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 |
---|---|---|---|---|---|---|
Sort the coupons by start date. We use this repo in the main page of the website. | List<Coupon> findByOrderByStartDateDesc(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void sortByDateOpen() {\n //selection sort\n for (int i = 0; i < size - 1; i++) {\n int earliestDateIndex = i;\n for (int j = i + 1; j < size; j++)\n if (accounts[j].getDateOpen().compareTo(accounts[earliestDateIndex].getDateOpen()) < 0) {\n earliestDateIndex = j;\n }\n Account acc = accounts[earliestDateIndex];\n accounts[earliestDateIndex] = accounts[i];\n accounts[i] = acc;\n }\n }",
"private void sortByDateOpen() { // sort in ascending order\n\t\tint numAccounts = size;\n\t\tDate firstDateOpen;\n\t\tDate secondDateOpen;\n\t\t\n\t\tfor (int i = 0; i < numAccounts-1; i++) {\n\t\t\t\n\t\t\t\n\t\t\tint min_idx = i;\n\t\t\t\n\t\t\t\n\t\t\tfor (int j = i+1; j < numAccounts; j++) {\n\t\t\t\t\n\t\t\t\t// Retrieve last name of two that you are comparing\n\t\t\t\tfirstDateOpen = accounts[j].getDateOpen();\n\t\t\t\tsecondDateOpen = accounts[min_idx].getDateOpen();\n\t\t\t\t\n\t\t\t\tif (firstDateOpen.compareTo(secondDateOpen) < 0) {\n\t\t\t\t\tmin_idx = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tAccount temp = accounts[min_idx];\n\t\t\taccounts[min_idx] = accounts[i];\n\t\t\taccounts[i] = temp;\n\t\t}\n\t\t\n\t}",
"private void sortByDateOpen() {\r\n\t\tfor ( int i = 0; i < size-1; i++ ) {\r\n\t\t\tint minIndex = i; \r\n\t\t\tfor ( int j = i + 1; j < size; j++) { \r\n\t\t\t\t//returns -1 if the date is less than\r\n\t\t\t\tif ( accounts[j].getDateOpen().compareTo(accounts[minIndex].getDateOpen()) == -1 ) {\r\n\t\t\t\t\tminIndex = j;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tAccount temp = accounts[minIndex];\r\n\t\t\taccounts[minIndex] = accounts[i];\r\n\t\t\taccounts[i] = temp;\r\n\t\t}\r\n\t\treturn;\r\n\t}",
"public void sortCompetitors(){\n\t\t}",
"public void sortBasedYearService();",
"@Override\n\t\t\t\tpublic int compare(PackageSubscription o1, PackageSubscription o2) {\n\t\t\t\t\treturn o2.getEndDate().compareTo(o1.getEndDate());\n\t\t\t\t}",
"public void sortByDate(){\n output.setText(manager.display(true, \"date\"));\n }",
"@Override\n\t/**\n\t * Returns all Coupons with end date up to value method received as an array\n\t * list sorted descended\n\t */\n\tpublic Collection<Coupon> getCouponsByDate(Date date, int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupons via prepared statement\n\t\t\tString getCouponsByEndDateSQL = \"select * from coupon where end_date < ? and id in(select couponid from compcoupon where companyid = ?) order by end_date desc\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponsByEndDateSQL);\n\t\t\t// Set date variable that method received into prepared statement\n\t\t\tpstmt.setDate(1, getSqlDate(date));\n\t\t\tpstmt.setInt(2, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}",
"@Test\n\tpublic void shouldReturnOnlyFirstPageSortedByDueDateAsc()\n\t{\n\t\tfinal SearchPageData<B2BDocumentModel> result = pagedB2BDocumentDao.getAllPagedDocuments(\n\t\t\t\tcreatePageableData(0, 2, \"byDueDateAsc\"), Collections.singletonList(AccountSummaryAddonUtils\n\t\t\t\t\t\t.createFilterByCriteriaObject(StringUtils.EMPTY, StringUtils.EMPTY)));\n\n\t\tTestCase.assertEquals(2, result.getResults().size());\n\n\t\tfinal B2BDocumentModel b2bDocumentModel1 = result.getResults().get(0);\n\t\tfinal B2BDocumentModel b2bDocumentModel2 = result.getResults().get(1);\n\t\tTestCase.assertEquals(DOCUMENT_NUMBER_CRN_005, b2bDocumentModel1.getDocumentNumber());\n\t\tTestCase.assertEquals(DOCUMENT_NUMBER_CRN_006, b2bDocumentModel2.getDocumentNumber());\n\n\t\tTestCase.assertEquals(\"2013-07-07\", sdf.format(b2bDocumentModel1.getDueDate()));\n\t\tTestCase.assertEquals(\"2013-07-08\", sdf.format(b2bDocumentModel2.getDueDate()));\n\t}",
"private void sortDateList(List<Date> dateList) {\n Collections.sort(dateList);\n }",
"private void sortDate()\n {\n for(int i = 0; i < movieList.size(); i++){\n for(int j = 1; j < movieList.size() - i; j++)\n {\n Movie a = movieList.get(j-1);\n Movie b = movieList.get(j);\n int result = a.getReleaseDate().compareTo(b.getReleaseDate());\n if( result < 0)\n {\n movieList.set(j-1, b);\n movieList.set(j, a);\n }\n else if(result == 0)\n {\n result = a.getTitle().compareTo(b.getTitle());\n if(result > 0)\n {\n movieList.set(j-1, b);\n movieList.set(j, a);\n }\n }\n }\n }\n }",
"public void sort(){\n listOperation.sort(Comparator.comparingInt(Operation::getiStartTime));\n }",
"private ArrayList<Task> sortByDate(ArrayList<Task> toSort) {\n ArrayList<Task> sorted = new ArrayList<>();\n\n toSort = removeNoTimeTask(toSort);\n\n int size = toSort.size();\n for (int i = 0; i < size; i++) {\n Date earliest = new Date(Long.MAX_VALUE);\n int earliestIndex = -1;\n for (int j = 0; j < toSort.size(); j++) {\n if (toSort.get(j).getClass().equals(Deadline.class)) {\n Deadline temp = (Deadline) toSort.get(j);\n if (temp.getTime().before(earliest)) {\n earliest = temp.getTime();\n earliestIndex = j;\n }\n } else if (toSort.get(j).getClass().equals(Event.class)) {\n Event temp = (Event) toSort.get(j);\n if (temp.getTime().before(earliest)) {\n earliest = temp.getTime();\n earliestIndex = j;\n }\n } else if (toSort.get(j).getClass().equals(Period.class)) {\n Period temp = (Period) toSort.get(j);\n if (temp.getStart().before(earliest)) {\n earliest = temp.getStart();\n earliestIndex = j;\n }\n }\n }\n\n sorted.add(toSort.get(earliestIndex));\n toSort.remove(earliestIndex);\n }\n return sorted;\n }",
"public void sortBasedPendingJobs();",
"public static JwComparator<AcUspsInternationalCgrReplyOffer> getEffectiveStartUtcDtComparator()\n {\n return AcUspsInternationalCgrReplyOfferTools.instance.getEffectiveStartUtcDtComparator();\n }",
"public void liste()\n {\n Collections.sort(listOrder, new Comparator<Order>() {\n @Override\n public int compare(Order o1, Order o2) {\n return o1.getStart() - o2.getStart(); // use your logic, Luke\n }\n });\n System.out.println(\"LISTE DES ORDRES\\n\");\n System.out.format(\"%8s %8s %5s %13s\", \"ID\", \"DEBUT\", \"DUREE\", \"PRIX\\n\");\n System.out.format(\"%8s %8s %5s %13s\", \"--------\", \"-------\", \"-----\", \"----------\\n\");\n for(int i = 0; i< listOrder.size(); i++) {\n Order order = listOrder.get(i);\n afficherOrdre(order);\n }\n System.out.format(\"%8s %8s %5s %13s\", \"--------\", \"-------\", \"-----\", \"----------\\n\");\n }",
"public void sortHub(List<Page> result) {\n\t\tCollections.sort(result, new Comparator<Page>() {\n\t\t\tpublic int compare(Page p1, Page p2) {\n\t\t\t\t// Sorts by 'TimeStarted' property\n\t\t\t\treturn p1.hub < p2.hub ? -1 : p1.hub > p2.hub ? 1 : secondaryOrderSort(p1, p2);\n\t\t\t}\n\n\t\t\t// If 'TimeStarted' property is equal sorts by 'TimeEnded' property\n\t\t\tpublic int secondaryOrderSort(Page p1, Page p2) {\n\t\t\t\treturn p1.getLocation().compareToIgnoreCase(p2.getLocation()) < 1 ? -1\n\t\t\t\t\t\t: p1.getLocation().compareToIgnoreCase(p2.getLocation()) > 1 ? 1 : 0;\n\t\t\t}\n\t\t});\n\t}",
"public PriceComparator()\n\t{\n\t\tascending=true;\n\t}",
"@Override\n public List<Client> clientsSortedByMoneySpent(){\n log.trace(\"clientsSortedByMoneySpent -- method entered\");\n Iterable<Client> clients = clientRepository.findAll();\n List<Client> result = StreamSupport.stream(clients.spliterator(),false).sorted(Comparator.comparing(Client::getMoneySpent).reversed()).collect(Collectors.toList());\n log.trace(\"clientsSortedByMoneySpent: result={}\", result);\n return result;\n }",
"@Override\n protected Comparator<? super UsagesInFile> getRefactoringIterationComparator() {\n return new Comparator<UsagesInFile>() {\n @Override\n public int compare(UsagesInFile o1, UsagesInFile o2) {\n int result = comparePaths(o1.getFile(), o2.getFile());\n if (result != 0) {\n return result;\n }\n int imports1 = countImports(o1.getUsages());\n int imports2 = countImports(o2.getUsages());\n return imports1 > imports2 ? -1 : imports1 == imports2 ? 0 : 1;\n }\n\n private int comparePaths(PsiFile o1, PsiFile o2) {\n String path1 = o1.getVirtualFile().getCanonicalPath();\n String path2 = o2.getVirtualFile().getCanonicalPath();\n return path1 == null && path2 == null ? 0 : path1 == null ? -1 : path2 == null ? 1 : path1.compareTo(path2);\n }\n\n private int countImports(Collection<UsageInfo> usages) {\n int result = 0;\n for (UsageInfo usage : usages) {\n if (FlexMigrationUtil.isImport(usage)) {\n ++result;\n }\n }\n return result;\n }\n };\n }",
"@Repository\npublic interface CouponRepository extends JpaRepository<Coupon , Integer> {\n\n /**\n * This method finds specific coupon by using the company id and the title of coupon.\n * @param companyId of the company that create this coupon\n * @param title of the coupon\n * @return Coupon object\n */\n Coupon findByCompanyIdAndTitle(int companyId, String title);\n\n\n /**\n * This method find coupon by company id.\n * The method helps us to get all of the coupons of specific company.\n * @param companyId of the relevant company\n * @return List of all the company coupons.\n */\n List<Coupon> findByCompanyId(int companyId);\n\n /**\n * Find all the coupons until the inserted date.\n * @param date defines the coupons list by the inserted date.\n * @return list of all the coupons until the inserted date.\n */\n List<Coupon> findByEndDateBefore(Date date);\n\n /**\n * The method finds the coupons with the id and the category that the company inserted.\n * @param companyId of the logged in company.\n * @param category of the coupon.\n * @return a Coupon list by categories that the user or the company inserted.\n */\n List<Coupon> findByCompanyIdAndCategory(int companyId, Category category);\n\n /**\n * The method finds the coupons with the id and the price that the company inserted.\n * @param companyId of the logged in company.\n * @param price of the coupon.\n * @return a Coupon list by price that the user or the company inserted.\n */\n List<Coupon> findByCompanyIdAndPriceLessThanEqual(int companyId, double price);\n\n /**\n * This repo responsible to get coupons by category.\n * @param category of the coupons will be shown.\n * @return list of the relevant coupons.\n */\n List<Coupon> findByCategory(Category category);\n\n /**\n * This repo responsible to get coupons by maximum price.\n * @param maxPrice of the coupons will be shown.\n * @return list of the relevant coupons.\n */\n List<Coupon> findByPrice(double maxPrice);\n\n /**\n * Sort the coupons by start date.\n * We use this repo in the main page of the website.\n * @return sorted list of the coupons.\n */\n List<Coupon> findByOrderByStartDateDesc();\n\n\n /**\n * Sort the coupons by the most purchased coupons.\n * We use this repo in the main page of the website.\n * @return sorted list of the most popular coupons.\n */\n @Query(value = \"SELECT coupons_id FROM customers_coupons ORDER BY coupons_id ASC\", nativeQuery = true)\n List<Integer> findByPopularity();\n\n /**\n * Get all coupons that contains the search word.\n * @param searchWord that the user search for.\n * @return list of the filtered coupons.\n */\n List<Coupon> findByTitleContaining(String searchWord);\n\n /**\n * Count all the coupons in the data base.\n * @return number of the coupons in the database.\n */\n @Query(value = \"SELECT COUNT(*) FROM coupons\", nativeQuery = true)\n int countAllCoupons();\n\n /**\n * Count all the purchased coupons.\n * @return number of the purchased coupons.\n */\n @Query(value = \"SELECT COUNT(*) FROM customers_coupons\", nativeQuery = true)\n int countAllCouponsPurchased();\n\n /**\n * Count all the coupons of specific company.\n * @param companyId of the coupons\n * @return number of the counted coupons.\n */\n int countByCompanyId(int companyId);\n\n /**\n * Count all the coupons that purchased of specific company.\n * @param companyId of the coupons.\n * @return number of the counted coupons.\n */\n @Query(value = \"SELECT COUNT(*) FROM customers_coupons AS cvc INNER JOIN coupons AS c On cvc.coupons_id = c.id WHERE company_id = ?1\" , nativeQuery = true)\n int countAllCouponsPurchasedByCompany(int companyId);\n\n\n\n}",
"@Test\n void sortByDate() {\n }",
"@Override\n\tprotected String getDefaultOrderBy() {\n\t\treturn \"date asc\";\n\t}",
"public void getAllPurchasedCouponsByDate(Date date) throws DBException\n {\n\t customerDBDAO.getAllPurchasedCouponsByDate(date);\n }",
"public void sort() {\n\n try {\n if (cards != null) {\n cards.sort(Comparator.comparing(Flashcard::getRepetitionDate));\n LogHelper.writeToLog(Level.INFO, \"Karten von Model.Deck \" + name + \" sortiert.\");\n\n } else {\n LogHelper.writeToLog(Level.INFO, \"Karten von Model.Deck \" + name + \" nicht sortiert (null).\");\n }\n } catch (Exception ex) {\n LogHelper.writeToLog(Level.INFO, \"Fehler beim Sortieren der Karten\" + ex);\n }\n }",
"@Test\n public void testShipment_Sorted_By_Date() {\n List<Widget> widgets = shipment.getWidgetsSortedByDate();\n assertNotNull(widgets);\n assertTrue(widgets.size() == 10);\n Widget widget1 = (Widget) widgets.get(0);\n Widget widget2 = (Widget) widgets.get(1);\n assertTrue(widget1.getColor().compareTo(widget2.getColor()) <= 0);\n }",
"public void sortAuthority(List<Page> result) {\n\t\tCollections.sort(result, new Comparator<Page>() {\n\t\t\tpublic int compare(Page p1, Page p2) {\n\t\t\t\t// Sorts by 'TimeStarted' property\n\t\t\t\treturn p1.hub < p2.hub ? -1 : p1.hub > p2.hub ? 1 : secondaryOrderSort(p1, p2);\n\t\t\t}\n\n\t\t\t// If 'TimeStarted' property is equal sorts by 'TimeEnded' property\n\t\t\tpublic int secondaryOrderSort(Page p1, Page p2) {\n\t\t\t\treturn p1.getLocation().compareToIgnoreCase(p2.getLocation()) < 1 ? -1\n\t\t\t\t\t\t: p1.getLocation().compareToIgnoreCase(p2.getLocation()) > 1 ? 1 : 0;\n\t\t\t}\n\t\t});\n\t}",
"List<Coupon> findByEndDateBefore(Date date);",
"public static void main(String[] args) {\n List l = new ArrayList();\r\n\tl.add(Month.SEP);\r\n\tl.add(Month.MAR);\r\n\tl.add(Month.JUN);\r\n\tSystem.out.println(\"\\nList before sort : \\n\" + l);\r\n\tCollections.sort(l);\r\n\tSystem.out.println(\"\\nList after sort : \\n\" + l);\r\n }",
"@Override\n\tpublic List<mOrders> getListOrderByDueDate(String DueDate) {\n\t\ttry{\n\t\t\tbegin();\n\t\t\tCriteria criteria = getSession().createCriteria(mOrders.class);\n\t\t\tcriteria.add(Restrictions.eq(\"O_DueDate\", DueDate));\n\t\t\t\n\t\t\tCriterion status1 = Restrictions.eq(\"O_Status_Code\", Constants.ORDER_STATUS_ARRIVED_BUT_NOT_DELIVERIED);\n\t\t\tCriterion status2 = Restrictions.eq(\"O_Status_Code\", Constants.ORDER_STATUS_NOT_IN_ROUTE);\n\t\t\t\n\t\t\tLogicalExpression orExp = Restrictions.or(status1, status2);\n\t\t\t\n\t\t\tcriteria.add(orExp);\n\t\t\t\n\t\t\tList<mOrders> o= criteria.list();\n\t\t\tcommit();\n//\t\t\tfor(int i=0; i<o.size(); i++){\n//\t\t\t\tSystem.out.println(name()+\"::getListOrderByDueDate--\"+o.get(i).toString());\n//\t\t\t}\n\t\t\treturn o;\n\t\t} catch (HibernateException e){\n\t\t\te.printStackTrace();\n\t\t\trollback();\n\t\t\tclose();\n\t\t\treturn null;\n\t\t}finally {\n\t\t\tflush();\n\t\t\tclose();\n\t\t}\n\t}",
"@Override\n public void onSortByDate() {\n mSorter.sortLocationsByDate(mListLocations);\n mAdapter.notifyDataSetChanged();\n }",
"public ArrayList<Event> sortByDate() {\n\t\tArrayList<Event>calendarSortedByDate = new ArrayList();\n\t\tfor(int j = 0; j<calendar.size(); j++) {\n\t\t\tcalendarSortedByDate.add(calendar.get(j));\n\t\t\t\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < calendarSortedByDate.size() - 1; i++) {\n\t\t // Find the minimum in the list[i..list.size-1]\n\t\t Event currentMin = calendarSortedByDate.get(i);\n\t\t int currentMinIndex = i;\n\n\t\t for (int j = i + 1; j < calendarSortedByDate.size(); j++) {\n\t\t if (currentMin.compareDate(calendarSortedByDate.get(j)) > 0) {\n\t\t currentMin = calendarSortedByDate.get(j);\n\t\t currentMinIndex = j;\n\t\t }\n\t\t }\n\n\t\t // Swap list[i] with list[currentMinIndex] if necessary;\n\t\t if (currentMinIndex != i) {\n\t\t \t calendarSortedByDate.set(currentMinIndex, calendarSortedByDate.get(i));\n\t\t \t calendarSortedByDate.set(i, currentMin);\n\t\t }\n\t\t }\n\t\treturn calendarSortedByDate;\n\t}",
"public static void sortEvents(){\n if(events.size()>0){\n Comparator<Event> comp = new Comparator<Event>(){\n public int compare(Event e1, Event e2){\n if(e1.getEventStartTime().before(e2.getEventStartTime())){\n return -1;\n }\n else if(e1.getEventStartTime().after(e2.getEventStartTime())){\n return 1;\n }\n else{\n return 0;\n }\n }\n \n };\n Collections.sort(events, comp);\n \n }}",
"LiveData<List<Task>> getSortedTasks(LocalDate startDate,\r\n LocalDate endDate);",
"public void sortAppointments() {\n reminders = sort(reminders);\n followup = sort(followup);\n }",
"@Override\n public Sort getDefaultSort() {\n return Sort.add(SiteConfineArea.PROP_CREATE_TIME, Direction.DESC);\n }",
"public List topologicalSort( Vertex startat ){\r\n return this.topologicalsorting.traverse( startat );\r\n }",
"@Override\n\tpublic int compare(Concepto o1, Concepto o2) {\n\t\treturn o1.getFecha_Fin().compareTo(o2.getFecha_Fin());\n\t}",
"public static void sortActivities() {\n Activity.activitiesList.sort(new Comparator<Activity>() {\n @Override\n public int compare(Activity activity, Activity t1) {\n if (activity.getStartTime().isAfter(t1.getStartTime())) {\n return 1;\n }\n else if (activity.getStartTime().isBefore(t1.getStartTime())){\n return -1;\n }\n else {\n return 0;\n }\n }\n });\n }",
"@Override\n public void sortCurrentList(FileSortHelper sort) {\n }",
"public List<JifendianzibiOrder> conditionPageOrder(int start, int pageSize,\n\t\t\tString loginId, String number, Date date1, Date date2) {\n\t\treturn fenhongMapper.conditionPageOrder(start, pageSize, loginId, number, date1, date2);\n\t}",
"@Override\n public List<Client> clientsSortedAlphabetically(){\n log.trace(\"clientsSortedAlphabetically -- method entered\");\n Iterable<Client> clients = clientRepository.findAll();\n List<Client> result = StreamSupport.stream(clients.spliterator(),false).sorted(Comparator.comparing(Client::getName)).collect(Collectors.toList());\n log.trace(\"clientsSortedAlphabetically: result={}\", result);\n return result;\n\n }",
"public ListUtilities cocktailSort(){\n\t\tboolean swaps = true;\n\t\tListUtilities temp = new ListUtilities();\n\t\t\n\t\twhile(swaps == true){\n\t\t\t//no swaps to begin with\n\t\t\tswaps = false;\n\n\t\t\t//if not end of list\n\t\t\tif (this.nextNum != null){\n\t\t\t\t\n\t\t\t\t//make temp point to next\n\t\t\t\ttemp = this.nextNum;\n\n\t\t\t\t//if b is greater than c\n\t\t\t\tif(this.num > this.nextNum.num){\n\t\t\t\t\t//it swapped\n\t\t\t\t\tswaps = true;\n\t\t\t\t\t\n\t\t\t\t\tswapF(temp);\n\t\t\t\t}\n\t\t\t//keep going until you hit end of list\n\t\t\ttemp.cocktailSort();\n\t\t\t}\n\t\t\t//if not beginning of list\n\t\t\tif (this.prevNum != null){\n\t\t\t\t//if c is smaller than b\n\t\t\t\tif(this.num < this.prevNum.num){\n\t\t\t\t\t//it swapped\n\t\t\t\t\tswaps = true;\n\t\t\t\t\tswapB(temp);\n\t\t\t\t}\n\t\t\t\t//keep going until hit beginning of list\n\t\t\t\ttemp.cocktailSort();\n\t\t\t}\n\t\t}\n\t//return beginning of list\n\treturn this.returnToStart();\n\t}",
"public static JwComparator<AcUspsInternationalCgrWorkLegFlightConflictSummaryVo> getMinEffectiveStartUtcDtComparator()\n {\n return AcUspsInternationalCgrWorkLegFlightConflictSummaryVoTools.instance.getMinEffectiveStartUtcDtComparator();\n }",
"public Collection<Coupon> getCouponByDate(Date date) throws DbException;",
"private void sortByDate(List<Entry> entries) {\n\t\t\n\t\tCollections.sort(entries, new Comparator<Entry>() {\n\t\t\tpublic int compare(Entry o1, Entry o2) {\n\t\t\t if (o1.getTimestamp() == null || o2.getTimestamp() == null)\n\t\t\t return 0;\n\t\t\t return o1.getTimestamp().compareTo(o2.getTimestamp());\n\t\t\t }\n\t\t\t});\n\t}",
"public void sortLibrary() {\n libraries.sort(Comparator.comparingLong(Library::getSignupCost));\n\n //J-\n// libraries.sort((o1, o2) -> Long.compare(\n// o2.getCurrentScore() - (2 * o2.getDailyShipCapacity() * o2.getSignupCost()),\n// o1.getCurrentScore() - (2 * o1.getDailyShipCapacity() * o1.getSignupCost())\n// ));\n\n// libraries.sort((o1, o2) -> Long.compare(\n// (o2.getBooksCount() + o2.getSignupCost()) * o2.getDailyShipCapacity(),\n// (o1.getBooksCount() + o1.getSignupCost()) * o1.getDailyShipCapacity()));\n //J+\n }",
"private static void performSort(TestApp testApp) {\n testApp.testPartition();\n\n /*\n Date end = new Date();\n System.out.println(\"Sort ended @ \" + end.getTime());\n System.out.println(\"Total time = \" + (end.getTime() - start.getTime())/1000.0 + \" seconds...\");\n */\n }",
"public Collection<String> getStartCodons() {\n\t\t\treturn startCodons;\n\t\t}",
"@Test(dependsOnMethods = \"verifyInvoiceSortTest\")\r\n\tpublic void verifySchedDateSortTest() throws InterruptedException {\n\t\tcarrierschedulepayment.clickschdateColumn();\r\n\t\t// click first row to expand\r\n\t\tcarrierschedulepayment.clickFirstRow();\r\n\t\t// get the data elements from the first row displayed\r\n\t\tfirstRowData = carrierschedulepayment.getFirstRowData();\r\n\t\tAssert.assertTrue(firstRowData.size() > 0, \"No data rows found when sorting by date\");\r\n\t\t// click LoadID Column to change sort from ascending to descending\r\n\t\tcarrierschedulepayment.clickschdateColumn();\r\n\t\t// click first row to expand\r\n\t\tcarrierschedulepayment.clickFirstRow();\r\n\t\t// get the data elements from the first row displayed\r\n\t\tlastRowData = carrierschedulepayment.getFirstRowData();\r\n\t\t// compare to the database when sorted by given column-Descending\r\n\t\t// if (carrierschedulepayment.getRowCount() > 1)\r\n\t\t// Assert.assertNotEquals(firstRowData, lastRowData,\r\n\t\t// \"First Row Data: \\n\" + firstRowData + \"\\nLast Row Data: \\n\" + lastRowData);\r\n\t}",
"public void sortFinalsList() {\n \n Course course = null;\n int j = 0;\n for (int i = 1; i < finalsList.size(); i++) {\n\n j = i;\n // checks to see if the start time of the element j is less than the\n // previous element, and if j > 0\n while (j > 0) {\n\n // if the current element, is less than the previous, then....\n if (finalsList.get(j).getDate()\n .compareTo(finalsList.get(j - 1).getDate()) < 0) {\n\n // if so, swap the two\n course = finalsList.get(j);\n finalsList.set(j, finalsList.get(j - 1));\n finalsList.set(j - 1, course);\n }\n else if (finalsList.get(j).getDate()\n .compareTo(finalsList.get(j - 1).getDate()) == 0) {\n \n if (compareTimes(finalsList.get(j).getBeginTime(), finalsList.get(j - 1).getBeginTime()) < 0) {\n \n // if so, swap the two\n course = finalsList.get(j);\n finalsList.set(j, finalsList.get(j - 1));\n finalsList.set(j - 1, course);\n }\n }\n\n // decrement j\n j--;\n }\n }\n }",
"public void sortDeadline(List<Chore> chores){\n Collections.sort(chores, new Comparator<Chore>() {\n @Override\n public int compare(Chore chore, Chore t1) {\n return chore.getDeadline().compareTo(t1.getDeadline());\n }\n });\n }",
"private List<Order> sortReadyOrders() throws SQLException {\n\t\tList<Order> nonFastFoodOrders = new LinkedList<Order>();\n\t\tList<Order> fastFoodOrders = new LinkedList<Order>();\n\t\tList<Order> sortedOrders = new LinkedList<Order>();\n\n\t\tfor (int i = 0; i < getReadyOrders().size(); i++) {\n\t\t\tfor (int j = 0; j < getReadyOrders().get(i).getOrderL().size(); j++) {\n\t\t\t\tif (getReadyOrders().get(i).getOrderL().get(j).getFood().getType().equalsIgnoreCase(\"fast food\")) {\n\t\t\t\t\tfastFoodOrders.add(getReadyOrders().get(i));\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tnonFastFoodOrders.add(getReadyOrders().get(i));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tsortedOrders.addAll(fastFoodOrders);\n\t\tsortedOrders.addAll(nonFastFoodOrders);\n\t\treturn sortedOrders;\n\t}",
"public ArrayList<Question> getQuestionsSortedByDate() {\n \t\tArrayList<Question> sortedQuestions = this.getQuestions();\n \n \t\tCollections.sort(sortedQuestions, new DateComparator());\n \n \t\treturn sortedQuestions;\n \t}",
"public JwComparator<AcGlobalDomesticActualMarketCache> getEffectiveStartDtComparatorNullsLower()\n {\n return EffectiveStartDtComparatorNullsLower;\n }",
"@Override\n public int compare(Date date1, Date date2) {\n if (date1.getDay() < date2.getDay() || date1.getMonth() < date2.getMonth() || date1.getYear() < date2.getYear())\n return -1;\n\n else if (date1.getDay() > date2.getDay() || date1.getMonth() > date2.getMonth() || date1.getYear() > date2.getYear())\n return 1;\n\n return 0;\n\n //Finally sort wins according to the -1, 0, 1 ascending order\n }",
"public FastNondominatedSorting() {\r\n\t\tthis(new ParetoDominanceComparator());\r\n\t}",
"public void sort() {\r\n int k = start;\r\n for (int i = 0; i < size - 1; i++) {\r\n int p = (k + 1) % cir.length;\r\n for (int j = i + 1; j < size; j++) {\r\n if ((int) cir[p] < (int) cir[k % cir.length]) {\r\n Object temp = cir[k];\r\n cir[k] = cir[p];\r\n cir[p] = temp;\r\n }\r\n p = (p + 1) % cir.length;\r\n }\r\n k = (k + 1) % cir.length;\r\n }\r\n }",
"public org.drip.analytics.date.JulianDate firstCouponDate()\n\t{\n\t\ttry {\n\t\t\treturn new org.drip.analytics.date.JulianDate (_lsPeriod.get (0).endDate());\n\t\t} catch (java.lang.Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn null;\n\t}",
"@Test(priority = 7)\n\tpublic void validateSortingByDate() {\n\t\tlog = Logger.getLogger(HeroImageProducttestscripts.class);\n\t\tLogReport.getlogger();\n\t\tlogger = extent.startTest(\"Validating the Sorting functionality\");\n\t\tHeroImageProductPageFlow.selectSortingDropdown(0, locator);\n\t\theroImg.validateDate(1, locator, validate);\n\t\tHeroImageProductPageFlow.selectSortingDropdown(1, locator);\n\t\theroImg.validateDate(2, locator, validate);\n\t\tlog.info(\"sorting is correct\");\n\t}",
"List<Sppprm> exportPrimesJourToPaie(List<Pointage> pointagesOrderedByDateAsc);",
"public static void sortFeedbacksByDateCreated(List<Feedback> feedbacks) {\n Collections.sort(feedbacks, SORT_COMMENTS_BY_DATE_CREATED);\n }",
"@Override\n public void sort() {\n\n List<Doctor> unsortedDocs = this.doctors;\n\n Collections.sort(unsortedDocs, new Comparator<Doctor>() {\n @Override\n public int compare(Doctor a, Doctor b) {\n //Compare first name for doctors and re-arrange list\n return a.getFirstName().compareTo(b.getFirstName());\n }\n });\n \n this.doctors = unsortedDocs;\n\n }",
"private void sortParents() {\n String[] MonthsArray = getResources().getStringArray(R.array.months);//gets an array that contains all the months\n Calendar cal = Calendar.getInstance();\n int monthPosition = cal.get(Calendar.MONTH);//gets the current month as an integer to be used as a position (ie. November would be 10)\n int i = monthPosition;//will be used to iterate, starting at the current month\n\n //After i reaches 11 (December) it's next loop will cause it to reset to 0 (January) and fill in the months before the current one\n do {\n if (i <= 11)\n ParentList.add(MonthsArray[i++]);\n else\n i = 0;\n } while (i != monthPosition); // will stop once it reaches the current month\n }",
"List<Spprim> exportPrimesMoisToPaie(List<VentilPrime> ventilPrimeOrderedByDateAsc);",
"List<Sppprm> exportPrimesCalculeesJourToPaie(List<PointageCalcule> pointagesCalculesOrderedByDateAsc);",
"public void sort() {\n ListNode start = head;\n ListNode position1;\n ListNode position2;\n\n // Going through each element of the array from the second element to the end\n while (start.next != null) {\n start = start.next;\n position1 = start;\n position2 = position1.previous;\n // Checks if previous is null and keeps swapping elements backwards till there\n // is an element that is bigger than the original element\n while (position2 != null && (position1.data < position2.data)) {\n swap(position1, position2);\n numberComparisons++;\n position1 = position2;\n position2 = position1.previous;\n }\n }\n }",
"@Override\n public LinkedList<String> orderAlphabetically(){\n LinkedList<String> stringLL = super.orderAlphabetically();\n stringLL.add(\"Years Until Tenure: \" + m_yearsUntilTenure);\n Collections.sort(stringLL);\n return stringLL;\n }",
"PriorityQueue<Ride> orderRidesByPriceAscending(Set<Ride> rides){\n return new PriorityQueue<>(rides);\n }",
"private void sortTravelContactsByCitizenship() {\n Collections.sort(this.contacts, new Comparator<User>(){\n public int compare(User obj1, User obj2) {\n // ## Ascending order\n return obj1.getSortingStringName().compareToIgnoreCase(obj2.getSortingStringName());\n }\n });\n }",
"private void sortAndNotify() {\n Collections.sort(todoDBList, listComparator);\n adapter.notifyDataSetChanged();\n }",
"private static void sortHelperMSD(String[] asciis, int start, int end, int index) {\n // Optional MSD helper method for optional MSD radix sort\n return;\n }",
"private void sort() {\n setFiles(getFileStreamFromView());\n }",
"public interface CouponRepository extends JpaRepository<Coupon, Long> {\n public Coupon findFirstByUid(Long uid);\n\n @Query(\"from Coupon c where c.uid = ?1 and c.expireDate>=?2 order by c.availableDate desc\")\n public List<Coupon> findAvailableCoupons(Long uid, Date date);\n\n @Query(\"from Coupon c where c.uid = ?1 and c.expireDate<?2 order by c.availableDate desc\")\n public List<Coupon> findExpiredCoupons(Long uid, Date date);\n\n @Query(\"from Coupon c where c.uid = ?1 and c.usageCondition <= ?2 and c.expireDate >?3 and c.hasUsed<>true and c.locked <> true order by c.amount desc, c.availableDate asc\")\n public List<Coupon> findFirstByAmountAndExpireDate(Long uid, Long price, Date date, Pageable pageable);\n}",
"public void listSort() {\n\t\tCollections.sort(cd);\n\t}",
"private void getToppingList() {\n compositeDisposable.add(mcApi.getMyCay(Common.TOPPING_MENU_ID)\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(new Consumer<List<mycay>>() {\n @Override\n public void accept(List<mycay> mycays) throws Exception {\n Common.toppingList=mycays;\n }\n\n }));\n }",
"public void sortareDesc(List<Autor> autoriList){\n\t\tboolean ok;\t\t\t\t \n\t\tdo { \n\t\t ok = true;\n\t\t for (int i = 0; i < autoriList.size() - 1; i++)\n\t\t if (autoriList.get(i).getNrPublicatii() < autoriList.get(i+1).getNrPublicatii()){ \n\t\t \t Autor aux = autoriList.get(i);\t\t//schimbarea intre autori\n\t\t \t Autor aux1 = autoriList.get(i+1);\t\n\t\t \t try {\n\t\t \t\t \trepo.schimbareAutori(aux,aux1);\n\t\t\t } catch (Exception e) {\n\t\t\t System.out.println(e.getMessage());\n\t\t\t }\n\t\t\t\t ok = false;\n\t\t\t}\n\t\t}\n\t while (!ok);\n\t }",
"public void sortGivenArray_date(){\n movieList = mergeSort(movieList);\n }",
"public void sort() {\n Collections.sort(tasks);\n }",
"public void SortByPrice() {\n for (int i = 1; i < LastIndex; i++) {\n int x = i;\n while (x >= 1) {\n if (ForChild[x - 1].getPrice() > ForChild[x].getPrice()) {\n Confectionery sweets = ForChild[x - 1];\n ForChild[x - 1] = ForChild[x];\n ForChild[x] = sweets;\n\n }\n x -= 1;\n }\n }\n }",
"private GeofenceInfoContent[] sortByDate(GeofenceInfoContent[] geofenceInfoContents){\n GeofenceInfoContent infoContent = null;\n for(int j = 0; j < geofenceInfoContents.length; j++) {\n for (int i = 0; i < geofenceInfoContents.length; i++) {\n infoContent = geofenceInfoContents[i];\n if (i < geofenceInfoContents.length - 1) {\n String year1 = infoContent.getYear();\n String year2 = geofenceInfoContents[i + 1].getYear();\n int year1Int = Integer.parseInt(year1);\n int year2Int = Integer.parseInt(year2);\n if (year1Int < year2Int) {\n geofenceInfoContents[i] = geofenceInfoContents[i + 1];\n geofenceInfoContents[i + 1] = infoContent;\n }\n }\n }\n }\n return geofenceInfoContents;\n }",
"public void sortQueries(){\n\t\tif (queries == null || queries.isEmpty()) {\n\t\t\treturn;\n\t\t} else {\n\t\t Collections.sort(queries, new Comparator<OwnerQueryStatsDTO>() {\n @Override\n public int compare(OwnerQueryStatsDTO obj1, OwnerQueryStatsDTO obj2) {\n if(obj1.isArchived() && obj2.isArchived()) {\n return 0;\n } else if(obj1.isArchived()) {\n return 1;\n } else if(obj2.isArchived()) {\n return -1;\n } else {\n return 0;\n }\n }\n });\n\n\t }\n\t}",
"private void sortViewEntries() {\n runOnUiThread(new Runnable() {\n public void run() {\n try {\n Collections.sort(viewEntries, new DateComparator());\n } catch (final Exception ex) {\n // Log.i(\"sortViewEntries\", \"Exception in thread\");\n }\n }\n });\n }",
"public static void sortCompilationProposal(List<ICompletionProposal> prop){\r\n\t\tCollections.sort(prop,new Comparator<ICompletionProposal>(){\r\n\t\t\tpublic int compare(ICompletionProposal o1, ICompletionProposal o2){\r\n\t\t\t\treturn o1.getDisplayString().compareTo(o2.getDisplayString());\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"public void sortToDo(){\n\t\tCollections.sort(allToDoLists);\n\t}",
"private List<Article> orderArticles(List<Article> things){\n\t\t Comparator<Article> comparatorPrizes = new Comparator<Article>() {\n\t public int compare(Article x, Article y) {\n\t return (int) (x.getPrize() - y.getPrize());\n\t }\n\t };\n\t Collections.sort(things,comparatorPrizes); \n\t Collections.reverse(things);\n\t return things;\n\t }",
"public static void printAllEventListInSortedOrder(){\n sortEvents();\n for(int i=0;i<events.size();i++){\n System.out.println((events.get(i).getMonth()+1)+\"/\"+events.get(i).getDate()+\"/\"+events.get(i).getYear()+\" \"+events.get(i).getStringStartandFinish()+\" \"+events.get(i).getEventTitle());\n }\n }",
"@Override\n public int compareTo(SmartDate o) {\n return this.date.compareTo(o.date);\n }",
"@Override\n public int compare(Todo td1, Todo td2) {\n\n // if td1 is null, then it should come after td2\n if (td1.getDueDate() == null && td2.getDueDate()!= null) {\n return GREATER;\n }\n // if td2 is null, then it should come after td1\n if (td1.getDueDate() != null && td2.getDueDate() == null) {\n return LESS;\n }\n // if both null, they are equal\n if (td1.getDueDate() == null && td2.getDueDate() == null) {\n return EQUAL;\n }\n // else, make into date object\n String td1Due = td1.getDueDate();\n String td2Due = td2.getDueDate();\n String[] td1DateRes = td1Due.split(\"/\");\n String[] td2DateRes = td2Due.split(\"/\");\n\n // Not caring about invalid formatting yet here\n // if both not null ,we create a date object, and let it compare themselves\n Date td1Date = new Date(td1DateRes[MONTH_INDEX],td1DateRes[DAY_INDEX],td1DateRes[YEAR_INDEX]);\n Date td2Date = new Date(td2DateRes[MONTH_INDEX],td2DateRes[DAY_INDEX],td2DateRes[YEAR_INDEX]);\n\n return td1Date.compareTo(td2Date);\n }",
"@Override\r\n\tpublic List<Evento> listarDisponivelPorDataAsc() {\n\t\treturn repository.findByFimAfterToday(sortByInicioAsc());\r\n\t}",
"public OrdersByOrderDate() {\n this.title = \"*** View Orders by order date ***\";\n }",
"public static List<FlickrFeedResponse.Item> sortByDateTaken(List<FlickrFeedResponse.Item> list){\n\n Collections.sort(list, new FlickrFeedResponse.Item.DateTakenComparator());\n\n return list;\n }",
"private void sortCourses() {\n ctrl.sortCourses().forEach(System.out::println);\n }",
"public Timestamp getDateOrdered();",
"public List<Tarif> sortTarifsByCallCost() {\n\t\tList<Tarif> sortedTarifs = new ArrayList<>(tarifs);\n\t\tCollections.sort(sortedTarifs, new Comparator<Tarif>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Tarif tarif1, Tarif tarif2) {\n\t\t\t\tif(tarif1.getCallCost() == tarif2.getCallCost())\n\t\t\t\t\treturn 0;\n\t\t\t\treturn (tarif1.getCallCost() > tarif2.getCallCost()) ? 1 : -1;\n\t\t\t}\n\t\t});\n\t\treturn sortedTarifs;\n\t}",
"public void sortKnowledgeBase()\n {\n int i;\n Random random;\n String aPredicate;\n StringTokenizer tokenizer;\n //------------\n random = new Random();\n i = 0;\n while (i < knowledgeBase.size())\n {\n aPredicate = knowledgeBase.get(i).commitments.get(0).predicate;\n tokenizer = new StringTokenizer(aPredicate,\"(), \");\n if(tokenizer.nextToken().equals(\"secuencia\"))\n knowledgeBase.get(i).priority = random.nextInt(100);\n //end if\n else\n knowledgeBase.get(i).priority = random.nextInt(10000);\n //end else\n i = i + 1;\n }//end while\n Collections.sort(knowledgeBase);\n }",
"public void sort() {\n }",
"@Override\n\t\t\t\tpublic int compare(StatisticsItemData o1, StatisticsItemData o2) {\n\t\t\t\t\treturn o2.getDate().compareTo(o1.getDate());\n\t\t\t\t}",
"public void sortEvents() {\n\t\tCollections.sort(events);\n\t}",
"public synchronized void firstSort(){\n Process temp;\n for(int j = 0; j<queue.length;j++){\n temp = null;\n for(int i = 0; i<pros.proSize(); i++){\n if(i==0){\n temp = new Process((pros.getPro(i)));\n }else if(temp.getArrivalTime() == pros.getPro(i).getArrivalTime()){\n if(temp.getId() > pros.getPro(i).getId()){\n temp = pros.getPro(i);\n }\n }else if (temp.getArrivalTime() > pros.getPro(i).getArrivalTime()){\n temp = pros.getPro(i);\n }\n }\n queue[j] = temp;\n pros.remove(temp.getId());\n }\n for(int i = 0; i< queue.length; i++){\n pros.addPro(queue[i]);\n }\n }"
]
| [
"0.60745364",
"0.5994526",
"0.5935631",
"0.5873463",
"0.5624386",
"0.5535461",
"0.5414848",
"0.54054177",
"0.54009134",
"0.53427",
"0.5326349",
"0.5300954",
"0.5289064",
"0.5273316",
"0.5264747",
"0.5248581",
"0.5220104",
"0.5198169",
"0.51755816",
"0.5144539",
"0.5118448",
"0.51176596",
"0.51166594",
"0.50990427",
"0.50814366",
"0.5076509",
"0.5046911",
"0.5038578",
"0.50289094",
"0.5025164",
"0.50023097",
"0.49685955",
"0.4950079",
"0.4939425",
"0.49138173",
"0.49079362",
"0.4904842",
"0.4898339",
"0.48905823",
"0.4890576",
"0.48850685",
"0.48795965",
"0.48794237",
"0.48770624",
"0.4870092",
"0.48691142",
"0.486249",
"0.48548967",
"0.4852093",
"0.48501682",
"0.48473138",
"0.48461705",
"0.48418212",
"0.48202556",
"0.48167813",
"0.48110384",
"0.4806514",
"0.4803815",
"0.4800532",
"0.479892",
"0.47812736",
"0.47804198",
"0.47786218",
"0.47612754",
"0.47593763",
"0.47480536",
"0.47402877",
"0.47370225",
"0.472524",
"0.4718997",
"0.47187316",
"0.47102374",
"0.46965867",
"0.46865043",
"0.46767205",
"0.46766177",
"0.46746355",
"0.46715173",
"0.46680984",
"0.4665791",
"0.46630552",
"0.46615067",
"0.46613204",
"0.4650279",
"0.46486732",
"0.464538",
"0.4635469",
"0.4630998",
"0.46283028",
"0.46273774",
"0.46269515",
"0.46267867",
"0.462629",
"0.4616149",
"0.4615348",
"0.46115372",
"0.46104386",
"0.46003526",
"0.45958933",
"0.45946267"
]
| 0.5930805 | 3 |
Sort the coupons by the most purchased coupons. We use this repo in the main page of the website. | @Query(value = "SELECT coupons_id FROM customers_coupons ORDER BY coupons_id ASC", nativeQuery = true)
List<Integer> findByPopularity(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void sortLibrary() {\n libraries.sort(Comparator.comparingLong(Library::getSignupCost));\n\n //J-\n// libraries.sort((o1, o2) -> Long.compare(\n// o2.getCurrentScore() - (2 * o2.getDailyShipCapacity() * o2.getSignupCost()),\n// o1.getCurrentScore() - (2 * o1.getDailyShipCapacity() * o1.getSignupCost())\n// ));\n\n// libraries.sort((o1, o2) -> Long.compare(\n// (o2.getBooksCount() + o2.getSignupCost()) * o2.getDailyShipCapacity(),\n// (o1.getBooksCount() + o1.getSignupCost()) * o1.getDailyShipCapacity()));\n //J+\n }",
"public void sortCompetitors(){\n\t\t}",
"public CountryList sortByCountDesc() {\n\t\tCountryList sorted = new CountryList();\n\t\tfor (int i = 0; i < this.nextAvailable; i++)\n\t\t\tsorted.binInsertDesc(new Country(this.countries.get(i)));\n\t\tsorted.totalCount = this.totalCount;\n\t\treturn sorted;\n\t}",
"public CountryList sortByCount() {\n\t\tCountryList sorted = new CountryList();\n\t\tfor (int i = 0; i < this.nextAvailable; i++)\n\t\t\tsorted.binInsert(new Country(this.countries.get(i)));\n\t\tsorted.totalCount = this.totalCount;\n\t\treturn sorted;\n\t}",
"@Override\n public int compareTo(Coupon o) {\n int toReturn=0;\n if(provider.compareTo(o.getProvider())>0){\n toReturn=1;\n }else if(provider.compareTo(o.getProvider())<0){\n toReturn=-1;\n }else {\n if (nameOfProduct.compareTo(o.getNameOfProduct())>0){\n toReturn=1;\n }else if(nameOfProduct.compareTo(o.getNameOfProduct())<0){\n toReturn=-1;\n }else {\n if(priceOfProduct>o.getPriceOfProduct()){\n toReturn=1;\n }else if(priceOfProduct<o.getPriceOfProduct()){\n toReturn=-1;\n }else {\n if(rateOfDiscount>o.getRateOfDiscount()){\n toReturn=1;\n }else if(rateOfDiscount<o.getRateOfDiscount()){\n toReturn=-1;\n }else{\n if(expirationPeriod>o.getExpirationPeriod()){\n toReturn=1;\n }else if(expirationPeriod<o.getExpirationPeriod()) {\n toReturn=-1;\n }else {\n if (Boolean.compare(isUsed,o.isUsed())>0){\n toReturn=1;\n }else if(Boolean.compare(isUsed,o.isUsed())<0){\n toReturn=-1;\n }else {\n toReturn=0;\n }\n }\n }\n }\n }\n }\n return toReturn;\n }",
"private void printCustomerCouponsByMaxPrice(CustomerService customerService) \n\t\t\t\t\t\tthrows DBOperationException\n\t{\n\t\tList<Coupon> coupons;\n\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\tSystem.out.println(\"Enter maximum price to filter coupons:\");\n\t\tString maxPriceStr = scanner.nextLine();\n\t\tdouble maxPrice;\n\t\ttry\n\t\t{\n\t\t\tmaxPrice = Double.parseDouble(maxPriceStr);\n\t\t}\n\t\tcatch(NumberFormatException e)\n\t\t{\n\t\t\tSystem.out.println(\"Invalid input\");\n\t\t\treturn;\n\t\t}\n\t\tcoupons = customerService.getCustomerCoupons(maxPrice);\n\t\tSystem.out.println(customerService.getClientMsg());\n\t\tif(coupons == null)\n\t\t{\n\t\t\tSystem.out.println(\"Error retrieving coupons\");\n\t\t\treturn;\n\t\t}\n\t\tif(coupons.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"This customer has no coupons below this price\");\n\t\t\treturn;\n\t\t}\n//\t\tSystem.out.println(coupons.size()+\" coupons found for this customer below this price\");\n\t\tfor(Coupon currCoupon : coupons)\n\t\t\tSystem.out.println(currCoupon);\n\t}",
"public void SortByPrice() {\n for (int i = 1; i < LastIndex; i++) {\n int x = i;\n while (x >= 1) {\n if (ForChild[x - 1].getPrice() > ForChild[x].getPrice()) {\n Confectionery sweets = ForChild[x - 1];\n ForChild[x - 1] = ForChild[x];\n ForChild[x] = sweets;\n\n }\n x -= 1;\n }\n }\n }",
"@Override\n\t/**\n\t * Returns all Coupons with price less than value method received as an\n\t * array list sorted descended\n\t */\n\tpublic Collection<Coupon> getCouponsByPrice(int price, int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupons via prepared statement\n\n\t\t\tString getCouponsByPriceSQL = \"select * from coupon where price < ? and id in(select couponid from compcoupon where companyid = ?) order by price desc\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponsByPriceSQL);\n\t\t\t// Set price variable that method received into prepared statement\n\t\t\tpstmt.setInt(1, price);\n\t\t\tpstmt.setInt(2, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}",
"public void sortByFuelConsumption(){\n for (int d = carPark.getCars().size() / 2; d >= 1; d /= 2)\n for (int i = d; i < carPark.getCars().size(); i++)\n for (int j = i; j >= d && carPark.getCars().get(j-d).getFuelConsumption() > carPark.getCars().get(j).getFuelConsumption(); j -= d) {\n Car temp = carPark.getCars().get(j);\n carPark.getCars().remove(j);\n carPark.getCars().add(j - 1, temp);\n }\n }",
"public Collection<Coupon> getAllPurchasedCoupons() {\r\n\t\treturn db.getCustomer(cust).getCouponHistory();\r\n\t}",
"private List<Article> orderArticles(List<Article> things){\n\t\t Comparator<Article> comparatorPrizes = new Comparator<Article>() {\n\t public int compare(Article x, Article y) {\n\t return (int) (x.getPrize() - y.getPrize());\n\t }\n\t };\n\t Collections.sort(things,comparatorPrizes); \n\t Collections.reverse(things);\n\t return things;\n\t }",
"public static void main(String[] args) {\n\t\tList<Product> prodList = new ArrayList<>();\n\t\tprodList.add(new Product(12, \"Refrigerator\", \"Whirlpool\", 43000.00f));\n\t\tprodList.add(new Product(16, \"Mobile\", \"Samsung\", 18000.00f));\n\t\tprodList.add(new Product(11, \"Laptop\", \"Lenovo\", 28300.00f));\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"Before Sorting\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\tCollections.sort(prodList);\n\t\t\n\t\tSystem.out.println(\"After Sorting\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\tProductNameComparator pnc = new ProductNameComparator();\n\t\tCollections.sort(prodList, pnc);\n\t\t\n\t\tSystem.out.println(\"After Sorting as per name\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\tCollections.sort(prodList,Collections.reverseOrder());\n\t\t\n\t\tSystem.out.println(\"After Sorting as per desc id\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\tCollections.sort(prodList,Collections.reverseOrder(pnc));\n\t\t\n\t\tSystem.out.println(\"After Sorting as per desc name\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\t\n\t\tCollections.sort(prodList, (p1,p2)-> p1.getPrice()>p2.getPrice()?1:-1 );\n\t\tSystem.out.println(\"After Sorting as per price\");\n\t\tprodList.forEach(p->System.out.println(p));\n\t\t\n\t\tCollections.sort(prodList, (p1,p2)-> p1.getPrice()<p2.getPrice()?1:-1 );\n\t\tSystem.out.println(\"After Sorting as per desc price\");\n\t\tprodList.forEach(System.out::println);\n\t\t\n\t}",
"private void sortCourses() {\n ctrl.sortCourses().forEach(System.out::println);\n }",
"List<Product> getTop5ProductsByQuantitySold();",
"@Override\n\tpublic void sortDeck() {\n\t\tfor(int i = 0; i < getCount() - 1; i++) {\n\t\t\tfor(int j = i + 1; j < getCount(); j++) {\n\t\t\t\tif(aktuellesDeck[i].compareTo(aktuellesDeck[j]) == 1) {\n\t\t\t\t\tSkatCard speicherCard = new SkatCard(aktuellesDeck[i].getSuit(), aktuellesDeck[i].getRank());\n\t\t\t\t\taktuellesDeck[i] = null;\n\t\t\t\t\taktuellesDeck[i] = new SkatCard(aktuellesDeck[j].getSuit(), aktuellesDeck[j].getRank());\n\t\t\t\t\taktuellesDeck[j] = null;\n\t\t\t\t\taktuellesDeck[j] = new SkatCard(speicherCard.getSuit(), speicherCard.getRank());\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}",
"public void sortGlobalAccountBalances()\n\t{\n\t\tCollections.sort(globalAccountBalances, new GlobalAccountBalanceBean.GlobalAccountBalanceBeanComparator());\n\t}",
"public List<Tarif> sortTarifsByCallCost() {\n\t\tList<Tarif> sortedTarifs = new ArrayList<>(tarifs);\n\t\tCollections.sort(sortedTarifs, new Comparator<Tarif>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Tarif tarif1, Tarif tarif2) {\n\t\t\t\tif(tarif1.getCallCost() == tarif2.getCallCost())\n\t\t\t\t\treturn 0;\n\t\t\t\treturn (tarif1.getCallCost() > tarif2.getCallCost()) ? 1 : -1;\n\t\t\t}\n\t\t});\n\t\treturn sortedTarifs;\n\t}",
"public void sortByGiftCardAmounts(ArrayList sortedList) {\r\n Collections.sort(sortedList, GIFT_CARD_AMOUNT_COMPARATOR);\r\n }",
"public void sortByPopularity() {\n Log.d(Contract.TAG_WORK_PROCESS_CHECKING, \"ListPresenter - sortByPopularity\");\n\n listInteractor.sortByPopularity(new ListCallback() {\n @Override\n public void setPhotosList(List<BasePojo.Result> photosList) {\n Log.d(Contract.TAG_WORK_PROCESS_CHECKING, \"ListPresenter - ListCallback - setPhotosList\");\n getViewState().setData(photosList);\n }\n });\n }",
"public void showLargestComponent()\n {\n System.out.println(\"The most sociable community: \");\n\n Iterable<User> usersList = service.getLargestComponent();\n for(User u : usersList)\n System.out.println(u.toString());\n }",
"public Collection<Coupon> getCompanyCoupons(double maxPrice) {\n return couponRepo.findCouponsByCompanyIDAndPriceLessThanEqual(this.companyID, maxPrice);\n }",
"private static List<String> getTopNCompetitors(int numCompetitors,\n int topNCompetitors, \n List<String> competitors,\n int numReviews,\n List<String> reviews) {\n\t\t\n\t\t HashMap<String, Integer> map = new HashMap<>();\n\t\t for(String comp : competitors){\n\t map.put(comp.toLowerCase(),0);\n\t }\n\t\t\n\t for(String sentence : reviews){\n\t String[] words = sentence.split(\" \"); // get all the words in one sentence and put them in a String array \n\t for(String word : words){\n\t if(map.containsKey(word.toLowerCase())) { // check if map has any of the words (competitor name). if yes increase its value\n\t map.put(word.toLowerCase(), map.get(word.toLowerCase()) + 1);\n\t }\n\t }\n\t }\n\t \n\t PriorityQueue<String> pq =new PriorityQueue<>((String i1,String i2)->{ \n\t return map.get(i1)-map.get(i2); \n\t });\n\t for(String key:map.keySet()){\n\t pq.add(key);\n\t if(pq.size()>topNCompetitors) pq.poll();\n\t }\n\t List<String> result=new ArrayList<>();\n\t while(!pq.isEmpty())\n\t result.add(pq.poll());\n\t \n\t Collections.reverse(result);\n\t \n\t return result; \n\t \n}",
"public static void main(String[] args) {\n ArrayList<BankAccount> accounts = makeBankingSystem();\n \n Collections.sort(accounts, BankAccount.createComparatorByBalance(false));\n for (BankAccount c: accounts){\n System.out.println(c.getName(c)+\", \"+c.getBalance(c));\n \n }\n \n}",
"public void sort()\n\t{\n\t\tfor(int i=0;i<bowlers.size()-1;i++)\n\t\t{\n\t\t\tfor(int j=i+1;j<bowlers.size();j++)\n\t\t\t{\n\t\t\t\tif(bowlers.get(i).getBall()<bowlers.get(j).getBall())\n\t\t\t\t{\n\t\t\t\t\tBowler bowler=bowlers.get(i);\n\t\t\t\t\tbowlers.set(i,bowlers.get(j));\n\t\t\t\t\tbowlers.set(j,bowler);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;i<bowlers.size();i++)\n\t\t{\n\t\tSystem.out.println(bowlers.get(i).getBall());\n\t\t}\n\t}",
"public ArrayList<Coupon> getCompanyCoupons(double maxPrice) throws SQLException {\r\n\t\tArrayList<Coupon> coupons = couponsDAO.getAllCoupons();\r\n\t\tArrayList<Coupon> coups = new ArrayList<>();\r\n\t\tfor (Coupon coupon : coupons) {\r\n\t\t\tif (companyID == coupon.getCompanyID())\r\n\t\t\t\tif (coupon.getPrice() <= maxPrice)\r\n\t\t\t\t\tcoups.add(coupon);\r\n\t\t}\r\n\t\treturn coups;\r\n\t}",
"private void sortChannelsTypeFaculty(List<Channel> channels) {\n Collections.sort(channels, new Comparator<Channel>() {\n public int compare(Channel c1, Channel c2) {\n int res = c1.getType().compareTo(c2.getType());\n if (res != 0) {\n return res;\n }\n if (c1.getType().equals(ChannelType.LECTURE)) {\n res = ((Lecture) c1).getFaculty().compareTo(((Lecture) c2).getFaculty());\n if (res != 0) {\n return res;\n }\n }\n return c1.getName().compareToIgnoreCase(c2.getName());\n }\n });\n }",
"private void sortTravelContactsByCitizenship() {\n Collections.sort(this.contacts, new Comparator<User>(){\n public int compare(User obj1, User obj2) {\n // ## Ascending order\n return obj1.getSortingStringName().compareToIgnoreCase(obj2.getSortingStringName());\n }\n });\n }",
"public void sortBalance() {\n for (int i=0; i < accounts.size() - 1; i++) {\n int posicao_menor = i;\n \n for (int j=i + 1; j < accounts.size(); j++) { // Cada iteração vai acumulando (a esquerda) a área ordenada.\n if (accounts.get(j).getBalance() < accounts.get(posicao_menor).getBalance())\n posicao_menor = j;\n }\n \n // Troca (swap)\n BankAccount temp = accounts.get(i); \n accounts.set(i, accounts.get(posicao_menor)); \n accounts.set(posicao_menor, temp);\n }\n }",
"private static List<MoneyLoss> sortLosses(Collection<MoneyLoss> unsortedLosses)\n {\n //Sort budget items first on frequency and then alphabetically\n ArrayList<MoneyLoss> oneTimeItems = new ArrayList<MoneyLoss>();\n ArrayList<MoneyLoss> dailyItems = new ArrayList<MoneyLoss>();\n ArrayList<MoneyLoss> weeklyItems = new ArrayList<MoneyLoss>();\n ArrayList<MoneyLoss> biweeklyItems = new ArrayList<MoneyLoss>();\n ArrayList<MoneyLoss> monthlyItems = new ArrayList<MoneyLoss>();\n ArrayList<MoneyLoss> yearlyItems = new ArrayList<MoneyLoss>();\n\n for (MoneyLoss loss : unsortedLosses)\n {\n switch (loss.lossFrequency())\n {\n case oneTime:\n {\n oneTimeItems.add(loss);\n break;\n }\n case daily:\n {\n dailyItems.add(loss);\n break;\n }\n case weekly:\n {\n weeklyItems.add(loss);\n break;\n }\n case biWeekly:\n {\n biweeklyItems.add(loss);\n break;\n }\n case monthly:\n {\n monthlyItems.add(loss);\n break;\n }\n case yearly:\n {\n yearlyItems.add(loss);\n break;\n }\n }\n }\n\n Comparator<MoneyLoss> comparator = new Comparator<MoneyLoss>() {\n @Override\n public int compare(MoneyLoss lhs, MoneyLoss rhs) {\n return lhs.expenseDescription().compareTo(rhs.expenseDescription());\n }\n };\n\n Collections.sort(oneTimeItems, comparator);\n Collections.sort(dailyItems, comparator);\n Collections.sort(weeklyItems, comparator);\n Collections.sort(biweeklyItems, comparator);\n Collections.sort(monthlyItems, comparator);\n Collections.sort(yearlyItems, comparator);\n\n ArrayList<MoneyLoss> sortedItems = new ArrayList<MoneyLoss>();\n BadBudgetApplication.appendItems(sortedItems, oneTimeItems);\n BadBudgetApplication.appendItems(sortedItems, dailyItems);\n BadBudgetApplication.appendItems(sortedItems, weeklyItems);\n BadBudgetApplication.appendItems(sortedItems, biweeklyItems);\n BadBudgetApplication.appendItems(sortedItems, monthlyItems);\n BadBudgetApplication.appendItems(sortedItems, yearlyItems);\n\n return sortedItems;\n }",
"public void setCoupJouer(int coupJouer) {\n this.coupJouer = coupJouer;\n }",
"public void getAllPurchasedCoupons() throws DBException\n {\n\t customerDBDAO.getCoupons();\n }",
"public void sort()\n {\n\tstrack.sort((Node n1, Node n2) ->\n\t{\n\t if (n1.getCost() < n2.getCost()) return -1;\n\t if (n1.getCost() > n2.getCost()) return 1;\n\t return 0;\n\t});\n }",
"public static void sortByPopular(){\n SORT_ORDER = POPULAR_PATH;\n }",
"private void sortChannelsType(List<Channel> channels) {\n Collections.sort(channels, new Comparator<Channel>() {\n public int compare(Channel c1, Channel c2) {\n int res = c1.getType().compareTo(c2.getType());\n if (res != 0) {\n return res;\n }\n return c1.getName().compareToIgnoreCase(c2.getName());\n }\n });\n }",
"@Override\n public List<Client> clientsSortedByMoneySpent(){\n log.trace(\"clientsSortedByMoneySpent -- method entered\");\n Iterable<Client> clients = clientRepository.findAll();\n List<Client> result = StreamSupport.stream(clients.spliterator(),false).sorted(Comparator.comparing(Client::getMoneySpent).reversed()).collect(Collectors.toList());\n log.trace(\"clientsSortedByMoneySpent: result={}\", result);\n return result;\n }",
"private void ordenaLista(List<AgrupamentoTipoBean> valoresMap) {\n\t\tCollections.sort(valoresMap, new Comparator<AgrupamentoTipoBean>() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic int compare(AgrupamentoTipoBean o1, AgrupamentoTipoBean o2) {\n\t\t\t\treturn o1.getQuantidade() > o2.getQuantidade() ? -1 : +1;\n\t\t\t}\n\t\t\t\n\t\t});\n\t}",
"void comparatorSort() {\n Collections.sort(vendor, Vendor.sizeVendor); // calling collection sort method and passing list and comparator variables\r\n for (HDTV item : vendor) { //looping arraylist\r\n System.out.println(\"Brand: \" + item.brandname + \" Size: \" + item.size);\r\n }\r\n }",
"private void sortChannelsName(List<Channel> channels) {\n Collections.sort(channels, new Comparator<Channel>() {\n public int compare(Channel c1, Channel c2) {\n return c1.getName().compareToIgnoreCase(c2.getName());\n }\n });\n }",
"public void sort()\n\t{\n\n\n\t\t// Sort the Product Inventory Array List (by Product Name)\n\t\tCollections.sort(myProductInventory);\n\n\n\n\n\t}",
"public void sortKnowledgeBase()\n {\n int i;\n Random random;\n String aPredicate;\n StringTokenizer tokenizer;\n //------------\n random = new Random();\n i = 0;\n while (i < knowledgeBase.size())\n {\n aPredicate = knowledgeBase.get(i).commitments.get(0).predicate;\n tokenizer = new StringTokenizer(aPredicate,\"(), \");\n if(tokenizer.nextToken().equals(\"secuencia\"))\n knowledgeBase.get(i).priority = random.nextInt(100);\n //end if\n else\n knowledgeBase.get(i).priority = random.nextInt(10000);\n //end else\n i = i + 1;\n }//end while\n Collections.sort(knowledgeBase);\n }",
"@Override\r\n\tpublic List<DrankB> findCommodityByTop() {\n\t\treturn pageMapper.findCommodityByTop();\r\n\t}",
"private static Artist[] sortAllPaintersBasedOnTheirCharge(Artist[] painterObject, int arrayCount) {\n\t\tif (arrayCount > 0) {\n\n\t\t\tSystem.out.println(\"sorting based on charges\");\n\t\t\tSystem.out.println(\"................................................\");\n\t\t\tfor (int i = 0; i < arrayCount; i++) {\n\t\t\t\tfor (int j = 0; j < arrayCount - i - 1; j++) {\n\t\t\t\t\tif (painterObject[j].getSqFeetCharge() > painterObject[j + 1].getSqFeetCharge()) {\n\t\t\t\t\t\tArtist temp = painterObject[j];\n\t\t\t\t\t\tpainterObject[j] = painterObject[j + 1];\n\t\t\t\t\t\tpainterObject[j + 1] = temp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n//display the data after sorting\n\t\t\tdisplay(painterObject, arrayCount);\n\n\t\t} else {\n\t\t\tSystem.out.println(\"There is no data in the database\");\n\t\t}\n\t\treturn painterObject;\n\t}",
"public void sortByQnNum() {\r\n\t\tfor (int j = 0; j < displayingList.size() - 1; j++) {\r\n\t\t\tfor (int i = 0; i < displayingList.size() - j - 1; i++) {\r\n\t\t\t\tif (displayingList.get(i).getQnNum() > displayingList.get(i + 1).getQnNum()) {\r\n\t\t\t\t\tswapPosition(displayingList, i, i + 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"List<Coupon> findByPrice(double maxPrice);",
"public void sortGivenArray_popularity() { \n int i, j, k; \n for(i = movieList.size()/2; i > 0; i /= 2) {\n for(j = i; j < movieList.size(); j++) {\n Movie key = movieList.get(j);\n for(k = j; k >= i; k -= i) {\n if(key.rents > movieList.get(k-i).rents) {\n movieList.set(k, movieList.get(k-i));\n } else {\n break; \n }\n }\n movieList.set(k, key);\n }\n } \n }",
"public void sortareDesc(List<Autor> autoriList){\n\t\tboolean ok;\t\t\t\t \n\t\tdo { \n\t\t ok = true;\n\t\t for (int i = 0; i < autoriList.size() - 1; i++)\n\t\t if (autoriList.get(i).getNrPublicatii() < autoriList.get(i+1).getNrPublicatii()){ \n\t\t \t Autor aux = autoriList.get(i);\t\t//schimbarea intre autori\n\t\t \t Autor aux1 = autoriList.get(i+1);\t\n\t\t \t try {\n\t\t \t\t \trepo.schimbareAutori(aux,aux1);\n\t\t\t } catch (Exception e) {\n\t\t\t System.out.println(e.getMessage());\n\t\t\t }\n\t\t\t\t ok = false;\n\t\t\t}\n\t\t}\n\t while (!ok);\n\t }",
"private void sortByWeight()\n\t{\n\t\tfor(int i=1; i<circles.size(); i++)\n\t\t{\n\t\t\tPVCircle temp = circles.get(i);\n\t\t\tint thisWeight = circles.get(i).getWeight();\n\t\t\tint j;\n\t\t\tfor(j=i-1; j>=0; j--)\n\t\t\t{\n\t\t\t\tint compWeight = circles.get(j).getWeight();\n\t\t\t\tif(thisWeight < compWeight)\n\t\t\t\t\tbreak;\n\t\t\t\telse\n\t\t\t\t\tcircles.set(j+1, circles.get(j));\n\t\t\t}\n\t\t\tcircles.set(j+1, temp);\n\t\t}\n\t\t\n\t}",
"public List<String>top10Utilizadores() {\n Map<String,List<String>> utilizadorEncomendas = new HashMap<String,List<String>>();\n \n for(Encomenda e : this.encomendas.values()) {\n if(!utilizadorEncomendas.containsKey(e.getCodigoUtilizador())) {\n utilizadorEncomendas.put(e.getCodigoUtilizador(), new ArrayList<>());\n }\n utilizadorEncomendas.get(e.getCodigoUtilizador()).add(e.getCodigoEncomenda());\n }\n \n // a partir do primeiro map criar um segundo com codigo de utilizador e numero de encomendas\n // a razao de ser um double é porque o mesmo comparator é também utilizado no metodo List<String>top10Transportadores()\n Map<String,Double> utilizadoresNumeroEncs = new HashMap<>();\n \n Iterator<Map.Entry<String, List<String>>> itr = utilizadorEncomendas.entrySet().iterator(); \n \n while(itr.hasNext()) { \n Map.Entry<String, List<String>> entry = itr.next(); \n utilizadoresNumeroEncs.put(entry.getKey(), Double.valueOf(entry.getValue().size()));\n }\n \n MapStringDoubleComparator comparator = new MapStringDoubleComparator(utilizadoresNumeroEncs);\n \n // criar map ordenado (descending)\n TreeMap<String, Double> utilizadorNumeroEncsOrdenado = new TreeMap<String, Double>(comparator);\n \n utilizadorNumeroEncsOrdenado.putAll(utilizadoresNumeroEncs);\n \n // retornar a lista de codigos de utilizadores pretendida\n return utilizadorNumeroEncsOrdenado.keySet()\n .stream()\n .limit(10)\n .collect(Collectors.toList()); \n }",
"public void sortElements(){\n\t\tgetInput();\n\t\tPeople[] all = countAndSort(people, 0, people.length-1);\n\t\t//PrintArray(all);\n\t\tSystem.out.println(InversionCount);\n\t}",
"public void sortScoresDescendently(){\n this.langsScores.sort((LangScoreBankUnit o1, LangScoreBankUnit o2) -> {\n return Double.compare(o2.getScore(),o1.getScore());\n });\n }",
"private void sortResults(){\r\n this.sortedPlayers = new ArrayList<>();\r\n int size = players.size();\r\n while (size > 0) {\r\n Player lowestPointsPlayer = this.players.get(0);\r\n for(int i = 0; i<this.players.size(); i++){\r\n if(lowestPointsPlayer.getPoints() <= this.players.get(i).getPoints()){\r\n lowestPointsPlayer = this.players.get(i);\r\n }\r\n }\r\n this.sortedPlayers.add(lowestPointsPlayer);\r\n this.players.remove(lowestPointsPlayer);\r\n size--;\r\n }\r\n\r\n\r\n }",
"@Repository\npublic interface CouponRepository extends JpaRepository<Coupon , Integer> {\n\n /**\n * This method finds specific coupon by using the company id and the title of coupon.\n * @param companyId of the company that create this coupon\n * @param title of the coupon\n * @return Coupon object\n */\n Coupon findByCompanyIdAndTitle(int companyId, String title);\n\n\n /**\n * This method find coupon by company id.\n * The method helps us to get all of the coupons of specific company.\n * @param companyId of the relevant company\n * @return List of all the company coupons.\n */\n List<Coupon> findByCompanyId(int companyId);\n\n /**\n * Find all the coupons until the inserted date.\n * @param date defines the coupons list by the inserted date.\n * @return list of all the coupons until the inserted date.\n */\n List<Coupon> findByEndDateBefore(Date date);\n\n /**\n * The method finds the coupons with the id and the category that the company inserted.\n * @param companyId of the logged in company.\n * @param category of the coupon.\n * @return a Coupon list by categories that the user or the company inserted.\n */\n List<Coupon> findByCompanyIdAndCategory(int companyId, Category category);\n\n /**\n * The method finds the coupons with the id and the price that the company inserted.\n * @param companyId of the logged in company.\n * @param price of the coupon.\n * @return a Coupon list by price that the user or the company inserted.\n */\n List<Coupon> findByCompanyIdAndPriceLessThanEqual(int companyId, double price);\n\n /**\n * This repo responsible to get coupons by category.\n * @param category of the coupons will be shown.\n * @return list of the relevant coupons.\n */\n List<Coupon> findByCategory(Category category);\n\n /**\n * This repo responsible to get coupons by maximum price.\n * @param maxPrice of the coupons will be shown.\n * @return list of the relevant coupons.\n */\n List<Coupon> findByPrice(double maxPrice);\n\n /**\n * Sort the coupons by start date.\n * We use this repo in the main page of the website.\n * @return sorted list of the coupons.\n */\n List<Coupon> findByOrderByStartDateDesc();\n\n\n /**\n * Sort the coupons by the most purchased coupons.\n * We use this repo in the main page of the website.\n * @return sorted list of the most popular coupons.\n */\n @Query(value = \"SELECT coupons_id FROM customers_coupons ORDER BY coupons_id ASC\", nativeQuery = true)\n List<Integer> findByPopularity();\n\n /**\n * Get all coupons that contains the search word.\n * @param searchWord that the user search for.\n * @return list of the filtered coupons.\n */\n List<Coupon> findByTitleContaining(String searchWord);\n\n /**\n * Count all the coupons in the data base.\n * @return number of the coupons in the database.\n */\n @Query(value = \"SELECT COUNT(*) FROM coupons\", nativeQuery = true)\n int countAllCoupons();\n\n /**\n * Count all the purchased coupons.\n * @return number of the purchased coupons.\n */\n @Query(value = \"SELECT COUNT(*) FROM customers_coupons\", nativeQuery = true)\n int countAllCouponsPurchased();\n\n /**\n * Count all the coupons of specific company.\n * @param companyId of the coupons\n * @return number of the counted coupons.\n */\n int countByCompanyId(int companyId);\n\n /**\n * Count all the coupons that purchased of specific company.\n * @param companyId of the coupons.\n * @return number of the counted coupons.\n */\n @Query(value = \"SELECT COUNT(*) FROM customers_coupons AS cvc INNER JOIN coupons AS c On cvc.coupons_id = c.id WHERE company_id = ?1\" , nativeQuery = true)\n int countAllCouponsPurchasedByCompany(int companyId);\n\n\n\n}",
"int getCouponListCount();",
"public static JwComparator<AcUspsInternationalClaim> getSubTotalComparator()\n {\n return AcUspsInternationalClaimTools.instance.getSubTotalComparator();\n }",
"public static ArrayList<FootballClub> sortClubsByGoals(ArrayList<FootballClub> guiSeasonFilteredClubs) {\n\n // comparator for sorting\n Comparator<FootballClub> comparator = (club1, club2) -> {\n\n if(club1.getTotalGoalsScored() < club2.getTotalGoalsScored()){\n return 1;\n }\n\n return -1;\n };\n\n // checks if clubs are present to sort\n if (guiSeasonFilteredClubs != null) {\n guiSeasonFilteredClubs.sort(comparator);\n\n }\n return guiSeasonFilteredClubs;\n }",
"public Collection<Customer> getTop3CustomerWithMoreComplaints() {\r\n\t\tfinal Collection<Customer> ratio = new ArrayList<>();\r\n\r\n\t\tfinal Collection<Customer> customersCompl = this.customerRepository.getTop3CustomerWithMoreComplaints();\r\n\t\tint i = 0;\r\n\t\tfor (final Customer c : customersCompl)\r\n\t\t\tif (i < 3) {\r\n\t\t\t\tratio.add(c);\r\n\t\t\t\ti++;\r\n\r\n\t\t\t}\r\n\t\treturn ratio;\r\n\t}",
"public void sort() {\n Card.arraySort(this.cards, this.topCard);\n }",
"private List<WifiConfiguration> sortConfigedAPs(List<WifiConfiguration> mconfig) {\n if (mconfig == null) {\n return null;\n }\n /* ascending sort by priority */\n Collections.sort(mconfig, new Comparator<WifiConfiguration>() {\n public int compare(WifiConfiguration a, WifiConfiguration b) {\n if (a.priority > b.priority) {\n return -1;\n } else if (a.priority < b.priority) {\n return 1;\n } else {\n return -1;\n }\n }\n });\n return mconfig;\n }",
"public void sortSubstrateSwitch() {\n\t\tCollections.sort(this.listNode, new Comparator<SubstrateSwitch>() {\n\t\t\t@Override\n\t\t\tpublic int compare(SubstrateSwitch o1, SubstrateSwitch o2) {\n\n\t\t\t\tif (o1.getType() > o2.getType())\n\t\t\t\t\treturn -1;\n\t\t\t\tif (o1.getType() < o2.getType())\n\t\t\t\t\treturn 1;\n\t\t\t\tif (o1.getType() == o2.getType()) {\n\t\t\t\t\tif (o1.getCpu() < o2.getCpu()) {\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t\tif (o1.getCpu() > o2.getCpu()) {\n\t\t\t\t\t\treturn -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t});\n\t}",
"private void sortOutlines() {\r\n Collections.sort(outlines, reversSizeComparator);\r\n }",
"private List<NewsArticle> getMostPopular() {\n LOGGER.log(Level.INFO, \"getMostPopular\");\n return newsService.getMostPopular();\n }",
"@Override\n public int compare(CostVector o1, CostVector o2) {\n int i = 0;\n while (i < o1.getCosts().length && o1.getCosts()[i] == o2.getCosts()[i]) {\n i++;\n }\n if (i != o1.getCosts().length) {\n return o1.getCosts()[i] > o2.getCosts()[i] ? 1 : -1;\n } else {\n return 0;\n }\n }",
"public void sort_crystals() {\n\t\tArrays.sort(identifiedArray, new SortByRating()); \n\t}",
"public static void sortByPlaceCount(List<Apartment> apartments) {\n Collections.sort(apartments, SORT_BY_PLACE_COUNT);\n }",
"public void sortPriceDescending() throws Exception {\n\n WebDriverWait wait=new WebDriverWait(driver, 20);\n WebElement dropdownList = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//option[@value='prce-desc']\")));\n dropdownList.click();\n\n Thread.sleep(5000);\n\n JavascriptExecutor javascriptExecutor = (JavascriptExecutor) driver;\n javascriptExecutor.executeScript(\"window.scrollBy(0,300)\");\n List<WebElement> price = driver.findElements(By.xpath(\"//span[@class='price ']\"));\n\n String priceListString;\n List<String> priceArrayList =new ArrayList<>();\n\n for (int i = 0; i < price.size(); i = i + 1) {\n\n priceListString = price.get(i).getText();\n\n String trimPriceListString = priceListString.replaceAll(\"Rs. \",\"\");\n String commaRemovedPriceList= trimPriceListString.replaceAll(\",\",\"\");\n priceArrayList.add(commaRemovedPriceList);\n\n }\n ArrayList<Float> priceList = new ArrayList<Float>();\n for (String stringValue : priceArrayList) {\n priceList.add(Float.parseFloat(stringValue));\n }\n if (descendingCheck(priceList)) {\n Reports.extentTest.log(Status.PASS, \"Verified Items displayed as Highest Price first \", MediaEntityBuilder.createScreenCaptureFromPath(takeScreenshot()).build());\n\n }\n else{\n Assert.fail(\"Item price not in descending order\");\n Reports.extentTest.log(Status.FAIL, \"Verified Items not displayed as Highest Price first \", MediaEntityBuilder.createScreenCaptureFromPath(takeScreenshot()).build());\n\n }\n\n }",
"public void sortChannels(List<Channel> channels) {\n if (channels != null) {\n // Check settings for preferred channel order.\n Settings settings = new SettingsDatabaseManager(context).getSettings();\n switch (settings.getChannelSettings()) {\n case ALPHABETICAL:\n sortChannelsName(channels);\n break;\n case TYPE:\n sortChannelsType(channels);\n break;\n case TYPE_AND_FACULTY:\n sortChannelsTypeFaculty(channels);\n break;\n }\n }\n }",
"@Override\n public int compare(Hive o1, Hive o2) {\n if ((o1 == null) && (o2 != null))\n return -1;\n else if ((o1 != null) && (o2 == null))\n return 1;\n else if ((o1 == null) && (o2 == null))\n return 0;\n\n int u1 = 0;\n int u2 = 0;\n\n if (HiveUserSubscriptions != null) {\n if ((HiveUserSubscriptions.containsKey(o1.getNameUrl())) && (HiveUserSubscriptions.get(o1.getNameUrl()) != null))\n u1 = HiveUserSubscriptions.get(o1.getNameUrl()).size();\n if ((HiveUserSubscriptions.containsKey(o2.getNameUrl())) && (HiveUserSubscriptions.get(o2.getNameUrl()) != null))\n u2 = HiveUserSubscriptions.get(o2.getNameUrl()).size();\n }\n\n int res = u2-u1;\n\n return ((res==0)?o1.getNameUrl().compareToIgnoreCase(o2.getNameUrl()):res);\n }",
"@Override\n\tpublic int compare(Product p1, Product p2) {\n\t\t\n\t\treturn p2.getReviewCount()*p2.getSaleCount()-p1.getReviewCount()*p1.getSaleCount();\n\t}",
"@Override\n\tpublic int compare(Coupon coupon, Coupon coupon2) {\n\t\t\n\tif (coupon.getCouponType().toString().equals(coupon2.getCouponType().toString())){\n\t\treturn coupon.getTitle().compareToIgnoreCase(coupon2.getTitle());\t\n\t}\n\t\t\n\t\treturn \tcoupon.getCouponType().toString().compareTo(coupon2.getCouponType().toString());\n\n\t}",
"hr.client.appuser.CouponCenter.AppCoupon getCouponList(int index);",
"public void sort() {\r\n // sort the process variables\r\n Arrays.sort(pvValues, categoryComparator);\r\n fireTableDataChanged();\r\n }",
"public void sort() {\n /*int jokers = this.getJokers();\n\t\tif (jokers > 0 && this.size() > 2) {\n\t\t\tArrayList<Tile> list = new ArrayList<>();\n for (int i=0; i<this.size(); i++) {\n\t\t\t\tif (this.get(i).getColour() == 'J') {\n\t\t\t\t\tTile joker = this.remove(this.get(i));\n\t\t\t\t\tlist.add(joker);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (Tile j : list) {\n\t\t\t\tthis.addInSort(j);\n\t\t\t}\n }*/\n \n\n //may need something in here to accomodate a joker changing its form\n\n if (tiles.size() > 1) { //will only sort a meld with any tiles in it\n //Override default comparator to compare by tile value (ints)\n Collections.sort(tiles, new Comparator<Tile>() {\n @Override \n public int compare(Tile t1, Tile t2) { \n if (t1.getColour() > t2.getColour()) {\n return 1;\n } else if (t1.getColour() < t2.getColour()) {\n return -1;\n }\n if (t1.getValue() > t2.getValue()) {\n return 1;\n } else if (t1.getValue() < t2.getValue()) {\n return -1;\n } else {\n return 0;\n }\n }\n });\n }\n\n }",
"public Collection<Customer> getTop3CustomerWithMoreComplaints() {\n\t\tfinal Collection<Customer> ratio = new ArrayList<>();\n\n\t\tfinal Collection<Customer> customersCompl = this.customerRepository.getTop3CustomerWithMoreComplaints();\n\t\tint i = 0;\n\t\tfor (final Customer c : customersCompl)\n\t\t\tif (i < 3) {\n\t\t\t\tratio.add(c);\n\t\t\t\ti++;\n\n\t\t\t}\n\t\treturn ratio;\n\t}",
"public void sortByTagCount() {\r\n this.addSortField(\"\", \"*\", SORT_DESCENDING, \"count\");\r\n }",
"public int compare(ClienteQuant c1,ClienteQuant c2){\n if(c1.getUnid()>=c2.getUnid()) return -1;\n\n return 1;\n }",
"static void billingCounter(int gifts[],int no_of_user){\n int gift_copy[]=gifts.clone();\n for(int pass=0; pass<no_of_user-1;pass++){\n int flag=0;\n for(int i=0;i<no_of_user-1-pass;i++){\n if(gift_copy[i]<gift_copy[i+1]){\n int temp=gift_copy[i];\n gift_copy[i]=gift_copy[i+1];\n gift_copy[i+1]=temp;\n flag=+1;\n }\n }\n if(flag==0){\n /* if flag becomes 0 means our array is now sorted so need to go further it is used to reduce the complexity */\n break;\n } \n }\n display(gifts,gift_copy,no_of_user); // calling the display function for displaying the output\n\n }",
"List<Coupon> findByOrderByStartDateDesc();",
"private void sortDice() {\r\n for (int index = 0; index < dice.size(); index++) {\r\n for (int subIndex = index; subIndex < dice.size(); subIndex++) {\r\n if (dice.get(subIndex).compareTo((dice.get(index))) > 0) {\r\n final Integer temp = dice.get(index);\r\n dice.set(index, dice.get(subIndex));\r\n dice.set(subIndex, temp);\r\n }\r\n }\r\n }\r\n }",
"public int candy(int[] ratings){\n\t\tint n = ratings.length;\n\t\tint[] pre_count = new int[n];\n\t\tfor(int i = 0; i < n; i ++)\n\t\t\tpre_count[i] = 0;\n\t\t\n\t\tfor(int i = 1; i < n; i ++){\n\t\t\tif (ratings[i] < ratings[i-1])\n\t\t\t\tpre_count[i-1] ++;\n\t\t\tif (ratings[i] > ratings[i-1])\n\t\t\t\tpre_count[i]++;\t\t\t\t\n\t\t}\n\t\tint[] candies = new int[n];\n\t\tLinkedList<Integer> topo_que = new LinkedList<Integer>();\n\t\tfor(int i = 0; i < n; i++)\n\t\t\tif (pre_count[i] == 0){\n\t\t\t\tcandies[i] = 1;\n\t\t\t\ttopo_que.add(i);\n\t\t\t}\n\t\twhile( ! topo_que.isEmpty()){\n\t\t\tint i = topo_que.removeFirst();\n\t\t\tif (i>0)\n\t\t\t\tif ( ratings[i] < ratings[i - 1]){\n\t\t\t\t\t// remove dependency\n\t\t\t\t\tpre_count[i-1] --;\n\t\t\t\t\t// update the candies\n\t\t\t\t\tif ( candies[i] + 1 > candies[i-1])\n\t\t\t\t\t\tcandies[i-1] = candies[i] + 1;\n\t\t\t\t\tif (pre_count[i-1] == 0)\n\t\t\t\t\t\ttopo_que.add(i-1);\n\t\t\t\t}\n\t\t\tif (i < n-1)\n\t\t\t\tif ( ratings[i] < ratings[i + 1]){\n\t\t\t\t\t// remove dependency\n\t\t\t\t\tpre_count[i+1] --;\n\t\t\t\t\t// update the candies\n\t\t\t\t\tif ( candies[i] + 1 > candies[i+1])\n\t\t\t\t\t\tcandies[i+1] = candies[i] + 1;\n\t\t\t\t\tif (pre_count[i+1] == 0)\n\t\t\t\t\t\ttopo_que.add(i+1);\n\t\t\t\t}\t\n\t\t}\n\t\tint sum = 0;\n\t\tfor(int i = 0; i < n ; i ++)\n\t\t\tsum += candies[i];\n\t\t\n\t\treturn sum;\n\t\n\n }",
"private void sortByPrice()\n {\n Collections.sort(foodList, new Comparator<FoodItem>() {\n @Override\n public int compare(FoodItem o1, FoodItem o2) {\n return o1.getItemPrice().compareTo(o2.getItemPrice());\n }\n });\n foodListAdapter.notifyDataSetChanged();\n }",
"public static ArrayList<FootballClub> sortClubsByPoints(ArrayList<FootballClub> guiSeasonFilteredClubs) {\n\n // comparator to sort the clubs by points\n Comparator<FootballClub> comparator = (club1, club2) -> {\n\n if(club1.getClubStatistics().getTotalPointsScored() == (club2.getClubStatistics()\n .getTotalPointsScored())){\n\n if(club1.getTotalGoalsScored() < club2.getTotalGoalsScored()){\n return 1;\n\n }\n\n }else{\n\n if(club1.getClubStatistics().getTotalPointsScored() < club2.getClubStatistics()\n .getTotalPointsScored()){\n return 1;\n\n }\n }\n return -1;\n };\n\n // sorting only if there are clubs to sort\n if (guiSeasonFilteredClubs != null) {\n guiSeasonFilteredClubs.sort(comparator);\n\n }\n\n return guiSeasonFilteredClubs;\n\n }",
"public void sortDescending()\r\n\t{\r\n\t\tList<Book> oldItems = items;\r\n\t\titems = new ArrayList<Book>(items);\r\n\t\tCollections.sort(items, Collections.reverseOrder());\r\n\t\tfirePropertyChange(\"books\", oldItems, items);\r\n\t}",
"@Override\r\n\t\t\tpublic int compare(Presentor o1, Presentor o2) {\n\t\t\t\tint sort = 0;\r\n\t\t\t\tint a = o1.getZs() - o2.getZs();\r\n\t\t\t\tif (a != 0) {\r\n\t\t\t\t\tsort = (a < 0) ? 1 : -1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\ta = o1.getJd() - o2.getJd();\r\n\t\t\t\t\tif (a != 0) {\r\n\t\t\t\t\t\tsort = (a < 0) ? 1 : -1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn sort;\r\n\t\t\t}",
"private void getToppingList() {\n compositeDisposable.add(mcApi.getMyCay(Common.TOPPING_MENU_ID)\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(new Consumer<List<mycay>>() {\n @Override\n public void accept(List<mycay> mycays) throws Exception {\n Common.toppingList=mycays;\n }\n\n }));\n }",
"@Override\n\t\t\tpublic int compare(Jugador j1, Jugador j2) {\n\t\t\t\treturn j1.valorDeCartas() - j2.valorDeCartas();\n\t\t\t}",
"public void sortiereTabelleSpiele() {\n sortListe.sort(new Comparator<Spiel>() {\n @Override\n public int compare(Spiel o1, Spiel o2) {\n /*int a=0,b=0;\n if(o1.getStatus()==0)\n {\n a-=100000;\n }\n if(o2.getStatus()==0)\n {\n b-=100000;\n }*/\n return o1.getZeitplanNummer() - o2.getZeitplanNummer();\n }\n });\n tabelle_spiele.setItems(sortListe);\n }",
"@Override\n\t/**\n\t * Returns all Coupons with end date up to value method received as an array\n\t * list sorted descended\n\t */\n\tpublic Collection<Coupon> getCouponsByDate(Date date, int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupons via prepared statement\n\t\t\tString getCouponsByEndDateSQL = \"select * from coupon where end_date < ? and id in(select couponid from compcoupon where companyid = ?) order by end_date desc\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponsByEndDateSQL);\n\t\t\t// Set date variable that method received into prepared statement\n\t\t\tpstmt.setDate(1, getSqlDate(date));\n\t\t\tpstmt.setInt(2, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}",
"public void sort() {\n\n try {\n if (cards != null) {\n cards.sort(Comparator.comparing(Flashcard::getRepetitionDate));\n LogHelper.writeToLog(Level.INFO, \"Karten von Model.Deck \" + name + \" sortiert.\");\n\n } else {\n LogHelper.writeToLog(Level.INFO, \"Karten von Model.Deck \" + name + \" nicht sortiert (null).\");\n }\n } catch (Exception ex) {\n LogHelper.writeToLog(Level.INFO, \"Fehler beim Sortieren der Karten\" + ex);\n }\n }",
"@Test(timeout = SHORT_TIMEOUT)\n public void testAdaptiveCocktailShakerSort() {\n //Test adaptiveness of completely ordered sort\n\n //Generate sorted array\n toSort = randArrDuplicates(MAX_ARR_SIZE, new Random(2110));\n Arrays.parallelSort(toSort, comp);\n sortedInts = cloneArr(toSort);\n\n comp.resetCount();\n Sorting.cocktailSort(sortedInts, comp);\n int numComparisons = comp.getCount();\n\n assertSorted(sortedInts, comp);\n\n //Should require only 1 pass through array, for n-1 comparisons\n assertTrue(\"Too many comparisons: \" + numComparisons,\n numComparisons <= MAX_ARR_SIZE - 1);\n\n //Check adaptiveness with 1 item out-of-order\n\n //Set up list\n toSort = new IntPlus[6];\n for (int i = 0; i < toSort.length; i++) {\n toSort[i] = new IntPlus(2 * i);\n }\n toSort[0] = new IntPlus(7);\n\n sortedInts = cloneArr(toSort);\n\n /*\n Initial Array: [7, 2, 4, 6, 8, 10]\n Forward pass: [ 2, 4, 6, *7, *8, *10]. 5 comparisons. Last swap at\n index 2, so starred items in order\n Backward pass: [ 2, 4, 6, *7, *8, *10]. 2 comparisons. Search ends\n */\n comp.resetCount();\n Sorting.cocktailSort(sortedInts, comp);\n numComparisons = comp.getCount();\n\n assertSorted(sortedInts, comp);\n\n assertTrue(\"Too many comparisons: \" + numComparisons,\n numComparisons <= 7);\n }",
"@Override\n protected Comparator<? super UsagesInFile> getRefactoringIterationComparator() {\n return new Comparator<UsagesInFile>() {\n @Override\n public int compare(UsagesInFile o1, UsagesInFile o2) {\n int result = comparePaths(o1.getFile(), o2.getFile());\n if (result != 0) {\n return result;\n }\n int imports1 = countImports(o1.getUsages());\n int imports2 = countImports(o2.getUsages());\n return imports1 > imports2 ? -1 : imports1 == imports2 ? 0 : 1;\n }\n\n private int comparePaths(PsiFile o1, PsiFile o2) {\n String path1 = o1.getVirtualFile().getCanonicalPath();\n String path2 = o2.getVirtualFile().getCanonicalPath();\n return path1 == null && path2 == null ? 0 : path1 == null ? -1 : path2 == null ? 1 : path1.compareTo(path2);\n }\n\n private int countImports(Collection<UsageInfo> usages) {\n int result = 0;\n for (UsageInfo usage : usages) {\n if (FlexMigrationUtil.isImport(usage)) {\n ++result;\n }\n }\n return result;\n }\n };\n }",
"public static void main(String args[]) {\n Order ord1 = new Order(101, 203.34f, \"11/19/2017\", \"11/20/2017\", \"Sony\");\n Order ord2 = new Order(102, 439.49f, \"11/19/2017\", \"11/20/2017\",\"Hitachi\");\n Order ord3 = new Order(103, 611.31f,\"11/19/2017\", \"11/20/2017\", \"Philips\");\n\n //putting Objects into Collection to sort\n List<Order> orders = new ArrayList<Order>();\n orders.add(ord3);\n orders.add(ord1);\n orders.add(ord2);\n orders.add(ord3);\n orders.add(ord1);\n\n //printing unsorted collection\n System.out.println(\"Unsorted Collection : \" + orders);\n\n UniqueList( orders );\n //Sorting Order Object on natural order - ascending\n Collections.sort(orders);\n\n //printing sorted collection\n System.out.println(\"List of UNIQUE Order object sorted in natural order : \" + orders);\n\n // Sorting object in descending order in Java\n Collections.sort(orders, Collections.reverseOrder());\n System.out.println(\"List of object sorted in descending order : \" + orders);\n\n //Sorting object using Comparator in Java\n Collections.sort(orders, new Order.OrderByAmount());\n System.out.println(\"List of Order object sorted using Comparator - amount : \" + orders);\n\n // Comparator sorting Example - Sorting based on customer\n Collections.sort(orders, new Order.OrderByVendor());\n System.out.println(\"Collection of Orders sorted using Comparator - by vendor : \" + orders);\n }",
"public static List<modelPurchasesI> reportPurchases(){\r\n\t\tif(modelUsersI.isLogged()){\r\n\t\t\tComparator<modelPurchasesI> sort = (primo, secondo) -> Double.compare(primo.getTotalSpent(), secondo.getTotalSpent());\r\n\t\t\t\r\n\t\t\treturn modelPurchasesI.purchasesList().stream()\r\n\t\t\t\t\t.sorted(sort)\r\n\t\t\t\t\t.collect(Collectors.toList());\r\n\t\t}else\r\n\t\t\treturn new ArrayList<modelPurchasesI>();\r\n\t}",
"public List<Product> getPriceAscSortedProducts(){\n\t\treturn dao.getAllProducts();\n\t}",
"@Override\n\tpublic List<Listing> findAllSortedByPrice() {\n\t\treturn theListingRepo.findAll(Sort.by(Direction.DESC, \"price\"));\n\t}",
"java.util.List<hr.client.appuser.CouponCenter.AppCoupon> \n getCouponListList();",
"public List<Category> getMostUserCate() {\n\t\tString sql = \"SELECT c.id,c.name FROM MINHDUC.posts p, MINHDUC.categories c where p.categories_id = c.id\";\n\t\tList<Category> listCate = jdbcTemplateObject.query(sql,new CategoriesMostUsedMapper());\n\t\treturn listCate;\n\t}",
"public ListUtilities cocktailSort(){\n\t\tboolean swaps = true;\n\t\tListUtilities temp = new ListUtilities();\n\t\t\n\t\twhile(swaps == true){\n\t\t\t//no swaps to begin with\n\t\t\tswaps = false;\n\n\t\t\t//if not end of list\n\t\t\tif (this.nextNum != null){\n\t\t\t\t\n\t\t\t\t//make temp point to next\n\t\t\t\ttemp = this.nextNum;\n\n\t\t\t\t//if b is greater than c\n\t\t\t\tif(this.num > this.nextNum.num){\n\t\t\t\t\t//it swapped\n\t\t\t\t\tswaps = true;\n\t\t\t\t\t\n\t\t\t\t\tswapF(temp);\n\t\t\t\t}\n\t\t\t//keep going until you hit end of list\n\t\t\ttemp.cocktailSort();\n\t\t\t}\n\t\t\t//if not beginning of list\n\t\t\tif (this.prevNum != null){\n\t\t\t\t//if c is smaller than b\n\t\t\t\tif(this.num < this.prevNum.num){\n\t\t\t\t\t//it swapped\n\t\t\t\t\tswaps = true;\n\t\t\t\t\tswapB(temp);\n\t\t\t\t}\n\t\t\t\t//keep going until hit beginning of list\n\t\t\t\ttemp.cocktailSort();\n\t\t\t}\n\t\t}\n\t//return beginning of list\n\treturn this.returnToStart();\n\t}",
"private ArrayList<IPlayer> sortPlayerAfterPoints() {\n ArrayList<IPlayer> arrlist = new ArrayList<>();\n\n iPlayerList.entrySet().stream().map((pair) -> (IPlayer) pair.getValue()).forEachOrdered((ip) -> {\n arrlist.add(ip);\n });\n\n Collections.sort(arrlist, (IPlayer p1, IPlayer p2) -> {\n try {\n if (p1.getPoints() == p2.getPoints()) {\n return 0;\n } else if (p1.getPoints() > p2.getPoints()) {\n return -1;\n } else {\n return 1;\n }\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n return 0;\n });\n\n return arrlist;\n }",
"void sortNumber()\r\n\t{\r\n\t\tCollections.sort(this, this.ContactNumber);\r\n\t}",
"public static void main(String[] args) {\n\t\tint flowerToPurchase = 3;\n int members = 2;\n int[] fPrice = {2,5,6};\n \n \tint j=0;\n \tint key,k;\n \tint arr_length= flowerToPurchase;\n \tfor(int i=1;i<flowerToPurchase; i++){\n \t\tj=i-1;\n \t\tkey = fPrice[i];\n \t\twhile(j >=0 && key < fPrice[j]){\n \t\t\tfPrice[j+1] = fPrice[j];\n \t\t\tj=j-1;\n \t\t}\n\n \t\tfPrice[j+1] = key;\n \t} // sort ends\n \t\n \tint temp = flowerToPurchase;\n \tint x =0;\n \tint amnt =0, peopleCount=0;\n \tint index = flowerToPurchase-1;\n \tint[] friends = new int[members];\n \tint f_index =0;\n \twhile(temp != 0){\n \t\tif(members == flowerToPurchase){\n \t\t\tamnt += fPrice[index--];\n \t\t\ttemp--;\n \t\t}\n \t\telse if(members < flowerToPurchase){\n \t\t\t\n \t\t\tif(friends[f_index] == 0){\n \t\t\t\tfriends[f_index] = 1;\n \t\t\t\tamnt += fPrice[index--];\n \t\t\t\tfPrice[index+1] = 0;\n \t\t\t\ttemp--;\n \t\t\t}\n \t\t\telse if(friends[f_index] == 1){\n \t\t\t\tamnt += (friends[f_index] + 1) * fPrice[0];\n \t\t\t\tfriends[f_index] = 2;\n \t\t\t\tfPrice[0] = 0;\n \t\t\t\ttemp--;\n \t\t\t\tf_index++;\n \t\t\t}\n \t\t\t\n \t\t}\n \t}\n \tSystem.out.println(amnt);\n \t\n }"
]
| [
"0.5942591",
"0.591153",
"0.5836145",
"0.5628223",
"0.5614709",
"0.5493174",
"0.54781383",
"0.53261334",
"0.52084655",
"0.5170107",
"0.51580524",
"0.51552194",
"0.5119171",
"0.50832295",
"0.5079607",
"0.5079314",
"0.5041417",
"0.503712",
"0.5030341",
"0.5013556",
"0.50135374",
"0.5003347",
"0.5001296",
"0.49978578",
"0.49974686",
"0.49944448",
"0.49913263",
"0.4990372",
"0.4972892",
"0.49677068",
"0.49610817",
"0.49609783",
"0.49360353",
"0.49353987",
"0.49225697",
"0.489556",
"0.48838434",
"0.4879535",
"0.4877824",
"0.4871612",
"0.48518848",
"0.48517174",
"0.48495865",
"0.48453304",
"0.48384076",
"0.48226708",
"0.48151717",
"0.4813248",
"0.4810429",
"0.4809886",
"0.48097748",
"0.4804572",
"0.48012447",
"0.4800444",
"0.47960517",
"0.47912052",
"0.47843817",
"0.4783838",
"0.47710732",
"0.47689864",
"0.47678062",
"0.47616223",
"0.47605115",
"0.47591415",
"0.47508585",
"0.47445783",
"0.47437474",
"0.47387904",
"0.4722183",
"0.47204977",
"0.47121206",
"0.47115448",
"0.47107077",
"0.4705776",
"0.47012526",
"0.47003153",
"0.47002038",
"0.46906298",
"0.4688459",
"0.46840525",
"0.46807238",
"0.46737477",
"0.46708918",
"0.46575895",
"0.4655467",
"0.46543172",
"0.46533358",
"0.46449512",
"0.46359184",
"0.463175",
"0.4629716",
"0.46293047",
"0.46274656",
"0.4627366",
"0.4621136",
"0.46196193",
"0.46137455",
"0.46113262",
"0.45994154",
"0.45950404"
]
| 0.57938004 | 3 |
Get all coupons that contains the search word. | List<Coupon> findByTitleContaining(String searchWord); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private ArrayList<String> findChampions() {\n\t\tString searchContents = search.getText();\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tfor (String c : CHAMPIONLIST) {\n\t\t\tif (c.toLowerCase().contains(searchContents.toLowerCase())) {\n\t\t\t\tresult.add(c);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"List<PilotContainer> Search(String cas, String word);",
"SearchResultCompany search(String keywords);",
"List<Cemetery> search(String query);",
"public List search() {\n\t\tSessionFactory sf = new Configuration().configure()\n\t\t\t\t.buildSessionFactory();\n\t\tSession s = sf.openSession();\n\t\tQuery q = s.createQuery(\"from cat_vo\");\n\t\tList ls = q.list();\n\t\treturn ls;\n\t}",
"public List<Product> search(String searchString);",
"public List<Budget> search (String search) throws SQLException{\n List<Budget> found = new ArrayList<Budget>();\n DatabaseConnection dbaInfo = new DatabaseConnection();\n Connection conn = null;\n try {\n conn = dbaInfo.getConnection();\n search = search + \"%\";\n PreparedStatement ps = conn.prepareStatement(\"SELECT * FROM finance.budget WHERE (bud_category ILIKE ?) OR (bud_description ILIKE ?);\");\n ps.setString(1, search);\n ps.setString(2, search);\n ResultSet rs = ps.executeQuery();\n found = listResults(rs);\n }catch (Exception error) {\n error.printStackTrace();\n conn.rollback();\n }finally {\n conn.close();\n }\n return found;\n }",
"@In String search();",
"public List<Product> search(String word, String codigo) {\n\t\tSession session = getSessionFactory().openSession();\n\t\treturn null;\n\t}",
"List<Cloth> findByNameContaining(String name);",
"public Set<String> Search(String search){\n\t\treturn Search(search, true);\n\t}",
"@RequestMapping(value = \"/_search/cophongs\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<Cophong> searchCophongs(@RequestParam String query) {\n log.debug(\"REST request to search Cophongs for query {}\", query);\n return StreamSupport\n .stream(cophongSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .collect(Collectors.toList());\n }",
"List<DataTerm> search(String searchTerm);",
"public ArrayList<Chapter> search(String keyword) throws Exception{\n\t\tControl control = new Control();\n\t\treturn control.search(keyword);\n\t}",
"public ArrayList<String> findCamps(String searchTerm) {\n if(searchTerm.equals(\"*\")) {\n return new ArrayList<>(landmarks.getCamps().keySet());\n }\n\n searchTerm = searchTerm.toLowerCase();\n ArrayList<String> results = new ArrayList<>();\n for(String campName : landmarks.getCamps().keySet()) {\n if(campName.toLowerCase().contains(searchTerm)) {\n results.add(campName);\n }\n }\n return results;\n }",
"public List<Contact> getSearch(String s){\n return contactsAndChildrenParser.getSearch(s);\n }",
"public List<Customer> findAutoCompleteCustomers(String key) {\n\t\tTypedQuery<Customer> query = em.createQuery(\n\t\t\t\t\"select distinct c from Customer c \"\n\t\t\t\t\t\t+ \" where upper(concat(c.customerName1,' ', c.customerName2,' ', c.customerName3,' ', c.customerName4)) like :name\",\n\t\t\t\tCustomer.class);\n\t\tquery.setParameter(\"name\", \"%\" + key.toUpperCase() + \"%\");\n\t\tList<Customer> customers = query.setFirstResult(0).setMaxResults(10).getResultList();\n\n\t\treturn customers;\n\t}",
"@Override\n\tpublic List<Charge> getChargesBykeyword(String keyword) {\n\t\tList<Charge> list = chargeMapper.getChargesBykeyword(keyword);\n\t\treturn list;\n\t}",
"@Override\n public List<Client> filterByName(String searchString){\n log.trace(\"filterByName -- method entered\");\n Iterable<Client> clients = clientRepository.findAll();\n List<Client> result = StreamSupport.stream(clients.spliterator(),false).filter((c)->c.getName().contains(searchString)).collect(Collectors.toList());\n log.trace(\"filterByName: result = {}\", result);\n return result;\n\n }",
"public void searchConc(String s) {\n\t \tscan = new Scanner(System.in);\n\t \t\n\n\t\t \twhile (array[findPos(s)] == null) {\n\t\t \t\tSystem.out.println(\"Word not found. Please try again or enter another word.\");\n\t\t \t\ts = scan.nextLine();\n\t\t \t}\n\t\t \t\n\t\t \tSystem.out.print(array[findPos(s)].element.getContent() + \" occurs \" + array[findPos(s)].element.getLines().getListSize() + \" times, in lines: \");\n\t\t \tarray[findPos(s)].element.getLines().printList();\n\t\t \tSystem.out.println(\"Please enter another word to search for: \");\n\t \t\n\t }",
"public void search() {\n String q = this.query.getText();\n String cat = this.category.getValue();\n if(cat.equals(\"Book\")) {\n searchBook(q);\n } else {\n searchCharacter(q);\n }\n }",
"@Override\n\tpublic List<AbilityBbs> searchList(String searchWord) {\n\t\treturn abilityDao.searchList(searchWord);\n\t}",
"public List<Produit> searchProduitsByQuartier(String theQuartier);",
"public ArrayList<Task> find(String word) {\n ArrayList<Task> newlist = new ArrayList<Task>();\n for (Task t : list) {\n if (t.contain(word)) {\n newlist.add(t);\n }\n }\n return newlist;\n }",
"@Override\n\tpublic List<Get_coupons> findGetcouponsByUserid(String userid) {\n\t\tList<Get_coupons> list=getcouponsDAO.findGetcouponsByUserid(userid);\n\t\treturn list;\n\t}",
"List<Block> search(String searchTerm);",
"List<Corretor> search(String query);",
"@Override\n\tpublic List<Customer> searchCustomers(String theSearchName) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\tQuery theQuery = null;\n\t\t\n\t\t// only search by name if theSearchName is not empty\n\t\tif(theSearchName != null && theSearchName.trim().length() > 0) {\n\t\t\ttheQuery = currentSession.createQuery(\"from Customer where \"\n\t\t\t\t\t+ \"lower(firstName) like :theName or lower(lastName) \"\n\t\t\t\t\t+ \"like :theName\", Customer.class);\n\t\t\t\n\t\t\ttheQuery.setParameter(\"theName\", \"%\" + theSearchName.toLowerCase() + \"%\");\n\t\t}\n\t\telse {\n\t\t\t// theSearchName is empty, so get all the customers\n\t\t\ttheQuery=currentSession.createQuery(\"from Customer\", Customer.class);\n\t\t}\n\t\t\n\t\t// execute query and get result list\n\t\tList<Customer> customers = theQuery.getResultList();\n\t\t\n\t\treturn customers;\n\t}",
"private void searchExec(){\r\n\t\tString key=jComboBox1.getSelectedItem().toString();\r\n\t\tkey=NameConverter.convertViewName2PhysicName(\"Discount\", key);\r\n\t\tString valueLike=searchTxtArea.getText();\r\n\t\tList<DiscountBean>searchResult=discountService.searchDiscountByKey(key, valueLike);\r\n\t\tjTable1.setModel(ViewUtil.transferBeanList2DefaultTableModel(searchResult,\"Discount\"));\r\n\t}",
"private void searchWord()\n {\n String inputWord = searchField.getText();\n \n if(inputWord.isEmpty())\n queryResult = null;\n \n else\n {\n char firstLetter = inputWord.toUpperCase().charAt(0);\n \n for(int i = 0 ; i < lexiNodeTrees.size() ; i++)\n {\n if(lexiNodeTrees.get(i).getCurrentCharacter() == firstLetter)\n {\n queryResult = lexiNodeTrees.get(i).searchWord(inputWord, false);\n i = lexiNodeTrees.size(); // escape the loop\n }\n }\n }\n \n // update the list on the GUI\n if(queryResult != null)\n {\n ArrayList<String> words = new ArrayList<>();\n for(WordDefinition word : queryResult)\n {\n words.add(word.getWord());\n }\n \n // sort the list of words alphabetically \n Collections.sort(words);\n \n // display the list of wordsin the UI\n DefaultListModel model = new DefaultListModel();\n for(String word : words)\n {\n model.addElement(word);\n }\n\n this.getSearchSuggestionList().setModel(model);\n }\n \n else\n this.getSearchSuggestionList().setModel( new DefaultListModel() );\n }",
"@Override\n public ArrayList<ItemBean> searchAll(String keyword)\n {\n String query= \"SELECT * FROM SilentAuction.Items WHERE Item_ID =?\";\n //Seacrh by Category Query\n String query1=\"SELECT * FROM SilentAuction.Items WHERE Category LIKE?\";\n //Seaches and finds items if Category is inserted\n ArrayList<ItemBean> resultsCat = searchItemsByCategory(query1,keyword);\n //Searches and finds items if number is inserted \n ArrayList<ItemBean> resultsNum= searchItemsByNumber(query,keyword);\n resultsCat.addAll(resultsNum);\n return resultsCat;\n }",
"public void searchCompanies() {\r\n\t\tResourceBundle bundle = ControladorContexto.getBundle(\"mensaje\");\r\n\t\ttry {\r\n\t\t\tbusiness = businessDao.searchBusinessForNameOrNit(searchCompany);\r\n\t\t\tif (business == null || business.size() <= 0) {\r\n\t\t\t\tControladorContexto.mensajeInformacion(\r\n\t\t\t\t\t\t\"frmAsociarPermisos:empresas\",\r\n\t\t\t\t\t\tbundle.getString(\"message_no_existen_registros\"));\r\n\t\t\t} else {\r\n\t\t\t\tBusinessAction businessAction = ControladorContexto\r\n\t\t\t\t\t\t.getContextBean(BusinessAction.class);\r\n\t\t\t\tbusinessAction.setListBusiness(new ArrayList<Business>());\r\n\t\t\t\tbusinessAction.setListBusiness(business);\r\n\t\t\t\tbusinessAction.loadDetailsBusiness();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tControladorContexto.mensajeError(e);\r\n\t\t}\r\n\t}",
"public ArrayList<SearchResult> partialSearch(String[] searchWords) {\n\t\tArrayList<SearchResult> words = new ArrayList<>();\n\t\tHashMap<String, SearchResult> resultMap = new HashMap<>();\n\t\tfor (String word : searchWords) {\n\t\t\tfor (String key : index.tailMap(word, true).navigableKeySet()) {\n\t\t\t\tif (key.startsWith(word)) {\n\t\t\t\t\twordSearch(key, resultMap, words);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tCollections.sort(words);\n\t\treturn words;\n\t}",
"private static List<String> getCandidates(String w, Set<String> words) {\n List<String> result = new LinkedList<>();\n for (int i = 0; i < w.length(); i++) {\n char[] chars = w.toCharArray();\n for (char ch = 'A'; ch <= 'Z'; ch++) {\n chars[i] = ch;\n String candidate = new String(chars);\n if (words.contains(candidate)) {\n result.add(candidate);\n }\n }\n }\n return result;\n }",
"private void search(String product) {\n // ..\n }",
"public List<Menu> searchCustomers(String theSearchName) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\r\n\r\n\t\tQuery theQuery = null;\r\n\r\n\t\t//\r\n\t\t// only search by name if theSearchName is not empty\r\n\t\t//\r\n\t\tif (theSearchName != null && theSearchName.trim().length() > 0) {\r\n\r\n\t\t\t// search for firstName or lastName ... case insensitive\r\n\t\t\ttheQuery = currentSession.createQuery(\r\n\t\t\t\t\t\"from Menu where lower(mname) like :theName or lower(munit) like :theName\", Menu.class);\r\n\t\t\ttheQuery.setParameter(\"theName\", \"%\" + theSearchName.toLowerCase() + \"%\");\r\n\r\n\t\t} else {\r\n\t\t\t// theSearchName is empty ... so just get all customers\r\n\t\t\ttheQuery = currentSession.createQuery(\"from Menu\", Menu.class);\r\n\t\t}\r\n\r\n\t\t// execute query and get result list\r\n\t\tList<Menu> theMenu = theQuery.getResultList();\r\n\r\n\t\t// return the results\r\n\t\treturn theMenu;\r\n\r\n\t}",
"@Override\n\tpublic List<ServiceInfo> search(String keywords) {\n\t\treturn null;\n\t}",
"public void search(String searchTerm)\r\n\t{\r\n\t\tpalicoWeapons = FXCollections.observableArrayList();\r\n\t\tselect(\"SELECT * FROM Palico_Weapon WHERE name LIKE '%\" + searchTerm + \"%'\");\r\n\t}",
"public Collection<City> getAutocompleteCities(String search) {\n return repo.getAutocompleteCities(search);\n }",
"public ArrayList<Music> getContains(String searchQuery)\n {\n ArrayList<Music> listResult = new ArrayList<>();\n\n for (Music m : songs)\n {\n if (m.getTitle().toLowerCase().contains(searchQuery) || m.getArtist().toLowerCase().contains(searchQuery) || m.getGenre().toLowerCase().contains(searchQuery))\n {\n listResult.add(m);\n }\n }\n return listResult;\n }",
"@Override\n @Transactional(readOnly = true)\n public List<Goods> search(String query) {\n log.debug(\"Request to search Goods for query {}\", query);\n return StreamSupport\n .stream(goodsSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .collect(Collectors.toList());\n }",
"public List<Ve> searchVe(String maSearch);",
"@GetMapping(\"/products/{text}\")\n public List<Product> findProductsContaining(@PathVariable String text){\n return productRepository.findProductByNameContains(text);\n }",
"public List<Contact> searchContacts(Map<SearchTerm,String> criteria);",
"void search();",
"void search();",
"public ArrayList<SearchResult> exactSearch(String[] searchWords) {\n\t\tArrayList<SearchResult> words = new ArrayList<>();\n\t\tHashMap<String, SearchResult> resultMap = new HashMap<>();\n\t\t\n\t\tfor (String word : searchWords) {\n\t\t\tif (containsWord(word)) {\n\t\t\t\twordSearch(word, resultMap, words);\n\t\t\t}\n\t\t}\n\t\t\n\t\tCollections.sort(words);\n\t\treturn words;\n\t}",
"public List<Component> searchComponent(String name) {\n\t\treturn sessionFactory.getCurrentSession().createQuery(\"from Component c where c.name like '%\"+name+\"%'\")\n\t\t.setMaxResults(10)\n\t\t.list();\n\t}",
"public List<Warehouse> search(String keyword) {\n\t\t return warehouseDAO.search(keyword);\r\n\t}",
"public List<Contact> getAllContactsByName(String searchByName);",
"public List<Word> search(final Section section) {\n return DICTIONARY.parallelStream()\n .filter(word -> BusinessLogic.IS_EQUAL_LENGTH.apply(word.getNumber(), section.getDigits()))\n .filter(word -> BusinessLogic.IS_EQUAL_HASH.apply(word.getNumber(), section.getDigits()))\n .filter(word -> BusinessLogic.IS_EQUAL_DIGITS.apply(word.getNumber(), section.getDigits()))\n .collect(Collectors.toList());\n }",
"public static List<Cancion> selectAll(String pattern) {\n\t\tList<Cancion> result = new ArrayList();\n\n\t\ttry {\n\t\t\tmanager = Connection.connectToMysql();\n\t\t\tmanager.getTransaction().begin();\n\n\t\t\tString q = \"FROM Cancion\";\n\n\t\t\tif (pattern.length() > 0) {\n\t\t\t\tq += \" WHERE nombre LIKE ?\";\n\t\t\t}\n\n\t\t\tif (pattern.length() > 0) {\n\t\t\t\tresult = manager.createQuery(\"FROM Cancion WHERE nombre LIKE '\" + pattern + \"%'\").getResultList();\n\t\t\t} else {\n\t\t\t\tresult = manager.createQuery(\"FROM Cancion\").getResultList();\n\t\t\t}\n\n\t\t\tmanager.getTransaction().commit();\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex);\n\t\t}\n\n\t\treturn result;\n\t}",
"@Query(\"select o from Ordine o \" +\n \"where lower(o.cliente.nomeCliente) like lower(concat('%', :searchTerm, '%')) \" )\n List<Ordine> searchForCliente(@Param(\"searchTerm\") String searchTerm);",
"Search getSearch();",
"public void filter(String charText) {\n charText = charText.toLowerCase();\n listData.clear(); // clear the listData\n\n if (charText.length() == 0) { // if nothing is written in the searchbar\n listData.addAll(copie); // refill the listData with all comic\n } else {\n for (Comic searchComic : copie) {\n // else, it will fill the lisData with the comic responding to the charText in th searchbar\n if (searchComic.getTitre().toLowerCase().contains(charText)) {\n listData.add(searchComic);\n }\n }\n }\n notifyDataSetChanged(); // notify to the data that the list had changed\n }",
"public String search_words(String word){\n\t\tString found_words = \"\";\n\t\t//We try to find the word within our childs\n\t\tfor(LexiNode child: childs)\n\t\t\tif(word.toLowerCase().charAt(0) == Character.toLowerCase(child.getRepresentative_letter()))\n\t\t\t\tfound_words += child.search_words(word, 0);\n\t\t\n\t\treturn found_words;\n\t}",
"public List<Produto> findByNomeLike(String nome);",
"@Override\n\tpublic List<Contact> search(String str) {\n\t\treturn null;\n\t}",
"public static ArrayList<MatHang_DTO> search(String text) throws ClassNotFoundException, SQLException {\n\t\treturn MatHang_DAL.search(text);\n\t}",
"public List<Contest> searchContests(Filter filter) throws ContestManagementException {\n return null;\r\n }",
"List<Company> getSuggestionsToFollow();",
"@Override\n public List<DefinitionDTO> findWordsByWord(String query) {\n List<Word> words = wordRepository.findBySearchString(query);\n return DTOMapper.mapWordListToDefinitionDTOList(words);\n }",
"List<Product> getProductsContainingProductNameOrShortDescription(String productSearchString);",
"public ArrayList<Customer> findCustomer(String searchText) {\r\n\t\tsearchText = searchText.toLowerCase();\r\n\t\tArrayList<Customer> customers = new ArrayList<Customer>();\r\n\t\ttry (ResultSet result = manager.performSql(\"SELECT id FROM Customer WHERE LOWER(first_name || ' ' || last_name) LIKE '%\" + searchText + \"%'\")) {\r\n\t\t\twhile (result.next()) {\r\n\t\t\t\tcustomers.add(manager.getCustomer(result.getInt(1)));\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customers;\r\n\t}",
"List<Codebadge> search(String query);",
"ArrayList<String> searchWordTweet(String word) throws SQLException {\r\n //Query che seleziona il mittente e il corpo data una parola\r\n String query=\"SELECT DISTINCT mittente,corpo FROM tweet WHERE corpo LIKE '%\"+word+\"%'\";\r\n //Oggetti per interrogare il db\r\n Statement statement=null;\r\n connection=DBConnection.connect();\r\n ResultSet resultSet=null;\r\n //Lista messaggi\r\n ArrayList<String> tweetsList = new ArrayList<>();\r\n\r\n try {\r\n statement=connection.createStatement();\r\n resultSet = statement.executeQuery(query);\r\n while(resultSet.next()){\r\n String mittente = resultSet.getString(\"mittente\");\r\n String corpo = resultSet.getString(\"corpo\");\r\n tweetsList.add(mittente+\": \"+corpo);\r\n }\r\n\r\n return tweetsList;\r\n }catch (SQLException e){\r\n e.printStackTrace();\r\n }finally {\r\n if (connection!=null) connection.close();\r\n if (statement!=null) statement.close();\r\n if(resultSet!=null) resultSet.close();\r\n }\r\n return null;\r\n }",
"@Override\n public String search(String word) {\n return search(word, root);\n }",
"@Override\n public List<FoodItem> filterByName(String substring) {\n //turn foodItemList into a stream to filter the list and check if any food item matched \n return foodItemList.stream().filter(x -> x.getName().toLowerCase() \n .contains(substring.toLowerCase())).collect(Collectors.toList());\n }",
"public List<Produit> searchProduitsByVendeur(String theVendeur);",
"public static void search(String word){\n if(index.containsKey(word)){\n System.out.println(\"word \" + word + \" displays in :\");\n HashSet<String> list = index.get(word);\n for(String str:list){\n System.out.println(str);\n }\n }\n else{\n System.out.println(\"word \" + word + \" doesn't found!\");\n }\n }",
"private List<moneda> filter(List<moneda> p1, String query)\n {\n query = query.toLowerCase();\n final List<moneda> filteredModeList = new ArrayList<>();\n for (moneda model:p1)\n {\n final String text = model.getNombre().toLowerCase();\n if(text.startsWith(query))\n {\n filteredModeList.add(model);\n }\n }\n return filteredModeList;\n }",
"private String[] computeSearchTerms(Control c) {\n \t\tComposite parent = c.getParent();\n \t\tList searchTerms = new ArrayList();\n \t\twhile (parent != null) {\n \t\t\tObject data = parent.getData();\n \t\t\tif (data instanceof IWizardContainer) {\n \t\t\t\tIWizardContainer wc = (IWizardContainer) data;\n \t\t\t\tsearchTerms.add(wc.getCurrentPage().getTitle());\n \t\t\t\tsearchTerms.add(wc.getCurrentPage().getWizard().getWindowTitle());\n \t\t\t\tbreak;\n \t\t\t} else if (data instanceof IWorkbenchWindow) {\n \t\t\t\tIWorkbenchWindow window = (IWorkbenchWindow) data;\n \t\t\t\tIWorkbenchPage page = window.getActivePage();\n \t\t\t\tif (page != null) {\n \t\t\t\t\tIWorkbenchPart part = lastPart;\n \t\t\t\t\tif (part != null) {\n\t\t\t\t\t\tif (part instanceof IViewPart)\n \t\t\t\t\t\t\tsearchTerms.add(NLS.bind(\n \t\t\t\t\t\t\t\t\tMessages.ContextHelpPart_query_view, part\n \t\t\t\t\t\t\t\t\t\t\t.getSite().getRegisteredName()));\n \t\t\t\t\t}\n \t\t\t\t\t/*\n // Searching by perspective seems counterproductive - CG\n \t\t\t\t\tIPerspectiveDescriptor persp = page.getPerspective();\n \t\t\t\t\tif (persp != null) {\n \t\t\t\t\t\tsearchTerms.add(NLS.bind(\n \t\t\t\t\t\t\t\tMessages.ContextHelpPart_query_perspective,\n \t\t\t\t\t\t\t\tpersp.getLabel()));\n \t\t\t\t\t}\n \t\t\t\t\t*/\n \t\t\t\t}\n \t\t\t\tbreak;\n \t\t\t} else if (data instanceof Window) {\n \t\t\t\tWindow w = (Window) data;\n \t\t\t\tif (w instanceof IPageChangeProvider) {\n \t\t\t\t\tObject page = ((IPageChangeProvider) w).getSelectedPage();\n \t\t\t\t\tString pageName = getPageName(c, page);\n \t\t\t\t\tif (pageName != null) {\n \t\t\t\t\t\tsearchTerms.add(pageName);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tsearchTerms.add(w.getShell().getText());\n \t\t\t\tbreak;\n \t\t\t}\n \t\t\tparent = parent.getParent();\n \t\t}\n \t\treturn (String[]) searchTerms.toArray(new String[searchTerms.size()]);\n \t}",
"public static void searchJobs(String searchTerm) {\n\n for (int i = 0; i > PostJob.allJobs.size(); i++) {\n\n\n if (PostJob.allJobs.contains(searchTerm)) {\n int itemIndx = PostJob.allJobs.indexOf(searchTerm);\n String output = PostJob.allJobs.get(itemIndx);\n System.out.print(\"Available jobs within your search terms\" + output);\n\n }\n }\n }",
"@Query(\"SELECT s FROM Store s WHERE s.storename LIKE %?1%\" + \" OR CONCAT(s.address, '') LIKE %?1%\")\n\tpublic List<Store> search(String keyword);",
"public List<Product> getProductBySearchName(String search) {\r\n List<Product> list = new ArrayList<>();\r\n String query = \"select * from Trungnxhe141261_Product\\n \"\r\n + \"where [name] like ? \";\r\n try {\r\n conn = new DBContext().getConnection();//mo ket noi voi sql\r\n ps = conn.prepareStatement(query);\r\n ps.setString(1, \"%\" + search + \"%\");\r\n rs = ps.executeQuery();\r\n while (rs.next()) {\r\n list.add(new Product(rs.getInt(1),\r\n rs.getString(2),\r\n rs.getString(3),\r\n rs.getDouble(4),\r\n rs.getString(5),\r\n rs.getString(6)));\r\n }\r\n } catch (Exception e) {\r\n }\r\n return list;\r\n }",
"@Override\n public void onSearchConfirmed(CharSequence text) {\n searchForFoods(text);\n }",
"private List<IChannel> channelSearch(IChannel root, String str) {\n List<IChannel> list = new LinkedList<IChannel>();\n channelSearch(root, str, list);\n return list;\n }",
"public void search(String text){\n filteredList.clear();\n\n if(TextUtils.isEmpty(text)){\n filteredList.addAll(filteredListForSearch);\n }\n\n else{\n String query = text.toLowerCase();\n for(SensorResponse item : filteredListForSearch){\n if(item.getSensor_Type().toLowerCase().contains(query) || Long.toString(item.getBattery()).toLowerCase().contains(query)\n || Long.toString(item.getDate_Time()).toLowerCase().contains(query) || Double.toString(item.getLat()).toLowerCase().contains(query)\n || Double.toString(item.getLong()).toLowerCase().contains(query) || item.getSensorHealth().toLowerCase().contains(query)\n || Long.toString(item.getSensor_ID()).toLowerCase().contains(query) || Double.toString(item.getSensor_Val()).toLowerCase().contains(query)){\n filteredList.add(item);\n }\n }\n }\n removeDuplicates();\n notifyDataSetChanged();\n }",
"public List<List<String>> suggestedProducts(String[] products, String searchWord) {\n Trie trie = new Trie();\n for(String product : products){\n trie.insert(product);\n }\n List<List<String>> res = new ArrayList<>();\n\n for(int i = 1; i <= searchWord.length(); i++){\n String str = searchWord.substring(0, i);\n List<String> inner = trie.suggest(str);\n res.add(inner);\n\n\n }\n return res;\n\n\n\n }",
"private List<ClinicItem> filter(List<ClinicItem> cList, String query){\n query = query.toLowerCase();\n final List<ClinicItem> filteredModeList = new ArrayList<>();\n\n for(ClinicItem vetClinic:cList){\n if(vetClinic.getName().toLowerCase().contains(query)){\n filteredModeList.add(vetClinic); }\n }\n return filteredModeList;\n }",
"public List<Customer> findByName(String n) {\n\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n ResultSet rest = null;\n List<Customer> customers = new ArrayList<>();\n\n try {\n ppst = conn.prepareStatement(\"SELECT * FROM customer WHERE LOWER(name) LIKE LOWER(?)\");\n ppst.setString(1, \"%\" + n + \"%\");\n rest = ppst.executeQuery();\n\n while (rest.next()) {\n Customer c = new Customer(\n rest.getInt(\"customer_key\"),\n rest.getString(\"name\"),\n rest.getString(\"id\"),\n rest.getString(\"phone\")\n );\n customers.add(c);\n }\n } catch (SQLException e) {\n throw new RuntimeException(\"Query error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst, rest);\n }\n return customers;\n }",
"public ArrayList<Donation> search(ArrayList<Donation> donation, String search) {\n if (search == null || search.length() == 0) {\n // Log.i(\"Search\", \"search is empty or null\");\n if (donation.size() == 0) { // say \"no items matching search\"\n noItems.setVisibility(TextView.VISIBLE);\n } else {\n noItems.setVisibility(TextView.INVISIBLE);\n }\n return donation;\n } else {\n ArrayList<Donation> sorted = new ArrayList<>();\n for (int i = 0; i < donation.size(); i++) {\n }\n for (int i = 0; i < donation.size(); i++) {\n if (donation.get(i).getName().toLowerCase().contains(search)) {\n sorted.add(donation.get(i));\n }\n }\n if (sorted.size() == 0) { // say \"no items matching search\"\n noItems.setVisibility(TextView.VISIBLE);\n } else {\n noItems.setVisibility(TextView.INVISIBLE);\n }\n return sorted;\n }\n }",
"public Set<CharacteristicValueObject> findPhenotypesInOntology( String searchQuery ) {\n\n if ( this.ontologies.isEmpty() ) {\n resetOntologies();\n }\n\n HashMap<String, OntologyTerm> uniqueValueTerm = new HashMap<String, OntologyTerm>();\n\n for ( AbstractOntologyService ontology : this.ontologies ) {\n Collection<OntologyTerm> hits = ontology.findTerm( searchQuery );\n\n for ( OntologyTerm ontologyTerm : hits ) {\n if ( uniqueValueTerm.get( ontologyTerm.getLabel().toLowerCase() ) == null ) {\n uniqueValueTerm.put( ontologyTerm.getLabel().toLowerCase(), ontologyTerm );\n }\n }\n }\n\n return ontology2CharacteristicValueObject( uniqueValueTerm.values() );\n }",
"public List search(String str) {\n List searchList = new ArrayList();\n try {\n //set the scanner to the entire bible file\n scan = new Scanner(new File(\"kjvdat.txt\"));\n //set the regex pattern with the search string\n Pattern p = Pattern.compile(\"(\" + str + \")\");\n //scan through the entire verses for the search parameter\n while (scan.hasNext()) {\n String txt = scan.nextLine();\n Matcher m = p.matcher(txt);\n if (m.find()) {\n //insert verses that are found into the searchlist\n searchList.add(txt.substring(0, txt.length() - 1));\n }\n }\n\n } catch (FileNotFoundException ex) {\n Logger.getLogger(Finder.class.getName()).log(Level.SEVERE, null, ex);\n }\n //return list of all verses found containing the search parameter\n scan.close();\n return searchList;\n }",
"List<SongVO> searchSong(String searchText) throws Exception;",
"public List searchProduct(String searchTerms) {\n ResultSet rsType = database.searchProduct(searchTerms);\n List<Product> searchedProducts = new ArrayList<>();\n try {\n while (rsType.next()) {\n searchedProducts.add(loadProductFromId(rsType.getInt(\"productid\")));\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n if (searchedProducts.isEmpty()) {\n throw new NoSuchProductException();\n }\n\n return searchedProducts;\n }",
"private ArrayList<String> matchingWords(String word){\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tfor(int i=0; i<words.size();i++){\n\t\t\tif(oneCharOff(word,words.get(i))){\n\t\t\t\tlist.add(words.get(i));\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}",
"public void search() {\r\n \t\r\n }",
"@Override\n @Transactional(readOnly = true)\n public List<VanBan> search(String query) {\n log.debug(\"Request to search VanBans for query {}\", query);\n return StreamSupport\n .stream(vanBanSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .collect(Collectors.toList());\n }",
"List<Dish> getDishesWhichContains(String subStr);",
"List<Message> searchMessages(final String text);",
"@Override\r\n\tpublic List<String> getListByPattern(String pattern) {\n\t\treturn companyRepository.getPattern(pattern);\r\n\t}",
"@GET(\"w/api.php?action=opensearch&format=json&suggest&redirects=resolve\")\n Call<JsonElement> getSuggestionsFromSearch(@Query(\"search\") String search);",
"public static List<Cancion> selectAllH2(String pattern) {\n\t\tList<Cancion> result = new ArrayList();\n\n\t\ttry {\n\t\t\tmanager = Connection.connectToH2();\n\t\t\tmanager.getTransaction().begin();\n\n\t\t\tString q = \"FROM Cancion\";\n\n\t\t\tif (pattern.length() > 0) {\n\t\t\t\tq += \" WHERE nombre LIKE ?\";\n\t\t\t}\n\n\t\t\tif (pattern.length() > 0) {\n\t\t\t\tresult = manager.createQuery(\"FROM Cancion WHERE nombre LIKE '\" + pattern + \"%'\").getResultList();\n\t\t\t} else {\n\t\t\t\tresult = manager.createQuery(\"FROM Cancion\").getResultList();\n\t\t\t}\n\n\t\t\tmanager.getTransaction().commit();\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex);\n\t\t}\n\n\t\treturn result;\n\t}",
"@Override\n\tpublic List<Product> findByName(String term) {\n\t\treturn productDAO.findByNameLikeIgnoreCase(\"%\" + term + \"%\");\n\t}",
"public static void search(String searchInput)\n {\n if (!searchInput.isEmpty())\n {\n searchInput = searchInput.trim();\n if (mNameSymbol.containsKey(searchInput))\n {\n //Returns list of stock symbols associated with company name\n List<String> lstTickerSymbols = mNameSymbol.get(searchInput);\n displayResults(lstTickerSymbols, searchInput);\n }\n else\n {\n Set<String> setNames = mNameSymbol.keySet();\n Iterator iterator = setNames.iterator();\n boolean matchMade = false;\n while (iterator.hasNext())\n {\n String storedName = (String)iterator.next();\n Float normalizedMatch = fuzzyScore(storedName, searchInput);\n if (normalizedMatch >= MIN_MATCH) \n {\n //Returns list of stock symbols associated with company name\n List<String> lstTickerSymbols = mNameSymbol.get(storedName);\n displayResults(lstTickerSymbols, storedName);\n matchMade = true;\n }\n }\n if (matchMade == false)\n {\n displayNoResults();\n }\n }\n }\n else\n {\n displayNoResults();\n }\n }",
"public Set<String> Search(String search, boolean expandSearch){\n\t\tSet<String> result = new HashSet<>();\n\t\tresult.addAll(dm.searchForTag(search));\n\t\t\n\t\tif(expandSearch) {\n\t\t\tfor(String extraSearch : getSubClasses(search, false)) {\n\t\t\t\tSystem.out.println(\"Extra tag added to search: \" + extraSearch);\n\t\t\t\tresult.addAll(dm.searchForTag(extraSearch));\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"@Override\n\tpublic List<Literature> searchKeywords() {\n\t\treturn null;\n\t}",
"@Override\n @Transactional(readOnly = true)\n public List<PerSubmit> search(String query) {\n log.debug(\"Request to search PerSubmits for query {}\", query);\n return StreamSupport\n .stream(perSubmitSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .collect(Collectors.toList());\n }",
"public ArrayList<AddressEntry> searchByName(String text) {\r\n ArrayList<AddressEntry> textMatches = new ArrayList<AddressEntry>();\r\n text = text.toLowerCase();\r\n for (AddressEntry current : contacts) {\r\n String currentname = current.getName().toLowerCase();\r\n if (currentname.contains(text)) {\r\n textMatches.add(current);\r\n }\r\n }\r\n return textMatches;\r\n }"
]
| [
"0.7001385",
"0.61704576",
"0.5960254",
"0.5847983",
"0.578801",
"0.5746785",
"0.5705791",
"0.56996185",
"0.5663986",
"0.5648297",
"0.56473154",
"0.55665296",
"0.547414",
"0.545042",
"0.54458606",
"0.5411166",
"0.54075235",
"0.5399662",
"0.5394018",
"0.537726",
"0.5289137",
"0.5249727",
"0.52450615",
"0.52358234",
"0.5213449",
"0.520942",
"0.5209205",
"0.52055395",
"0.51973593",
"0.5188357",
"0.51802456",
"0.51709765",
"0.51583654",
"0.51569575",
"0.5153193",
"0.5142351",
"0.5138403",
"0.5133073",
"0.5125971",
"0.5123288",
"0.5118046",
"0.50959057",
"0.5093204",
"0.5087736",
"0.50807816",
"0.50807816",
"0.5079847",
"0.50766456",
"0.50685585",
"0.5055423",
"0.50534636",
"0.5052837",
"0.5047245",
"0.50408316",
"0.50325453",
"0.50264955",
"0.50194275",
"0.5002976",
"0.49977687",
"0.4996508",
"0.49962452",
"0.49902928",
"0.49888662",
"0.4987013",
"0.49851432",
"0.4984892",
"0.49830258",
"0.4977228",
"0.4977095",
"0.49671322",
"0.4963173",
"0.49517635",
"0.49414593",
"0.4938619",
"0.49360722",
"0.4931123",
"0.49269462",
"0.49258265",
"0.49224436",
"0.4920377",
"0.49138337",
"0.49120063",
"0.48835063",
"0.48775697",
"0.48756388",
"0.48691413",
"0.48670882",
"0.48649666",
"0.48646876",
"0.48597315",
"0.48592693",
"0.48562047",
"0.48479137",
"0.4842576",
"0.48421118",
"0.48417616",
"0.4840043",
"0.4832665",
"0.4831394",
"0.48294002"
]
| 0.6843232 | 1 |
Count all the coupons in the data base. | @Query(value = "SELECT COUNT(*) FROM coupons", nativeQuery = true)
int countAllCoupons(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getCouponListCount();",
"@Query(value = \"SELECT COUNT(*) FROM customers_coupons\", nativeQuery = true)\n int countAllCouponsPurchased();",
"public int getCouponListCount() {\n return couponList_.size();\n }",
"public int getCouponListCount() {\n if (couponListBuilder_ == null) {\n return couponList_.size();\n } else {\n return couponListBuilder_.getCount();\n }\n }",
"@Override\n\tpublic Integer getAllComBorrowingsCount() {\n\t\treturn comBorrowingsMapper.countByExample(new ComBorrowingsExample());\n\t}",
"public void getAllPurchasedCoupons() throws DBException\n {\n\t customerDBDAO.getCoupons();\n }",
"@Override\n public long count() {\n return super.doCountAll();\n }",
"@Override\n public long count() {\n return super.doCountAll();\n }",
"@Override\n public long count() {\n return super.doCountAll();\n }",
"@Query(value = \"SELECT COUNT(*) FROM customers_coupons AS cvc INNER JOIN coupons AS c On cvc.coupons_id = c.id WHERE company_id = ?1\" , nativeQuery = true)\n int countAllCouponsPurchasedByCompany(int companyId);",
"@Override\n\tpublic Integer findCount() {\n\t\tInteger total;\n\t\tString hql=\"from Commodity\";\n\t\tList<Commodity> commoditylist=(List<Commodity>) this.getHibernateTemplate().find(hql, null);\n\t\ttotal=commoditylist.size();\n\t\treturn total;\n\t}",
"@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_VCMSPORTION);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\n\t\t\t\t\tcount);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}",
"int getStreamCouponHistoryListCount();",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"@Override\n\tpublic int countCompany() {\n\t\treturn comShortMapper.selectCountShort()+elegantMapper.selectCountEle()+honorMapper.selectCountHonor();\n\t}",
"public int countAll();",
"public int countAll();",
"public int countAll();",
"public int countAll();",
"public int countAll();",
"public int countAll();",
"public int countAll();",
"public int countAll();",
"public int countAll();",
"public int countAll();",
"public int countAll();",
"public int getCoffeeShopCount() {\n String sqlCountQuery = \"SELECT * FROM \" + CoffeeShopDatabase.CoffeeShopTable.TABLE_NAME;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(sqlCountQuery, null);\n cursor.close();\n int count = cursor.getCount();\n return count;\n }",
"@Override\r\n\tpublic int carpoollistCount(Criteria cri) throws Exception {\n\t\treturn adminDAO.carpoollistCount(cri);\r\n\t}",
"public int count() {\n\t\tint count = cstCustomerDao.count();\n\t\treturn count;\n\t}",
"@Override\r\n\tprotected int count() {\n\t\treturn service.count();\r\n\t}",
"@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(\n\t\t\t_finderPathCountAll, FINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_CATEGORY);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(\n\t\t\t\t\t_finderPathCountAll, FINDER_ARGS_EMPTY, count);\n\t\t\t}\n\t\t\tcatch (Exception exception) {\n\t\t\t\tfinderCache.removeResult(\n\t\t\t\t\t_finderPathCountAll, FINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(exception);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}",
"@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_CAMPUS);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\n\t\t\t\t\tcount);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}",
"public int delegateGetCountAllTx() {\r\n return getMyDao().getCountAll();\r\n }",
"Long getAllCount();",
"public long countAll();",
"public int countAll() {\n\t\treturn transactionDAO.countAll();\n\t}",
"int getCazuriCount();",
"@Override\r\n\tpublic int priceallcount() {\n\t\treturn productRaw_PriceDao.allCount();\r\n\t}",
"public long countAll() {\n\t\treturn super.doCountAll();\n\t}",
"@Override\r\n\tpublic int getCountByAll() throws Exception {\n\t\treturn 0;\r\n\t}",
"@Override\n public int countAll() {\n\n Query qry = this.em.createQuery(\n \"select count(assoc) \" +\n \"from WorkToSubjectEntity assoc\");\n\n return ((Long) qry.getSingleResult()).intValue();\n }",
"public int cuantosCursos(){\n return inscripciones.size();\n }",
"public int getAllCount(){\r\n\t\tString sql=\"select count(*) from board_notice\";\r\n\t\tint result=0;\r\n\t\tConnection conn=null;\r\n\t\tStatement stmt=null;\r\n\t\tResultSet rs=null;\r\n\t\ttry{\r\n\t\t\tconn=DBManager.getConnection();\r\n\t\t\tstmt=conn.createStatement();\r\n\t\t\trs=stmt.executeQuery(sql);\r\n\t\t\trs.next();\r\n\t\t\tresult=rs.getInt(1);\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\tDBManager.close(conn, stmt, rs);\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public Collection<Coupon> getAllPurchasedCoupons() {\r\n\t\treturn db.getCustomer(cust).getCouponHistory();\r\n\t}",
"int getChannelStatisticsCount();",
"long countNumberOfProductsInDatabase();",
"public long countAll() {\n\n AtomicLong total = new AtomicLong();\n solarFlareRepository.count()\n .map(count -> {\n total.set(count);\n return count;\n })\n .block();\n\n return total.get();\n }",
"@Override\n\tpublic int chungchungcount() throws Exception {\n\t\treturn dao.chungchungcount();\n\t}",
"@Override\n public int getItemCount() {\n //int size = dataset.size();\n int size = coupons.size();\n return size;\n }",
"public Integer countAll();",
"@Override\n\t/** Returns all Coupons as an array list */\n\tpublic Collection<Coupon> getAllCoupons() throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve all Coupons via prepared\n\t\t\t// statement\n\t\t\tString getAllCouponsSQL = \"select * from coupon\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getAllCouponsSQL);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}",
"public int getCazuriCount() {\n return cazuri_.size();\n }",
"@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(\n\t\t\t_finderPathCountAll, FINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_PHATVAY);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(\n\t\t\t\t\t_finderPathCountAll, FINDER_ARGS_EMPTY, count);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(\n\t\t\t\t\t_finderPathCountAll, FINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}",
"int getTrucksCount();",
"public int getCompaniesCount() {\n return companies_.size();\n }",
"public void can_counter()\n {\n candidate_count=0;\n for (HashMap.Entry<String,Candidate> set : allCandidates.entrySet())\n {\n candidate_count++;\n }\n }",
"@Override\r\n\tpublic int inallcount() {\n\t\treturn productRaw_InDao.allCount();\r\n\t}",
"public int getListCount() {\n\t\tConnection con = getConnection();\r\n\t\tMemberDAO memberDao = MemberDAO.getInstance();\r\n\t\tmemberDao.setConnection(con);\r\n\r\n\t\tint listCount = memberDao.selectRatingCount();\r\n\r\n\t\tclose(con);\r\n\t\treturn listCount;\r\n\t}",
"int getCustomersCount();",
"long countAll();",
"long countAll();",
"public Flowable<Integer> counts() {\n return createFlowable(b.updateBuilder, db) //\n .flatMap(Tx.flattenToValuesOnly());\n }",
"@Override\r\n\tpublic int allCount() {\n\t\treturn productRawDao.allCount();\r\n\t}",
"@Override\r\n\tpublic int countAll() {\r\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\r\n\t\t\t\tFINDER_ARGS_EMPTY, this);\r\n\r\n\t\tif (count == null) {\r\n\t\t\tSession session = null;\r\n\r\n\t\t\ttry {\r\n\t\t\t\tsession = openSession();\r\n\r\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_SHARE);\r\n\r\n\t\t\t\tcount = (Long)q.uniqueResult();\r\n\r\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\r\n\t\t\t\t\tcount);\r\n\t\t\t}\r\n\t\t\tcatch (Exception e) {\r\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\r\n\t\t\t\t\tFINDER_ARGS_EMPTY);\r\n\r\n\t\t\t\tthrow processException(e);\r\n\t\t\t}\r\n\t\t\tfinally {\r\n\t\t\t\tcloseSession(session);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn count.intValue();\r\n\t}",
"@Override\n\tpublic int countAll() throws SystemException {\n\t\tLong count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_CANDIDATE);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tFinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY, count);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tFinderCacheUtil.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}",
"public void count() {\n APIlib.getInstance().addJSLine(jsBase + \".count();\");\n }",
"public Collection<Coupon> getAllCoupon() throws DbException;",
"@Override\n public final long countAll() {\n\treturn (long) getEntityManager()\n\t\t.createQuery(\"select count(*) from \"\n\t\t\t+ CustomerUser.class.getName())\n\t\t.getSingleResult();\n }",
"public static int getConnectionCount()\r\n {\r\n return count_; \r\n }",
"@Override\n\tpublic Long count() {\n\t\treturn SApplicationcategorydao.count(\"select count(*) from \"+tablename+\" t\");\n\t}",
"public int getCazuriCount() {\n if (cazuriBuilder_ == null) {\n return cazuri_.size();\n } else {\n return cazuriBuilder_.getCount();\n }\n }",
"int getDataCount();",
"int getDataCount();",
"int getDataCount();",
"int getDataCount();",
"int getDataCount();",
"@Override\n\tpublic int countCustomers() {\n\t\treturn 0;\n\t}",
"int getConnectionCount();",
"public Mono<Long> countAll() {\n return supplementsRepository.count();\n }",
"public Collection<Coupon> getCompanyCoupons() {\n return couponRepo.findCouponsByCompanyID(this.companyID);\n }",
"@Override\r\n\tpublic int paylistCount(Criteria cri) throws Exception {\n\t\treturn adminDAO.paylistCount(cri);\r\n\t}",
"public int countAll() throws DAOException;",
"public int getCount() {\n\t\treturn channelCountMapper.getCount();\n\t}",
"public int getListCount() {\n String countQuery = \"SELECT * FROM \" + TABLE_NAME;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(countQuery, null);\n cursor.close();\n return cursor.getCount();\n }",
"public int countAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public int countAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public int countAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public int countAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public int countAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public int countAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public int countAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;"
]
| [
"0.7418666",
"0.7208847",
"0.71198696",
"0.6739912",
"0.6644935",
"0.6591941",
"0.6570099",
"0.6570099",
"0.6570099",
"0.6496432",
"0.646816",
"0.64444983",
"0.6430569",
"0.6428544",
"0.6428544",
"0.6428544",
"0.6428544",
"0.6428544",
"0.6428544",
"0.6428544",
"0.6428544",
"0.6428544",
"0.6428544",
"0.6426083",
"0.63981813",
"0.63981813",
"0.63981813",
"0.63981813",
"0.63981813",
"0.63981813",
"0.63981813",
"0.63981813",
"0.63981813",
"0.63981813",
"0.63981813",
"0.63782877",
"0.6371428",
"0.6361602",
"0.6359524",
"0.6348891",
"0.6321217",
"0.63132715",
"0.63109875",
"0.6292446",
"0.628078",
"0.6254214",
"0.6239217",
"0.62080055",
"0.62003803",
"0.61831707",
"0.61797225",
"0.61770356",
"0.6162269",
"0.6148045",
"0.6140227",
"0.61373186",
"0.61346704",
"0.6128995",
"0.61157304",
"0.61156666",
"0.6113444",
"0.61074656",
"0.6089708",
"0.60889715",
"0.6079157",
"0.6052771",
"0.6047414",
"0.6042334",
"0.60269654",
"0.60269654",
"0.6007379",
"0.59939516",
"0.59868014",
"0.5986477",
"0.5983039",
"0.5981893",
"0.5973613",
"0.5972688",
"0.5967048",
"0.5966112",
"0.59566754",
"0.59566754",
"0.59566754",
"0.59566754",
"0.59566754",
"0.5952967",
"0.59339905",
"0.59329",
"0.59310216",
"0.59184605",
"0.59101903",
"0.5892261",
"0.58861846",
"0.5878729",
"0.5878729",
"0.5878729",
"0.5878729",
"0.5878729",
"0.5878729",
"0.5878729"
]
| 0.75060177 | 0 |
Count all the purchased coupons. | @Query(value = "SELECT COUNT(*) FROM customers_coupons", nativeQuery = true)
int countAllCouponsPurchased(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getCouponListCount();",
"public int getCouponListCount() {\n return couponList_.size();\n }",
"@Query(value = \"SELECT COUNT(*) FROM coupons\", nativeQuery = true)\n int countAllCoupons();",
"@Query(value = \"SELECT COUNT(*) FROM customers_coupons AS cvc INNER JOIN coupons AS c On cvc.coupons_id = c.id WHERE company_id = ?1\" , nativeQuery = true)\n int countAllCouponsPurchasedByCompany(int companyId);",
"public Collection<Coupon> getAllPurchasedCoupons() {\r\n\t\treturn db.getCustomer(cust).getCouponHistory();\r\n\t}",
"public void getAllPurchasedCoupons() throws DBException\n {\n\t customerDBDAO.getCoupons();\n }",
"public int getCouponListCount() {\n if (couponListBuilder_ == null) {\n return couponList_.size();\n } else {\n return couponListBuilder_.getCount();\n }\n }",
"@Override\n\tpublic Integer getAllComBorrowingsCount() {\n\t\treturn comBorrowingsMapper.countByExample(new ComBorrowingsExample());\n\t}",
"int getStreamCouponHistoryListCount();",
"int getPurchasableOffersCount();",
"public int getCoffeeShopCount() {\n String sqlCountQuery = \"SELECT * FROM \" + CoffeeShopDatabase.CoffeeShopTable.TABLE_NAME;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(sqlCountQuery, null);\n cursor.close();\n int count = cursor.getCount();\n return count;\n }",
"@Override\n\tpublic int countCompany() {\n\t\treturn comShortMapper.selectCountShort()+elegantMapper.selectCountEle()+honorMapper.selectCountHonor();\n\t}",
"int getDeliveriesCount();",
"@Override\n public long count() {\n return super.doCountAll();\n }",
"@Override\n public long count() {\n return super.doCountAll();\n }",
"@Override\n public long count() {\n return super.doCountAll();\n }",
"public int cuantosCursos(){\n return inscripciones.size();\n }",
"public int getPurchasedListCount()\r\n\t{\r\n\t\treturn m_purechaseList.size();\r\n\t}",
"@Override\r\n\tpublic int priceallcount() {\n\t\treturn productRaw_PriceDao.allCount();\r\n\t}",
"@Override\n\tpublic int count(HashMap<String, Object> map) {\n\t\treturn paymentDao.count(map);\n\t}",
"int getSubscriptionCount();",
"public Mono<Long> countAll() {\n return supplementsRepository.count();\n }",
"public void can_counter()\n {\n candidate_count=0;\n for (HashMap.Entry<String,Candidate> set : allCandidates.entrySet())\n {\n candidate_count++;\n }\n }",
"@Override\r\n\tprotected int count() {\n\t\treturn service.count();\r\n\t}",
"@Override\r\n\tpublic int inallcount() {\n\t\treturn productRaw_InDao.allCount();\r\n\t}",
"public void countCoins() {\r\n\t\tthis.coinCount = 0;\r\n\t\tfor (int x = 0; x < WIDTH; x++) {\r\n\t\t\tfor (int y = 0; y < HEIGHT; y++) {\r\n\t\t\t\tif (this.accessType(x, y) == 'C')\r\n\t\t\t\t\tthis.coinCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic int allCount() {\n\t\treturn productRawDao.allCount();\r\n\t}",
"@Override\r\n\tpublic int countCart(String userid, int pnum) {\n\t\treturn 0;\r\n\t}",
"public double countCalories() {\n double count = 0;\n\n for (VegetablePortion vegetablePortion : list) {\n count += vegetablePortion.getVegetable().getCalories() * vegetablePortion.getWeight();\n }\n\n return count;\n }",
"int getDeliveredCount();",
"long getTotalProductsCount();",
"@Override\n public int getItemCount() {\n //int size = dataset.size();\n int size = coupons.size();\n return size;\n }",
"public void getAllPurchasedCouponsByType(CouponType type) throws DBException\n {\n\t customerDBDAO.getAllPurchasedCouponsByType(type);\n }",
"@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_VCMSPORTION);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\n\t\t\t\t\tcount);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}",
"public int count() {\n\t\tint count = cstCustomerDao.count();\n\t\treturn count;\n\t}",
"@Override\n\tpublic int countCustomers() {\n\t\treturn 0;\n\t}",
"int getPriceCount();",
"public int countAll();",
"public int countAll();",
"public int countAll();",
"public int countAll();",
"public int countAll();",
"public int countAll();",
"public int countAll();",
"public int countAll();",
"public int countAll();",
"public int countAll();",
"public int countAll();",
"public Flowable<Integer> counts() {\n return createFlowable(b.updateBuilder, db) //\n .flatMap(Tx.flattenToValuesOnly());\n }",
"int getTrucksCount();",
"@Override\n\tpublic Integer findCount() {\n\t\tInteger total;\n\t\tString hql=\"from Commodity\";\n\t\tList<Commodity> commoditylist=(List<Commodity>) this.getHibernateTemplate().find(hql, null);\n\t\ttotal=commoditylist.size();\n\t\treturn total;\n\t}",
"@Override\n\tpublic List<Coupon> getAllPurchasedCoupons(int id) throws CustomDateBaseExepation {\n\n\t\tif (customerRipository.findById(id) == null) {\n\t\t\tthrow new CustomDateBaseExepation(\"no customer with this id - \" + id);\n\t\t}\n\n\t\tList<Coupon> c = customerRipository.getAllPurchasedCoupons(id);\n\n\t\tif (c.isEmpty()) {\n\t\t\tthrow new CustomDateBaseExepation(\"no purchased coupons for this customer \");\n\t\t}\n\n\t\treturn c;\n\t}",
"public int getProductCount();",
"int getNumOfBuyOrders();",
"protected final static int getPurchases(final Profile prf) {\n return Coltil.size(prf.availableClothings) + Coltil.size(prf.availableHats)\r\n \t\t+ Coltil.size(prf.availableJumpModes) + Coltil.size(prf.availableAssists)\r\n \t\t+ Coltil.size(prf.availableSpecialAnimals) + Coltil.size(prf.availableBirds) - 1;\r\n }",
"public Integer getBuyCount() {\n return buyCount;\n }",
"public int countAll() {\n\t\treturn transactionDAO.countAll();\n\t}",
"public void getAllPurchasedCouponsByDate(Date date) throws DBException\n {\n\t customerDBDAO.getAllPurchasedCouponsByDate(date);\n }",
"public int collect(int n){\r\n\t\tint counter=0;\r\n\t\tint distinctValue=0;\r\n\t\tboolean[] collectedvalue=new boolean[n];\r\n\t\twhile(distinctValue<n){\r\n\t\t\tint v=generateRandomCoupon(n);\r\n\t\t\tcounter++;\r\n\t\t\tif(collectedvalue[v]){\r\n\t\t\t\tdistinctValue++;\r\n\t\t\t\tcollectedvalue[v]=true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn counter++;\r\n\t}",
"public int getCompaniesCount() {\n return companies_.size();\n }",
"int getCustomersCount();",
"@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_CAMPUS);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(FINDER_PATH_COUNT_ALL, FINDER_ARGS_EMPTY,\n\t\t\t\t\tcount);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}",
"public int getDeliveriesCount() {\n return deliveries_.size();\n }",
"@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(\n\t\t\t_finderPathCountAll, FINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_CATEGORY);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(\n\t\t\t\t\t_finderPathCountAll, FINDER_ARGS_EMPTY, count);\n\t\t\t}\n\t\t\tcatch (Exception exception) {\n\t\t\t\tfinderCache.removeResult(\n\t\t\t\t\t_finderPathCountAll, FINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(exception);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}",
"public long countAll();",
"int getCazuriCount();",
"public Collection<Coupon> getCompanyCoupons() {\n return couponRepo.findCouponsByCompanyID(this.companyID);\n }",
"@javax.annotation.Nullable\n @ApiModelProperty(value = \"Maps the coupon value to a key-value list of that coupons attributes.\")\n\n public Object getCoupons() {\n return coupons;\n }",
"int getAcksCount();",
"int getAcksCount();",
"@Override\r\n\tpublic int getCountByAll() throws Exception {\n\t\treturn 0;\r\n\t}",
"@Override\r\n\tpublic int paylistCount(Criteria cri) throws Exception {\n\t\treturn adminDAO.paylistCount(cri);\r\n\t}",
"public Result viewCoupons() {\n CouponReceiveCenter receiveCenter = CouponReceiveCenter.find.byId(session().get(\"email\"));\n return ok(\n views.html.allcoupons.render(receiveCenter)\n );\n }",
"@java.lang.Override\n public int getPriceCount() {\n return price_.size();\n }",
"@Override\r\n\tpublic int outallcount() {\n\t\treturn productRaw_OutDao.allCount();\r\n\t}",
"public int countAllActivePlayers(ArrayList<PlayerController> allPlayers)\n\t{\n\t\tint count = 0;\n\t\tfor(int i=0;i<allPlayers.size();i+=1)\n\t\t{\n\t\t\tif(allPlayers.get(i).active)\n\t\t\t{\n\t\t\t\tcount+=1;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}",
"public void count() {\n APIlib.getInstance().addJSLine(jsBase + \".count();\");\n }",
"@Override\n public final long countAll() {\n\treturn (long) getEntityManager()\n\t\t.createQuery(\"select count(*) from \"\n\t\t\t+ CustomerUser.class.getName())\n\t\t.getSingleResult();\n }",
"long countNumberOfProductsInDatabase();",
"private int countProductsInCart_UPDATED() {\n System.out.println(\"-=====================Shopping Cart List========================================-\");\n int count, value;\n count = 0;\n List<WebElement> cakes = getDriver().findElements(By.xpath(\"//*[text()='Edit Your Cake']\"));\n List<WebElement> sthAndCnC = getDriver().findElements(By.xpath(\"//*[starts-with(@id, 'basketBody_') and @type='number']\"));\n System.out.println(\" === adding \" + cakes.size() + \" cakes to count\");\n count += cakes.size();\n for (WebElement product : sthAndCnC) {\n if ((!product.getAttribute(\"value\").equals(\"\")) && (product.getAttribute(\"value\") != null)) {\n String checkForLB = product.getAttribute(\"data-qtyincrement\");\n if (checkForLB.contains(\"0.\")) { //To validate for LB(s) items\n value = 1;\n } else {\n value = Integer.valueOf(product.getAttribute(\"value\"));\n }\n System.out.println(\"=== adding \" + value + \" cnc or sth item to cart\");\n count += value;\n } else {\n System.out.println(\"=== error adding product quantity\");\n }\n }\n System.out.println(\" === Count was: \" + count);\n System.out.println(\"-=====================Shopping Cart List========================================-\");\n return count;\n }",
"public long countAll() {\n\t\treturn super.doCountAll();\n\t}",
"@Override\n public int countAll() {\n\n Query qry = this.em.createQuery(\n \"select count(assoc) \" +\n \"from WorkToSubjectEntity assoc\");\n\n return ((Long) qry.getSingleResult()).intValue();\n }",
"public int getStreamCouponHistoryListCount() {\n return streamCouponHistoryList_.size();\n }",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"public static int countAll() {\n\t\treturn getPersistence().countAll();\n\t}",
"int getTransactionsCount();",
"public int countryCount(){\n\t\treturn this.countries.size();\n\t}",
"int getTotalDepositCount();",
"public String getCustomerProductCount(String[] carrierIds,int channelModelParam,String beginDate,String endDate,String userId,String curUserName,String isPrint);",
"@Override\n\tpublic int countAll() {\n\t\tLong count = (Long)finderCache.getResult(\n\t\t\t_finderPathCountAll, FINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_PHATVAY);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(\n\t\t\t\t\t_finderPathCountAll, FINDER_ARGS_EMPTY, count);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(\n\t\t\t\t\t_finderPathCountAll, FINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}",
"@Override\r\n\tpublic List<PayedProduct> getProductCount() {\n\t\tList<PayedProduct> list=null;\r\n\t\ttry {\r\n\t\t\tString sql=\"SELECT * FROM payedproduct\";\r\n\t\t\treturn qr.query(sql, new BeanListHandler<PayedProduct>(PayedProduct.class));\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public int Customers()\r\n\t{\r\n\t\treturn customers.size();\r\n\t}"
]
| [
"0.7208497",
"0.6883",
"0.6834106",
"0.6597679",
"0.65643275",
"0.6511057",
"0.6434128",
"0.63509274",
"0.6143228",
"0.61198026",
"0.6081262",
"0.60797125",
"0.60311913",
"0.60079926",
"0.60079926",
"0.60079926",
"0.5987306",
"0.59388673",
"0.59094507",
"0.5873482",
"0.58435434",
"0.58013844",
"0.57832944",
"0.5771295",
"0.5766584",
"0.5758154",
"0.57395387",
"0.5734948",
"0.5728558",
"0.5707729",
"0.5700145",
"0.5694547",
"0.5690514",
"0.5686856",
"0.5684698",
"0.566185",
"0.56585056",
"0.56433326",
"0.56433326",
"0.56433326",
"0.56433326",
"0.56433326",
"0.56433326",
"0.56433326",
"0.56433326",
"0.56433326",
"0.56433326",
"0.56433326",
"0.5632891",
"0.56322384",
"0.5624218",
"0.5621098",
"0.56137127",
"0.5608221",
"0.55976564",
"0.55932873",
"0.5588582",
"0.5583046",
"0.55813634",
"0.55791366",
"0.5566132",
"0.5561665",
"0.55488783",
"0.5545826",
"0.55355823",
"0.552454",
"0.5519678",
"0.5518781",
"0.550942",
"0.550942",
"0.5500361",
"0.5490545",
"0.5486395",
"0.5484381",
"0.54795635",
"0.54752064",
"0.5474602",
"0.5469148",
"0.5465608",
"0.5455477",
"0.54554063",
"0.54534423",
"0.54502946",
"0.54478014",
"0.54478014",
"0.54478014",
"0.54478014",
"0.54478014",
"0.54478014",
"0.54478014",
"0.54478014",
"0.54478014",
"0.54478014",
"0.5446782",
"0.5443599",
"0.54424626",
"0.5441695",
"0.5440663",
"0.54332805",
"0.5433109"
]
| 0.72745335 | 0 |
Count all the coupons of specific company. | int countByCompanyId(int companyId); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Query(value = \"SELECT COUNT(*) FROM customers_coupons AS cvc INNER JOIN coupons AS c On cvc.coupons_id = c.id WHERE company_id = ?1\" , nativeQuery = true)\n int countAllCouponsPurchasedByCompany(int companyId);",
"@Override\n\tpublic int countCompany() {\n\t\treturn comShortMapper.selectCountShort()+elegantMapper.selectCountEle()+honorMapper.selectCountHonor();\n\t}",
"int getCountForConditionCompany(Long companyId);",
"public int countByCompanyId(long companyId);",
"public int getCompaniesCount() {\n return companies_.size();\n }",
"int getCouponListCount();",
"public int countByc(long companyId)\n throws com.liferay.portal.kernel.exception.SystemException;",
"@Query(value = \"SELECT COUNT(*) FROM customers_coupons\", nativeQuery = true)\n int countAllCouponsPurchased();",
"@Query(value = \"SELECT COUNT(*) FROM coupons\", nativeQuery = true)\n int countAllCoupons();",
"public int getCompaniesCount() {\n if (companiesBuilder_ == null) {\n return companies_.size();\n } else {\n return companiesBuilder_.getCount();\n }\n }",
"public Collection<Coupon> getCompanyCoupons() {\n return couponRepo.findCouponsByCompanyID(this.companyID);\n }",
"public int countByUuid_C(String uuid, long companyId);",
"public int countByUuid_C(String uuid, long companyId);",
"public int countByUuid_C(String uuid, long companyId);",
"public int totalCompanies(){\n\treturn companyEmpWageArray.size();\n }",
"public int getCouponListCount() {\n return couponList_.size();\n }",
"public int countByC_S(long companyId, int status);",
"public int countByUuid_C(java.lang.String uuid, long companyId);",
"public int getCouponListCount() {\n if (couponListBuilder_ == null) {\n return couponList_.size();\n } else {\n return couponListBuilder_.getCount();\n }\n }",
"@Override\r\n\tpublic int carpoollistCount(Criteria cri) throws Exception {\n\t\treturn adminDAO.carpoollistCount(cri);\r\n\t}",
"public ArrayList<Coupon> getCompanyCoupons() throws SQLException {\r\n\t\tArrayList<Coupon> coupons = couponsDAO.getAllCoupons();\r\n\t\tArrayList<Coupon> coups = new ArrayList<>();\r\n\t\tfor (Coupon coupon : coupons) {\r\n\t\t\tif (companyID == coupon.getCompanyID())\r\n\t\t\t\tcoups.add(coupon);\r\n\t\t}\r\n\t\treturn coups;\r\n\t}",
"@Override\n\tpublic Integer getAllComBorrowingsCount() {\n\t\treturn comBorrowingsMapper.countByExample(new ComBorrowingsExample());\n\t}",
"List<Coupon> findByCompanyId(int companyId);",
"@Override\n public int countByCompany(long companyId) throws SystemException {\n FinderPath finderPath = FINDER_PATH_COUNT_BY_COMPANY;\n\n Object[] finderArgs = new Object[] { companyId };\n\n Long count = (Long) FinderCacheUtil.getResult(finderPath, finderArgs,\n this);\n\n if (count == null) {\n StringBundler query = new StringBundler(2);\n\n query.append(_SQL_COUNT_BROKERMESSAGELISTENER_WHERE);\n\n query.append(_FINDER_COLUMN_COMPANY_COMPANYID_2);\n\n String sql = query.toString();\n\n Session session = null;\n\n try {\n session = openSession();\n\n Query q = session.createQuery(sql);\n\n QueryPos qPos = QueryPos.getInstance(q);\n\n qPos.add(companyId);\n\n count = (Long) q.uniqueResult();\n\n FinderCacheUtil.putResult(finderPath, finderArgs, count);\n } catch (Exception e) {\n FinderCacheUtil.removeResult(finderPath, finderArgs);\n\n throw processException(e);\n } finally {\n closeSession(session);\n }\n }\n\n return count.intValue();\n }",
"@Override\r\n\tpublic int paylistCount(Criteria cri) throws Exception {\n\t\treturn adminDAO.paylistCount(cri);\r\n\t}",
"public List<Coupon> getAllCouponsByCompanyName(String companyName) {\n\t\treturn Validations.VerifyNotEmpty(\n\t\t\t\tcouponRepository.findByOwnerUsernameIgnoreCase(companyName));\n\t}",
"@Override\n\tpublic Integer findCount() {\n\t\tInteger total;\n\t\tString hql=\"from Commodity\";\n\t\tList<Commodity> commoditylist=(List<Commodity>) this.getHibernateTemplate().find(hql, null);\n\t\ttotal=commoditylist.size();\n\t\treturn total;\n\t}",
"public int countByc_g(long groupId, long companyId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"long countSearchByCompanyName(Map<String, String> options);",
"@Override\n\t/** Returns all Coupons of selected Company as an array list */\n\tpublic Collection<Coupon> getCouponsByCompany(int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupons via prepared statement\n\t\t\tString getCouponsByCompanySQL = \"select * from coupon where id in (select couponid from compcoupon where companyid = ?)\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponsByCompanySQL);\n\t\t\t// Set Company ID variable that method received into prepared\n\t\t\t// statement\n\t\t\tpstmt.setInt(1, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}",
"long countByExample(CompanyExtendExample example);",
"long countByExample(CmsChannelCriteria example);",
"public int countByUuid_C(java.lang.String uuid, long companyId)\n throws com.liferay.portal.kernel.exception.SystemException;",
"public int countByUuid_C(java.lang.String uuid, long companyId)\n throws com.liferay.portal.kernel.exception.SystemException;",
"public Collection<Coupon> getCompanyCoupons(Category category) {\n return couponRepo.findByCompanyIDAndCategory(this.companyID, category);\n }",
"public static int countByc(long companyId)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence().countByc(companyId);\n }",
"private String companies() {\r\n\t\tint num=tile.getCompaniesNum();\r\n\t\tString out=\"Total Companies: \"+num;\r\n\t\treturn out;\r\n\t}",
"@Override\r\n\tpublic int countByUuid_C(String uuid, long companyId) {\r\n\t\tFinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_C;\r\n\r\n\t\tObject[] finderArgs = new Object[] { uuid, companyId };\r\n\r\n\t\tLong count = (Long)finderCache.getResult(finderPath, finderArgs, this);\r\n\r\n\t\tif (count == null) {\r\n\t\t\tStringBundler query = new StringBundler(3);\r\n\r\n\t\t\tquery.append(_SQL_COUNT_SHARE_WHERE);\r\n\r\n\t\t\tboolean bindUuid = false;\r\n\r\n\t\t\tif (uuid == null) {\r\n\t\t\t\tquery.append(_FINDER_COLUMN_UUID_C_UUID_1);\r\n\t\t\t}\r\n\t\t\telse if (uuid.equals(StringPool.BLANK)) {\r\n\t\t\t\tquery.append(_FINDER_COLUMN_UUID_C_UUID_3);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tbindUuid = true;\r\n\r\n\t\t\t\tquery.append(_FINDER_COLUMN_UUID_C_UUID_2);\r\n\t\t\t}\r\n\r\n\t\t\tquery.append(_FINDER_COLUMN_UUID_C_COMPANYID_2);\r\n\r\n\t\t\tString sql = query.toString();\r\n\r\n\t\t\tSession session = null;\r\n\r\n\t\t\ttry {\r\n\t\t\t\tsession = openSession();\r\n\r\n\t\t\t\tQuery q = session.createQuery(sql);\r\n\r\n\t\t\t\tQueryPos qPos = QueryPos.getInstance(q);\r\n\r\n\t\t\t\tif (bindUuid) {\r\n\t\t\t\t\tqPos.add(uuid);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tqPos.add(companyId);\r\n\r\n\t\t\t\tcount = (Long)q.uniqueResult();\r\n\r\n\t\t\t\tfinderCache.putResult(finderPath, finderArgs, count);\r\n\t\t\t}\r\n\t\t\tcatch (Exception e) {\r\n\t\t\t\tfinderCache.removeResult(finderPath, finderArgs);\r\n\r\n\t\t\t\tthrow processException(e);\r\n\t\t\t}\r\n\t\t\tfinally {\r\n\t\t\t\tcloseSession(session);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn count.intValue();\r\n\t}",
"public int countByC_S(long companyId, int[] statuses);",
"public long employeesCount(String companyShortName);",
"public int countByC_U_S(long companyId, long userId, int status);",
"int getCustomersCount();",
"public List<Coupon> getAllCouponsByCompany(long ownerId, boolean activeCoupons) {\n\t\tList<Coupon> companyCoupons = \n\t\t\t\tcouponRepository.findAllByOwnerIdAndIsActive(ownerId, activeCoupons);\n\t\treturn Validations.verifyNotNull(companyCoupons);\n\t}",
"int countByExample(CGcontractCreditExample example);",
"public void getAllPurchasedCoupons() throws DBException\n {\n\t customerDBDAO.getCoupons();\n }",
"@Override\n\tpublic String countByCondition(Familybranch con) throws Exception {\n\t\treturn null;\n\t}",
"@Override\n\tpublic int countByCompanyId(long companyId) throws SystemException {\n\t\tFinderPath finderPath = FINDER_PATH_COUNT_BY_COMPANYID;\n\n\t\tObject[] finderArgs = new Object[] { companyId };\n\n\t\tLong count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs,\n\t\t\t\tthis);\n\n\t\tif (count == null) {\n\t\t\tStringBundler query = new StringBundler(2);\n\n\t\t\tquery.append(_SQL_COUNT_TVSHOW_WHERE);\n\n\t\t\tquery.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2);\n\n\t\t\tString sql = query.toString();\n\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(sql);\n\n\t\t\t\tQueryPos qPos = QueryPos.getInstance(q);\n\n\t\t\t\tqPos.add(companyId);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tFinderCacheUtil.putResult(finderPath, finderArgs, count);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tFinderCacheUtil.removeResult(finderPath, finderArgs);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}",
"@Override\n\tpublic int countByBrowse(CustomerBrowse browse) {\n\t\treturn customerBrowseMapper.countByBrowse(browse);\n\t}",
"int getCustomerCount(CustomerVo vo);",
"List<Coupon> findByCompanyIdAndCategory(int companyId, Category category);",
"public static void showCompanies(){\n\t\tCompanyDao.getAllCompanies();\n\t}",
"int getStreamCouponHistoryListCount();",
"int countByExample(TycCompanyCheckCrawlerExample example);",
"public static int countByUuid_C(String uuid, long companyId) {\n\t\treturn getPersistence().countByUuid_C(uuid, companyId);\n\t}",
"public static int countByUuid_C(String uuid, long companyId) {\n\t\treturn getPersistence().countByUuid_C(uuid, companyId);\n\t}",
"public static int countByUuid_C(String uuid, long companyId) {\n\t\treturn getPersistence().countByUuid_C(uuid, companyId);\n\t}",
"@Test\n @Order(8)\n void getCountByCity() {\n var a3 = new Account(Industry.ECOMMERCE, 100, \"Barcelona\", \"Spain\");\n var a4 = new Account(Industry.ECOMMERCE, 200, \"Barcelona\", \"Spain\");\n accountRepository.saveAll(List.of(a3, a4));\n var o1 = new Opportunity(Product.HYBRID, 100, c, Status.CLOSED_WON, a3, sr);\n var o2 = new Opportunity(Product.HYBRID, 100, c, Status.CLOSED_WON, a4, sr);\n opportunityRepository.saveAll(List.of(o1, o2));\n\n List<IOpportunityCountryOrCityCount> cityCounts = accountRepository.countByCity();\n assertEquals(3, cityCounts.size());\n assertEquals(\"Barcelona\", cityCounts.get(0).getCountryOrCityComment());\n assertEquals(2, cityCounts.get(0).getCountryOrCityCount());\n assertEquals(\"London\", cityCounts.get(1).getCountryOrCityComment());\n assertEquals(1, cityCounts.get(1).getCountryOrCityCount());\n assertEquals(\"Madrid\", cityCounts.get(2).getCountryOrCityComment());\n assertEquals(0, cityCounts.get(2).getCountryOrCityCount());\n }",
"@Override\n\tpublic Integer findByChannelCounts(String bikeCode, List<Long> modelsList) {\n\t\tBikeExample bikeExample = new BikeExample();\n\t\tBikeExample.Criteria criteria = bikeExample.createCriteria();\n\t\tcriteria.andBikeDelEqualTo(0);\n\t\tif(null!=bikeCode&&!\"\".equals(bikeCode)){\n\t\t\tcriteria.andBikeCodeLike(bikeCode+\"%\");\n\t\t}\n\t\tcriteria.andBikeModelsIdIn(modelsList);\n\t\treturn bikeMapper.countByExample(bikeExample);\n\t}",
"@Transactional(readOnly = true)\n public long countByCriteria(AccbillnoCriteria criteria) {\n log.debug(\"count by criteria : {}\", criteria);\n final Specification<Accbillno> specification = createSpecification(criteria);\n return accbillnoRepository.count(specification);\n }",
"public ArrayList<Coupon> getCompanyCoupons(Category category) throws SQLException {\r\n\t\tArrayList<Coupon> coupons = couponsDAO.getAllCoupons();\r\n\t\tArrayList<Coupon> coups = new ArrayList<>();\r\n\t\tfor (Coupon coupon : coupons) {\r\n\t\t\tif (companyID == coupon.getCompanyID())\r\n\t\t\t\tif (coupon.getCategory().equals(category))\r\n\t\t\t\t\tcoups.add(coupon);\r\n\t\t}\r\n\t\treturn coups;\r\n\t}",
"int getCazuriCount();",
"public String getBulletinCount(String companyId) {\n\t\tlong count = 0;\n\t\tSession session = getSession();\n\t\tString hql = \"select count(id) from AuctionBulletin a \" +\n\t\t\t\"where a.deleteFlag=0 and a.companyId=:companyId \";\n\t\tcount = Long.parseLong(session.createQuery(hql).setString(\"companyId\", companyId)\n\t\t\t\t.uniqueResult().toString());\n\t\tsession.close();\n\t\treturn \"\" + count;\n\t}",
"long countUniqueClientsBetween(String companyId, DateTime startDate, DateTime endDate);",
"public Collection<Coupon> getCompanyCoupons(double maxPrice) {\n return couponRepo.findCouponsByCompanyIDAndPriceLessThanEqual(this.companyID, maxPrice);\n }",
"public String getCustomerProductCount(String[] carrierIds,int channelModelParam,String beginDate,String endDate,String userId,String curUserName,String isPrint);",
"long countByExample(CmIndustryConfigExample example);",
"public abstract long countByCustomer(Customer customer);",
"public abstract long countByCustomer(Customer customer);",
"private void printCustomerCouponsByCategory(CustomerService customerService) \n\t\t\t\t\t\tthrows DBOperationException\n\t{\n\t\tCategory category = this.getCategory();\n\t\tList<Coupon> coupons = customerService.getCustomerCoupons(category);\n//\t\tSystem.out.println(customerService.getClientMsg());\n\t\tif(coupons == null)\n\t\t{\n\t\t\tSystem.out.println(\"Error retrieving coupons\");\n\t\t\treturn;\n\t\t}\n\t\tif(coupons.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"This customer has no coupons in the chosen category\");\n\t\t\treturn;\n\t\t}\n//\t\tSystem.out.println(coupons.size()+\" coupons found for this customer int chosen category\");\n\t\tfor(Coupon currCoupon : coupons)\n\t\t\tSystem.out.println(currCoupon);\n\t}",
"int getDeliveriesCount();",
"private void printCustomerCoupons(CustomerService customerService) \n\t\t\t\t\t\tthrows DBOperationException\n\t{\n\t\tList<Coupon> coupons = customerService.getCustomerCoupons();\n\t\tSystem.out.println(customerService.getClientMsg());\n\t\tif(coupons == null)\n\t\t{\n\t\t\tSystem.out.println(\"Error retrieving coupons\");\n\t\t\treturn;\n\t\t}\n\t\tif(coupons.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"This customer has no coupons\");\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.println(coupons.size()+\" coupons found for this customer\");\n\t\tfor(Coupon currCoupon : coupons)\n\t\t\tSystem.out.println(currCoupon);\n\t}",
"@Override\n\tpublic String countByCondition(Familynames con) throws Exception {\n\t\treturn null;\n\t}",
"@Test\n @Order(7)\n void getCountByCountry() {\n var a3 = new Account(Industry.ECOMMERCE, 100, \"Barcelona\", \"Spain\");\n var a4 = new Account(Industry.ECOMMERCE, 100, \"Toledo\", \"Spain\");\n accountRepository.saveAll(List.of(a3, a4));\n var o1 = new Opportunity(Product.HYBRID, 100, c, Status.CLOSED_WON, a3, sr);\n var o2 = new Opportunity(Product.HYBRID, 100, c, Status.CLOSED_WON, a4, sr);\n opportunityRepository.saveAll(List.of(o1, o2));\n\n List<IOpportunityCountryOrCityCount> countryCounts = accountRepository.countByCountry();\n assertEquals(2, countryCounts.size());\n assertEquals(\"Spain\", countryCounts.get(0).getCountryOrCityComment());\n assertEquals(2, countryCounts.get(0).getCountryOrCityCount());\n assertEquals(\"UK\", countryCounts.get(1).getCountryOrCityComment());\n assertEquals(1, countryCounts.get(1).getCountryOrCityCount());\n }",
"public int returnAllAddressListCount(AddressCommonSC criteria) throws DAOException\r\n {\r\n DAOHelper.fixGridMaps(criteria, getSqlMap(), \"addressMapper.cifAddressDetailMap\");\r\n\r\n return ((Integer) getSqlMap().queryForObject(\"addressMapper.allAddressListCount\", criteria)).intValue();\r\n\r\n }",
"public Result viewCoupons() {\n CouponReceiveCenter receiveCenter = CouponReceiveCenter.find.byId(session().get(\"email\"));\n return ok(\n views.html.allcoupons.render(receiveCenter)\n );\n }",
"Long getAllCount();",
"@Transactional(readOnly = true)\n public long countByCriteria(DSpczCriteria criteria) {\n log.debug(\"count by criteria : {}\", criteria);\n final Specification<DSpcz> specification = createSpecification(criteria);\n return dSpczRepository.count(specification);\n }",
"int countByExample(CusBankAccountExample example);",
"public int getCoffeeShopCount() {\n String sqlCountQuery = \"SELECT * FROM \" + CoffeeShopDatabase.CoffeeShopTable.TABLE_NAME;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(sqlCountQuery, null);\n cursor.close();\n int count = cursor.getCount();\n return count;\n }",
"int getTrucksCount();",
"public ArrayList<Coupon> getCompanyCoupons(double maxPrice) throws SQLException {\r\n\t\tArrayList<Coupon> coupons = couponsDAO.getAllCoupons();\r\n\t\tArrayList<Coupon> coups = new ArrayList<>();\r\n\t\tfor (Coupon coupon : coupons) {\r\n\t\t\tif (companyID == coupon.getCompanyID())\r\n\t\t\t\tif (coupon.getPrice() <= maxPrice)\r\n\t\t\t\t\tcoups.add(coupon);\r\n\t\t}\r\n\t\treturn coups;\r\n\t}",
"int countByExample(NeeqCompanyAccountingFirmOnlineExample example);",
"public int cuantosCursos(){\n return inscripciones.size();\n }",
"public int DetailComentListCount(HashMap<String, Object> param) {\n\t\treturn sqlSession.selectOne(\"main.DetailComentListCount\",param);\r\n\t}",
"@Override\r\n\tpublic int countCopProject(Map<String, Object> map) throws Exception {\n\t\treturn 0;\r\n\t}",
"public static void printGroupByCountryCount(){\n for (CountryGroup group : query.groupByCountry()) {\n System.out.println(\"There are \" + group.people.size() + \" people in \" + group.country);\n }\n }",
"hr.client.appuser.CouponCenter.AppCoupon getCouponList(int index);",
"@Test\n @Order(9)\n void getCountByIndustry() {\n var a3 = new Account(Industry.ECOMMERCE, 100, \"Barcelona\", \"Spain\");\n var a4 = new Account(Industry.MEDICAL, 200, \"Barcelona\", \"Spain\");\n accountRepository.saveAll(List.of(a3, a4));\n var o1 = new Opportunity(Product.HYBRID, 100, c, Status.CLOSED_LOST, a3, sr);\n var o2 = new Opportunity(Product.HYBRID, 100, c, Status.OPEN, a4, sr);\n opportunityRepository.saveAll(List.of(o1, o2));\n\n List<IOpportunityIndustryCount> industryCounts = accountRepository.countByIndustry();\n assertEquals(3, industryCounts.size());\n assertEquals(Industry.ECOMMERCE, industryCounts.get(0).getIndustryComment());\n assertEquals(2, industryCounts.get(0).getIndustryCount());\n assertEquals(Industry.MEDICAL, industryCounts.get(1).getIndustryComment());\n assertEquals(1, industryCounts.get(1).getIndustryCount());\n assertEquals(Industry.MANUFACTURING, industryCounts.get(2).getIndustryComment());\n assertEquals(0, industryCounts.get(2).getIndustryCount());\n }",
"int countByExample(CCustomerExample example);",
"public static int countByCompanyId(long companyId)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence().countByCompanyId(companyId);\n }",
"public abstract long countByCountry(Country country);",
"public abstract long countByCountry(Country country);",
"public abstract long countByCity(City city);",
"public abstract long countByCity(City city);",
"public int count() {\n\t\tint count = cstCustomerDao.count();\n\t\treturn count;\n\t}",
"int getPriceCount();",
"int countByExample(MEsShoppingCartDTOCriteria example);",
"@Override\n\tpublic int countByUuid_C(String uuid, long companyId)\n\t\tthrows SystemException {\n\t\tFinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_C;\n\n\t\tObject[] finderArgs = new Object[] { uuid, companyId };\n\n\t\tLong count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs,\n\t\t\t\tthis);\n\n\t\tif (count == null) {\n\t\t\tStringBundler query = new StringBundler(3);\n\n\t\t\tquery.append(_SQL_COUNT_TVSHOW_WHERE);\n\n\t\t\tboolean bindUuid = false;\n\n\t\t\tif (uuid == null) {\n\t\t\t\tquery.append(_FINDER_COLUMN_UUID_C_UUID_1);\n\t\t\t}\n\t\t\telse if (uuid.equals(StringPool.BLANK)) {\n\t\t\t\tquery.append(_FINDER_COLUMN_UUID_C_UUID_3);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbindUuid = true;\n\n\t\t\t\tquery.append(_FINDER_COLUMN_UUID_C_UUID_2);\n\t\t\t}\n\n\t\t\tquery.append(_FINDER_COLUMN_UUID_C_COMPANYID_2);\n\n\t\t\tString sql = query.toString();\n\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(sql);\n\n\t\t\t\tQueryPos qPos = QueryPos.getInstance(q);\n\n\t\t\t\tif (bindUuid) {\n\t\t\t\t\tqPos.add(uuid);\n\t\t\t\t}\n\n\t\t\t\tqPos.add(companyId);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tFinderCacheUtil.putResult(finderPath, finderArgs, count);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tFinderCacheUtil.removeResult(finderPath, finderArgs);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}",
"int getServiceAccountsCount();",
"@Override\n\t/** Returns all Coupons as an array list */\n\tpublic Collection<Coupon> getAllCoupons() throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve all Coupons via prepared\n\t\t\t// statement\n\t\t\tString getAllCouponsSQL = \"select * from coupon\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getAllCouponsSQL);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}"
]
| [
"0.756825",
"0.73603505",
"0.7171021",
"0.70534104",
"0.70367676",
"0.6909915",
"0.67322314",
"0.66569763",
"0.66373336",
"0.6622985",
"0.65912586",
"0.6540851",
"0.6540851",
"0.6540851",
"0.6479915",
"0.63875365",
"0.6368365",
"0.62789875",
"0.62716115",
"0.6267189",
"0.6167366",
"0.6157894",
"0.6105421",
"0.6090893",
"0.6053344",
"0.6045863",
"0.60075915",
"0.5926023",
"0.5912535",
"0.5868455",
"0.58535355",
"0.5820873",
"0.5820084",
"0.5820084",
"0.5770111",
"0.5748946",
"0.5732027",
"0.5719336",
"0.57098025",
"0.5709566",
"0.5634415",
"0.56191134",
"0.56046855",
"0.55866534",
"0.5584088",
"0.55829597",
"0.55787414",
"0.5569299",
"0.55673933",
"0.5560316",
"0.55573994",
"0.5555495",
"0.55549246",
"0.55502343",
"0.55502343",
"0.55502343",
"0.5548096",
"0.55348355",
"0.5524957",
"0.55240995",
"0.5520806",
"0.5508703",
"0.54987395",
"0.54767543",
"0.5465377",
"0.5461663",
"0.54523396",
"0.54523396",
"0.5452007",
"0.5443952",
"0.54339623",
"0.5425498",
"0.540814",
"0.5403101",
"0.5397691",
"0.5382617",
"0.53783184",
"0.53777397",
"0.53604287",
"0.53561974",
"0.53520197",
"0.5350682",
"0.534704",
"0.5334349",
"0.5313214",
"0.5312438",
"0.53098583",
"0.5303077",
"0.52968967",
"0.529641",
"0.5296249",
"0.5296249",
"0.5291633",
"0.5291633",
"0.529057",
"0.5289108",
"0.52822673",
"0.528148",
"0.5261961",
"0.5261076"
]
| 0.69838953 | 5 |
Count all the coupons that purchased of specific company. | @Query(value = "SELECT COUNT(*) FROM customers_coupons AS cvc INNER JOIN coupons AS c On cvc.coupons_id = c.id WHERE company_id = ?1" , nativeQuery = true)
int countAllCouponsPurchasedByCompany(int companyId); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getCountForConditionCompany(Long companyId);",
"@Override\n\tpublic int countCompany() {\n\t\treturn comShortMapper.selectCountShort()+elegantMapper.selectCountEle()+honorMapper.selectCountHonor();\n\t}",
"public int countByCompanyId(long companyId);",
"int countByCompanyId(int companyId);",
"int getCouponListCount();",
"public int getCompaniesCount() {\n return companies_.size();\n }",
"@Query(value = \"SELECT COUNT(*) FROM customers_coupons\", nativeQuery = true)\n int countAllCouponsPurchased();",
"public int countByUuid_C(String uuid, long companyId);",
"public int countByUuid_C(String uuid, long companyId);",
"public int countByUuid_C(String uuid, long companyId);",
"public int countByc(long companyId)\n throws com.liferay.portal.kernel.exception.SystemException;",
"public int totalCompanies(){\n\treturn companyEmpWageArray.size();\n }",
"public int countByUuid_C(java.lang.String uuid, long companyId);",
"public Collection<Coupon> getCompanyCoupons() {\n return couponRepo.findCouponsByCompanyID(this.companyID);\n }",
"public int getCompaniesCount() {\n if (companiesBuilder_ == null) {\n return companies_.size();\n } else {\n return companiesBuilder_.getCount();\n }\n }",
"public int getCouponListCount() {\n return couponList_.size();\n }",
"public int countByC_S(long companyId, int status);",
"@Query(value = \"SELECT COUNT(*) FROM coupons\", nativeQuery = true)\n int countAllCoupons();",
"@Override\n\tpublic Integer getAllComBorrowingsCount() {\n\t\treturn comBorrowingsMapper.countByExample(new ComBorrowingsExample());\n\t}",
"public ArrayList<Coupon> getCompanyCoupons() throws SQLException {\r\n\t\tArrayList<Coupon> coupons = couponsDAO.getAllCoupons();\r\n\t\tArrayList<Coupon> coups = new ArrayList<>();\r\n\t\tfor (Coupon coupon : coupons) {\r\n\t\t\tif (companyID == coupon.getCompanyID())\r\n\t\t\t\tcoups.add(coupon);\r\n\t\t}\r\n\t\treturn coups;\r\n\t}",
"public int getCouponListCount() {\n if (couponListBuilder_ == null) {\n return couponList_.size();\n } else {\n return couponListBuilder_.getCount();\n }\n }",
"@Override\n public int countByCompany(long companyId) throws SystemException {\n FinderPath finderPath = FINDER_PATH_COUNT_BY_COMPANY;\n\n Object[] finderArgs = new Object[] { companyId };\n\n Long count = (Long) FinderCacheUtil.getResult(finderPath, finderArgs,\n this);\n\n if (count == null) {\n StringBundler query = new StringBundler(2);\n\n query.append(_SQL_COUNT_BROKERMESSAGELISTENER_WHERE);\n\n query.append(_FINDER_COLUMN_COMPANY_COMPANYID_2);\n\n String sql = query.toString();\n\n Session session = null;\n\n try {\n session = openSession();\n\n Query q = session.createQuery(sql);\n\n QueryPos qPos = QueryPos.getInstance(q);\n\n qPos.add(companyId);\n\n count = (Long) q.uniqueResult();\n\n FinderCacheUtil.putResult(finderPath, finderArgs, count);\n } catch (Exception e) {\n FinderCacheUtil.removeResult(finderPath, finderArgs);\n\n throw processException(e);\n } finally {\n closeSession(session);\n }\n }\n\n return count.intValue();\n }",
"public int countByUuid_C(java.lang.String uuid, long companyId)\n throws com.liferay.portal.kernel.exception.SystemException;",
"public int countByUuid_C(java.lang.String uuid, long companyId)\n throws com.liferay.portal.kernel.exception.SystemException;",
"List<Coupon> findByCompanyId(int companyId);",
"public void getAllPurchasedCoupons() throws DBException\n {\n\t customerDBDAO.getCoupons();\n }",
"public Collection<Coupon> getAllPurchasedCoupons() {\r\n\t\treturn db.getCustomer(cust).getCouponHistory();\r\n\t}",
"@Override\r\n\tpublic int paylistCount(Criteria cri) throws Exception {\n\t\treturn adminDAO.paylistCount(cri);\r\n\t}",
"public List<Coupon> getAllCouponsByCompanyName(String companyName) {\n\t\treturn Validations.VerifyNotEmpty(\n\t\t\t\tcouponRepository.findByOwnerUsernameIgnoreCase(companyName));\n\t}",
"long countByExample(CompanyExtendExample example);",
"public int countByc_g(long groupId, long companyId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;",
"public String getCustomerProductCount(String[] carrierIds,int channelModelParam,String beginDate,String endDate,String userId,String curUserName,String isPrint);",
"long countSearchByCompanyName(Map<String, String> options);",
"@Override\n\tpublic Integer findCount() {\n\t\tInteger total;\n\t\tString hql=\"from Commodity\";\n\t\tList<Commodity> commoditylist=(List<Commodity>) this.getHibernateTemplate().find(hql, null);\n\t\ttotal=commoditylist.size();\n\t\treturn total;\n\t}",
"@Override\r\n\tpublic int carpoollistCount(Criteria cri) throws Exception {\n\t\treturn adminDAO.carpoollistCount(cri);\r\n\t}",
"long countByExample(CmsChannelCriteria example);",
"@Override\r\n\tpublic int countByUuid_C(String uuid, long companyId) {\r\n\t\tFinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_C;\r\n\r\n\t\tObject[] finderArgs = new Object[] { uuid, companyId };\r\n\r\n\t\tLong count = (Long)finderCache.getResult(finderPath, finderArgs, this);\r\n\r\n\t\tif (count == null) {\r\n\t\t\tStringBundler query = new StringBundler(3);\r\n\r\n\t\t\tquery.append(_SQL_COUNT_SHARE_WHERE);\r\n\r\n\t\t\tboolean bindUuid = false;\r\n\r\n\t\t\tif (uuid == null) {\r\n\t\t\t\tquery.append(_FINDER_COLUMN_UUID_C_UUID_1);\r\n\t\t\t}\r\n\t\t\telse if (uuid.equals(StringPool.BLANK)) {\r\n\t\t\t\tquery.append(_FINDER_COLUMN_UUID_C_UUID_3);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tbindUuid = true;\r\n\r\n\t\t\t\tquery.append(_FINDER_COLUMN_UUID_C_UUID_2);\r\n\t\t\t}\r\n\r\n\t\t\tquery.append(_FINDER_COLUMN_UUID_C_COMPANYID_2);\r\n\r\n\t\t\tString sql = query.toString();\r\n\r\n\t\t\tSession session = null;\r\n\r\n\t\t\ttry {\r\n\t\t\t\tsession = openSession();\r\n\r\n\t\t\t\tQuery q = session.createQuery(sql);\r\n\r\n\t\t\t\tQueryPos qPos = QueryPos.getInstance(q);\r\n\r\n\t\t\t\tif (bindUuid) {\r\n\t\t\t\t\tqPos.add(uuid);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tqPos.add(companyId);\r\n\r\n\t\t\t\tcount = (Long)q.uniqueResult();\r\n\r\n\t\t\t\tfinderCache.putResult(finderPath, finderArgs, count);\r\n\t\t\t}\r\n\t\t\tcatch (Exception e) {\r\n\t\t\t\tfinderCache.removeResult(finderPath, finderArgs);\r\n\r\n\t\t\t\tthrow processException(e);\r\n\t\t\t}\r\n\t\t\tfinally {\r\n\t\t\t\tcloseSession(session);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn count.intValue();\r\n\t}",
"int countByExample(CGcontractCreditExample example);",
"int getDeliveriesCount();",
"public static int countByUuid_C(String uuid, long companyId) {\n\t\treturn getPersistence().countByUuid_C(uuid, companyId);\n\t}",
"public static int countByUuid_C(String uuid, long companyId) {\n\t\treturn getPersistence().countByUuid_C(uuid, companyId);\n\t}",
"public static int countByUuid_C(String uuid, long companyId) {\n\t\treturn getPersistence().countByUuid_C(uuid, companyId);\n\t}",
"int getCustomerCount(CustomerVo vo);",
"public int countByC_S(long companyId, int[] statuses);",
"int getPurchasableOffersCount();",
"public int countByC_U_S(long companyId, long userId, int status);",
"@Override\n\t/** Returns all Coupons of selected Company as an array list */\n\tpublic Collection<Coupon> getCouponsByCompany(int compID) throws CouponSystemException {\n\t\tConnection con = null;\n\t\t// Getting a connection from the Connection Pool\n\t\tcon = ConnectionPool.getInstance().getConnection();\n\t\t// Create list object to fill it later with Coupons\n\t\tCollection<Coupon> colCoup = new ArrayList<>();\n\n\t\ttry {\n\t\t\t// Defining SQL string to retrieve Coupons via prepared statement\n\t\t\tString getCouponsByCompanySQL = \"select * from coupon where id in (select couponid from compcoupon where companyid = ?)\";\n\t\t\t// Creating prepared statement with predefined SQL string\n\t\t\tPreparedStatement pstmt = con.prepareStatement(getCouponsByCompanySQL);\n\t\t\t// Set Company ID variable that method received into prepared\n\t\t\t// statement\n\t\t\tpstmt.setInt(1, compID);\n\t\t\t// Executing prepared statement and using its result for\n\t\t\t// post-execute manipulations\n\t\t\tResultSet resCoup = pstmt.executeQuery();\n\t\t\t// While there is result line in resCoup do lines below\n\t\t\twhile (resCoup.next()) {\n\t\t\t\t// Creating Coupon object to fill it later with data from SQL\n\t\t\t\t// query result and for method to add it to the list and return\n\t\t\t\t// it afterwards\n\t\t\t\tCoupon coupon = new Coupon();\n\t\t\t\t// Set Coupon attributes according to the results in the\n\t\t\t\t// ResultSet\n\t\t\t\tcoupon.setId(resCoup.getInt(\"id\"));\n\t\t\t\tcoupon.setTitle(resCoup.getString(\"title\"));\n\t\t\t\tcoupon.setStart_date(resCoup.getDate(\"start_date\"));\n\t\t\t\tcoupon.setEnd_date(resCoup.getDate(\"end_date\"));\n\t\t\t\tcoupon.setExpired(resCoup.getString(\"expired\"));\n\t\t\t\tcoupon.setType(resCoup.getString(\"type\"));\n\t\t\t\tcoupon.setMessage(resCoup.getString(\"message\"));\n\t\t\t\tcoupon.setPrice(resCoup.getInt(\"price\"));\n\t\t\t\tcoupon.setImage(resCoup.getString(\"image\"));\n\t\t\t\t// Add resulting Coupon to the list\n\t\t\t\tcolCoup.add(coupon);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// Handling SQL exception during Coupon retrieval from the database\n\t\t\tthrow new CouponSystemException(\"SQL error - Coupon list retrieve has been failed\", e);\n\t\t} finally {\n\t\t\t// In any case we return connection to the Connection Pool (at least\n\t\t\t// we try to)\n\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t}\n\n\t\t// Return resulted list of Coupons\n\t\treturn colCoup;\n\t}",
"public Collection<Coupon> getCompanyCoupons(Category category) {\n return couponRepo.findByCompanyIDAndCategory(this.companyID, category);\n }",
"int getCustomersCount();",
"public abstract long countByCustomer(Customer customer);",
"public abstract long countByCustomer(Customer customer);",
"public List<Coupon> getAllCouponsByCompany(long ownerId, boolean activeCoupons) {\n\t\tList<Coupon> companyCoupons = \n\t\t\t\tcouponRepository.findAllByOwnerIdAndIsActive(ownerId, activeCoupons);\n\t\treturn Validations.verifyNotNull(companyCoupons);\n\t}",
"long countByExample(PurchasePaymentExample example);",
"private String companies() {\r\n\t\tint num=tile.getCompaniesNum();\r\n\t\tString out=\"Total Companies: \"+num;\r\n\t\treturn out;\r\n\t}",
"public static int countByc(long companyId)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence().countByc(companyId);\n }",
"@Override\n\tpublic int countByBrowse(CustomerBrowse browse) {\n\t\treturn customerBrowseMapper.countByBrowse(browse);\n\t}",
"public long employeesCount(String companyShortName);",
"long countUniqueClientsBetween(String companyId, DateTime startDate, DateTime endDate);",
"public int getCoffeeShopCount() {\n String sqlCountQuery = \"SELECT * FROM \" + CoffeeShopDatabase.CoffeeShopTable.TABLE_NAME;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(sqlCountQuery, null);\n cursor.close();\n int count = cursor.getCount();\n return count;\n }",
"public void getAllPurchasedCouponsByType(CouponType type) throws DBException\n {\n\t customerDBDAO.getAllPurchasedCouponsByType(type);\n }",
"int countByExample(TycCompanyCheckCrawlerExample example);",
"int countByExample(MEsShoppingCartDTOCriteria example);",
"long countByExample(CmIndustryConfigExample example);",
"@Transactional(readOnly = true)\n public long countByCriteria(AccbillnoCriteria criteria) {\n log.debug(\"count by criteria : {}\", criteria);\n final Specification<Accbillno> specification = createSpecification(criteria);\n return accbillnoRepository.count(specification);\n }",
"int getStreamCouponHistoryListCount();",
"int countByExample(NeeqCompanyAccountingFirmOnlineExample example);",
"long countByExample(cskaoyan_mall_order_goodsExample example);",
"private void printCustomerCoupons(CustomerService customerService) \n\t\t\t\t\t\tthrows DBOperationException\n\t{\n\t\tList<Coupon> coupons = customerService.getCustomerCoupons();\n\t\tSystem.out.println(customerService.getClientMsg());\n\t\tif(coupons == null)\n\t\t{\n\t\t\tSystem.out.println(\"Error retrieving coupons\");\n\t\t\treturn;\n\t\t}\n\t\tif(coupons.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"This customer has no coupons\");\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.println(coupons.size()+\" coupons found for this customer\");\n\t\tfor(Coupon currCoupon : coupons)\n\t\t\tSystem.out.println(currCoupon);\n\t}",
"int countByExample(CusBankAccountExample example);",
"int countByExample(TbaDeliveryinfoCriteria example);",
"public ArrayList<Coupon> getCompanyCoupons(Category category) throws SQLException {\r\n\t\tArrayList<Coupon> coupons = couponsDAO.getAllCoupons();\r\n\t\tArrayList<Coupon> coups = new ArrayList<>();\r\n\t\tfor (Coupon coupon : coupons) {\r\n\t\t\tif (companyID == coupon.getCompanyID())\r\n\t\t\t\tif (coupon.getCategory().equals(category))\r\n\t\t\t\t\tcoups.add(coupon);\r\n\t\t}\r\n\t\treturn coups;\r\n\t}",
"private void printCustomerCouponsByCategory(CustomerService customerService) \n\t\t\t\t\t\tthrows DBOperationException\n\t{\n\t\tCategory category = this.getCategory();\n\t\tList<Coupon> coupons = customerService.getCustomerCoupons(category);\n//\t\tSystem.out.println(customerService.getClientMsg());\n\t\tif(coupons == null)\n\t\t{\n\t\t\tSystem.out.println(\"Error retrieving coupons\");\n\t\t\treturn;\n\t\t}\n\t\tif(coupons.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"This customer has no coupons in the chosen category\");\n\t\t\treturn;\n\t\t}\n//\t\tSystem.out.println(coupons.size()+\" coupons found for this customer int chosen category\");\n\t\tfor(Coupon currCoupon : coupons)\n\t\t\tSystem.out.println(currCoupon);\n\t}",
"public String getBulletinCount(String companyId) {\n\t\tlong count = 0;\n\t\tSession session = getSession();\n\t\tString hql = \"select count(id) from AuctionBulletin a \" +\n\t\t\t\"where a.deleteFlag=0 and a.companyId=:companyId \";\n\t\tcount = Long.parseLong(session.createQuery(hql).setString(\"companyId\", companyId)\n\t\t\t\t.uniqueResult().toString());\n\t\tsession.close();\n\t\treturn \"\" + count;\n\t}",
"List<Coupon> findByCompanyIdAndCategory(int companyId, Category category);",
"int countByExample(ShopAccountExample example);",
"int countByExample(MVoucherDTOCriteria example);",
"@Test\n @Order(8)\n void getCountByCity() {\n var a3 = new Account(Industry.ECOMMERCE, 100, \"Barcelona\", \"Spain\");\n var a4 = new Account(Industry.ECOMMERCE, 200, \"Barcelona\", \"Spain\");\n accountRepository.saveAll(List.of(a3, a4));\n var o1 = new Opportunity(Product.HYBRID, 100, c, Status.CLOSED_WON, a3, sr);\n var o2 = new Opportunity(Product.HYBRID, 100, c, Status.CLOSED_WON, a4, sr);\n opportunityRepository.saveAll(List.of(o1, o2));\n\n List<IOpportunityCountryOrCityCount> cityCounts = accountRepository.countByCity();\n assertEquals(3, cityCounts.size());\n assertEquals(\"Barcelona\", cityCounts.get(0).getCountryOrCityComment());\n assertEquals(2, cityCounts.get(0).getCountryOrCityCount());\n assertEquals(\"London\", cityCounts.get(1).getCountryOrCityComment());\n assertEquals(1, cityCounts.get(1).getCountryOrCityCount());\n assertEquals(\"Madrid\", cityCounts.get(2).getCountryOrCityComment());\n assertEquals(0, cityCounts.get(2).getCountryOrCityCount());\n }",
"@Override\n\tpublic int countByUuid_C(String uuid, long companyId) {\n\t\tFinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_C;\n\n\t\tObject[] finderArgs = new Object[] { uuid, companyId };\n\n\t\tLong count = (Long)finderCache.getResult(finderPath, finderArgs, this);\n\n\t\tif (count == null) {\n\t\t\tStringBundler query = new StringBundler(3);\n\n\t\t\tquery.append(_SQL_COUNT_PAPER_WHERE);\n\n\t\t\tboolean bindUuid = false;\n\n\t\t\tif (uuid == null) {\n\t\t\t\tquery.append(_FINDER_COLUMN_UUID_C_UUID_1);\n\t\t\t}\n\t\t\telse if (uuid.equals(StringPool.BLANK)) {\n\t\t\t\tquery.append(_FINDER_COLUMN_UUID_C_UUID_3);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbindUuid = true;\n\n\t\t\t\tquery.append(_FINDER_COLUMN_UUID_C_UUID_2);\n\t\t\t}\n\n\t\t\tquery.append(_FINDER_COLUMN_UUID_C_COMPANYID_2);\n\n\t\t\tString sql = query.toString();\n\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(sql);\n\n\t\t\t\tQueryPos qPos = QueryPos.getInstance(q);\n\n\t\t\t\tif (bindUuid) {\n\t\t\t\t\tqPos.add(uuid);\n\t\t\t\t}\n\n\t\t\t\tqPos.add(companyId);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(finderPath, finderArgs, count);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(finderPath, finderArgs);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}",
"int countByExample(CCustomerExample example);",
"@Override\n\tpublic int countByCompanyId(long companyId) throws SystemException {\n\t\tFinderPath finderPath = FINDER_PATH_COUNT_BY_COMPANYID;\n\n\t\tObject[] finderArgs = new Object[] { companyId };\n\n\t\tLong count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs,\n\t\t\t\tthis);\n\n\t\tif (count == null) {\n\t\t\tStringBundler query = new StringBundler(2);\n\n\t\t\tquery.append(_SQL_COUNT_TVSHOW_WHERE);\n\n\t\t\tquery.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2);\n\n\t\t\tString sql = query.toString();\n\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(sql);\n\n\t\t\t\tQueryPos qPos = QueryPos.getInstance(q);\n\n\t\t\t\tqPos.add(companyId);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tFinderCacheUtil.putResult(finderPath, finderArgs, count);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tFinderCacheUtil.removeResult(finderPath, finderArgs);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}",
"int countByExample(CxBasStaffExample example);",
"public Result viewCoupons() {\n CouponReceiveCenter receiveCenter = CouponReceiveCenter.find.byId(session().get(\"email\"));\n return ok(\n views.html.allcoupons.render(receiveCenter)\n );\n }",
"int getNumOfBuyOrders();",
"int countByExample(ItoProductCriteria example);",
"public int getpaycount(String cname) {\n\t\tString countQuery = \"SELECT * FROM \" + DATABASE_TABLE3 +\" WHERE \"+Sales_Cname+\" = '\"+cname+\"'\";\n\t \n\t Cursor cursor = ourDatabase.rawQuery(countQuery, null);\n\t int cnt = cursor.getCount();\n\t cursor.close();\n\t return cnt;\n\t\n\n\n\t}",
"@Transactional(readOnly = true)\n public long countByCriteria(DSpczCriteria criteria) {\n log.debug(\"count by criteria : {}\", criteria);\n final Specification<DSpcz> specification = createSpecification(criteria);\n return dSpczRepository.count(specification);\n }",
"public int DetailComentListCount(HashMap<String, Object> param) {\n\t\treturn sqlSession.selectOne(\"main.DetailComentListCount\",param);\r\n\t}",
"public ArrayList<Coupon> getCompanyCoupons(double maxPrice) throws SQLException {\r\n\t\tArrayList<Coupon> coupons = couponsDAO.getAllCoupons();\r\n\t\tArrayList<Coupon> coups = new ArrayList<>();\r\n\t\tfor (Coupon coupon : coupons) {\r\n\t\t\tif (companyID == coupon.getCompanyID())\r\n\t\t\t\tif (coupon.getPrice() <= maxPrice)\r\n\t\t\t\t\tcoups.add(coupon);\r\n\t\t}\r\n\t\treturn coups;\r\n\t}",
"public Collection<Coupon> getCompanyCoupons(double maxPrice) {\n return couponRepo.findCouponsByCompanyIDAndPriceLessThanEqual(this.companyID, maxPrice);\n }",
"public int cuantosCursos(){\n return inscripciones.size();\n }",
"@Test\n @Order(7)\n void getCountByCountry() {\n var a3 = new Account(Industry.ECOMMERCE, 100, \"Barcelona\", \"Spain\");\n var a4 = new Account(Industry.ECOMMERCE, 100, \"Toledo\", \"Spain\");\n accountRepository.saveAll(List.of(a3, a4));\n var o1 = new Opportunity(Product.HYBRID, 100, c, Status.CLOSED_WON, a3, sr);\n var o2 = new Opportunity(Product.HYBRID, 100, c, Status.CLOSED_WON, a4, sr);\n opportunityRepository.saveAll(List.of(o1, o2));\n\n List<IOpportunityCountryOrCityCount> countryCounts = accountRepository.countByCountry();\n assertEquals(2, countryCounts.size());\n assertEquals(\"Spain\", countryCounts.get(0).getCountryOrCityComment());\n assertEquals(2, countryCounts.get(0).getCountryOrCityCount());\n assertEquals(\"UK\", countryCounts.get(1).getCountryOrCityComment());\n assertEquals(1, countryCounts.get(1).getCountryOrCityCount());\n }",
"@Override\n\tpublic int countByUuid_C(String uuid, long companyId)\n\t\tthrows SystemException {\n\t\tFinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_C;\n\n\t\tObject[] finderArgs = new Object[] { uuid, companyId };\n\n\t\tLong count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs,\n\t\t\t\tthis);\n\n\t\tif (count == null) {\n\t\t\tStringBundler query = new StringBundler(3);\n\n\t\t\tquery.append(_SQL_COUNT_TVSHOW_WHERE);\n\n\t\t\tboolean bindUuid = false;\n\n\t\t\tif (uuid == null) {\n\t\t\t\tquery.append(_FINDER_COLUMN_UUID_C_UUID_1);\n\t\t\t}\n\t\t\telse if (uuid.equals(StringPool.BLANK)) {\n\t\t\t\tquery.append(_FINDER_COLUMN_UUID_C_UUID_3);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbindUuid = true;\n\n\t\t\t\tquery.append(_FINDER_COLUMN_UUID_C_UUID_2);\n\t\t\t}\n\n\t\t\tquery.append(_FINDER_COLUMN_UUID_C_COMPANYID_2);\n\n\t\t\tString sql = query.toString();\n\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(sql);\n\n\t\t\t\tQueryPos qPos = QueryPos.getInstance(q);\n\n\t\t\t\tif (bindUuid) {\n\t\t\t\t\tqPos.add(uuid);\n\t\t\t\t}\n\n\t\t\t\tqPos.add(companyId);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tFinderCacheUtil.putResult(finderPath, finderArgs, count);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tFinderCacheUtil.removeResult(finderPath, finderArgs);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}",
"@Test\n @Order(9)\n void getCountByIndustry() {\n var a3 = new Account(Industry.ECOMMERCE, 100, \"Barcelona\", \"Spain\");\n var a4 = new Account(Industry.MEDICAL, 200, \"Barcelona\", \"Spain\");\n accountRepository.saveAll(List.of(a3, a4));\n var o1 = new Opportunity(Product.HYBRID, 100, c, Status.CLOSED_LOST, a3, sr);\n var o2 = new Opportunity(Product.HYBRID, 100, c, Status.OPEN, a4, sr);\n opportunityRepository.saveAll(List.of(o1, o2));\n\n List<IOpportunityIndustryCount> industryCounts = accountRepository.countByIndustry();\n assertEquals(3, industryCounts.size());\n assertEquals(Industry.ECOMMERCE, industryCounts.get(0).getIndustryComment());\n assertEquals(2, industryCounts.get(0).getIndustryCount());\n assertEquals(Industry.MEDICAL, industryCounts.get(1).getIndustryComment());\n assertEquals(1, industryCounts.get(1).getIndustryCount());\n assertEquals(Industry.MANUFACTURING, industryCounts.get(2).getIndustryComment());\n assertEquals(0, industryCounts.get(2).getIndustryCount());\n }",
"@Transactional(readOnly = true)\n public long countByCriteria(CustomerCriteria criteria) {\n log.debug(\"count by criteria : {}\", criteria);\n final Specification<Customer> specification = createSpecification(criteria);\n return customerRepository.count(specification);\n }",
"public void setBuyCount(Integer buyCount) {\n this.buyCount = buyCount;\n }",
"public int calculateDiscount(ArrayList<Product> basket) {\n\n int discount = 0;\n\n\n // Voor elk product in de basket tel je 1 bij elke type op\n for (Product product : this.allProducts) {\n\n int counter = 0;\n\n for (Product basketProduct : basket) {\n\n if (basketProduct.equals(product)){\n counter++;\n System.out.println(\"wat doet ie heej\");\n }\n }\n }\n\n// for (int i = 0; i < basket.size(); i++)\n// if (basket.get(i).getNameProduct() == \"Robijn\") {\n// System.out.println(\"Dit product is gelijk aan Robijn\");\n// countItemRobijn += 1;\n// } else if (basket.get(i).getNameProduct() == \"Brinta\") {\n// System.out.println(\"Dit product is gelijk aan Brinta\");\n// countItemBrinta += 1;\n// } else if (basket.get(i).getNameProduct() == \"Chinese Groenten\") {\n// System.out.println(\"Dit product is gelijk aan Chinese Groenten\");\n// countItemChineseGroenten += 1;\n// } else if (basket.get(i).getNameProduct() == \"Kwark\") {\n// System.out.println(\"Dit product is gelijk aan Kwark\");\n// countItemKwark += 1;\n// } else if (basket.get(i).getNameProduct() == \"Luiers\") {\n// System.out.println(\"Dit product is gelijk aan Luiers\");\n// countItemLuiers += 1;\n// }\n// System.out.println(countItemRobijn);\n// System.out.println(countItemBrinta);\n// System.out.println(countItemChineseGroenten);\n// System.out.println(countItemKwark);\n// System.out.println(countItemLuiers);\n\n return discount;\n }",
"int countByExample(PaymentTradeExample example);",
"@Override\n\tpublic String countByCondition(Familybranch con) throws Exception {\n\t\treturn null;\n\t}",
"long getProductsCountAccordingClientFilter(ClientFilter clientFilter) throws ServiceException;",
"public void removeCustomerCoupon(Company company) throws DbException;"
]
| [
"0.70353264",
"0.7009697",
"0.67642605",
"0.67106634",
"0.66602206",
"0.6620596",
"0.66183144",
"0.65296525",
"0.65296525",
"0.65296525",
"0.63908595",
"0.63449365",
"0.6264513",
"0.62393504",
"0.62000537",
"0.61164004",
"0.61038667",
"0.6073266",
"0.5994447",
"0.59551597",
"0.59304905",
"0.57914126",
"0.57806134",
"0.57806134",
"0.5766365",
"0.5750212",
"0.5718977",
"0.5715941",
"0.57080257",
"0.5701707",
"0.56861997",
"0.5651529",
"0.564539",
"0.56407315",
"0.56390005",
"0.5636468",
"0.56338125",
"0.5620105",
"0.56006366",
"0.5592268",
"0.5592268",
"0.5592268",
"0.55382025",
"0.5535872",
"0.5532033",
"0.55233157",
"0.5469846",
"0.54678446",
"0.5448537",
"0.5444665",
"0.5444665",
"0.5440926",
"0.54316384",
"0.5427903",
"0.5409193",
"0.53994954",
"0.53988475",
"0.53976345",
"0.53912544",
"0.5389908",
"0.5381775",
"0.5374412",
"0.5372207",
"0.53375095",
"0.5311471",
"0.5310086",
"0.53064907",
"0.5296407",
"0.5295916",
"0.5292733",
"0.5290856",
"0.5283042",
"0.52706474",
"0.5266248",
"0.52621806",
"0.5255985",
"0.52552134",
"0.525169",
"0.5243601",
"0.5239673",
"0.52359027",
"0.5235331",
"0.5227886",
"0.5222232",
"0.5207321",
"0.5207017",
"0.51951766",
"0.51922256",
"0.51854444",
"0.51735646",
"0.5170322",
"0.5168076",
"0.5167941",
"0.516342",
"0.51619214",
"0.5157729",
"0.514438",
"0.5141294",
"0.51281565",
"0.5127464"
]
| 0.7540153 | 0 |
Responsavel por carregar o Objeto JSON | public static String getJSONFromAPI(String url){
String retorno = "";
try {
URL apiEnd = new URL(url);
int codigoResposta;
HttpURLConnection conexao;
InputStream is;
conexao = (HttpURLConnection) apiEnd.openConnection();
conexao.setRequestMethod(Common.METHOD_GET);
conexao.setReadTimeout(15000);
conexao.setConnectTimeout(15000);
conexao.connect();
codigoResposta = conexao.getResponseCode();
if(codigoResposta < HttpURLConnection.HTTP_BAD_REQUEST){
is = conexao.getInputStream();
}else{
is = conexao.getErrorStream();
}
retorno = converterInputStreamToString(is);
is.close();
conexao.disconnect();
} catch (MalformedURLException e) {
e.printStackTrace();
}catch (IOException e){
e.printStackTrace();
}
return retorno;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@GET\n //@Path(\"/{usuario}-{clave}\")\n @Produces(MediaType.APPLICATION_JSON)\n @Consumes(MediaType.APPLICATION_JSON)\n public Response ConsultaItemsWS(@QueryParam(\"tipo\") String tipo, \n @QueryParam(\"cod_int\") String codigoIterno,\n @QueryParam(\"cod_alt\") String codigoAlterno,\n @QueryParam(\"descripcion\") String Descripcion,\n @QueryParam(\"linea\") String Linea\n ){\n String datos =\"[]\";\n JSONObject json = new JSONObject();\n JSONArray itemSelectedJson = new JSONArray();\n datos=item.ConsultaItems(tipo, codigoIterno, codigoAlterno, Descripcion, Linea);\n \n JsonParser parser = new JsonParser();\n\n // Obtain Array\n JsonArray gsonArr = parser.parse(datos).getAsJsonArray();\n json = new JSONObject();\n \n /*json.put(\"data\", gsonArr);\n json.put(\"mensaje\", \"ok\");\n json.put(\"codigo_error\", 1);\n itemSelectedJson.add(json);*/\n String datosJSON=\"{ \\\"data\\\":\"+gsonArr+\",\\\"mensaje\\\":\\\"ok\\\",\\\"codigo_error\\\":1}\";\n \n System.out.println(\"datosJSON: \"+datosJSON);\n //return Response.ok(itemSelectedJson.toString()).build();\n return Response.ok(datosJSON).build();\n }",
"public void listarJsonbyMovimientos(HttpServletRequest request, HttpServletResponse response) throws Exception{\n String valorcriterio = request.getParameter(\"valorcriterio\");\n \n GestionBendiv gbenef = new GestionBendiv();\n BeneficiarioDiv benef_div = gbenef.obtenerGenerico(valorcriterio);\n //ArrayList beneficiario_div = new ArrayList();\n Integer id_bendiv = benef_div.getId_bendiv();\n //beneficiario_div.add(benef_div);\n \n GestionMov_diversos modelo=new GestionMov_diversos();\n ArrayList movimientos_div=modelo.obtenerMovimientosporID(id_bendiv);\n \n \n GsonBuilder builder=new GsonBuilder().setDateFormat(\"dd/MM/yyy\");\n Gson gson=builder.create();\n \n //response.addHeader(\"Access-Control-Allow-Origin\", \"http://localhost:4200\");\n response.setHeader(\"Access-Control-Allow-Origin\", \"*\");\n response.setHeader(\"Access-Control-Allow-Methods\", \"POST, GET\");\n response.setHeader(\"Access-Control-Max-Age\", \"3600\");\n response.setHeader(\"Access-Control-Allow-Headers\", \"Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With\");\n //response.getWriter().write(\"{\\\"mov_diversos\\\":\"+gson.toJson(movimientos_div)+\",\\\"beneficiario_div\\\":\"+gson.toJson(beneficiario_div)+\"}\");\n response.getWriter().write(\"{\\\"mov_diversos\\\":\"+gson.toJson(movimientos_div)+\"}\");\n }",
"@PostMapping(\"registrar\")\n public ResponseEntity<?> registrar(@RequestBody String payload) {\n\n JsonObject json = new Gson().fromJson(payload, JsonObject.class);\n try {\n log.info(\"Pude crear el objeto básico JSON \");\n log.info(\"siendo: \" + payload.toString());\n //log.info( \" Como yo se los objetos que vienen, puedo castear los wrappers por parte\");\n //log.info( \"Objeto 1: LoginDatos, Objeto 2: Formulario (String), 3: String[+ \");\n Usuario usuario = new Gson().fromJson(json.get(\"usuario\"), Usuario.class);\n JsonObject formulario = new Gson().fromJson(json.get(\"formulario\"), JsonObject.class);\n log.info(\"FORM: \" + formulario.toString());\n boolean artista = formulario.get(\"isArtista\").getAsBoolean();\n\n if (artista) {\n String instrumentos = new Gson().fromJson(json.get(\"instrumentos\"), String.class);\n this.usuarioServicio.guardarArtista(usuario, formulario, instrumentos);\n return new ResponseEntity(new Mensaje(\" El usuario ARTISTA se creó correctamente\"), HttpStatus.OK);\n } else {\n this.usuarioServicio.guardarComercio(usuario, formulario);\n return new ResponseEntity(new Mensaje(\" El usuario COMERCIO se creó correctamente\"), HttpStatus.OK);\n\n }\n\n } catch (Exception e) {\n return new ResponseEntity(new Mensaje(\" El uNOOOOOOOOOOOOOOOOOOOO se creó correctamente\"), HttpStatus.BAD_REQUEST);\n }\n }",
"public abstract Object toJson();",
"@GET\n @Produces(\"application/json\")\n public String getJson() {\n\n JSONObject rezultat = new JSONObject();\n\n List<Korisnici> korisnici = korisniciFacade.findAll();\n\n \n\n try {\n for (Korisnici k : korisnici) {\n if (k.getIdkorisnik() == Long.parseLong(id)) {\n\n SoapListaAdresa soapOdgovor = listaDodanihAdresaBesplatno(k.getKorisnickoime(), k.getLozinka());\n\n List<Adresa> adrese = soapOdgovor.getAdrese();\n \n JSONArray jsonPolje = new JSONArray();\n int brojac = 0;\n for (Adresa a : adrese) {\n JSONObject jsonAdresa = new JSONObject();\n jsonAdresa.put(\"idadresa\", a.getIdadresa());\n jsonAdresa.put(\"adresa\", a.getAdresa());\n jsonAdresa.put(\"lat\", a.getGeoloc().getLatitude());\n jsonAdresa.put(\"long\", a.getGeoloc().getLongitude());\n jsonPolje.put(brojac,jsonAdresa);\n brojac++;\n }\n rezultat.put(\"adrese\", jsonPolje);\n } \n }\n return rezultat.toString();\n } catch (JSONException ex) {\n Logger.getLogger(MeteoRESTResource.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }",
"public String getJson();",
"protected abstract Object buildJsonObject(R response);",
"public Response() {\n objectMap = new JSONObject<>();\n }",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n public String getJson() {\n GsonBuilder gBuilder = new GsonBuilder();\n Gson jObject = gBuilder.create();\n\n try {\n return jObject.toJson(dao.getAll());\n } catch (Exception e) {\n Resposta lResposta = new Resposta();\n\n lResposta.setMensagem(e.getMessage());\n lResposta.setSucesso(false);\n\n return jObject.toJson(lResposta);\n }\n }",
"@GET\n @Path(\"/getAll\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response getJson() {\n \n \ttry \n \t{\n \t\treturn Response.status(200).header(\"Access-Control-Allow-Origin\", \"*\").entity(servDoctores.getDoctores().toString()).build();\n \t} catch (Exception e) {\n\n \t\te.printStackTrace();\n \t\treturn Response.status(Response.Status.NO_CONTENT).build();\n \t}\n }",
"@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n PrintWriter out = resp.getWriter();\n resp.setStatus(200);\n resp.setCharacterEncoding(\"UTF-8\");\n resp.setContentType(\"application/json\");\n resp.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n resp.addHeader(\"Access-Control-Allow-Methods\", \"POST, GET, OPTIONS, PUT, DELETE, HEAD\");\n\n if (req.getParameter(\"id\") != null) {\n Contato contato = new Contato(Integer.parseInt(req.getParameter(\"id\")));\n\n JSONObject obj = new JSONObject();\n obj.put(\"id\", contato.getId());\n obj.put(\"nome\", contato.getNome());\n obj.put(\"telefone\", contato.getTelefone());\n obj.put(\"celular\", contato.getCelular());\n obj.put(\"email\", contato.getEmail());\n\n out.println(obj);\n out.flush();\n\n } else {\n try {\n ArrayList<JSONObject> listaJson = new ArrayList<>();\n Contato contatos = new Contato();\n List<Contato> listaContatos = contatos.busca();\n for (int i = 0; i < listaContatos.size(); i++) {\n Contato c = listaContatos.get(i);\n JSONObject obj = new JSONObject();\n obj.put(\"id\", c.getId());\n obj.put(\"nome\", c.getNome());\n obj.put(\"telefone\", c.getTelefone());\n obj.put(\"celular\", c.getCelular());\n obj.put(\"email\", c.getEmail());\n listaJson.add(obj);\n }\n out.println(listaJson);\n out.flush();\n } catch (SQLException e) {\n e.printStackTrace();\n resp.setStatus(500);\n }\n }\n }",
"void sendJson(Object data);",
"@Override\r\n\tprotected GuardarVtaCeroMotivoResponse responseText(String json) {\n\t\tGuardarVtaCeroMotivoResponse guardarVtaCeroMotivoResponse = JSONHelper.desSerializar(json, GuardarVtaCeroMotivoResponse.class);\r\n\t\treturn guardarVtaCeroMotivoResponse;\r\n\t}",
"String getJson();",
"String getJson();",
"String getJson();",
"public void jsonPresentation () {\n System.out.println ( \"****** Json Data Module ******\" );\n ArrayList<Book> bookArrayList = new ArrayList<Book>();\n String jsonData = \"\";\n ObjectMapper mapper = new ObjectMapper();\n bookArrayList = new Request().postRequestBook();\n try {\n jsonData = mapper.writeValueAsString(bookArrayList);\n } catch (JsonProcessingException e) {\n System.out.println(\"Error: \"+ e);\n }\n System.out.println(jsonData);\n ClientEntry.showMenu ( );\n }",
"protected JSONObject getJsonRepresentation() throws Exception {\n\n JSONObject jsonObj = new JSONObject();\n jsonObj.put(\"name\", getName());\n return jsonObj;\n }",
"private JSON() {\n\t}",
"@Path(\"/productos\")\n @GET\n @Produces(MediaType.APPLICATION_JSON) //Por que una track si la aceptaba (ejemplo) pero un producto no?\n public String productos(){\n return test.getProductos().get(\"Leche\").toString();\n\n }",
"@CrossOrigin\r\n @RequestMapping(value = \"/especialidad\", method = RequestMethod.GET, headers = {\"Accept=application/json\"})\r\n @ResponseBody\r\n String buscarTodos() throws Exception {\r\n String mensajito = \"nada\";\r\n ObjectMapper maper = new ObjectMapper();\r\n\r\n ArrayList<Especialidades> especialidad = new ArrayList<Especialidades>();\r\n especialidad = (ArrayList<Especialidades>) daoesp.findAll();\r\n //usamos del paquete fasterxml de json la clase objetMapper\r\n\r\n return maper.writeValueAsString(especialidad);\r\n\r\n }",
"@GET\r\n @Produces(\"application/json\")\r\n public String listCarro() throws Exception {\r\n List<CarroModel> lista;\r\n //CarroDao dao = new CarroDao();\r\n CarroDao dao = CarroDao.getInstance();\r\n List<model.CarroModel> carros = dao.getAll();\r\n //Converter para Gson\r\n Gson g = new Gson();\r\n return g.toJson(carros);\r\n }",
"JSONObject toJson();",
"JSONObject toJson();",
"public static void main(String[] args) {\n Gson json = new Gson();\n RestPregunta client = new RestPregunta();\n ArrayList value = client.getPreguntasCuestionario(ArrayList.class, \"68\");\n for(Object ob: value){ \n System.out.println(ob);\n Pregunta pregunta = json.fromJson(ob.toString(), Pregunta.class);\n System.out.println(pregunta.getPregunta());\n }\n client.close();\n //Gson json = new Gson();\n RestPregunta restPregunta = new RestPregunta();\n ArrayList<Pregunta> lista = new ArrayList();\n ArrayList values = restPregunta.getPreguntasCuestionario(ArrayList.class,\"68\");\n for(Object pro: values){\n Pregunta pregunta = json.fromJson(pro.toString(), Pregunta.class);\n lista.add(new Pregunta(pregunta.getIdPregunta(), pregunta.getIdCuestionario(), pregunta.getPuntoAsignado(), pregunta.getPuntoObtenido(), pregunta.getPregunta())); \n }\n// Pregunta pregunta = client.getPregunta(Pregunta.class, \"1\");\n// System.out.println(pregunta);\n// System.out.println(pregunta.toString());\n \n// ArrayList value = client.getPreguntas(ArrayList.class);\n // ArrayList<Pregunta> list = new ArrayList();\n// System.out.println(value);\n \n //list.add(pregunta);\n \n //System.out.println(pregunta.getArchivoimg2());\n \n// Pregunta p = new Pregunta(1,14,400,300,\"5000?\",\"C:\\\\Users\\\\Matias\\\\Pictures\\\\Pictures\\\\Sample Pictures\\\\Desert.jpg\", inputStream,\" \");\n //Object ob = p;\n// client.addPregunta(p, Pregunta.class);\n// System.out.println(list);\n \n }",
"@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}",
"@Override\r\n\tprotected GuardarSustentoResponse responseText(String json) {\n\t\tGuardarSustentoResponse guardarSustentoResponse = JSONHelper.desSerializar(json, GuardarSustentoResponse.class);\r\n\t\treturn guardarSustentoResponse;\r\n\t}",
"public JsonObject toJson();",
"@GET\n @Path(\"/{id}\")\n @Produces(MediaType.APPLICATION_JSON)\n public String getJson(@PathParam(\"id\") int id) {\n GsonBuilder gBuilder = new GsonBuilder();\n Gson jObject = gBuilder.create();\n try {\n return jObject.toJson(dao.getObjectById(id));\n } catch (Exception e) {\n Resposta lResposta = new Resposta();\n lResposta.setMensagem(e.getMessage());\n lResposta.setSucesso(false);\n\n return jObject.toJson(lResposta);\n }\n }",
"public abstract String toJson();",
"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 }",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n public String consultarSolicitudes()\n {\n Object objeto = sdao.consultaGeneral();\n return gson.toJson(objeto);\n }",
"@Override\n public void onResponse(JSONObject jsonObject)\n {\n }",
"protected JSONObject getJsonRepresentation() throws Exception {\r\n\r\n JSONObject jsonObj = new JSONObject();\r\n jsonObj.put(\"note\", note);\r\n return jsonObj;\r\n }",
"@Override\r\n\tprotected ActualizarClienteResponse responseText(String json) {\n\t\tActualizarClienteResponse actualizarClienteResponse = JSONHelper.desSerializar(json, ActualizarClienteResponse.class);\r\n\t\treturn actualizarClienteResponse;\r\n\t}",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n public String obtener() {\n logger.debug(\"Obteniendo todos los equipos\");\n Set<Sala> salas= salaService.buscarTodasLasSalasSimples();\n logger.debug(\"Obtenidas.\");\n Genson genson = new Genson();\n String retorno = genson.serialize(salas);\n logger.debug(retorno);\n return retorno;\n }",
"@POST\n @Path(\"/mensaje\")\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.APPLICATION_JSON)\n public DatosJsonResponse setMessage (DatosJsonRequest datosJsonRequest){\n DatosJsonResponse datosJsonResponse = new DatosJsonResponse();\n datosJsonResponse.setMensaje(datosJsonRequest.getMensaje());\n return datosJsonResponse;\n }",
"@GET\n @Path(\"{name}/object\")\n public JsonObject jsonObject(@PathParam(\"name\") String name) {\n return new JsonObject().put(\"Hello\", name);\n }",
"@Test\n public void oneSpartanPojo(){\n Response response = given().accept(ContentType.JSON)\n .and().pathParam(\"id\", 15)\n .and().get(\"http://18.232.145.26:8000/api/spartans/{id}\");\n\n // Verify response status code should be 200\n Assert.assertEquals(response.statusCode(), 200 , \"Verify status code : \");\n\n // Convert Json to POJO( Our custom Spartan java class )\n Spartan spartan15 = response.body().as(Spartan.class);\n System.out.println(\"spartan15 = \" + spartan15);\n System.out.println(\"spartan15.getNames() = \" + spartan15.getName());\n System.out.println(\"spartan15.getId() = \" + spartan15.getId());\n\n\n }",
"@GET\n @Produces(\"application/json\")\n public String getJson() {\n //TODO return proper representation object\n throw new UnsupportedOperationException();\n }",
"public String agregar(String trama) throws JsonProcessingException {\n\t\tString respuesta = \"\";\n\t\tRespuestaGeneralDto respuestaGeneral = new RespuestaGeneralDto();\n \t\tlogger.info(HILO + \"[ \" + Thread.currentThread().getId()+ \" ] \" \n \t\t\t\t+ \", ProductoService.agregar trama entrante para agregar o actualizar producto: \" + trama);\n\t\ttry {\n\t\t\t/*\n\t\t\t * Se convierte el dato String a estructura json para ser manipulado en JAVA\n\t\t\t */\n\t\t\tJSONObject obj = new JSONObject(trama);\n\t\t\tProducto producto = new Producto();\n\t\t\t/*\n\t\t\t * use: es una bandera para identificar el tipo de solicitud a realizar:\n\t\t\t * use: 0 -> agregar un nuevo proudcto a la base de datos;\n\t\t\t * use: 1 -> actualizar un producto existente en la base de datos\n\t\t\t */\n\t\t\tString use = obj.getString(\"use\");\n\t\t\tif(use.equalsIgnoreCase(\"0\")) {\n\t\t\t\tString nombre = obj.getString(\"nombre\");\n\t\t\t\t/*\n\t\t\t\t * Se realiza una consulta por nombre a la base de datos a la tabla producto\n\t\t\t\t * para verificar que no existe un producto con el mismo nombre ingresado.\n\t\t\t\t */\n\t\t\t\tProducto productoBusqueda = productoDao.buscarPorNombre(nombre);\n\t\t\t\tif(productoBusqueda.getProductoId() == null) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Si no existe un producto con el mismo nombre pasa a crear el nuevo producto\n\t\t\t\t\t */\n\t\t\t\t\tproducto.setProductoNombre(nombre);\n\t\t\t\t\tproducto.setProductoCantidad(obj.getLong(\"cantidad\"));\n\t\t\t\t\tTipoProducto tipoProducto = tipoProductoDao.consultarPorId(obj.getLong(\"tipoProducto\"));\n\t\t\t\t\tproducto.setProductoTipoProducto(tipoProducto);\n\t\t\t\t\tproducto.setProductoPrecio(obj.getLong(\"precio\"));\n\t\t\t\t\tproducto.setProductoFechaRegistro(new Date());\n\t\t\t\t\tproductoDao.update(producto);\n\t\t\t\t\trespuestaGeneral.setTipoRespuesta(\"0\");\n\t\t\t\t\trespuestaGeneral.setRespuesta(\"Nuevo producto registrado con éxito.\");\n\t\t\t\t\t/*\n\t\t\t\t\t * Se mapea la respuesta con una estructura json en un dato tipo String\n\t\t\t\t\t */\n\t\t\t\t\trespuesta = new ObjectMapper().writeValueAsString(respuestaGeneral);\n\t\t\t\t}else {\n\t\t\t\t\t/*\n\t\t\t\t\t * Si existe un producto con el mismo nombre, se devolvera una excepcion,\n\t\t\t\t\t * para indicarle al cliente.\n\t\t\t\t\t */\n\t\t\t\t\trespuestaGeneral.setTipoRespuesta(\"1\");\n\t\t\t\t\trespuestaGeneral.setRespuesta(\"Ya existe un producto con el nombre ingresado.\");\n\t\t\t\t\t/*\n\t\t\t\t\t * Se mapea la respuesta con una estructura json en un dato tipo String\n\t\t\t\t\t */\n\t\t\t\t\trespuesta = new ObjectMapper().writeValueAsString(respuestaGeneral);\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\t/*\n\t\t\t\t * Se realiza una busqueda del producto registrado para actualizar\n\t\t\t\t * para implementar los datos que no van a ser reemplazados ni actualizados\n\t\t\t\t */\n\t\t\t\tProducto productoBuscar = productoDao.buscarPorId(obj.getLong(\"id\"));\n\t\t\t\tproducto.setProductoId(obj.getLong(\"id\"));\n\t\t\t\tproducto.setProductoNombre(obj.getString(\"nombre\"));\n\t\t\t\tproducto.setProductoCantidad(obj.getLong(\"cantidad\"));\n\t\t\t\tproducto.setProductoTipoProducto(productoBuscar.getProductoTipoProducto());\n\t\t\t\tproducto.setProductoPrecio(obj.getLong(\"precio\"));\n\t\t\t\tproducto.setProductoFechaRegistro(productoBuscar.getProductoFechaRegistro());\n\t\t\t\tproductoDao.update(producto);\n\t\t\t\trespuestaGeneral.setTipoRespuesta(\"0\");\n\t\t\t\trespuestaGeneral.setRespuesta(\"Producto actualizado con exito.\");\n\t\t\t\t/*\n\t\t\t\t * Se mapea la respuesta con una estructura json en un dato tipo String\n\t\t\t\t */\n\t\t\t\trespuesta = new ObjectMapper().writeValueAsString(respuestaGeneral);\n\t\t\t}\n\t\t\t/*\n\t\t\t * Se mapea la respuesta con una estructura json en un dato tipo String\n\t\t\t */\n\t\t\trespuesta = new ObjectMapper().writeValueAsString(respuestaGeneral);\n\t\t} catch (Exception e) {\n\t\t\t/*\n\t\t\t * En caso de un error, este se mostrara en los logs\n\t\t\t * Sera enviada la respuesta correspondiente al cliente.\n\t\t\t */\n\t\t\tlogger.error(HILO + \"[ \" + Thread.currentThread().getId()+ \" ] \" \n\t\t\t\t\t+ \"ProductoService.agregar, \"\n\t\t\t\t\t+ \", descripcion: \"\n\t\t\t\t\t+ e.getMessage());\n\t\t\trespuestaGeneral.setTipoRespuesta(\"1\");\n\t\t\trespuestaGeneral.setRespuesta(\"Error al ingresar los datos, por favor intente mas tarde.\");\n\t\t\t/*\n\t\t\t * Se mapea la respuesta con una estructura json en un dato tipo String\n\t\t\t */\n\t\t\trespuesta = new ObjectMapper().writeValueAsString(respuestaGeneral);\n\t\t}\n \t\tlogger.info(HILO + \"[ \" + Thread.currentThread().getId()+ \" ] \" \n \t\t\t\t+ \", ProductoService.agregar resultado de agregar/actualizar un producto: \" + respuesta);\n\t\treturn respuesta;\n\t}",
"private static JsonAluno toBasicJson(Aluno aluno) {\r\n\t\tJsonAluno jsonAluno = new JsonAluno();\r\n\t\tapplyBasicJsonValues(jsonAluno, aluno);\r\n\t\treturn jsonAluno;\r\n\t}",
"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 }",
"public String pasarAjson(ArrayList<Cliente> miLista){\n String textoenjson;\n Gson gson = new Gson();\n textoenjson = gson.toJson(miLista);\n\n\n return textoenjson;\n }",
"@Override\n\tpublic Response novo(String dadosEmJson) {\n\t\tProduto dadosNovoProduto = converterParaJava(dadosEmJson);\n\t\tif (dadosNovoProduto != null) {\n\t\t\t// convertido com sucesso.\n\t\t\t// pegar os dados para criar um novo Produto:\n\n\t\t\t// criar a Receita com os dados enviado para o novo Produto.\n\t\t\tReceita receita = new Receita(dadosNovoProduto.getReceita().getRendimento(),\n\t\t\t\t\tdadosNovoProduto.getReceita().getTempoPreparo());\n\t\t\t// pegar a lista de componentes que ira compor a receita do produto.\n\t\t\t// adiciona na lista da receita o componente e a qtd utilizada.\n\t\t\tfor (ItemReceita item : dadosNovoProduto.getReceita().getComponentes()) {\n\t\t\t\treceita.addComponente(item.getComponente(), item.getQtdUtilizada());\n\t\t\t}\n\t\t\t// criar um novo Produto com os dados enviado e com a receita pronta.\n\t\t\tProduto produto = new Produto(dadosNovoProduto.getDescricao(), dadosNovoProduto.getCategoria(),\n\t\t\t\t\tdadosNovoProduto.getSimbolo(), dadosNovoProduto.getPreco(), receita);\n\t\t\t// persistir no BD o novo Produto.\n\t\t\tif (getDao().salvar(produto)) {\n\t\t\t\t// novo produto foi criado e persistido no BD com sucesso.\n\t\t\t\tsetResposta(mensagemCriadoRecurso());\n\t\t\t} else {\n\t\t\t\t// os dados informado possui campos inválidos.\n\t\t\t\tsetResposta(mensagemDadosInvalidos());\n\t\t\t}\n\t\t} else {\n\t\t\t// aconteceu um erro com o servidor;\n\t\t\tsetResposta(mensagemErro());\n\t\t}\n\t\treturn getResposta();\n\t}",
"@Override\r\n\tpublic JSONObject toJSON() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tprotected ConsultarIndiceEjecucionAnioResponse responseText(String json) {\n\t\tConsultarIndiceEjecucionAnioResponse response = JSONHelper.desSerializar(json, ConsultarIndiceEjecucionAnioResponse.class);\r\n\t\treturn response;\r\n\t}",
"@Override\r\n\tprotected ActualizarCompromisoResponse responseText(String json) {\n\t\tActualizarCompromisoResponse response = JSONHelper.desSerializar(json, ActualizarCompromisoResponse.class);\r\n\t\treturn response;\r\n\t}",
"String getJSON();",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n public String getJson() {\n //TODO return proper representation object\n throw new UnsupportedOperationException();\n }",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n public String getJson() {\n //TODO return proper representation object\n throw new UnsupportedOperationException();\n }",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n public String getJson() {\n //TODO return proper representation object\n throw new UnsupportedOperationException();\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 }",
"@Override\n public List<ModelPerson> selectjson(ModelPerson person) {\n List<ModelPerson> result = null;\n JSONArray response = null;\n Gson gson = new Gson();\n\n try {\n request = new HttpRequest( HTTP_URL_SELECTJSON );\n request.configPostType( HttpRequest.MineType.JSONObject );\n\n // Gson을 이용하여 ModelPerson 을 JSONObject로 변환.\n String jsonString = gson.toJson( person );\n httpCode = request.post(jsonString);\n\n if( httpCode == HttpURLConnection.HTTP_OK ){\n response = request.getJSONArrayResponse();\n }\n\n // Gson을 이용하여 JSONArray 를 List<ModelPerson> 로 변환.\n result = gson.fromJson(response.toString(), new TypeToken< List<ModelPerson> >(){}.getType() );\n\n } catch (IOException e) {\n e.printStackTrace();\n } catch (JSONException e) {\n e.printStackTrace();\n }catch (Exception e) {\n e.printStackTrace();\n }\n\n return result;\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 }",
"public JSONObject insertIntoJson(ClientModel m){\n JSONObject json = new JSONObject();\n\n //inserting key value pairs in json object\n if(!m.getFristName().equals(\"None\")){\n json.put(\"firstName\", m.getFristName());\n }\n\n if(!m.getLastName().equals(\"None\")){\n json.put(\"lastName\", m.getLastName());\n }\n\n if(!m.getAddres().equals(\"None\")){\n json.put(\"address\", m.getAddres());\n }\n\n if(m.getAge() > 0){\n json.put(\"age\", m.getAge());\n }\n\n if(m.getSalary() > 0){\n json.put(\"salary\", \"$\" + m.getSalary());\n }\n\n return json; //return the json object\n }",
"private String converttoJson(Object medicine) throws JsonProcessingException {\r\n ObjectMapper objectMapper = new ObjectMapper();\r\n return objectMapper.writeValueAsString(medicine);\r\n }",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n public String getJson() {\n return null;\n }",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n public Response getProductos() {\n //TODO return proper representation object\n return controller.mostrarProductos();\n }",
"@Override\r\n\tprotected ProfitHistoryDetalleResponse responseText(String json) {\n\t\tProfitHistoryDetalleResponse response = JSONHelper.desSerializar(json,ProfitHistoryDetalleResponse.class);\r\n\t\treturn response;\r\n\t}",
"@Get(\"json\")\n public Representation toJSON() {\n \tString status = getRequestFlag(\"status\", \"valid\");\n \tString access = getRequestFlag(\"location\", \"all\");\n\n \tList<Map<String, String>> metadata = null;\n\n \tString msg = \"no metadata matching query found\";\n\n \ttry {\n \t\tmetadata = getMetadata(status, access,\n \t\t\t\tgetRequestQueryValues());\n \t} catch(ResourceException r){\n \t\tmetadata = new ArrayList<Map<String, String>>();\n \tif(r.getCause() != null){\n \t\tmsg = \"ERROR: \" + r.getCause().getMessage();\n \t}\n \t}\n\n\t\tString iTotalDisplayRecords = \"0\";\n\t\tString iTotalRecords = \"0\";\n\t\tif (metadata.size() > 0) {\n\t\t\tMap<String, String> recordCounts = (Map<String, String>) metadata\n\t\t\t\t\t.remove(0);\n\t\t\tiTotalDisplayRecords = recordCounts.get(\"iTotalDisplayRecords\");\n\t\t\tiTotalRecords = recordCounts.get(\"iTotalRecords\");\n\t\t}\n\n\t\tMap<String, Object> json = buildJsonHeader(iTotalRecords,\n\t\t\t\tiTotalDisplayRecords, msg);\n\t\tList<ArrayList<String>> jsonResults = buildJsonResults(metadata);\n\n\t\tjson.put(\"aaData\", jsonResults);\n\n\t\t// Returns the XML representation of this document.\n\t\treturn new StringRepresentation(JSONValue.toJSONString(json),\n\t\t\t\tMediaType.APPLICATION_JSON);\n }",
"protected String getJSON() {\n/*Generated! Do not modify!*/ return gson.toJson(replyDTO);\n/*Generated! Do not modify!*/ }",
"public static void ObtenerDatosRegistro(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n String url = \"http://161.35.14.188/Persuhabit/registro\";//establece ruta al servidor para obtener los datos\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray jsonArray = response.getJSONArray(\"data\");//\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n queue.add(jsonObjectRequest);\n }",
"public JSONObject toJson() {\n }",
"public JSONObject transformer() {\n JSONObject jsonObject = new JSONObject();\n JSONArray listening = new JSONArray();\n JSONArray listening_correction = new JSONArray();\n JSONArray reading = new JSONArray();\n JSONArray reading_correction = new JSONArray();\n JSONArray historique = new JSONArray();\n\n for (int i = 0; i < this.listening.size(); i++) {\n listening.put(this.listening.get(i).whoIs());\n listening_correction.put(this.listening_correction.get(i).whoIs());\n }\n\n for (int j = 0; j < this.reading.size(); j++) {\n reading.put(this.reading.get(j).whoIs());\n reading_correction.put(this.reading_correction.get(j).whoIs());\n }\n\n for(int k=0; k < this.historique.size(); k++){\n historique.put( transforme(this.historique.get(k)) );\n }\n\n try {\n jsonObject.put(\"nom\", this.nom);\n jsonObject.put(\"listening\", listening);\n jsonObject.put(\"reading\", reading);\n jsonObject.put(\"listening_correction\", listening_correction);\n jsonObject.put(\"reading_correction\", reading_correction);\n jsonObject.put(\"historique\",historique);\n jsonObject.put(\"etat\", this.etat);\n jsonObject.put(\"mode\", this.mode);\n jsonObject.put(\"est_termine\", this.est_termine);\n jsonObject.put(\"chronometre\", this.chronometre);\n Log.i(\"jsonObject\",jsonObject.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return jsonObject;\n }",
"public interface BaseFormModel {\n JSONObject toJson();\n}",
"public JsonObject covertToJson() {\n JsonObject transObj = new JsonObject(); //kasutaja portf. positsiooni tehing\n transObj.addProperty(\"symbol\", symbol);\n transObj.addProperty(\"type\", type);\n transObj.addProperty(\"price\", price);\n transObj.addProperty(\"volume\", volume);\n transObj.addProperty(\"date\", date);\n transObj.addProperty(\"time\", time);\n transObj.addProperty(\"profitFromSell\", profitFromSell);\n transObj.addProperty(\"averagePurchasePrice\", averagePurchasePrice);\n return transObj;\n }",
"@GetMapping(produces=MediaType.APPLICATION_JSON_VALUE)\n\tpublic Saludo consulta() {\n\t\treturn new Saludo(\"Hola\", \"!!!!\");\n\t}",
"String toJSON();",
"public String postJsonArticleJournaliste() throws ClientErrorException {\r\n return webTarget.request().post(null, String.class);\r\n }",
"public abstract T zzb(JSONObject jSONObject);",
"@Override\n public void onResponse(JSONObject response) {\n // public ArrayList<Curso> onResponse(JSONObject response) {\n //lectura del Json\n\n //Toast.makeText(getContext(), \"onResponse: \" + response.toString(), Toast.LENGTH_SHORT).show();\n EjercicioG1 ejercicioG1 = null;\n json = response.optJSONArray(\"ejerciciog1\");\n\n ArrayList<EjercicioG1> listaDEjerciciosg1 = new ArrayList<>();\n listaDEjerciciosg1 = new ArrayList<>();\n\n try {\n for (int i = 0; i < json.length(); i++) {\n ejercicioG1 = new EjercicioG1();\n JSONObject jsonObject = null;\n jsonObject = json.getJSONObject(i);\n ejercicioG1.setNameEjercicio(jsonObject.optString(\"nameEjercicioG1\"));\n ejercicioG1.setIdEjercicio(jsonObject.optInt(\"idEjercicioG1\"));\n ejercicioG1.setIdTipo(jsonObject.optInt(\"Tipo_idTipo\"));\n\n listaDEjerciciosg1.add(ejercicioG1);\n\n }\n //Spinner spinner = (Spinner) this.view.findViewById(R.id.sp_Ejercicios_asignar);\n\n\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n //Toast.makeText(getContext(), \"No se ha podido establecer conexión: \" + response.toString(), Toast.LENGTH_LONG).show();\n\n }\n }",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n public String getJSON() {\n throw new UnsupportedOperationException();\n }",
"private String notificacionesSRToJson(List<DaNotificacion> notificacions){\n String jsonResponse=\"\";\n Map<Integer, Object> mapResponse = new HashMap<Integer, Object>();\n Integer indice=0;\n for(DaNotificacion notificacion : notificacions){\n Map<String, String> map = new HashMap<String, String>();\n map.put(\"idNotificacion\",notificacion.getIdNotificacion());\n if (notificacion.getFechaInicioSintomas()!=null)\n map.put(\"fechaInicioSintomas\",DateUtil.DateToString(notificacion.getFechaInicioSintomas(), \"dd/MM/yyyy\"));\n else\n map.put(\"fechaInicioSintomas\",\" \");\n map.put(\"codtipoNoti\",notificacion.getCodTipoNotificacion().getCodigo());\n map.put(\"tipoNoti\",notificacion.getCodTipoNotificacion().getValor());\n map.put(\"fechaRegistro\",DateUtil.DateToString(notificacion.getFechaRegistro(), \"dd/MM/yyyy\"));\n map.put(\"SILAIS\",notificacion.getCodSilaisAtencion()!=null?notificacion.getCodSilaisAtencion().getNombre():\"\");\n map.put(\"unidad\",notificacion.getCodUnidadAtencion()!=null?notificacion.getCodUnidadAtencion().getNombre():\"\");\n //Si hay persona\n if (notificacion.getPersona()!=null){\n /// se obtiene el nombre de la persona asociada a la ficha\n String nombreCompleto = \"\";\n nombreCompleto = notificacion.getPersona().getPrimerNombre();\n if (notificacion.getPersona().getSegundoNombre()!=null)\n nombreCompleto = nombreCompleto +\" \"+ notificacion.getPersona().getSegundoNombre();\n nombreCompleto = nombreCompleto+\" \"+notificacion.getPersona().getPrimerApellido();\n if (notificacion.getPersona().getSegundoApellido()!=null)\n nombreCompleto = nombreCompleto +\" \"+ notificacion.getPersona().getSegundoApellido();\n map.put(\"persona\",nombreCompleto);\n //Se calcula la edad\n int edad = DateUtil.calcularEdadAnios(notificacion.getPersona().getFechaNacimiento());\n map.put(\"edad\",String.valueOf(edad));\n //se obtiene el sexo\n map.put(\"sexo\",notificacion.getPersona().getSexo().getValor());\n if(edad > 12 && notificacion.getPersona().isSexoFemenino()){\n map.put(\"embarazada\", envioMxService.estaEmbarazada(notificacion.getIdNotificacion()));\n }else\n map.put(\"embarazada\",\"--\");\n if (notificacion.getMunicipioResidencia()!=null){\n map.put(\"municipio\",notificacion.getMunicipioResidencia().getNombre());\n }else{\n map.put(\"municipio\",\"--\");\n }\n }else{\n map.put(\"persona\",\" \");\n map.put(\"edad\",\" \");\n map.put(\"sexo\",\" \");\n map.put(\"embarazada\",\"--\");\n map.put(\"municipio\",\"\");\n }\n\n mapResponse.put(indice, map);\n indice ++;\n }\n jsonResponse = new Gson().toJson(mapResponse);\n UnicodeEscaper escaper = UnicodeEscaper.above(127);\n return escaper.translate(jsonResponse);\n }",
"public PersonajeVO getPersonaje(String url) {\n\t\tGson gson = new Gson();\n\t\tHttpClient httpClient = new DefaultHttpClient();\n\t\tPersonajeVO data = new PersonajeVO();\n\t\t java.lang.reflect.Type aType = new TypeToken<PersonajeVO>()\n\t\t{}.getType();\n\t\t gson = new Gson();\n\t\t httpClient = WebServiceUtils.getHttpClient();\n\t\t try {\n\t\t HttpResponse response = httpClient.execute(new HttpGet(url));\n\t\t HttpEntity entity = response.getEntity();\n\t\t Reader reader = new InputStreamReader(entity.getContent());\n\t\t data = gson.fromJson(reader, aType);\n\t\t } catch (Exception e) {\n\t\t Log.i(\"json array\",\"While getting server response server generate error. \");\n\t\t }\n\t\t return data;\n\t}",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(req.getInputStream()));\n\n String json = \"\";\n if(br != null){\n json = br.readLine();\n System.out.println(json);\n }\n\n // 2. initiate jackson mapper\n ObjectMapper mapper = new ObjectMapper();\n\n // 3. Convert received JSON to Article\n Product product = mapper.readValue(json, Product.class);\n\n // 4. Set response type to JSON\n resp.setContentType(\"application/json\");\n\n ProductService productService = new ProductService();\n productService.addProduct(product);\n\n String productsJsonString = this.gson.toJson(productService.getAllProducts());\n PrintWriter out = resp.getWriter();\n resp.setContentType(\"application/json\");\n resp.setCharacterEncoding(\"UTF-8\");\n out.print(productsJsonString);\n out.flush();\n\n }",
"public void ReadJson() {\n System.out.println(\"Read Json Method in the Mother Class\");\n }",
"private static JsonLista toBasicJson(Lista lista) {\r\n\t\tJsonLista jsonLista = new JsonLista();\r\n\t\tapplyBasicJsonValues(jsonLista, lista);\r\n\t\treturn jsonLista;\r\n\t}",
"private void writeHttpServiceResponse(String contentType, HttpServletResponse response, Object result) throws\r\n IOException {\r\n if (contentType.indexOf(CONTENT_TYPE_BSF) > -1) {\r\n OutputStream outputStream = response.getOutputStream();\r\n ObjectOutputStream oos = new ObjectOutputStream(outputStream);\r\n oos.writeObject(new ServiceResponse(result));\r\n oos.close();\r\n } else {\r\n //JSONObject jsonResult = new JSONObject();\r\n \tJsonObject jsonResult = new JsonObject();\r\n if (result instanceof Throwable) {\r\n Throwable ex = (Throwable) result;\r\n jsonResult.addProperty(ERROR, ex.getMessage());\r\n StringWriter sw = new StringWriter();\r\n ex.printStackTrace(new PrintWriter(sw));\r\n jsonResult.addProperty(STACK_TRACE, sw.toString());\r\n } /*else if (result != null && ObjectUtil.isCollection(result)) {\r\n jsonResult.put(VALUE, JSONArray.fromObject(result));\r\n } else if (result instanceof String && JSONUtils.mayBeJSON((String) result)) {\r\n jsonResult.put(VALUE, JSONObject.fromObject((String) result));\r\n } else if (JSONUtils.isNumber(result) || JSONUtils.isBoolean(result) || JSONUtils.isString(result)) {\r\n jsonResult.put(VALUE, result);\r\n }*/ \r\n else {\r\n System.out.println(\">>>result class: \" + result.getClass());\r\n jsonResult.add(VALUE, JSONConverter.toJsonTree(result));\r\n }\r\n response.setCharacterEncoding(RESP_ENCODING);\r\n response.getWriter().write(JSONConverter.gson().toJson(jsonResult));\r\n }\r\n }",
"@Path(\"/\")\n @GET\n @Produces(MediaType.APPLICATION_JSON) // indique que la réponse est en json\n public Response test(@Context final UriInfo ui) {\n\n return Response.ok(true).build();\n }",
"private static JsonEndereco toBasicJson(Endereco endereco) {\r\n\t\tJsonEndereco jsonEndereco = new JsonEndereco();\r\n\t\tapplyBasicJsonValues(jsonEndereco, endereco);\r\n\t\treturn jsonEndereco;\r\n\t}",
"@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }",
"private Response createObjectReturnResponse(Class clazz, Request request) {\n Object object = ContextMap.getInstance().getContext().getObject(clazz);\n // if it could not create the object, will return a proper error message\n if (object == null) {\n return Error(request, \"No object created from this class: \" + clazz.getName()).toResponse();\n } else {\n try {\n return runMethodReturnResponse(object, request);\n } catch (Exception e) {\n e.printStackTrace();\n return Error(request, \"could not handle method\").exception(e).toResponse();\n }\n }\n }",
"private Object JSONArray(String estado) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"public String toJSON() throws JSONException;",
"private void cargarDetalleStory(String idStory) {\n\n HashMap<String, String> data = new LinkedHashMap<>();\n data.put(\"story_id\", idStory);\n\n JSONObject jsonObject = new JSONObject (data);\n\n System.out.print(jsonObject.toString());\n\n VolleySingleton.getInstance(getContext()).addToRequestQueue(\n new JsonObjectRequest(\n Request.Method.POST,\n Constantes.GET_STORY,\n jsonObject,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n obtenerStorybyId(response);\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(getActivity().getApplicationContext(), \"An error has occur. Please try again.\", Toast.LENGTH_LONG).show();\n }\n }\n ) {\n @Override\n public Map<String, String> getHeaders() {\n Map<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n headers.put(\"Accept\", \"application/json\");\n return headers;\n }\n\n @Override\n public String getBodyContentType() {\n return \"application/json; charset=utf-8\" + getParamsEncoding();\n }\n }\n );\n\n }",
"@Override\r\n\tpublic void translateToJSON(ParsedJSONContainer jsonContainer) {\t\tjsonContainer.put(\"id\",getId());\r\n\t\tjsonContainer.put(\"labels\",getLabels());\r\n\t\tjsonContainer.put(\"version\",getVersion());\r\n\t}",
"public static void generarFicheroJSON(App aplicacion) throws IOException {\n\n ObjectMapper mapeador = new ObjectMapper();\n\n mapeador.configure(SerializationFeature.INDENT_OUTPUT, true);\n\n // Escribe en un fichero JSON el objeto que le pasamos\n mapeador.writeValue(new File(\"./aplicaciones/\" + aplicacion.getNombre() + \".json\"), aplicacion);\n\n }",
"@GET\n @Produces(\"application/json\")\n public JSONObject getResultado() {\n \n Connection con = null;\n PreparedStatement pst = null;\n ResultSet rs = null;\n\n String url = \"jdbc:mysql://localhost:3306/testdb\";\n String user = \"testuser\";\n String password = \"test623\";\n\n try {\n \n con = DriverManager.getConnection(url, user, password);\n pst = con.prepareStatement(\"SELECT * FROM Authors\");\n rs = pst.executeQuery();\n \n \n while (rs.next()) {\n System.out.print(rs.getInt(1));\n System.out.print(\": \");\n System.out.println(rs.getString(2));\n }\n \n \n con.close();\n\n } catch (SQLException ex) {\n System.err.println(\"Got an exception! \"); \n System.err.println(ex.getMessage()); \n\n }\n \n int resultado=0;\n \n JSONObject obj = new JSONObject();\n\n obj.put(\"res\", resultado);\n \n return obj;\n \n }",
"@Override\r\n protected Codigos doInBackground(Void... voids) {\n try {\r\n\r\n FormBody.Builder formBuilder = new FormBody.Builder()\r\n .add(\"usuarioId\", usuarioId)\r\n .add(\"ubicaciones\", jsonLocalizador);\r\n\r\n RequestBody formBody = formBuilder.build();\r\n Request request = new Request.Builder()\r\n .url(RestUrl.REST_ACTION_GUARDAR_UBICACION)\r\n .post(formBody)\r\n .build();\r\n\r\n Response response = client.newCall(request).execute();\r\n respuesta = response.body().string();\r\n Gson gson = new Gson();\r\n String jsonInString = respuesta;\r\n return codigo = gson.fromJson(jsonInString, Codigos.class);\r\n\r\n }catch (Exception e){\r\n e.printStackTrace();\r\n if(e.getMessage().contains(\"Failed to connect to\")){\r\n codigo = new Codigos();\r\n codigo.setCodigo(1);\r\n return codigo;\r\n }else{\r\n codigo = new Codigos();\r\n codigo.setCodigo(404);\r\n return codigo;\r\n }\r\n }\r\n }",
"@Override\r\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n WebFunction.JsonHeaderInit(resp);\r\n ArticleService svc=new ArticleService();\r\n JSONObject ResultJson = svc.GetType(\"1\");\r\n WebFunction.ResponseJson(resp, ResultJson);\r\n }",
"@Override\r\n public JSONObject toJSON() {\r\n return this.studente.toJSON();\r\n }",
"private Alvo retornaAlvo(JSONObject jsonAlvo){\n\n Alvo alvoTemp = null;\n\n String divisao = ((JSONObject) jsonAlvo).get(\"divisao\").toString();\n String tipo = ((JSONObject) jsonAlvo).get(\"tipo\").toString();\n\n alvoTemp= new Alvo(tipo, divisao);\n return alvoTemp;\n }",
"@Override\n\tprotected String toJSON()\n\t{\n\t\treturn getJSON(null);\n\t}",
"JsonObject raw();",
"void response( JSONArray data );",
"public interface ApiObject {\n\n String toJson();\n\n Object fromJson(JsonObject json);\n}",
"public JsonObject toJson(){\n JsonObject json = new JsonObject();\n if(username != null){\n json.addProperty(\"username\" , username);\n }\n json.addProperty(\"title\", title);\n json.addProperty(\"description\", description);\n json.addProperty(\"date\", date);\n json.addProperty(\"alarm\", alarm);\n json.addProperty(\"alert_before\", alert_before);\n json.addProperty(\"location\", location);\n\n return json;\n }",
"public String serializeJSON () {\n ObjectMapper mapper = new ObjectMapper();\n String jsonString = null;\n \n try {\n jsonString = mapper.writeValueAsString(this);\n } catch (JsonProcessingException e) {\n e.printStackTrace();\n }\n return jsonString;\n }",
"@Override\n public Object toJson() {\n JSONObject json = (JSONObject)super.toJson();\n json.put(\"name\", name);\n json.put(\"reason\", reason);\n return json;\n }",
"@Override\n public Response intercept(Chain chain) throws IOException {\n Request request = chain.request();\n Request.Builder newRequest;\n\n newRequest = request.newBuilder()\n .addHeader(\"Content-type\", \"application/json;charset=UTF-8\")\n .addHeader(\"Accept\", \"application/json\");\n return chain.proceed(newRequest.build());\n }"
]
| [
"0.66065675",
"0.6506867",
"0.6475575",
"0.64741164",
"0.64423895",
"0.640094",
"0.6370733",
"0.63390714",
"0.6310827",
"0.62871027",
"0.6283211",
"0.6267363",
"0.62626916",
"0.6225683",
"0.6225683",
"0.6225683",
"0.62215394",
"0.6209491",
"0.62035745",
"0.6145796",
"0.6139657",
"0.6138982",
"0.6111554",
"0.6111554",
"0.6093325",
"0.6078378",
"0.6069464",
"0.60629517",
"0.6049863",
"0.6044792",
"0.6036248",
"0.6021883",
"0.60087156",
"0.59902716",
"0.5989026",
"0.59679997",
"0.595612",
"0.59523946",
"0.59417796",
"0.5920427",
"0.592008",
"0.5897436",
"0.58954024",
"0.5894743",
"0.5890336",
"0.5876928",
"0.5868442",
"0.58649415",
"0.58506644",
"0.5834879",
"0.5834879",
"0.5834879",
"0.5817762",
"0.5814734",
"0.5812262",
"0.58094794",
"0.57948595",
"0.57939464",
"0.5787434",
"0.57658064",
"0.5748906",
"0.57411313",
"0.5735582",
"0.5728591",
"0.57279265",
"0.5717829",
"0.5713063",
"0.570512",
"0.570453",
"0.5701775",
"0.5693621",
"0.56926644",
"0.56904525",
"0.5683905",
"0.5680518",
"0.567956",
"0.5674785",
"0.5672753",
"0.56715393",
"0.56674665",
"0.566523",
"0.5644438",
"0.5633243",
"0.5632215",
"0.5626945",
"0.5623116",
"0.56170577",
"0.5610658",
"0.5608793",
"0.5608435",
"0.5608018",
"0.5599236",
"0.55987763",
"0.55978286",
"0.5592702",
"0.559062",
"0.5589338",
"0.55831",
"0.5575983",
"0.5575226",
"0.55724937"
]
| 0.0 | -1 |
// Print user with his color | public String toString() {
return this.getName();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void printColor(String color){\n System.out.println(color);\n }",
"void print(String message, Color color) throws IOException;",
"private static void printColor() {\n\t\tfor (int i = 0; i < colors.length; i++) {\n\t\t\tSystem.out.print(String.format(\"%d for %s\", i + 1, colors[i]));\n\t\t\tif (i != colors.length - 1) {\n\t\t\t\tSystem.out.print(\", \"); // Separate colors with comma\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\")\"); // Print a new line for the last color option\n\t\t\t}\n\t\t}\n\t}",
"@Override\r\n\tpublic void printColor(String color1, String message, String color2) {\n\t\tSystem.out.println(color1 + message + color2);\r\n\t}",
"public String showColor(){\r\n\t\tSystem.out.println(\"The color of this fruit is \" + color);\r\n\t\treturn color;}",
"@Override\n\tpublic void color() {\n\t\tSystem.out.println(\"Colour is red\");\n\t\t\n\t}",
"public static void printColor(String[] colors){\n for(int i=0; i<colors.length; i++){\n System.out.println(colors[i]);\n }\n }",
"private void displayColourMenu()\r\n {\r\n System.out.println();\r\n System.out.println(\"------------- Colour Menu ---------------\");\r\n System.out.println(\"(1) To edit Colour1\");\r\n System.out.println(\"(2) To edit Colour2\");\r\n System.out.println(\"(3) To edit Colour3\");\r\n }",
"public String printColors(){\n String RGB = \"\";\n detectedColor = m_colorSensor.getColor();\n RGB = \"Red: \" + detectedColor.red + \", Green: \" + detectedColor.green + \", Blue: \" + detectedColor.blue;\n return RGB;\n }",
"private static void print(SimpleUser su) {\n\t\tSystem.out.println(\"userId: \" + su.getUserId());\n\t\tSystem.out.println(\"username: \" + su.getUsername());\n\t\tSystem.out.println(\"password: \" + su.getPassword());\n\t\tSystem.out.println(\"nickname: \" + su.getNickname());\n\t\tSystem.out.println();\n\t}",
"public void printUser() {\n\t\tSystem.out.println(\"First name: \" + this.firstname);\n\t\tSystem.out.println(\"Last name: \" + this.lastname);\n\t\tSystem.out.println(\"Age: \" + this.age);\n\t\tSystem.out.println(\"Email: \" + this.email);\n\t\tSystem.out.println(\"Gender: \" + this.gender);\n\t\tSystem.out.println(\"City: \" + this.city);\n\t\tSystem.out.println(\"State: \" + this.state + \"\\n\");\n\t}",
"public void print() {\n System.out.print(\"\\033[H\\033[2J\");\n for(int y = 0; y < this.height; y++) {\n for (int x = 0; x < this.width; x++) {\n ColoredCharacter character = characterLocations.get(new Coordinate(x , y));\n if (character == null) {\n System.out.print(\" \");\n } else {\n System.out.print(character);\n }\n }\n System.out.print(\"\\n\");\n }\n }",
"public static void main(String[] args) {\n\t\t\n\t\tchar color ='g';\n\t\t\n\t\tswitch(color) {\n\t\tcase 'r': System.out.println(\"red\");\n\t\tcase 'b': System.out.println(\"blue\");\n\t\tcase 'g': System.out.println(\"green\");\n\t\t\n\t\t}}",
"public void printCorlor() {\n\t\tSystem.out.println(\"I'm yellow\");\r\n\t}",
"public void colorInfo() {\n\t\tSystem.out.println(\"Universal Color\");\n\t}",
"Color userColorChoose();",
"public void printUsers() {\n userAnya.printInfo();\n userRoma.printInfo();\n }",
"public void applyColor() {\n\t\tSystem.out.println(\"Yellow\");\n\n\t}",
"public static void showColor(Color colorArg) {\n\n\t\t//bellow code is given\n\t\t\n\t\tJFrame frame = new JFrame(\"Guess this color\");\n\t\tframe.setSize(200, 200);\n\t\tframe.setLocation(300, 300);\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBackground(colorArg);\n\t\tframe.add(panel);\n\t\tframe.setVisible(true);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t}",
"public static void main(String args[]) {\n\t\tRGB myColor = new RGB(100, 125, 25);\n\t\tRGB red = new RGB(255, 0, 0);\n\t\t\n\t\t// you can get the individual red, green and blue values\n\t\t// using the .get methods:\n\t\tSystem.out.println(\"red = \" + myColor.getRed());\n\t\tSystem.out.println(\"green = \" + myColor.getGreen());\n\t\tSystem.out.println(\"blue = \" + myColor.getBlue());\n\t\t\n\t\tSystem.out.println(red);\n\t}",
"@Override\n\tpublic void draw() {\n\t\tif (isWhite){\n\t\t\tSystem.out.print(\"\\u2656\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.print(\"\\u265C\");\n\t\t}\t\t\n\t}",
"public void drawAsColor(Color color) {\n\n\t}",
"@Override\n\tprotected void display(Coordination c) {\n\t\tSystem.out.println(\"白棋,颜色是:\" + color + \"位置是:\" + c.getX() + \"--\" + c.getY());\n\t}",
"public void switchColor(){\r\n System.out.println(color);\r\n if(color==\"W\"){\r\n color=\"B\";\r\n System.out.println(color);\r\n }else{ \r\n color=\"W\";\r\n } \r\n }",
"private static void printOp(User u){\n\t\tSystem.out.println(\"Hello \"+u.getUserName()+\", type:\\n\"\n\t\t\t\t + \"- request\\n\"\n\t\t\t\t\t+ \"- confirm\\n\"\n\t\t\t\t\t+ \"- search\\n\"\n\t\t\t\t\t+ \"- post\\n\"\n\t\t\t\t\t+ \"- follow\\n\"\n\t\t\t\t\t+ \"- listPosts\\n\"\n\t\t\t\t\t+ \"- listFriends\\n\"\n\t\t\t\t\t+ \"- listRequests\\n\"\n\t\t\t\t\t+ \"- listFollowed\\n\"\n\t\t\t\t\t+ \"- logout\");\n\t}",
"public User(String username, int colour){\n this.userName = username;\n this.colour = colour;\n }",
"public static void main (String[] args) {\n System.out.printf (\"%s%20s%s\\n\",\"\\033[42m\",\"\",\"\\033[40m\");\n System.out.printf (\"%s%20s%s\\n\",\"\\033[42m\",\"\",\"\\033[40m\");\n System.out.printf (\"%s%20s%s\\n\",\"\\033[107m\",\"\",\"\\033[40m\");\n System.out.printf (\"%s%20s%s\\n\",\"\\033[107m\\033[90m\",\"ANDALUCÍA \",\"\\033[40m\");\n //System.out.printf (\"%s%20s%s\\n\",\"\\033[107m\",\"ANDALUCÍA \",\"\\033[40m\");\n System.out.printf (\"%s%20s%s\\n\",\"\\033[107m\",\"\",\"\\033[40m\");\n System.out.printf (\"%s%20s%s\\n\",\"\\033[42m\",\"\",\"\\033[40m\");\n System.out.printf (\"%s%20s%s\\n\",\"\\033[42m\",\"\",\"\\033[40m\"); \n \n \n }",
"public void fillColor() {\n\t\tSystem.out.println(\"Blue color\");\n\t}",
"public void printToUser(String message){\n System.out.println(message);\n }",
"public void printToScreen() {\n String type = \"\";\n switch (this.type) {\n case 1:\n type = \"Fashion\";\n break;\n case 2:\n type = \"Electronic\";\n break;\n case 3:\n type = \"Consumable\";\n break;\n case 4:\n type = \"Household appliance\";\n break;\n }\n// System.out.println(\"Type : \" + type);\n System.out.printf(\"%6d%15s%6f%20s\\n\", id, name, price, type);\n }",
"public void Color() {\n\t\t\r\n\t}",
"void PrintOnScreen(String toPrnt);",
"public void showColorAndId(int light) {\n String result;\n result = showColor(light);\n\n System.out.println(\"My color is \"\n + result\n + \" and my id is: \"\n + showId()\n );\n }",
"static void welcome() {\n System.out.println(getAnsiRed() + \"\\n\" +\n \"███████╗████████╗██████╗ █████╗ ███╗ ██╗ ██████╗ ███████╗██████╗ \\n\" +\n \"██╔════╝╚══██╔══╝██╔══██╗██╔══██╗████╗ ██║██╔════╝ ██╔════╝██╔══██╗\\n\" +\n \"███████╗ ██║ ██████╔╝███████║██╔██╗ ██║██║ ███╗█████╗ ██████╔╝\\n\" +\n \"╚════██║ ██║ ██╔══██╗██╔══██║██║╚██╗██║██║ ██║██╔══╝ ██╔══██╗\\n\" +\n \"███████║ ██║ ██║ ██║██║ ██║██║ ╚████║╚██████╔╝███████╗██║ ██║\\n\" +\n \"╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝\\n\" +\n \" ██████╗ █████╗ ███╗ ███╗███████╗ \\n\" +\n \" ██╔════╝ ██╔══██╗████╗ ████║██╔════╝ \\n\" +\n \" ██║ ███╗███████║██╔████╔██║█████╗ \\n\" +\n \" ██║ ██║██╔══██║██║╚██╔╝██║██╔══╝ \\n\" +\n \" ╚██████╔╝██║ ██║██║ ╚═╝ ██║███████╗ \\n\" +\n \" ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ \\n\" +\n getAnsiReset());\n\n System.out.println(\"\\n\" +\n \" Built by Team NullPointer (Team 5)\\n\" +\n \" Neill Perry (https://github.com/neillperry)\\n\" +\n \" Bruce West (https://github.com/BruceBAWest)\\n\" +\n \" Tapan Trivedi (https://github.com/tapantriv)\\n\" +\n \" TLG Learning: Capstone Java Project\\n\" +\n \" https://github.com/NullPointer-Team\");\n }",
"public void getColor() {\n\t\tPoint point = MouseInfo.getPointerInfo().getLocation();\n\t\trobot.mouseMove(point.x, point.y);\n\t\tColor color = robot.getPixelColor(point.x, point.y);\n//\t\tSystem.out.println(color);\n\t}",
"public void print() {\n System.out.println(\"Nome: \" + nome);\n System.out.println(\"Telefone: \" + telefone);\n }",
"@Override\n public String print(Command cmd, CommandResult cr) {\n GetUserDetailsResult result = (GetUserDetailsResult) cr;\n ArrayList<Review> reviews = result.getReviews();\n User user = (User) result.getResult();\n ArrayList<Element> rows = new ArrayList<>();\n Table table;\n if (reviews.isEmpty()) {\n table = new Table(new Tr(\n ));\n } else {\n for (Review r: reviews) {\n rows.add(\n new Tr(\n new Td(new A(r.getSummary(), \"/movies/\"\n + r.getMovie().getMid()\n + \"/reviews/\"\n + r.getId())),\n new Td(new Text(String.valueOf(r.getRating()))),\n new Td(new Text(r.getMovie().getTitle())),\n new Td(new Text(String.valueOf(r.getMovie().getYear())))\n )\n );\n }\n table = new Table(\n new Thead(\n new Tr(\n new Th(\"Summary\"),\n new Th(\"Rating\"),\n new Th(\"Title\"),\n new Th(\"Year\")\n )\n ),\n new Tbody(\n rows\n ));\n }\n\n html = new Html(\n new Head(\n new Title(\"User Details\")\n ),\n new Body(\n new A(\"Return home\", \"/\"),\n new Br(),\n new Br(),\n new A(\"Return all users\", \"/users/\"),\n new Ul(\n new Li(new Text(user.getName())),\n new Li(new Text(user.getEmail()))\n ),\n table\n )\n );\n\n return html.print();\n }",
"@Override\n\t\tpublic Color color() { return color; }",
"@Override\r\n\tpublic void setColor(String color) {\n\t\tthis.color=color;\r\n\t\tSystem.out.println(\"我用\"+color+\"颜色进行填充。\");\r\n\t}",
"public void print() {\n System.out.println(\"fish: \"+name+\", species= \"+species+\", color= \"+color+\", #fins= \"+fins);\n }",
"private void showToast(int color) {\n String rgbString = \"R: \" + Color.red(color) + \" B: \" + Color.blue(color) + \" G: \" + Color.green(color);\n Toast.makeText(this, rgbString, Toast.LENGTH_SHORT).show();\n }",
"public void print() {\n btprint(c);\n }",
"public static void main(String[] args) {\n\t\tSquare a=new Square();\n System.out.println(a.howtocolor());\n\t}",
"public void printInfo() {\n\t\tSystem.out.println(\"User: \" + userName);\n\t\tSystem.out.println(\"Login: \" + loginName);\n\t\tSystem.out.println(\"Host: \" + hostName);\n\t}",
"public void print()\n {\n System.out.println();\n for (int i = 0; i < 6; i++) {\n for (int j = 0; j < 6; j++) {\n int index=0;\n if(j>2)\n index++;\n if(i>2)\n index+=2;\n char c='○';\n if(blocks[index].getCells()[i%3][j%3]==CellType.Black)\n c='B';\n if(blocks[index].getCells()[i%3][j%3]==CellType.Red)\n c='R';\n System.out.print(c+\" \");\n if(j==2)\n System.out.print(\"| \");\n }\n System.out.println();\n if(i==2)\n System.out.println(\"-------------\");\n }\n }",
"String getColor();",
"public static void printRed(FqImage imh) {\n\t\tint\ti,j;\r\n\t\tfor( i = 0 ; i < imh.width ; i++ ){\r\n\t\t\tfor( j = 0 ; j < imh.height ; j++ ){\r\n\t\t\t\tSystem.out.print(\"r\"+imh.points[i][j].getRed()+\"r\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t}",
"public void printUserInfo(){\n System.out.print(\"Username: \"+ getName() + \"\\n\" + \"Birthday: \"+getBirthday()+ \"\\n\"+ \"Hometown: \"+getHome()+ \"\\n\"+ \"About: \" +getAbout()+ \" \\n\"+ \"Subscribers: \" + getSubscriptions());\n\t}",
"public void printScreen() {\n\t\tBrowser.printScreen(this.getClass().getSimpleName());\n\t}",
"public static String textColor(String color,String message)\n {\n String colorCode = null;\n switch (color.toLowerCase())\n {\n case \"red\":\n colorCode = \"\\033[1;91m\";\n break;\n\n case \"green\":\n colorCode = \"\\033[1;92m\";\n break;\n\n case \"blue\":\n colorCode = \"\\033[1;94m\";\n break;\n\n case \"yellow\":\n colorCode = \"\\033[1;93m\";\n break;\n\n case \"purple\":\n colorCode = \"\\033[1;95m\";\n break;\n\n case \"cyan\":\n colorCode = \"\\033[1;96m\";\n break;\n\n case \"white\":\n colorCode = \"\\033[1;97m\";\n break;\n\n default:\n colorCode = \"\\033[0m\";\n break;\n\n }\n return String.format(\"%s%s%s\",colorCode,message,\"\\033[0m\");\n }",
"@Override\r\n\tpublic void howToColor() {\n\t\t\r\n\t}",
"abstract void consoleCustom(boolean time, String tag, String message, Paint color);",
"public String getColor() {\n\t\treturn \"Elcolor del vehiculo es: \"+color; \n\t }",
"public void display ( GameObject obj ) {\n Screen tempScreen = Screen.getScreen();\n\n // I could script this! Quickly change the colors\n\n tempScreen.fill(color); //set color\n\n\n tempScreen.noStroke(); //no stroke\n tempScreen.rect(obj.x, obj.y, obj.width, obj.height); //make a rectangle\n }",
"public String getColor() { \n return color; \n }",
"public static void carColor() {\n System.out.println(\"Do you have a red car? \");\n char redCar= sc.next().charAt(0); \n }",
"@Override\n\tpublic String getColor() {\n\t\treturn \"blue\";\n\t}",
"public void printList(){\n\t\tfor(User u : userList){\r\n\t\t\tSystem.out.println(\"Username: \" + u.getUsername() + \" | User ID: \" + u.getUserID() + \" | Hashcode: \" + u.getHashcode() + \" | Salt: \" + u.getSalt());\r\n\t\t}\r\n\t}",
"void setColor(ChatColor color);",
"public static void printRGB(FqImage imh){\n\t\tint\ti,j;\r\n\t\tfor( i = 0 ; i < imh.width ; i++ ){\r\n\t\t\tfor( j = 0 ; j < imh.height ; j++ ){\r\n\t\t\t\tSystem.out.print(\"rgb\"+imh.points[i][j].getRGB() );\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t}",
"public String toString(){\n\t\treturn (red + \" \" + green + \" \" + blue + \"\\n\");\n\t}",
"public void color(Color the_color) {\n \n }",
"public void chooseColor() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t}",
"@Override\n public String toString() {\n return color.name();\n }",
"public static void log(String color, String message) {\r\n message = \"<font color=\\\"\" + color + \"\\\">\" + message + \"</font><br>\";\r\n chatText.append(message);\r\n jEditorPane1.setText(chatText.toString());\r\n }",
"protected void setPlayerBackground() { Console.setBackground(Console.YELLOW); }",
"public char getColor();",
"public void setColor(String color){\n this.color = color;\n }",
"public String getColor(){\r\n return color;\r\n }",
"public void formatPrint() {\n\t\tSystem.out.printf(\"%8d \", codigo);\n\t\tSystem.out.printf(\"%5.5s \", clase);\n\t\tSystem.out.printf(\"%5.5s \", par);\n\t\tSystem.out.printf(\"%5.5s \", nombre);\n\t\tSystem.out.printf(\"%8d \", comienza);\n\t\tSystem.out.printf(\"%8d\", termina);\n\t}",
"public void print() {\n System.out.println(\"Person of name \" + name);\n }",
"public void print() {\n System.out.println(\"I am \" + status() + (muted ? \" and told to shut up *sadface*\" : \"\") + \" (\" + toString() + \")\");\n }",
"@Override\n\t\t\tpublic void print() {\n\t\t\t\t\n\t\t\t}",
"public void print(Graphics g);",
"public void setColor(String c)\n { \n color = c;\n draw();\n }",
"String prompt(String message, Color color) throws IOException;",
"public String getColorRGB(WebDriver driver, String xpath, String css, Boolean ifPrint) throws NumberFormatException, IOException {\t\t\n\t\tif(ifPrint){ fileWriterPrinter(driver.findElement(By.xpath(xpath)).getCssValue(css)); }\n\t\treturn driver.findElement(By.xpath(xpath)).getCssValue(\"color\");\t\t\n\t}",
"public void print() {\r\n\t\tSystem.out.print(getUID());\r\n\t\tSystem.out.print(getTITLE());\r\n\t\tSystem.out.print(getNOOFCOPIES());\r\n\t}",
"public String showColor(int light) {\n\n String result;\n switch (light) {\n case 1:\n System.out.println(\"Red\");\n result = \"Red\";\n break;\n case 2:\n System.out.println(\"Orange\");\n result = \"Orange\";\n break;\n case 3:\n System.out.println(\"Green\");\n result = \"Green\";\n break;\n default:\n System.out.println(\"Red\");\n result = \"red\";\n break;\n }\n return result;\n }",
"@Override\n\tpublic void Red() {\n\t\tSystem.out.println(\"Red Light\");\n\t\t\n\t}",
"@Override\n\tpublic void print() {\n\t\t\n\t}",
"String getColour();",
"public Color getColor() { return color; }",
"public static void guessColor(Color colorArg) {\n\t\t\n\t\t//pass colorArg into showColor()\n\t\tshowColor(colorArg);\n\n\t\t//retrieve userGuess\n\t\tString userGuess = (JOptionPane.showInputDialog(\"Guess one of the following colors.\" + \"\\nBlue\" + \"\\nYellow\"\n\t\t\t\t+ \"\\nRed\" + \"\\nGreen\" + \"\\nOrange\" + \"\\nCyan\"));\n\n\t\t//pass userGuess into confirmGuess()\n\t\tconfirmGuess(userGuess);\n\n\t}",
"@NoProxy\n @NoWrap\n @NoDump\n public String getColor() {\n return color;\n }",
"public void gameUI(String username, BigDecimal balance){\n\n System.out.println(ANSI_RESET + username + \", balance: \" + ANSI_YELLOW + balance + \"\\n\" +\n ANSI_PURPLE + \"Command:\");\n }",
"@Override\n\tpublic void yellow() {\n\t\tSystem.out.println(\"Yellow Light\");\n\t\t\n\t}",
"public void showUserTurnMessage() {\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\"dein Zug... (9 drücken um zu speichern)\");\n\t\tSystem.out.println(\"\");\n\t}",
"public String format(Object object){\n return \"<font\"+(this == NO_COLOR ? \"\" : \" color=#\"+getHexValue())+\">\"+object+\"</font>\";\n }",
"@Override\n\tpublic String addcolor() {\n\t\treturn \"Green color is applied\";\n\t}",
"public void setColor(String color) {\r\n this.color = color;\r\n }",
"public static void printGreeting() {\n printDashLines();\n printLogo();\n System.out.println(GREETING_LINES);\n printDashLines();\n }",
"public void printByUser() {\r\n TUseStatus useStatus;\r\n\t for (int a=0; a < m_current_resources_count; a++)\r\n\t for (int b=0; b < m_current_users_count; b++) {\r\n\t useStatus = m_associations[a][b];\r\n\t if (useStatus!=null) System.out.println(useStatus.toString()); \r\n\t } \r\n }",
"public void printScreen() {\n Graphics g;\n try {\n g = this.getGraphics();\n g.setColor(Color.red);\n if (dbImage != null) {\n g.drawImage(dbImage, 0, 0, null);\n String text = \"Score:\" + gameData.score.score;//text of displated score\n g.drawString(text, 50, 50);\n } else {\n System.out.println(\"printScreen:graphic is null\");\n }\n Toolkit.getDefaultToolkit().sync();\n g.dispose();\n } catch (Exception e) {\n System.out.println(\"Graphics error: \" + e);\n }\n }",
"private static String printToken(GameToken token) {\n\t\tfinal String ANSI_EARTH\t= \"e\";\n\t\tfinal String ANSI_AIR \t= \"a\";\n\t\tfinal String ANSI_FIRE\t= \"f\";\n\t\tfinal String ANSI_WATER\t= \"w\";\n\t\t\n\t\tString result = \"\";\n\t\t\n\t\tif (token == null) {\n\t\t\tresult += \"-\";\n\t\t} else {\n\t\t\tswitch(token.getPlayer().getPlayerColor()) {\n\t\t\t\tcase EARTH: result += ANSI_EARTH; break;\n\t\t\t\tcase AIR: \tresult += ANSI_AIR; break;\n\t\t\t\tcase FIRE:\tresult += ANSI_FIRE; break;\n\t\t\t\tcase WATER:\tresult += ANSI_WATER; break; \n\t\t\t}\n\t\t\tif (token.isMaster()) {\n\t\t\t\tresult = result.toUpperCase();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"public void setColor(String c);",
"public void setColor(String color) {\n this.color = color;\n }",
"public void setColor(String color) {\n this.color = color;\n }",
"public void setColor(String color) {\n this.color = color;\n }",
"public void setColor(String color) {\n this.color = color;\n }",
"public void setColor(String color) {\n this.color = color;\n }"
]
| [
"0.72011065",
"0.69084674",
"0.66671944",
"0.66452634",
"0.6376924",
"0.6326419",
"0.62504286",
"0.61789113",
"0.61352086",
"0.6116256",
"0.61052495",
"0.6105169",
"0.6096502",
"0.60722476",
"0.6063117",
"0.60564864",
"0.60370713",
"0.60138386",
"0.5952047",
"0.5899186",
"0.5789638",
"0.57423913",
"0.5724193",
"0.57044333",
"0.5646659",
"0.5640154",
"0.5634521",
"0.5624881",
"0.562441",
"0.55717003",
"0.5562332",
"0.55566597",
"0.55527735",
"0.5502937",
"0.54943144",
"0.5487275",
"0.54843307",
"0.5469974",
"0.54682004",
"0.546782",
"0.5443333",
"0.54351044",
"0.54100865",
"0.5409355",
"0.54088086",
"0.54009885",
"0.5398836",
"0.5398213",
"0.539248",
"0.5386922",
"0.53839904",
"0.53826696",
"0.5382517",
"0.5375299",
"0.53720784",
"0.5370127",
"0.53507024",
"0.53506935",
"0.5350513",
"0.53437084",
"0.5342782",
"0.5333501",
"0.5329109",
"0.532086",
"0.5317355",
"0.53161055",
"0.53079534",
"0.5307139",
"0.5303102",
"0.5287405",
"0.52767336",
"0.5266314",
"0.5257302",
"0.5255493",
"0.52548534",
"0.5254826",
"0.5254475",
"0.5237446",
"0.5231633",
"0.523131",
"0.5222021",
"0.5221225",
"0.52185404",
"0.5215409",
"0.52137053",
"0.5212242",
"0.52105373",
"0.52065235",
"0.5206165",
"0.52051884",
"0.52048457",
"0.52004105",
"0.519696",
"0.51897246",
"0.518859",
"0.5186039",
"0.5183069",
"0.5183069",
"0.5183069",
"0.5183069",
"0.5183069"
]
| 0.0 | -1 |
1. OnlineVisaManagement Application Function Name:createDepartment Input Parameters:department object Return Type:department object Author:suriyaS Description:adding the department details to database by calling department repository | public Department createDepartment(Department department) {
return departmentRepository.save(department);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ResponseEntity<ApiMessageResponse> createDepartment(DepartmentRequest departmentRequest) {\n //Creating a new object of department model to save on database\n DepartmentModel departmentModel = new DepartmentModel(0L, departmentRequest.getName(), departmentRequest.getActive());\n\n departmentRepository.save(departmentModel); //Saving in database\n\n return new ResponseEntity<>(new ApiMessageResponse(201, \"Department Created\"), HttpStatus.CREATED);\n }",
"void insertDepartment(String depName, Date creationDate, long idParentDepartment);",
"public static void main(String[] args) {\n DepartmentServiceimpl deptservice=new DepartmentServiceimpl();\n Department deptobj=new Department();\n \n deptobj.setDepartmentNumber(22);\n deptobj.setDepartmentName(\"com\");\n deptobj.setDepatmentLocation(\"pune\");\ndeptservice.createDepartmentService(deptobj);\n\n}",
"@PostMapping(\"/company-departments\")\n @Timed\n public ResponseEntity<CompanyDepartment> createCompanyDepartment(@RequestBody CompanyDepartment companyDepartment) throws URISyntaxException {\n log.debug(\"REST request to save CompanyDepartment : {}\", companyDepartment);\n if (companyDepartment.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(\"companyDepartment\", \"idexists\", \"A new companyDepartment cannot already have an ID\")).body(null);\n }\n CompanyDepartment result = companyDepartmentRepository.save(companyDepartment);\n return ResponseEntity.created(new URI(\"/api/company-departments/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(\"companyDepartment\", result.getId().toString()))\n .body(result);\n }",
"public void addDepartmentRow(Departmentdetails departmentDetailsFeed);",
"public void addDepartment(IBaseDTO dto) {\n\t\tSysDepartment sd=new SysDepartment();\n\t\t\n\t\tsd.setName((String)dto.get(\"name\"));\n\t\tsd.setParentId((String)dto.get(\"parentId\"));\n\t\tsd.setRemarks((String)dto.get(\"remark\"));\n\t\tsd.setTagShow((String)dto.get(\"tagShow\"));\n\t\tsd.setId(ks.getNext(\"sys_department\"));\n\t\t\n\t\tdao.saveEntity(sd);\n\t\tcts.reload();\n\t}",
"public void assignDepartment(String departmentName);",
"@Override\r\n\tpublic void addDepartment(Department department) {\n\r\n\t\tgetHibernateTemplate().save(department);\r\n\t}",
"@Override\n\tpublic Department create(long departmentId) {\n\t\tDepartment department = new DepartmentImpl();\n\n\t\tdepartment.setNew(true);\n\t\tdepartment.setPrimaryKey(departmentId);\n\n\t\treturn department;\n\t}",
"public LevelOneDepartment addLevelTwoDepartment(RetailscmUserContext userContext, String levelOneDepartmentId, String name, String description, Date founded , String [] tokensExpr) throws Exception;",
"public void add(Department dep)\n\t{\n\t\tHRProtocol envelop = null;\n\t\tenvelop = new HRProtocol(HRPROTOCOL_ADD_DEPARTMENT_REQUEST, dep, null);\n\t\tsendEnvelop(envelop);\n\t\tenvelop = receiveEnvelop();\n\t\tif(envelop.getPassingCode() == HRPROTOCOL_ADD_DEPARTMENT_RESPONSE)\n\t\t{\t//Success in transition\n\t\t}else\n\t\t{\n\t\t\t//Error in transition. or other error codes.\n\t\t}\n\t}",
"@Test (priority = 5)\n\t\t\tpublic void verifyCreateNewDepartment() throws InterruptedException{\n\t\t\tLoginPage loginPage = new LoginPage(webdriver);\n\t\t\t\n\t\t\tDashBoardPage dashBoardPageAdminBB = loginPage.loginAs(\"[email protected]\",\"abc12345\");\n\t\t\tdashBoardPageAdminBB.verifyAdminBBAccount();\n\t\t\t\n\t\t\tCreateNewDepartmentPage createNewDepartmentPage = new CreateNewDepartmentPage(webdriver);\n\t\t\tcreateNewDepartmentPage.verifyCreateDepartment(departmentNameslist,accountCharactersList,parentDepartmentCharactersList);\t\t\t\t\t\n\t\t\t}",
"public static void addDept() {\n\t\tScanner sc = ReadFromConsole.sc;\n\n\t\tSystem.out.println(\"Enter Department name: \");\n\t\tString deptName = sc.nextLine();\n\n\t\tsc.nextLine(); // had to add this in to prevent input lines with different data types from\n\t\t\t\t\t\t// printing simultaneously, if you know a better solution, let me know\n\n\t\tSystem.out.println(\"Enter Department phone number: \");\n\t\tString deptPhoneNum = sc.nextLine();\n\n\t\tDepartment dept1 = new Department(deptName, deptPhoneNum);\n\t\t// pass in the info for each department\n\t\t// dept1 is the reference to the newly created obj\n\t\t// new Department = creates a new department obj and the Department constructor has a\n\t\t// counter variable which increments the id# and assigns it as new department id\n\n\t\tdeptInfo.add(dept1);\n\t\t// adding the newly created obj ref into arrlist\n\n\t}",
"@RequestMapping(value = \"/department/add.html\", method = RequestMethod.POST)\n\tpublic String add(@ModelAttribute Department department) {\n\t\tdepartment = deptDao.saveDepartment(department);\n\t\tSystem.out.println(\"Department saved\");\n\t\treturn \"redirect:list.html\";\n\n\t}",
"public Integer addDepartment(Department dep) {\n\n //the new User's id\n Integer id = null;\n\n Session session = ConnectionFactory.getInstance().getSession();\n\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n\n session.saveOrUpdate(dep);\n tx.commit();\n\n\n } catch (HibernateException e) {\n try {\n tx.rollback(); //error\n } catch (HibernateException he) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n return id;\n }",
"@RequestMapping(value = \"addUpdateDepartment\", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)\n protected void addUpdateDepartment(HttpServletRequest request, HttpServletResponse response) throws Exception {\n String json = \"\";\n String resultado = \"\";\n Integer idManagLab = 0;\n Integer department = 0;\n Integer idRecord = 0;\n\n\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(request.getInputStream(), \"UTF8\"));\n json = br.readLine();\n //Recuperando Json enviado desde el cliente\n JsonObject jsonpObject = new Gson().fromJson(json, JsonObject.class);\n\n if(jsonpObject.get(\"idManagLab\") != null && !jsonpObject.get(\"idManagLab\").getAsString().isEmpty() ) {\n idManagLab = jsonpObject.get(\"idManagLab\").getAsInt();\n }\n\n if (jsonpObject.get(\"department\") != null && !jsonpObject.get(\"department\").getAsString().isEmpty()) {\n department = jsonpObject.get(\"department\").getAsInt();\n }\n\n\n if (jsonpObject.get(\"idRecord\") != null && !jsonpObject.get(\"idRecord\").getAsString().isEmpty()) {\n idRecord = jsonpObject.get(\"idRecord\").getAsInt();\n }\n\n\n\n\n User usuario = seguridadService.getUsuario(seguridadService.obtenerNombreUsuario());\n\n if (idRecord == 0) {\n if (department != 0 && idManagLab!= 0) {\n\n //search record\n DepartamentoDireccion record = organizationChartService.getDepManagementRecord(idManagLab, department);\n\n if (record == null) {\n DepartamentoDireccion dep = new DepartamentoDireccion();\n dep.setFechaRegistro(new Timestamp(new Date().getTime()));\n dep.setUsuarioRegistro(usuario);\n dep.setDepartamento(laboratoriosService.getDepartamentoById(department));\n dep.setDireccionLab(organizationChartService.getManagmentLabById(idManagLab));\n dep.setPasivo(false);\n organizationChartService.addOrUpdateDepManagement(dep);\n } else {\n resultado = messageSource.getMessage(\"msg.existing.record.error\", null, null);\n throw new Exception(resultado);\n }\n\n }\n } else {\n DepartamentoDireccion rec = organizationChartService.getDepManagementById(idRecord);\n if (rec != null) {\n rec.setPasivo(true);\n organizationChartService.addOrUpdateDepManagement(rec);\n }\n }\n\n\n } catch (Exception ex) {\n logger.error(ex.getMessage(), ex);\n ex.printStackTrace();\n resultado = messageSource.getMessage(\"msg.add.depManag.error\", null, null);\n resultado = resultado + \". \\n \" + ex.getMessage();\n\n } finally {\n Map<String, String> map = new HashMap<String, String>();\n map.put(\"idManagLab\", idManagLab.toString());\n map.put(\"mensaje\", resultado);\n map.put(\"idRecord\", \"\");\n map.put(\"department\", \"\");\n String jsonResponse = new Gson().toJson(map);\n response.getOutputStream().write(jsonResponse.getBytes());\n response.getOutputStream().close();\n }\n }",
"int insert(CrmDept record);",
"public void create(Department department) {\n\t entityManager.persist(department);\n\t return;\n\t }",
"void assign (int departmentId, AssignEmployeeRequest empList);",
"public void AddEmployee(String firstName ,String lastName , String name_department)\n\t{\n\t\tEmployee emp = new Employee();\n\t\temp.setName(firstName);\n\t\temp.setSurname(lastName);\n\t\temp.setDepartment(SearchDepartment(name_department));\n\t\tAddEmployeeToDepartement(name_department,emp);\n\t}",
"@Insert({\n \"insert into dept (id, dept_name)\",\n \"values (#{id,jdbcType=INTEGER}, #{deptName,jdbcType=VARCHAR})\"\n })\n int insert(Dept record);",
"Department createOrUpdate(Department department);",
"public void AddDep(Department dep) {\n\t\tddi.Add(dep);\n\t\t\n\t}",
"@Test\n @IfProfileValue(name=\"dept-test-group\", values={\"all\",\"department\"})\n public void _2_1_3_addExistDept() throws Exception {\n Department dept = new Department();\n dept.setName(d_1_1.getName());\n dept.setDescription(\"测试新增重复部门\");\n dept.setParent(d_1.getId());\n try {\n RequestBuilder request = post(\n \"/api/v1.0/companies/\"+\n d_1.getCompany()+\n \"/departments\")\n .contentType(CONTENT_TYPE)\n .header(AUTHORIZATION, ACCESS_TOKEN)\n .content(json(dept));\n this.mockMvc.perform(request)\n .andDo(print())\n .andExpect(status().isConflict());\n } catch(Exception e) {\n throw(e);\n } finally {\n cleanNode(LdapNameBuilder.newInstance(d_1.getId())\n .add(\"ou\",dept.getName())\n .build().toString());\n }\n }",
"public void SetDepartmentID(String DepartmentID)\n {\n this.DepartmentID=DepartmentID;\n }",
"public Department createNewDepartment(Department newDepartment) {\n this.departmentDao.insert(newDepartment);\n return newDepartment;\n }",
"@Override\r\n public int deptInsert(Dept dept) {\n return sqlSession.insert(\"deptDAO.deptInsert\", dept);\r\n }",
"public void AddDepartment(String nomDepart)\n\t{ \n\t\tDepartment depart = new Department();\n\t\tdepart.setNameDepartment(nomDepart);\n\t\tdepartments.add(depart);\n\t}",
"public void create(Employee employee, Company company, IncomingReport incoming_report) throws IllegalArgumentException, DAOException;",
"int insert(Depart record);",
"public Departmentdetails getDepartmentByName(String departmentName);",
"public void setDepartment(String department) {\n this.department = department;\n }",
"public interface DepartmentService {\n public Map<String,Object> departmentList();\n public Map<String,Object> departmentAdd(Map<String,Object> params);\n public Map<String,Object> departmentEdit(Map<String,Object> params);\n public Map<String,Object> departmentDelete(Map<String,Object> params);\n public Map<String,Object> departmentDeleteCascade(Map<String,Object> params);\n public Map<String,Object> departmentNewRoot();\n\n}",
"public String checkDepartment(String departmentName);",
"public void saveDepartment(Department department) {\n\t\tgetHibernateTemplate().save(department);\n\t\t\n\t}",
"public Department save(Department department){\n\t\treturn departmentRepository.save(department);\n\t}",
"public void setDepartment(Department department) {\n this.department = department;\n }",
"void modifyDepartment(Department dRef);",
"public void setDepartment(Department d) {\r\n department = d;\r\n }",
"RentalAgency createRentalAgency();",
"@RequestMapping(\"/add\")\n @ResponseBody\n public JSONObject addDepart(HttpServletRequest request , HttpServletResponse response, Map<String,Object>map){\n JSONObject jo = new JSONObject();\n try\n {\n // department.setSort(departmentService.max());\n boolean index = departmentService.add(map);\n Operationlog operationlog = new Operationlog();\n operationlogService.addLog(\"添加用户\",\"2\",request);\n }\n catch (Exception e)\n {\n e.printStackTrace();\n jo.put(\"status\",\"1\");\n jo.put(\"code\",0);\n jo.put(\"msg\",\"ok\");\n return jo;\n }\n jo.put(\"status\",1);\n jo.put(\"code\",0);\n jo.put(\"msg\",\"ok\");\n return (JSONObject) JSONObject.toJSON(jo);\n }",
"public boolean createPersonalDetails(Integer staffID, String surname, String name, Date dob, String address, String town, String county,\n String postCode, String telNo, String mobileNo, String emergencyContact, String emergencyContactNo){\n\n\n hrDB.addPDRecord(staffID, surname, name, dob, address, town, county,\n postCode, telNo, mobileNo, emergencyContact, emergencyContactNo);\n return true;\n\n\n }",
"public void setDepartment(String department) {\r\n\t\tthis.department=department;\r\n\t}",
"public interface DepartmentService {\n public Department saveOrUpdate(Department department);\n public Optional<Department> getOne(Long departmentId);\n public void deleteOne(Long departmentId);\n public void deleteOne(Department department);\n public List<Department> getAll();\n public Department getByDepartmentCode(String code);\n public List<Department> getDepartmentByParentCode(String parentCode);\n public List<Department> getEmployeeCountByParentCode(String parentCode);\n public List<Department> getEmployeeAvgSalaryByParentCode(String parentCode);\n}",
"int insert(R_dept_user record);",
"public boolean add(Department dept) {\n Connection connection = null; \n try {\n connection = DBConnection.getConnection();\n stmt = connection.createStatement();\n// stmt = DBConnector.openConnection();\n String query = \"INSERT INTO \" + TABLE + \"(abbreviation,title,url_moodle,token) VALUES(\" + dept.toStringQueryInsert() + \")\";\n if (stmt.executeUpdate(query) == 1) {\n connection.commit();\n return true;\n }\n \n } catch (SQLException ex) {\n ex.printStackTrace();\n throw new RuntimeException(\"Insertion Query failed!\");\n } finally {\n DBConnection.releaseConnection(connection);\n// DBConnector.closeConnection();\n }\n return false;\n }",
"public int insertDept(DeptDTO dto) {\n\t\tConnection con=null;\n\t PreparedStatement pstmt=null;\n\t ResultSet rs=null;\n\t int num=0;\n\t try {\n\t \tcon=DriverManager.getConnection(url,userid,passwd);\n\t \t\n\t \tString sql=\"insert into dept(deptno,dname,loc)\"\n\t \t\t\t+\"values(?,?,?)\";\n\t \t\n\t \tpstmt=con.prepareStatement(sql);\n\t \tpstmt.setInt(1, dto.getDeptno());\n\t \tpstmt.setString(2, dto.getDname());\n\t \tpstmt.setString(3, dto.getLoc());\n\t \t\n\t \t num=pstmt.executeUpdate();\n\t \tSystem.out.println(\"실행된 레코드 갯수:\"+num);\n\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} finally {\n\t\t\ttry {\n\t\t\t\tif(rs!=null)\n\t\t\t\t\t rs.close();\n\t\t\t\t\tif(pstmt!=null)\n\t\t\t\t\t pstmt.close();\n\t\t\t\t\tif(con!=null)\n\t\t\t\t\t con.close();\n\t\t\t} catch (SQLException e2) {\n\t\t\t\t// TODO: handle exception\n\t\t\t}// TODO: handle finally clause\n\t\t}\n\t\treturn num;\n\t \t\t\t\n\t}",
"@Override\r\n\tpublic Department saveDepartment(Department department) {\n\t\treturn deptRepo.save(department);\r\n\t}",
"public Department(String name){\n this.name = name;\n }",
"@Override\npublic int insert(Department depa) {\n\treturn departmentMapper.insert(depa);\n}",
"public void setDepartmentid(Integer departmentid) {\n this.departmentid = departmentid;\n }",
"public void setDepartmentid(Integer departmentid) {\n this.departmentid = departmentid;\n }",
"public EmployeeBoarding addEmployee(RetailscmUserContext userContext, String employeeBoardingId, String companyId, String title, String departmentId, String familyName, String givenName, String email, String city, String address, String cellPhone, String occupationId, String responsibleForId, String currentSalaryGradeId, String salaryAccount , String [] tokensExpr) throws Exception;",
"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}",
"public void deleteDepartmentByDeptNo(int dept_no);",
"public Department() \n {\n name = \"unnamed department\";\n }",
"public String addEmployee(EmployeeDetails employeeDetails) throws NullPointerException;",
"public void setDepartment(String department) {\r\n\t\tthis.department = department;\r\n\t}",
"private String setDepartment() {\r\n\t\tSystem.out.println(\"New worker: \" + firstName + \".Department Codes\\n1 for Sales\\n2 for Development\\n3 for Accounting\\n0 for none\\nEnter department code:\");\r\n\t\tScanner in=new Scanner(System.in);\r\n\t\tint depChoice=in.nextInt();\r\n\t\tif(depChoice == 1) {\r\n\t\t\treturn \"sales\";\r\n\t\t}\r\n\t\telse if(depChoice == 2) {\r\n\t\t\treturn \"dev\";\r\n\t\t}\r\n\t\telse if (depChoice == 3) {\r\n\t\t\treturn \"acct\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}",
"public EmployeeDTO createEmployee(final EmployeeDTO createEmployeeDTO) throws ApplicationCustomException;",
"@Override\n\tpublic void insert(DeptVO deptVO) {\n\t\t\n\t}",
"public void addemp(Dept dept);",
"public int createEmployee(Employee emp) {\n\tStudentDAO studentDAO=new StudentDAO();\n\treturn studentDAO. createEmployee(emp);\n}",
"public void setDepartmentId(Integer departmentId) {\n this.departmentId = departmentId;\n }",
"public void setDepartmentId(Integer departmentId) {\n this.departmentId = departmentId;\n }",
"public void setDepartmentId(Integer departmentId) {\n this.departmentId = departmentId;\n }",
"@Test(expected = DataIntegrityViolationException.class)\n public void testInsertNullDepartmentName() throws Exception {\n Department insertDepartment = new Department(null);\n departmentDao.addDepartment(insertDepartment);\n\n }",
"public void setDepartmentName(String departmentName) {\n this.departmentName = departmentName;\n }",
"public interface DepartmentService {\n Department saveDepartment(Department d);\n\n Department findByDepartmentId(String departmentId);\n\n void deleteByDepartmentId(String departmentId);\n\n void updateDepartment(Department d);\n\n boolean departmentExists(Department d);\n\n List<Department> findAll();\n\n void deleteAll();\n}",
"public interface AdminDeptService {\n\n /**获取部门树\n * @return\n */\n @PostMapping(value =\"getDeptTree\", consumes = \"application/json; charset=UTF-8\" )\n Result getDeptTree() ;\n\n /**获取部门列表\n * @param dept\n * @return\n */\n @PostMapping(value =\"deptList\" , consumes = \"application/json; charset=UTF-8\")\n Result deptList(DeptHandle dept);\n\n /**获取部门信息\n * @param deptId\n * @return\n */\n @GetMapping(value =\"getDept\" , consumes = \"application/json; charset=UTF-8\")\n Result getDept(@RequestParam(value = \"deptId\") Long deptId) ;\n\n /**校验\n * @param deptName\n * @return\n */\n @PostMapping(value =\"checkDeptName\" , consumes = \"application/json; charset=UTF-8\")\n Result<Boolean> checkDeptName(@RequestParam(\"deptName\") String deptName);\n\n /**新增部门\n * @param deptHandle\n * @return\n */\n @PostMapping(value =\"addDept\" , consumes = \"application/json; charset=UTF-8\")\n Result addDept(@RequestBody DeptHandle deptHandle);\n\n /**删除部门\n * @param ids\n * @return\n */\n @PostMapping(value =\"deleteDepts\" , consumes = \"application/json; charset=UTF-8\")\n Result deleteDepts(@RequestBody String ids);\n\n /**修改部门\n * @param dept\n * @return\n */\n @PostMapping(value =\"updateDepts\" , consumes = \"application/json; charset=UTF-8\")\n Result updateDepts(@RequestBody DeptHandle dept);\n\n}",
"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}",
"public void setDepartmentName(String departmentName)\r\n\t{\r\n\t\tthis.departmentName = departmentName;\r\n\t}",
"@PostMapping(value = \"/addEmployee\")\n\tpublic void addEmployee() {\n\t\tEmployee e = new Employee(\"Iftekhar Khan\");\n\t\tdataServiceImpl.add(e);\n\t}",
"public void addDepartmentUser(DepartmentUser u) {\n\n //the new User's id\n Integer id = null;\n\n Session session = ConnectionFactory.getInstance().getSession();\n\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n\n session.saveOrUpdate(u);\n tx.commit();\n\n } catch (HibernateException e) {\n try {\n tx.rollback(); //error\n } catch (HibernateException he) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }",
"public void openDepartmentDialog(ActionEvent ae)\r\n {\r\n UIComponent source = ae.getComponent();\r\n\r\n ParticipantUserObject participantUserObject = (ParticipantUserObject) source.getAttributes().get(\"userObject\");\r\n if (participantUserObject.isReferencesDepartment())\r\n {\r\n parentNodeToRefresh = (DefaultMutableTreeNode) participantUserObject.getWrapper().getParent();\r\n selectedDepartment = participantUserObject.getDepartment();\r\n if (selectedDepartment != null)\r\n {\r\n createMode = false;\r\n modifyMode = true;\r\n\r\n this.departmentBean = new DepartmentBean(selectedDepartment);\r\n }\r\n }\r\n else\r\n {\r\n modifyMode = false;\r\n createMode = false;\r\n\r\n Department parentDepartment = null;\r\n OrganizationInfo assignedOrganization = null;\r\n\r\n if (participantUserObject.isReferencesScopedOrganization())\r\n {\r\n parentNodeToRefresh = (DefaultMutableTreeNode) participantUserObject.getWrapper();\r\n assignedOrganization = participantUserObject.getScopedOrganization();\r\n\r\n TreeNode node = participantUserObject.getWrapper().getParent();\r\n if (node instanceof DefaultMutableTreeNode)\r\n {\r\n createMode = true;\r\n\r\n DefaultMutableTreeNode parentNode = (DefaultMutableTreeNode) node;\r\n if (parentNode.getUserObject() instanceof ParticipantUserObject)\r\n {\r\n ParticipantUserObject parentParticipantUserObject = (ParticipantUserObject) parentNode\r\n .getUserObject();\r\n if (parentParticipantUserObject.isReferencesDepartment())\r\n {\r\n parentDepartment = parentParticipantUserObject.getDepartment();\r\n }\r\n else if (parentParticipantUserObject.isReferencesImplicitlyScopedOrganization())\r\n {\r\n DepartmentInfo parentDepartmentInfo = parentParticipantUserObject.getQualifiedModelParticipantInfo()\r\n .getDepartment();\r\n AdministrationService adminService = workflowFacade.getServiceFactory().getAdministrationService();\r\n parentDepartment = adminService.getDepartment(parentDepartmentInfo.getOID());\r\n }\r\n }\r\n }\r\n }\r\n this.departmentBean = new DepartmentBean(parentDepartment, assignedOrganization);\r\n }\r\n\r\n if (createMode || modifyMode)\r\n {\r\n super.openPopup();\r\n }\r\n }",
"public void setDepartmentId(Long departmentId) {\n this.departmentId = departmentId;\n }",
"public void setDepartmentId(Long departmentId) {\n this.departmentId = departmentId;\n }",
"public void setDepartmentId(Long departmentId) {\n this.departmentId = departmentId;\n }",
"public void setDepartmentId(int value) {\n this.departmentId = value;\n }",
"void validateCreate(ClaudiaData claudiaData, EnvironmentDto environmentDto, String vdc) throws \r\n AlreadyExistEntityException, InvalidEntityException;",
"@Override\n /*\n 插入数据\n */\n public void insertUserRoleDept(PmsUserRoleDept userRoleDept) {\n userRoleDept.setRoleDeptId(this.newId().intValue());\n this.execute(\"insertUserRoleDept\",userRoleDept);\n }",
"public void setDepartmentname(java.lang.String newDepartmentname) {\n\tdepartmentname = newDepartmentname;\n}",
"public interface DeptService {\n\n public void saveDept(DeptVo deptVO);\n\n public List<DeptEntity> getDeptTree();\n\n public void updateDept(DeptVo deptVO);\n\n}",
"private Department createDepartmentFromElement(Element element){\n Integer id = Integer.parseInt(element.getAttribute(\"id\"));\n String name = element.getElementsByTagName(\"name\").item(0).getTextContent();\n Integer nrPlaces = Integer.parseInt(\n element.getElementsByTagName(\"numberOfPlaces\").item(0).getTextContent());\n return new Department(id, name, nrPlaces);\n }",
"public void saveInwDepartCompetence(InwDepartCompetence inwDepartCompetence);",
"@GetMapping(\"/insertdepartment/{id}\")\n public String edit(@PathVariable(name = \"id\") Integer id,\n Model model){\n departmentDTO department = departmentService.getById(id);\n model.addAttribute(\"dpmtid\",department.getDpmtid());\n model.addAttribute(\"dpmtname\",department.getDpmtname());\n model.addAttribute(\"dpmtinfo\",department.getDpmtinfo());\n return \"insertdepartment\";\n }",
"public Department(){}",
"@Test\n @IfProfileValue(name=\"dept-test-group\", values={\"all\",\"department\"})\n public void _2_1_2_addSecondLevelDept() throws Exception {\n Department dept = new Department();\n dept.setName(\"testadd2nddept\");\n dept.setDescription(\"测试新增二级部门\");\n dept.setParent(d_1.getId());\n try {\n RequestBuilder request = post(\n \"/api/v1.0/companies/\"+\n d_1.getCompany()+\n \"/departments\")\n .contentType(CONTENT_TYPE)\n .header(AUTHORIZATION, ACCESS_TOKEN)\n .content(json(dept));\n this.mockMvc.perform(request)\n .andDo(print())\n .andExpect(status().isCreated())\n .andExpect(jsonPath(\"$.id\",is(\n LdapNameBuilder.newInstance(d_1.getId())\n .add(\"ou\",dept.getName())\n .build().toString()\n )))\n .andExpect(jsonPath(\"$.name\",is(dept.getName())))\n .andExpect(jsonPath(\"$.description\",is(dept.getDescription())))\n .andExpect(jsonPath(\"$.company\",is(d_1.getCompany().toString())))\n .andExpect(jsonPath(\"$.parent\",is(d_1.getId().toString())));\n } catch(Exception e) {\n throw(e);\n } finally {\n cleanNode(LdapNameBuilder.newInstance(d_1.getId())\n .add(\"ou\",dept.getName())\n .build().toString());\n }\n }",
"public String addEmployee() {\n\t\t\t//logger.info(\"addEmployee method called\");\n\t\t\t//userGroupBO.save(userGroup);;\n\t\t\treturn SUCCESS;\n\t\t}",
"public interface IDepartmentService {\n\n /**\n * 获取所有Department对象\n */\n public List<Department> getAllList();\n\n /**\n * 获取PageResult对象\n */\n public PageResult getQuery(BaseQuery query);\n\n /**\n * 获取Department对象\n */\n public Department get(Department department);\n\n /**\n * 保存Department对象\n */\n public void save(Department department);\n\n /**\n * 更新Department对象\n */\n public void update(Department department);\n\n /**\n * 更新Department对象\n */\n public void delete(Department department);\n\n /**\n * 批量删除Department对象\n * @param ids\n */\n public void batchDelete(List<Long> ids);\n}",
"int insertSelective(CrmDept record);",
"@Override\r\n\tpublic int insert(DeptBean dept) throws SQLException {\n\t\tList params = new ArrayList();\r\n\t\tint rows = 0;\r\n\t\tdeptConn = this.getConnection();\r\n\t\tparams.add(dept.getId() );\r\n\t\tparams.add(dept.getDeptNo() );\r\n\t\tparams.add(dept.getDeptName() );\r\n\t\tparams.add(dept.getDeptLeader() );\r\n\t\tparams.add(dept.getDeptTel() );\r\n\t\tparams.add(dept.getParentDeptNo() );\r\n\t\tparams.add(dept.getDeptDesc() );\r\n\t\tparams.add(dept.getRemark() );\r\n\t\trows = this.executeUpdate(deptConn,SQL_INSERT,params.toArray());\r\n\t\tif (deptConn != null) {\r\n\t\t\tthis.closeConnection(deptConn);\r\n\t\t}\r\n\t\treturn rows;\r\n\t}",
"public void crearDepartamento(String nombredep, String num, int nvJefe, int horIn, int minIn, int horCi, int minCi) {\r\n\t\t// TODO Auto-generated method stub by carlos Sánchez\r\n\t\t//Agustin deberia devolverme algo q me indique si hay un fallo alcrearlo cual es\r\n\t\t//hazlo como mas facil te sea.Yo no se cuantos distintos puede haber.\r\n\t\r\n\t//para añadir el Dpto en la BBDD no se necesita el Nombre del Jefe\r\n\t//pero si su numero de vendedor (por eso lo he puesto como int) que forma parte de la PK \r\n\t\t\r\n\t\tint n= Integer.parseInt(num);\r\n\t\tString horaapertura=aplicacion.utilidades.Util.horaminutosAString(horIn, minIn);\r\n\t\tString horacierre=aplicacion.utilidades.Util.horaminutosAString(horCi, minCi);\r\n\t\tTime thI= Time.valueOf(horaapertura);\r\n\t\tTime thC=Time.valueOf(horacierre);\r\n\t\tthis.controlador.insertDepartamentoPruebas(nombredep, nvJefe,thI,thC); //tabla DEPARTAMENTO\r\n\t\tthis.controlador.insertNumerosDepartamento(n, nombredep); //tabla NumerosDEPARTAMENTOs\r\n\t\tthis.controlador.insertDepartamentoUsuario(nvJefe, nombredep); //tabla DepartamentoUsuario\r\n\r\n\t\t//insertamos en la cache\r\n\t\t//Departamento d=new Departamento(nombredep,Integer.parseInt(num),getEmpleado(nvJefe),null,null);\r\n\t\t//departamentosJefe.add(d);\r\n\t\t/*ArrayList<Object> aux=new ArrayList<Object>();\r\n\t\taux.add(nombredep);\r\n\t\taux.add(n);\r\n\t\taux.add(nvJefe);\r\n\t\tinsertCache(aux,\"crearDepartamento\");*///no quitar el parseInt\r\n\t}",
"int insert(ProEmployee record);",
"@POST \n\t\t@Path(\"NewGrant\") \n\t\t@Consumes(MediaType.APPLICATION_FORM_URLENCODED) \n\t\t@Produces(MediaType.TEXT_PLAIN)\n\t\tpublic String insertFund( @FormParam(\"id\") String id,\n\t\t\t\t @FormParam(\"title\") String title,\n\t\t\t\t\t\t\t\t@FormParam(\"full_name\") String full_name,\n\t\t\t\t\t\t\t\t@FormParam(\"email\") String email,\n\t\t\t\t\t\t\t\t@FormParam(\"phone\") String phone,\n\t\t\t\t\t\t\t\t@FormParam(\"research_category\") String research_category,\n\t\t\t\t\t\t\t\t@FormParam(\"budget\") String budget,\n\t\t\t\t\t\t\t\t@FormParam(\"introduction\") String introduction)\n\t\n\t\t{\n\t\t \t{\n\t\t \t\tString output = Obj.insertGrantApplication(id,title,full_name,email,phone,research_category,budget,introduction); \n\t\t \t\treturn output;\n\t\t\t}\n\t\t}",
"public static Department createScenarioDepartmentA() {\n\t\t\t//Establish all the employees\n\t\t\tManager managerA = new Manager(\"Manager A\");\n\t\t\tManager managerB = new Manager(\"Manager B\");\n\t\t\tEmployee developerA = new Developer(\"Developer A\");\n\t\t\tEmployee qaTesterA = new QATester(\"QATester A\");\n\n\t\t\t//Set up reporting employee hierarchy\n\t\t\tmanagerA.addReportingEmployee(managerB);\n\t\t\tmanagerB.addReportingEmployee(developerA);\n\t\t\tmanagerB.addReportingEmployee(qaTesterA);\n\t\t\t\n\t\t\t//Establish Departments, with head managers\n\t\t\tDepartment departmentA = new Department(managerA);\n\t\t\t\n\t\t\treturn departmentA;\n\t\t}",
"@POST\n @Path(\"/{requirementId}/developers\")\n @Produces(MediaType.APPLICATION_JSON)\n @ApiOperation(value = \"This method add the current user to the developers list of a given requirement.\")\n @ApiResponses(value = {\n @ApiResponse(code = HttpURLConnection.HTTP_OK, message = \"Returns the requirement\", response = RequirementEx.class),\n @ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = \"Unauthorized\"),\n @ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = \"Not found\"),\n @ApiResponse(code = HttpURLConnection.HTTP_INTERNAL_ERROR, message = \"Internal server problems\")\n })\n public Response addUserToDevelopers(@PathParam(\"requirementId\") int requirementId) {\n DALFacade dalFacade = null;\n try {\n UserAgent agent = (UserAgent) Context.getCurrent().getMainAgent();\n long userId = agent.getId();\n String registratorErrors = service.bazaarService.notifyRegistrators(EnumSet.of(BazaarFunction.VALIDATION, BazaarFunction.USER_FIRST_LOGIN_HANDLING));\n if (registratorErrors != null) {\n ExceptionHandler.getInstance().throwException(ExceptionLocation.BAZAARSERVICE, ErrorCode.UNKNOWN, registratorErrors);\n }\n dalFacade = service.bazaarService.getDBConnection();\n Integer internalUserId = dalFacade.getUserIdByLAS2PeerId(userId);\n boolean authorized = new AuthorizationManager().isAuthorized(internalUserId, PrivilegeEnum.Create_DEVELOP, dalFacade);\n if (!authorized) {\n ExceptionHandler.getInstance().throwException(ExceptionLocation.BAZAARSERVICE, ErrorCode.AUTHORIZATION, Localization.getInstance().getResourceBundle().getString(\"error.authorization.develop.create\"));\n }\n dalFacade.wantToDevelop(internalUserId, requirementId);\n dalFacade.followRequirement(internalUserId, requirementId);\n Requirement requirement = dalFacade.getRequirementById(requirementId, internalUserId);\n service.bazaarService.getNotificationDispatcher().dispatchNotification(service, new Date(), Activity.ActivityAction.DEVELOP, requirement.getId(),\n Activity.DataType.REQUIREMENT, requirement.getComponents().get(0).getId(), Activity.DataType.COMPONENT, internalUserId);\n Gson gson = new Gson();\n return Response.status(Response.Status.CREATED).entity(gson.toJson(requirement)).build();\n } catch (BazaarException bex) {\n if (bex.getErrorCode() == ErrorCode.AUTHORIZATION) {\n return Response.status(Response.Status.UNAUTHORIZED).entity(ExceptionHandler.getInstance().toJSON(bex)).build();\n } else if (bex.getErrorCode() == ErrorCode.NOT_FOUND) {\n return Response.status(Response.Status.NOT_FOUND).entity(ExceptionHandler.getInstance().toJSON(bex)).build();\n } else {\n return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(ExceptionHandler.getInstance().toJSON(bex)).build();\n }\n } catch (Exception ex) {\n BazaarException bex = ExceptionHandler.getInstance().convert(ex, ExceptionLocation.BAZAARSERVICE, ErrorCode.UNKNOWN, \"\");\n return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(ExceptionHandler.getInstance().toJSON(bex)).build();\n } finally {\n service.bazaarService.closeDBConnection(dalFacade);\n }\n }",
"private String setDepartment() {\n\t\tSystem.out.println(\"Department codes\\n1 for Sales \\n2 for Development \"\n\t\t\t\t+ \"\\n3 for Accounting \\n0 for Other\\nEnter the department code: \");\n\t\tScanner sc = new Scanner(System.in);\n\t\tint deptChoice = sc.nextInt();\n\t\tsc.close();\n\t\tif (deptChoice == 1) return \"sales\";\n\t\telse if (deptChoice == 2) return \"development\";\n\t\telse if (deptChoice == 3) return \"accounting\";\n\t\telse return \"other\";\n\t}",
"public void deleteDepartmentByDeptName(String dept_name);",
"@Test\n @Transactional\n void createDepartmentWithExistingId() throws Exception {\n department.setId(1L);\n DepartmentDTO departmentDTO = departmentMapper.toDto(department);\n\n int databaseSizeBeforeCreate = departmentRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restDepartmentMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(departmentDTO)))\n .andExpect(status().isBadRequest());\n\n // Validate the Department in the database\n List<Department> departmentList = departmentRepository.findAll();\n assertThat(departmentList).hasSize(databaseSizeBeforeCreate);\n }"
]
| [
"0.7775858",
"0.7304928",
"0.7047602",
"0.68089056",
"0.6572822",
"0.65683126",
"0.65388787",
"0.6534011",
"0.6378762",
"0.6378559",
"0.63359445",
"0.62870705",
"0.6284885",
"0.62194526",
"0.6175454",
"0.61736375",
"0.61723685",
"0.616892",
"0.6152875",
"0.61524695",
"0.6136379",
"0.6125735",
"0.6088233",
"0.6061157",
"0.60507673",
"0.6045151",
"0.60192966",
"0.60022336",
"0.59417504",
"0.5917312",
"0.591432",
"0.5901697",
"0.5897638",
"0.58887005",
"0.58847165",
"0.5853568",
"0.58495146",
"0.5847692",
"0.5846802",
"0.5846225",
"0.58130264",
"0.5806182",
"0.579938",
"0.5792098",
"0.5787828",
"0.57865775",
"0.5783825",
"0.57267433",
"0.5723783",
"0.57180303",
"0.57051206",
"0.57051206",
"0.57016283",
"0.5693867",
"0.56810725",
"0.5678543",
"0.566008",
"0.56512475",
"0.5650125",
"0.565005",
"0.5637712",
"0.563615",
"0.56338155",
"0.562548",
"0.562548",
"0.562548",
"0.56206924",
"0.5619975",
"0.5618222",
"0.5614824",
"0.5610571",
"0.56006926",
"0.5584384",
"0.5577772",
"0.55707204",
"0.5558924",
"0.5558924",
"0.5558924",
"0.5544368",
"0.5539372",
"0.5535107",
"0.5524611",
"0.5518977",
"0.551677",
"0.5507332",
"0.55025196",
"0.54906464",
"0.54759574",
"0.5475186",
"0.54740393",
"0.54589957",
"0.545591",
"0.5449114",
"0.5446695",
"0.5437712",
"0.5430273",
"0.54273206",
"0.5424505",
"0.5423926",
"0.5420752"
]
| 0.66583866 | 4 |
1. OnlineVisaManagement Application Function Name:getDepartmentId Input Parameters:department id Return Type:optional department object Author:suriyaS Description:get department from database by calling findById() in department repository | public Optional<Department> getDepartmentId(long departmentId) {
return departmentRepository.findById(departmentId);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Department getDepartmentById(Integer id);",
"Department findById(long id);",
"public Department FindById(Department d) {\n\t\treturn ddi.FindById(d);\n\t}",
"public Department findOne(long departmentId){\n\t\treturn departmentRepository.findOne(departmentId);\n\t}",
"public Departmentdetails getDepartmentByName(String departmentName);",
"@Override\n\tpublic Optional<Department> findDepartmentById(Integer id) {\n\t\treturn departmentRepository.findById(id);\n\t}",
"public Department getSingleDepartment(Integer id) {\n\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n try {\n\n results = session.find(\"from Department as department where department.departmentId = ?\",\n new Object[]{id},\n new Type[]{Hibernate.INTEGER});\n\n\n\n } /*\n * If the object is not found, i.e., no Item exists with the\n * requested id, we want the method to return null rather\n * than throwing an Exception.\n *\n */ catch (ObjectNotFoundException onfe) {\n return null;\n } catch (HibernateException e) {\n /*\n * All Hibernate Exceptions are transformed into an unchecked\n * RuntimeException. This will have the effect of causing the\n * user's request to return an error.\n *\n */\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n if (results.isEmpty()) {\n return null;\n } else {\n return (Department) results.get(0);\n }\n\n }",
"public Department getSingleDepartment(String department) {\n\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n try {\n\n results = session.find(\"from Department as department where department.department = ?\",\n new Object[]{department},\n new Type[]{Hibernate.STRING});\n\n\n\n } /*\n * If the object is not found, i.e., no Item exists with the\n * requested id, we want the method to return null rather\n * than throwing an Exception.\n *\n */ catch (ObjectNotFoundException onfe) {\n return null;\n } catch (HibernateException e) {\n /*\n * All Hibernate Exceptions are transformed into an unchecked\n * RuntimeException. This will have the effect of causing the\n * user's request to return an error.\n *\n */\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n if (results.isEmpty()) {\n return null;\n } else {\n return (Department) results.get(0);\n }\n\n }",
"public int getDepartmentId() {\n return departmentId;\n }",
"public ResultSet getDepartmentByID(int dept_no);",
"public ResponseEntity<BasicApiResponse<DepartmentResponse>> getDepartmentById(Long departmentId) {\n Optional<DepartmentModel> departmentModelOptional = departmentRepository.findById(departmentId);\n\n //Checking if the Department is available\n if(departmentModelOptional.isPresent()){\n //If department found\n DepartmentModel departmentModel = departmentModelOptional.get();\n\n DepartmentResponse departmentResponse = new DepartmentResponse(departmentModel.getId(),\n departmentModel.getName(), departmentModel.getActive());\n\n return new ResponseEntity<>(new BasicApiResponse<>(200,\"Department Found\",departmentResponse),\n HttpStatus.OK);\n }\n else {\n //If No department found\n throw new ResponseStatusException(HttpStatus.NOT_FOUND, \"No Department found with ID: \" + departmentId);\n }\n }",
"public Integer getDepartmentId() {\n return departmentId;\n }",
"public Integer getDepartmentId() {\n return departmentId;\n }",
"public Integer getDepartmentId() {\n return departmentId;\n }",
"public Integer getDepartmentid() {\n return departmentid;\n }",
"public Integer getDepartmentid() {\n return departmentid;\n }",
"@Override\r\n\tpublic Department getDepartment(Long id) throws DepartmentNotFoundException {\n\t\tOptional<Department> department = deptRepo.findById(id);\r\n\t\t\r\n\t\tif(!department.isPresent()) {\r\n\t\t\tthrow new DepartmentNotFoundException(\"Oops..! No Department is available for the id.\");\r\n\t\t}\r\n\t\t\r\n\t\treturn department.get();\r\n\t}",
"public Long getDepartmentId() {\n return departmentId;\n }",
"public Long getDepartmentId() {\n return departmentId;\n }",
"public Long getDepartmentId() {\n return departmentId;\n }",
"@GetMapping(\"/company-departments/{id}\")\n @Timed\n public ResponseEntity<CompanyDepartment> getCompanyDepartment(@PathVariable Long id) {\n log.debug(\"REST request to get CompanyDepartment : {}\", id);\n CompanyDepartment companyDepartment = companyDepartmentRepository.findOne(id);\n return Optional.ofNullable(companyDepartment)\n .map(result -> new ResponseEntity<>(\n result,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }",
"@Override\n public Department getDepartment(int departmentId) {\n return null;\n }",
"@Override\r\n\tpublic Department getDepartmentById(int id) {\n\t\treturn getHibernateTemplate().get(Department.class, id);\r\n\t}",
"Dept findByDeptId(Long deptId);",
"public String getDepartmentid() {\n return departmentid;\n }",
"@Override\n\tpublic GappDepartment getDepartmentId(Integer id) {\n\t\treturn entityManager.find(GappDepartment.class, id);\n\t\t// return entityManager.createQuery(\"from GappUsers\",\n\t\t// GappUsers.class).getResultList();\n\t}",
"public Department findByNameDepartment(String nameDepartment);",
"public DepartmentModel findUserByDeptId( Long userId);",
"public Department getDepartmentById(int id) {\n return this.dsl\n .selectFrom(DEPARTMENT)\n .where(DEPARTMENT.ID.eq(id))\n .fetchOne()\n .into(Department.class);\n }",
"public Department getID(int id) {\n\t\tDepartment deptr = new Department();\n\t\tString query =\"Select * from departments where department_id=\"+id;\n\t\tStatement stmt = null;\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\t\n\t\t\tstmt = con.createStatement();\n\t\t\trs = stmt.executeQuery(query);\n\t\t\t\n\t\t\twhile(rs.next()) {\n\t\t\t\t\n\t\t\t\tdeptr.setDepartmentId(rs.getInt(\"department_id\"));\n\t\t\t\tdeptr.setDepartmentName(rs.getString(\"department_name\"));\n\t\t\t\tdeptr.setLocationId(rs.getString(\"location_id\"));\n\t\t\t\tdeptr.setManagerId(rs.getString(\"manager_id\"));\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}catch (SQLException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn deptr;\n\t}",
"public Department getById(long id) {\n\t return entityManager.find(Department.class, id);\n\t }",
"public List<Departmentdetails> getDepartmentDetails();",
"public Department findDepartment(Department department) {\n\t\treturn (Department)getHibernateTemplate().find(String.valueOf(department.getIdDepartment())).get(0);\n\t}",
"public void setDepartmentid(Integer departmentid) {\n this.departmentid = departmentid;\n }",
"public void setDepartmentid(Integer departmentid) {\n this.departmentid = departmentid;\n }",
"public void setDepartmentId(Integer departmentId) {\n this.departmentId = departmentId;\n }",
"public void setDepartmentId(Integer departmentId) {\n this.departmentId = departmentId;\n }",
"public void setDepartmentId(Integer departmentId) {\n this.departmentId = departmentId;\n }",
"public IBaseDTO getDepartment(String id) {\n\t\tIBaseDTO dto=new DynaBeanDTO();\n\t\tSysDepartment sd=(SysDepartment)dao.loadEntity(SysDepartment.class,id);\n\t\t\n\t\tdto.set(\"id\",sd.getId());\n\t\tdto.set(\"name\",sd.getName());\n\t\tdto.set(\"parentId\",sd.getParentId());\n\t\tdto.set(\"remark\",sd.getRemarks());\n\t\tdto.set(\"tagShow\",sd.getTagShow());\n\t\tdto.set(\"admin\",sd.getAdmin());\n\t\treturn dto;\n\t}",
"@Repository\r\npublic interface DepartmentRepository extends JpaRepository<Department, Integer>\r\n{\r\n\t\r\n\t/**\r\n\t * utilise la methode findById du CrudRepository en utilisant le nom du service comme parametre\r\n\t * \r\n\t * @param nameDepartment\r\n\t * @return une service\r\n\t */\r\n\t\r\n\tpublic Department findByNameDepartment(String nameDepartment);\r\n\r\n\tpublic Department findByIdDepartment(Integer idDepartment);\r\n\t\r\n}",
"public ResponseEntity<ApiMessageResponse> deleteDepartment(Long departmentId) {\n Optional<DepartmentModel> departmentModelOptional = departmentRepository.findById(departmentId);\n //Checking if the Department is available\n if (departmentModelOptional.isPresent()) {\n //If department found\n DepartmentModel departmentModel = departmentModelOptional.get();\n\n departmentRepository.delete(departmentModel);\n\n return new ResponseEntity<>(new ApiMessageResponse(200, \"Department info delete Successful\"),\n HttpStatus.OK);\n } else {\n //If No department found\n throw new ResponseStatusException(HttpStatus.NOT_FOUND, \"No Department found with ID: \" + departmentId);\n }\n }",
"public void setDepartmentId(Long departmentId) {\n this.departmentId = departmentId;\n }",
"public void setDepartmentId(Long departmentId) {\n this.departmentId = departmentId;\n }",
"public void setDepartmentId(Long departmentId) {\n this.departmentId = departmentId;\n }",
"@Override\n\tpublic Department fetchByPrimaryKey(long departmentId)\n\t\tthrows SystemException {\n\t\treturn fetchByPrimaryKey((Serializable)departmentId);\n\t}",
"public interface DepartmentService {\n public Department saveOrUpdate(Department department);\n public Optional<Department> getOne(Long departmentId);\n public void deleteOne(Long departmentId);\n public void deleteOne(Department department);\n public List<Department> getAll();\n public Department getByDepartmentCode(String code);\n public List<Department> getDepartmentByParentCode(String parentCode);\n public List<Department> getEmployeeCountByParentCode(String parentCode);\n public List<Department> getEmployeeAvgSalaryByParentCode(String parentCode);\n}",
"public final int getDepartmentId() {\n return departmentId;\n }",
"public String getId()\r\n {\r\n return departmentBean.getId();\r\n }",
"public interface DepartmentService extends VbootService<Department> {\n\n /**\n * 通过父部门id获取子部门id\n * @param parentId\n * @return\n */\n List<String> findChildByParentId(String parentId);\n}",
"public interface DepartmentRepository extends JpaRepository<Department,Integer> {\n public Department findOneByDeptName(String deptName);\n public Page<Department> findAllByDeptNameLike(Pageable pageable, String deptName);\n public List<Department> findAllByIdNot(Integer id);\n}",
"@GetMapping(\"/{id}\")\n\t\t\tpublic ResponseEntity<Message> getDepartementById(@PathVariable long id){\n\t\t\t\ttry {\n\t\t\t\t\tOptional<Departement> optDepartement = departementServices.getDepartementById(id);\n\t\t\t\t\tif (optDepartement.isPresent()) {\n\t\t\t\t\t\treturn new ResponseEntity<Message> (new Message (\"Successfully! Retrieve a Departement by id = \" +id,\n\t\t\t\t\t\t\t\tnull, Arrays.asList(optDepartement.get()), null, null, \"\"), HttpStatus.OK);\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn new ResponseEntity<Message> (new Message (\"Failure -> NOT Found a Departement by id = \" + id,\n\t\t\t\t\t\t\t\tnull, null, null, null, \"\"), HttpStatus.NOT_FOUND);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}catch (Exception e){\n\t\t\t\t\treturn new ResponseEntity<Message>(new Message(\"Failure\",\n\t\t\t\t\t\t\tnull, null, null, null, e.getMessage()), HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t\t\t}\n\t\t\t}",
"@RequestMapping(\"/select.do\")\r\n\t@ResponseBody\r\n\tpublic JsonResult selectDept(String deptId){\n\t\tList<Department> list = deptService.selectDept(deptId);\r\n\t\treturn new JsonResult(list);\r\n\t}",
"public java.lang.String getDepartmentId () {\r\n\t\treturn departmentId;\r\n\t}",
"@GetMapping(\"/insertdepartment/{id}\")\n public String edit(@PathVariable(name = \"id\") Integer id,\n Model model){\n departmentDTO department = departmentService.getById(id);\n model.addAttribute(\"dpmtid\",department.getDpmtid());\n model.addAttribute(\"dpmtname\",department.getDpmtname());\n model.addAttribute(\"dpmtinfo\",department.getDpmtinfo());\n return \"insertdepartment\";\n }",
"@Override\n\tpublic DeptInf findDeptById(Integer id) {\n\t\treturn deptMapper.selectByPrimaryKey(id);\n\t}",
"public void setDepartmentId(int value) {\n this.departmentId = value;\n }",
"public Department showDepById(int id)\n\t\t\tthrows ClassNotFoundException, FileNotFoundException, SQLException, IOException {\n\t\tConnection connection = jdbcUtils.connect();\n\t\tDepartment department = new Department();\n\t\t// Create a statement object\n\t\tString sql = \"SELECT * FROM Department WHERE DepartmentId = ?\";\n\t\tPreparedStatement preparedStatement = connection.prepareStatement(sql);\n\n\t\t// set parameter\n\t\tpreparedStatement.setInt(1, id);\n\n\t\t// Step 4: execute query\n\t\tResultSet resultSet = preparedStatement.executeQuery();\n\n\t\t// Step 5: handling result set\n\t\tif (resultSet.next()) {\n\t\t\tSystem.out.println((\"DepartmentID: \" + resultSet.getInt(\"DepartmentId\") + \" //\" + \" DepartmentName: \"\n\t\t\t\t\t+ resultSet.getString(\"DepartmentName\")));\n\t\t\treturn department;\n\n\t\t} else {\n\t\t\tSystem.out.println(\"Cannot find department which has id = \" + id);\n\t\t}\n\t\tjdbcUtils.disconnect();\n\t\treturn department;\n\t}",
"public DepartmentUser getSingleDepartmentUser(Integer userId,Integer departmentId)\n\t{\n\n\t\t/*\n\t\t * Use the ConnectionFactory to retrieve an open\n\t\t * Hibernate Session.\n\t\t *\n\t\t */\n\t\tSession session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\t\ttry\n\t\t{\n\n results = session.find(\"from DepartmentUser as departmentUser where departmentUser.userId = ? and departmentUser.departmentId = ? \",\n new Object[] {userId,departmentId},\n new Type[] {Hibernate.INTEGER,Hibernate.INTEGER} );\n\n\n\n\t\t}\n\t\t/*\n\t\t * If the object is not found, i.e., no Item exists with the\n\t\t * requested id, we want the method to return null rather\n\t\t * than throwing an Exception.\n\t\t *\n\t\t */\n\t\tcatch (ObjectNotFoundException onfe)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\tcatch (HibernateException e)\n\t\t{\n\t\t\t/*\n\t\t\t * All Hibernate Exceptions are transformed into an unchecked\n\t\t\t * RuntimeException. This will have the effect of causing the\n\t\t\t * user's request to return an error.\n\t\t\t *\n\t\t\t */\n\t\t\tSystem.err.println(\"Hibernate Exception\" + e.getMessage());\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t\t/*\n\t\t * Regardless of whether the above processing resulted in an Exception\n\t\t * or proceeded normally, we want to close the Hibernate session. When\n\t\t * closing the session, we must allow for the possibility of a Hibernate\n\t\t * Exception.\n\t\t *\n\t\t */\n\t\tfinally\n\t\t{\n\t\t\tif (session != null)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tsession.close();\n\t\t\t\t}\n\t\t\t\tcatch (HibernateException e)\n\t\t\t\t{\n\t\t\t\t\tSystem.err.println(\"Hibernate Exception\" + e.getMessage());\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n if(results.isEmpty())\n return null;\n else\n return (DepartmentUser) results.get(0);\n\n\t}",
"public BaseDepartment findById(Long id) throws Exception {\n\t\tString hql = \"FROM BaseDepartment dp WHERE dp.pkDeptId=?\";\n\t\tObject[] values = {\n\t\t\t\tid\n\t\t};\n\t\ttry {\n\t\t\tList list = this.find(hql, values);\n\t\t\tif(list != null && list.size() > 0 && list.get(0) != null){\n\t\t\t\treturn (BaseDepartment)list.get(0);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"public interface IDepartmentService {\n\n /**\n * 获取所有Department对象\n */\n public List<Department> getAllList();\n\n /**\n * 获取PageResult对象\n */\n public PageResult getQuery(BaseQuery query);\n\n /**\n * 获取Department对象\n */\n public Department get(Department department);\n\n /**\n * 保存Department对象\n */\n public void save(Department department);\n\n /**\n * 更新Department对象\n */\n public void update(Department department);\n\n /**\n * 更新Department对象\n */\n public void delete(Department department);\n\n /**\n * 批量删除Department对象\n * @param ids\n */\n public void batchDelete(List<Long> ids);\n}",
"public Department findDepartment(String num)\n\t{\n\t\tHRProtocol envelop = null;\n\t\tenvelop = new HRProtocol(HRPROTOCOL_FIND_DEPARTMENT_REQUEST, num, null);\n\t\tsendEnvelop(envelop);\n\t\tenvelop = receiveEnvelop();\n\t\tif(envelop.getPassingCode() == HRPROTOCOL_FIND_DEPARTMENT_RESPONSE)\n\t\t{\n\t\t\tint DepNum = ((Department)envelop.getPassingObject()).getDepartmentId();\n\t\t\tString DepName = ((Department)envelop.getPassingObject()).getDepartmentName();\n\n\t\t\tDepartment dep = new Department(DepNum, DepName);\n\t\t\treturn dep;\n\t\t\t\n\t\t}else\n\t\t{\n\t\t\t//Error in transition. or other error codes.\n\t\t\treturn null;\n\t\t}\n\t}",
"public interface DepartmentService {\n Department saveDepartment(Department d);\n\n Department findByDepartmentId(String departmentId);\n\n void deleteByDepartmentId(String departmentId);\n\n void updateDepartment(Department d);\n\n boolean departmentExists(Department d);\n\n List<Department> findAll();\n\n void deleteAll();\n}",
"public interface DeptService {\n\n List<Department> query();\n\n void saveOrUpdate(Department department);\n\n List<Department> findByDeptId(Department department);\n\n}",
"@RequestMapping(\"/departments/{departmentId}\")\n\tpublic ModelAndView departmentHandler(@PathVariable(\"departmentId\") int departmentId) {\n\n\t\tString viewName = \"departments/show\";\n\t\tModelAndView mav = new ModelAndView(viewName);\n\t\tmav.addObject(this.company.loadDepartment(departmentId));\n\n\t\tlogger.info(\"departmentHandler(): departmentId[\" + departmentId + \"], viewName[\" + viewName + \"]\");\n\t\treturn mav;\n\t}",
"public ResultSet getDepartmentByName(String dept_name);",
"@Override\npublic void deleteDepartmentDataById(Integer Id) {\n\tOptional<DepartmentEntity> emp= departmentRepository.findById(Id);\n\tif(emp.isPresent())\n\t{\n\t\tdepartmentRepository.deleteById(Id);\n\t}\n\telse\n\t{\n\t\tthrow new IdNotValidException();\n\t}\n}",
"@GetMapping(\"/{id}\")\n public ResponseTemplateVO getUserWithDepartment(@PathVariable(\"id\")\n Long studentId){\n return studentService.getUserWithDepartment(studentId);\n }",
"public List<GLJournalApprovalVO> getDepartmentfromuniquecode(String OrgId, String ClientId,\n String deptId) {\n String sqlQuery = \"\";\n PreparedStatement st = null;\n ResultSet rs = null;\n List<GLJournalApprovalVO> list = null;\n try {\n list = new ArrayList<GLJournalApprovalVO>();\n sqlQuery = \" select f.c_salesregion_id,sal.name from fact_acct f join c_salesregion sal on sal.c_salesregion_id = f.c_salesregion_id WHERE f.AD_ORG_ID IN (\"\n + OrgId + \") \" + \" AND f.AD_CLIENT_ID IN (\" + ClientId\n + \") AND f.em_efin_uniquecode IN ('\" + deptId\n + \"') and f.c_bpartner_id is not null and f.c_salesregion_id is not null and f.c_project_id is not null and f.c_campaign_id is not null and f.c_activity_id is not null and f.user1_id is not null and f.user2_id is not null limit 1\";\n st = conn.prepareStatement(sqlQuery);\n rs = st.executeQuery();\n while (rs.next()) {\n GLJournalApprovalVO VO = new GLJournalApprovalVO();\n VO.setId(rs.getString(1));\n VO.setName(rs.getString(2));\n list.add(VO);\n }\n } catch (Exception e) {\n log4j.error(\"Exception in getOrgs()\", e);\n }\n return list;\n }",
"@RequestMapping(value=\"/department\", method = RequestMethod.GET)\npublic @ResponseBody List<Department> department(){\n\treturn (List<Department>) departmentrepository.findAll();\n}",
"@Override\n\tpublic long getEmployeeDepartmentId() {\n\t\treturn _candidate.getEmployeeDepartmentId();\n\t}",
"public void SetDepartmentID(String DepartmentID)\n {\n this.DepartmentID=DepartmentID;\n }",
"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}",
"public Department getDepartment() {\n return department;\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 Department selectDepartment()\n {\n Department selectedDepartment = null;\n if(listViewSelectedHospital != null){\n listViewSelectedHospital = listViewSelectedHospital.trim();\n String hospitalName = listViewSelectedHospital.split(\" \")[0];\n selectedDepartment = getDepartment(hospitalName);\n }\n return selectedDepartment;\n }",
"@Override\r\n\tpublic String deleteDepartment(Long deptId) {\n\t\tdeptRepo.deleteById(deptId);\r\n\t\treturn \"Deleted successfully\";\r\n\t}",
"public String GetDept()\r\n {\r\n return Department;\r\n }",
"@Override\r\n\tpublic Department getDepartmentByName(String departmentName) {\n\t\treturn deptRepo.findByDepartmentNameIgnoreCase(departmentName);\r\n\t}",
"@Repository\npublic interface DepartmentRepository extends JpaRepository<Department, Long> {\n /**\n * 根据ID和名称模糊匹配获取部门\n * @param id\n * @param name\n * @return\n */\n List<Department> findByIdOrName(Long id, String name);\n /**\n * 根据部门名称模糊匹配\n * @param name\n * @return\n */\n Department getByName(String name);\n Department getByNameEquals(String name);\n Department getByNameLike(String name);\n}",
"public interface ISysDeptService extends IBaseService<SysDept> {\n\n /**\n * 校验部门名称是否唯一\n *\n * @param dept 部门信息\n * @return 结果\n */\n String checkDeptNameUnique(SysDept dept);\n\n /**\n * 查询部门是否存在用户\n *\n * @param deptId 部门ID\n * @return 结果 true 存在 false 不存在\n */\n Boolean checkDeptExistUser(Long deptId);\n\n /**\n * 查询部门管理树\n *\n * @param dept 部门信息\n * @return 所有部门信息\n */\n List<Ztree> selectDeptTree(SysDept dept);\n\n /**\n * 根据角色ID查询菜单\n *\n * @param role 角色对象\n * @return 菜单列表\n */\n List<Ztree> roleDeptTreeData(SysRole role);\n}",
"public List<Department> getAllDepartments();",
"@Override\r\n\tpublic Dept queryByID(Dept t) {\n\t\treturn null;\r\n\t}",
"public int getEmployeeId();",
"public boolean deleteDepartmentById(Integer id);",
"@Select({\n \"select\",\n \"id, dept_name\",\n \"from dept\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"cn.wuaijing.mapper.DeptMapper.BaseResultMap\")\n Dept selectByPrimaryKey(Integer id);",
"public List getDepartmentUserByDEpartment(int departmentId) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n Session session = ConnectionFactory.getInstance().getSession();\n Query query;\n\n try {\n /*\n * Build HQL (Hibernate Query Language) query to retrieve a list\n * of all the items currently stored by Hibernate.\n */\n\n query = session.createQuery(\"select DepartmentUser from app.user.DepartmentUser DepartmentUser where \"\n + \" DepartmentUser.departmentId= \" + departmentId);\n return query.list();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }",
"public String checkDepartment(String departmentName);",
"void deleteDepartmentById(Long id);",
"public Department employeeDepartment(String employeeName) {\n\n String departmentOfEmployee = \"\";\n\n try {\n Connection conn = ConnectToSqlDB.connectToSqlDatabase();\n String query = \"SELECT * FROM employees;\";\n\n ConnectToSqlDB.statement = conn.createStatement();\n\n ConnectToSqlDB.resultSet = ConnectToSqlDB.statement.executeQuery(query);\n\n while (ConnectToSqlDB.resultSet.next()) {\n int idField = ConnectToSqlDB.resultSet.getInt(\"employee_id\");\n String nameField = ConnectToSqlDB.resultSet.getString(\"employee_name\");\n String salaryField = ConnectToSqlDB.resultSet.getString(\"employee_salary\");\n String departmentField = ConnectToSqlDB.resultSet.getString(\"department\");\n\n if (nameField.equals(employeeName)) {\n departmentOfEmployee = departmentField;\n }\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n System.out.print(\"This employee belongs to the following department: \");\n if (departmentOfEmployee.equals(Department.Executive.toString())) {\n return Department.Executive;\n }\n if (departmentOfEmployee.equals(Department.Development.toString())) {\n return Department.Development;\n }\n if (departmentOfEmployee.equals(Department.Accounting.toString())) {\n return Department.Accounting;\n }\n if (departmentOfEmployee.equals(Department.Human_Resources.toString())) {\n return Department.Human_Resources;\n }\n else return Department.No_Department;\n\n }",
"public Long getDeptId() {\n return deptId;\n }",
"public Doctor findById(int id);",
"public String getEmployeeDepartment(){\n return profile.getDepartment();\n }",
"public interface DeptRepository extends CrudRepository<Department, Long> {\n List<Department> findByDeptName(String deptName);\n List<Department> findByCity(String city);\n}",
"public Integer getDeptId() {\r\n return deptId;\r\n }",
"Department findByShortName(String name);",
"private Department getDepartment(String departmentName)\n {\n for(Department department:humanPlayer.getDepartments())\n {\n if(department.getName().equals(departmentName))\n {\n return department;\n }\n }\n return null;\n }",
"public interface DepartmentDao extends BaseDao<Department,String> {\n\n List<Department> getDeptListByPage(Integer pageNumber, Integer pageSize,String name,String parentName);\n Integer getSize(String name,String parentName);\n}",
"public Integer getDeptId() {\n return deptId;\n }",
"public Integer getDeptId() {\n return deptId;\n }",
"public Integer getDeptId() {\n return deptId;\n }"
]
| [
"0.82897556",
"0.77946246",
"0.7533263",
"0.7527321",
"0.7467079",
"0.73659456",
"0.73501986",
"0.73488873",
"0.73368734",
"0.72655636",
"0.72473055",
"0.7205326",
"0.7205326",
"0.7205326",
"0.7162683",
"0.7162683",
"0.71522355",
"0.71364224",
"0.71364224",
"0.71364224",
"0.7121675",
"0.7113189",
"0.7061508",
"0.69759446",
"0.696484",
"0.6946119",
"0.6910375",
"0.6904583",
"0.69003415",
"0.68958527",
"0.68301105",
"0.6790815",
"0.6769945",
"0.67559737",
"0.67559737",
"0.673908",
"0.673908",
"0.673908",
"0.6734927",
"0.66634965",
"0.66608375",
"0.6659299",
"0.6659299",
"0.6659299",
"0.66393244",
"0.66153145",
"0.66020745",
"0.658002",
"0.6553694",
"0.65093994",
"0.6502678",
"0.6490592",
"0.64837235",
"0.6464247",
"0.64507294",
"0.64442796",
"0.6431176",
"0.64262444",
"0.64243126",
"0.63998014",
"0.6370516",
"0.6359393",
"0.63526475",
"0.6346042",
"0.632266",
"0.6308835",
"0.63060814",
"0.63023347",
"0.6299237",
"0.6287631",
"0.6278238",
"0.62677556",
"0.62640834",
"0.624718",
"0.62456775",
"0.6232849",
"0.6227165",
"0.6207486",
"0.6179337",
"0.61678696",
"0.61589956",
"0.61530405",
"0.6146559",
"0.61425465",
"0.61299276",
"0.61262834",
"0.61224884",
"0.6116484",
"0.61103266",
"0.60954267",
"0.60886776",
"0.6085062",
"0.60813254",
"0.6076668",
"0.6068777",
"0.6060656",
"0.60581565",
"0.60498434",
"0.60498434",
"0.60498434"
]
| 0.7157328 | 16 |
1. OnlineVisaManagement Application Function Name:getAllEmployee Input Parameters:empty Return Type:List of employee object Author:suriyaS Description:get all employee details from database by calling findAll() in employee repository | public List<Department> getAllDepartments()
{
return departmentRepository.findAll();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Employee> listAll(){\n return employeeRepository.findAll();\n }",
"public List<Employee> getAllEmployees() {\n return employeeRepository.findAll();\n }",
"@GetMapping(\"/employee\")\r\n\tpublic List<Employee> getAllEmployees()\r\n\t{\r\n\t\treturn empdao.findAll();\r\n\t}",
"@GetMapping(\"/employees\")\npublic List <Employee> findAlll(){\n\treturn employeeService.findAll();\n\t}",
"@RequestMapping(value = \"/getAllEmployees\", method = RequestMethod.GET, produces = { MediaType.APPLICATION_JSON_VALUE })\r\n\tpublic List<Employee> getAllEmpoyees(){\r\n\t\treturn repository.getAllEmpoyees();\r\n\t}",
"@GetMapping(value=\"/searchEmpData\")\n\tpublic List<Employee> getAllEmployees()\n\t{\n\t\treturn this.integrationClient.getAllEmployees();\n\t}",
"@Override\r\n\tpublic List<Employee> getAllEmployeeList() throws Exception {\n\t\t\r\n\t\treturn (List<Employee>) employeeRepository.findAll();\r\n\t}",
"public List<Employee> listAllCrud(){\n return employeeCrudRepository.findAll();\n }",
"public List<Employee> getAllEmployee(){\n List<Employee> employee = new ArrayList<Employee>();\n employeeRepository.findAll().forEach(employee::add);\n return employee;\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}",
"List<Employee> allEmpInfo();",
"@Override\n\tpublic List<Employee> getAllEmployees() {\n\t\t\n\t\tlog.debug(\"EmplyeeService.getAllEmployee() return list of employees\");\n\t\treturn repositary.findAll();\n\t}",
"@RequestMapping(method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n public final List<EmployeeDTO> findAllEmployees() {\n LOGGER.info(\"getting all employees\");\n return employeeFacade.findAllEmployees();\n }",
"@GetMapping(\"/GetAllEmployees\")\r\n public List<Employee> viewAllEmployees() {\r\n return admin.viewAllEmployees();\r\n }",
"List<Employee> findAll();",
"public List<Employee> findAll() {\n return employeeRepository.findAll();\n }",
"@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 }",
"@GetMapping(\"/findAllEmployees\")\n\tpublic List<Employee> getAll() {\n\t\treturn testService.getAll();\n\t}",
"@GetMapping(\"/emloyees\")\n public List<Employee> all() {\n return employeeRepository.findAll();\n }",
"public List<Employees> getEmployeesList()\n {\n return employeesRepo.findAll();\n }",
"@Override\n\tpublic List<Employee> getAllEmployee() {\n\t\tList<Employee> employee = new ArrayList<>();\n\t\tlogger.info(\"Getting all employee\");\n\t\ttry {\n\t\t\temployee = employeeDao.getAllEmployee();\n\t\t\tlogger.info(\"Getting all employee = {}\",employee.toString());\n\t\t} catch (Exception exception) {\n\t\t\tlogger.error(exception.getMessage());\n\t\t}\n\t\treturn employee;\n\t}",
"public List<Employee> getAllEmployees(){\n\t\tList<Employee> employees = employeeDao.findAll();\n\t\tif(employees != null)\n\t\t\treturn employees;\n\t\treturn null;\n\t}",
"@RequestMapping(value = \"/employeesList\", method = RequestMethod.GET, produces = {\"application/xml\", \"application/json\" })\n\t@ResponseStatus(HttpStatus.OK)\n\tpublic @ResponseBody\n\tEmployeeListVO getListOfAllEmployees() {\n\t\tlog.info(\"ENTERING METHOD :: getListOfAllEmployees\");\n\t\t\n\t\tList<EmployeeVO> employeeVOs = employeeService.getListOfAllEmployees();\n\t\tEmployeeListVO employeeListVO = null;\n\t\tStatusVO statusVO = new StatusVO();\n\t\t\n\t\tif(employeeVOs.size()!=0){\n\t\t\tstatusVO.setCode(AccountantConstants.ERROR_CODE_0);\n\t\t\tstatusVO.setMessage(AccountantConstants.SUCCESS);\n\t\t}else{\n\t\t\tstatusVO.setCode(AccountantConstants.ERROR_CODE_1);\n\t\t\tstatusVO.setMessage(AccountantConstants.NO_RECORDS_FOUND);\n\t\t}\n\t\t\n\t\temployeeListVO = new EmployeeListVO(employeeVOs, statusVO);\n\t\t\n\t\tlog.info(\"EXITING METHOD :: getListOfAllEmployees\");\n\t\treturn employeeListVO;\n\t}",
"@RequestMapping(value = GET_ALL_EMPLOYEE_URL_API, method=RequestMethod.GET)\r\n public ResponseEntity<?> getAllEmployee() {\r\n\r\n checkLogin();\r\n\r\n return new ResponseEntity<>(employeeService.getAll(), HttpStatus.OK);\r\n }",
"@RequestMapping(\"/employee\")\n\tpublic List<Employee> getAllEmplyee() {\n\t\treturn service.getAllEmplyee();\n\t}",
"@GetMapping(\"/all\")\n\tpublic ResponseEntity<List<Employee>> getAllEmployees() {\n\t\tList<Employee> list = service.getAllEmployees();\n\t\treturn new ResponseEntity<List<Employee>>(list, HttpStatus.OK);\n\t}",
"@GetMapping(\"/employees\")\r\n\tpublic List<Employee> list() {\r\n\t return empService.listAll();\r\n\t}",
"@Override\r\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn employeeDao.getAllEmployee();\r\n\t}",
"@Override\n\tpublic void getAllEmployee() {\n\t\t\n\t}",
"@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}",
"@Override\n\tpublic List<Employee> getAll() {\n\t\tList<Employee> list =null;\n\t\tEmployeeDAO employeeDAO = DAOFactory.getEmployeeDAO();\n\t\ttry {\n\t\t\tlist=employeeDAO.getAll();\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Employee> getAllEmployees() {\r\n\t\tfinal Session session = sessionFactory.getCurrentSession();\t\t\r\n\t\tfinal Query query = session.createQuery(\"from Employee e order by id desc\");\r\n\t\t//Query q = session.createQuery(\"select NAME from Customer\");\r\n\t\t//final List<Employee> employeeList = query.list(); \r\n\t\treturn (List<Employee>) query.list();\r\n\t}",
"public List<Employee> getEmployees();",
"public List<Employee> getListOfAllEmployees() {\n\t\tlista = employeeDao.findAll();\r\n\r\n\t\treturn lista;\r\n\t}",
"@GetMapping(\"/employees\")\r\n\tpublic List<Employee> getEmployees(){\r\n\t\t\r\n\t\treturn employeeService.getEmployees();\r\n\t\t\r\n\t}",
"@GetMapping(\"/getEmployees\")\n\t@ResponseBody\n\tpublic List<Employee> getAllEmployees(){\n\t\treturn employeeService.getEmployees();\n\t}",
"public ResponseEntity<List<Employee>> getAllEmployees() {\n \tList<Employee> emplist=empService.getAllEmployees();\n\t\t\n\t\tif(emplist==null) {\n\t\t\tthrow new ResourceNotFoundException(\"No Employee Details found\");\n\t\t}\n\t\t\n\t\treturn new ResponseEntity<>(emplist,HttpStatus.OK);\t\t\n }",
"@RequestMapping(value=\"/employees/all\", method = RequestMethod.GET)\npublic @ResponseBody List<Employee> employeeListRest(){\n\treturn (List<Employee>) employeerepository.findAll();\n}",
"@Override\r\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn employees;\r\n\t}",
"@Override\n\tpublic List<Employee> queryAll() {\n\t\treturn dao.queryAll();\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 List<EmployeeTO> getAllEmployees() {\n\t\t\r\n\t\treturn EmployeeService.getInstance().getAllEmployees();\r\n\t}",
"Collection<EmployeeDTO> getAll();",
"@GetMapping(value=\"/employes\")\n\tpublic List<Employee> getEmployeeDetails(){\n\t\t\n\t\tList<Employee> employeeList = employeeService.fetchEmployeeDetails();\n\t\treturn employeeList;\t\t\t\t\t\t\n\t}",
"@Override\n\tpublic List<Employee> viewAllEmployees() {\n\t\t CriteriaBuilder cb = em.getCriteriaBuilder();\n\t\t CriteriaQuery<Employee> cq = cb.createQuery(Employee.class);\n\t\t Root<Employee> rootEntry = cq.from(Employee.class);\n\t\t CriteriaQuery<Employee> all = cq.select(rootEntry);\n\t \n\t\t TypedQuery<Employee> allQuery = em.createQuery(all);\n\t\t return allQuery.getResultList();\n\t}",
"@Transactional\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn accountDao.getAllEmployee();\n\t}",
"@Override\n\tpublic List<Employee> getAllEmployees() {\n\t\treturn employeeDao.getAllEmployees();\n\t}",
"@Override\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic List<Employee> findAllEMployees() {\n\t\tList<Employee> employees = new ArrayList<Employee>();\r\n\t\tString findData = \"select * from employee\";\r\n\r\n\t\ttry {\r\n\t\t\tStatement s = dataSource.getConnection().createStatement();\r\n\r\n\t\t\tResultSet set = s.executeQuery(findData);\r\n\r\n\t\t\twhile (set.next()) {\r\n\t\t\t\tString name = set.getString(1);\r\n\t\t\t\tint id = set.getInt(\"empId\");\r\n\t\t\t\tint sal = set.getInt(\"salary\");\r\n\t\t\t\tString tech = set.getString(\"technology\");\r\n\t\t\t\tEmployee employee = new Employee(id, sal, name, tech);\r\n\t\t\t\temployees.add(employee);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn employees;\r\n\r\n\t}",
"public List<EmployeeDetails> getEmployeeDetails();",
"@RequestMapping(value = \"/v2/employees\", method = RequestMethod.GET)\r\n\tpublic List<Employee> employeev2() {\r\n JPAQuery<?> query = new JPAQuery<Void>(em);\r\n QEmployee qemployee = QEmployee.employee;\r\n List<Employee> employees = (List<Employee>) query.from(qemployee).fetch();\r\n // Employee oneEmp = employees.get(0);\r\n\t\treturn employees;\r\n }",
"@GetMapping(\"/all\")\n public ResponseEntity responseAllEmployees(){\n return new ResponseEntity<>(hr_service.getAllEmployees(), HttpStatus.OK);\n }",
"public List<Employee> getAllEmployeeDetail() {\n\t\treturn dao.getAllEmployeeDetail();\n\t}",
"@GET\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response getAll() {\n\t\tEmployeeFacade employeeFacade = new EmployeeFacade();\n\n\t\tGenericEntity<List<EmployeeVO>> generic = new GenericEntity<List<EmployeeVO>>(employeeFacade.findAll()) {};\n\t\treturn Response.status(200).header(\"Access-Control-Allow-Origin\", CorsFilter.DEFAULT_ALLOWED_ORIGINS).entity(generic).build();\n\t}",
"@Override\n public List<Employee> getAllEmployees() {\n return null;\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}",
"@Override\n\t@Transactional\n\tpublic List<Employee> getAllEmployees() {\n\t\treturn employeeDao.getAllEmployees();\n\t}",
"public List<EmployeeDto> retrieveEmployees();",
"@Override\n\tpublic List<Employee> findAllEmployees() {\n\t\treturn employeeRepository.findAllEmployess();\n\t}",
"@Transactional(readOnly = true)\r\n\t@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Employee> getAllEmployees() {\r\n\t\treturn em.createQuery(\"select e from Employee e order by e.office_idoffice\").getResultList();\r\n\t}",
"public List<Employee> getAllEmployees() {\n\t\tList<Employee> list = new ArrayList<Employee>();\n\t\tlist = template.loadAll(Employee.class);\n\t\treturn list;\n\t}",
"@Override\r\n\tpublic List<Employee> getAllEmployees() {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic List<Employee> findAll() {\n\t\t\t\tSession currentSession = entityManager.unwrap(Session.class);\n\t\t\t\t// create a query\n\t\t\t\tQuery<Employee> theQuery = currentSession.createQuery(\"from Employee\", Employee.class);\n\t\t\t\t\n\t\t\t\t// execute a query and get the result list\n\t\t\t\tList<Employee> employeeList = theQuery.getResultList();\n\t\t\t\t\n\t\t\t\t// return the result list\n\t\t\t\treturn employeeList;\n\t}",
"@Override\n\tpublic List<Employee> findAllEmployee() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic List<Employee> findAll() {\n\t\tSession currentSession = entityManager.unwrap(Session.class);\n\t\t\n\t\t\n\t\t//create a query\n\t\t\n\t\tQuery<Employee> theQuery= currentSession.createQuery(\"from Employee\",Employee.class);\n\t\t\n\t\tList<Employee> theEmployees=theQuery.list();\n\t\treturn theEmployees;\n\t}",
"public List<Employee> getAllEmployees(){\n\t\tFaker faker = new Faker();\n\t\tList<Employee> employeeList = new ArrayList<Employee>();\n\t\tfor(int i=101; i<=110; i++) {\n\t\t\tEmployee myEmployee = new Employee();\n\t\t\tmyEmployee.setId(i);\n\t\t\tmyEmployee.setName(faker.name().fullName());\n\t\t\tmyEmployee.setMobile(faker.phoneNumber().cellPhone());\n\t\t\tmyEmployee.setAddress(faker.address().streetAddress());\n\t\t\tmyEmployee.setCompanyLogo(faker.company().logo());\n\t\t\temployeeList.add(myEmployee);\n\t\t}\n\t\treturn employeeList;\n\t}",
"List<Employee> findAllByName(String name);",
"@Override\n\tpublic List<Employee> getAllEmployees() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic List<Employee> getAllEmployees() {\n\t\treturn null;\n\t}",
"@RequestMapping(path = \"/employee\", method = RequestMethod.GET)\r\n\t@ResponseBody\r\n\tpublic List<Employee> displayEmployee() {\r\n\t\treturn er.findAll();\r\n\t}",
"public List<EmployeeEntity> retrieveAllEmployeeData(StorageContext context) throws PragmaticBookSelfException {\n\t\tList<EmployeeEntity> listOfEmployeeData = null;\n\n\t\tSession hibernateSession = context.getHibernateSession();\n\n\t\tString queryString = \"FROM EmployeeEntity\"; // select * from employee;//\n\t\ttry {\n\t\t\tQuery query = hibernateSession.createQuery(queryString);\n\t\t\tlistOfEmployeeData = query.list();\n\t\t} catch (HibernateException he) {\n\t\t\tthrow new PragmaticBookSelfException(he);\n\t\t}\n\t\treturn listOfEmployeeData;\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}",
"@GetMapping(\"/get_all_employees\")\n public String getAllEmployees(){\n\n Gson gsonBuilder = new GsonBuilder().create();\n List<Employee> initial_employee_list = employeeService.get_all_employees();\n String jsonFromJavaArray = gsonBuilder.toJson(initial_employee_list);\n\n return jsonFromJavaArray;\n }",
"@Override\r\n\t\r\n\tpublic List<Employee> getAllDetails()\r\n\t{\r\n\t\t\r\n\t\tList<Employee> empList =hibernateTemplate.loadAll(Employee.class);\r\n\t\t\r\n\t\treturn empList;\r\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 }",
"@Override\r\n\tpublic List<Employee> findAll() {\n\t\treturn null;\r\n\t}",
"public List<String> getAll() {\n\treturn employeeService.getAll();\n }",
"@Override\n\tpublic List<Employee> getEmpleados() {\n\t\treturn repositorioEmployee.findAll();\n\t}",
"@ResponseBody\n\t@GetMapping(\"/employees\")\n\tpublic List<Employee> listEmployees() {\n\t\tList<Employee> theEmployees = employeeDAO.getEmployees();\n\t\t\n\t\treturn theEmployees;\n\t}",
"public List<Employee> getAll() {\n\t\treturn edao.listEmploye();\n\t}",
"public List<Employee> selectAllEmployee() {\n\n\t\t// using try-with-resources to avoid closing resources (boiler plate code)\n\t\tList<Employee> emp = new ArrayList<>();\n\t\t// Step 1: Establishing a Connection\n\t\ttry (Connection connection = dbconnection.getConnection();\n\n\t\t\t\t// Step 2:Create a statement using connection object\n\t\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(SELECT_ALL_employe);) {\n\t\t\tSystem.out.println(preparedStatement);\n\t\t\t// Step 3: Execute the query or update query\n\t\t\tResultSet rs = preparedStatement.executeQuery();\n\n\t\t\t// Step 4: Process the ResultSet object.\n\t\t\twhile (rs.next()) {\n\t\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\tString employeename = rs.getString(\"employeename\");\n\t\t\t\tString address = rs.getString(\"address\");\n\t\t\t\tint mobile = rs.getInt(\"mobile\");\n\t\t\t\tString position = rs.getString(\"position\");\n\t\t\t\tint Salary = rs.getInt(\"Salary\");\n\t\t\t\tString joineddate = rs.getString(\"joineddate\");\n\t\t\t\tString filename =rs.getString(\"filename\");\n\t\t\t\tString path = rs.getString(\"path\");\n\t\t\t\temp.add(new Employee(id, employeename, address, mobile, position, Salary, joineddate,filename,path));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tdbconnection.printSQLException(e);\n\t\t}\n\t\treturn emp;\n\t}",
"@Override\n\tpublic ResponseEntity<Collection<Employee>> findAll() {\n\t\treturn new ResponseEntity<Collection<Employee>>(empService.findAll(),HttpStatus.OK);\n\t}",
"@Cacheable(cacheNames = \"allEmployeesCache\")\n\tpublic List<Employee> getAllEmployees() throws Exception {\n\t\tIterable<Employee> iterable = employeeRepository.findAll();\n\t List<Employee> result = new ArrayList<>();\n\t iterable.forEach(result::add);\n\t\treturn result;\n\t}",
"@Override\n\tpublic List<Emp> findAll() {\n\t\treturn eb.findAll();\n\t}",
"@Override\n\tpublic List<EmployeeBean> getEmployeeList() throws Exception {\n\t\treturn employeeDao.getEmployeeList();\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t\t\n\t\tpublic List<Employee> listEmployee() throws SQLException {\n\t\t\treturn (List<Employee>) employeeDAO.listEmployee();\n\t\t}",
"public List<User> getAllEmployees(String companyShortName);",
"@GetMapping(\"/employees\")\n Flux<Employee> all() { //TODO: Wasn't previously public\n return this.repository.findAll();\n }",
"@Override\r\n\tpublic List<Employee> selectAllEmployee() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic List<Emp> getAll() {\n\t\treturn null;\r\n\t}",
"@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\tpublic List<Employee> queryEmp() {\n\t\treturn null;\n\t}",
"@RequestMapping(\"/get\")\n public ResponseEntity<ResponseDTO> getEmployeePayrollData() {\n List<EmployeePayrollData> empDataList ;\n empDataList = employeePayrollService.getEmployeePayrollData();\n ResponseDTO responseDTO = new ResponseDTO(\"Get Call Success\", empDataList);\n log.info(\"get all data\");\n return new ResponseEntity<>(responseDTO, HttpStatus.OK);\n\n }",
"@GetMapping\n\t@Secured(Roles.ADMIN)\n\tpublic ResponseEntity<EmployeeCollectionDto> getAll() {\n\t\tLogStepIn();\n\n\t\tList<Employee> employeeList = employeeRepository.findAll();\n\t\tEmployeeCollectionDto employeeCollectionDto = new EmployeeCollectionDto();\n\n\t\tfor (Employee employee : employeeList) {\n\t\t\temployeeCollectionDto.collection.add(toDto(employee));\n\t\t}\n\n\t\treturn LogStepOut(ResponseEntity.ok(employeeCollectionDto));\n\t}",
"@RequestMapping(value = \"/empregado/list_all\" , method = RequestMethod.GET)\n\tpublic List<EmpregadoDto> listAllEmpregados(){\n\t\treturn repoEmp.findAll();\n\t}",
"@GetMapping(\"/getoffer/{empId}\")\n\t public ResponseEntity<List<Offer>> getAllOffers(@PathVariable int empId)\n\t {\n\t\t List<Offer> fetchedOffers=employeeService.getAllOffers(empId);\n\t\t if(fetchedOffers.isEmpty())\n\t\t {\n\t\t\t throw new InvalidEmployeeException(\"No Employee found with id= : \" + empId);\n\t\t }\n\t\t else\n\t\t {\n\t\t\t return new ResponseEntity<List<Offer>>(fetchedOffers,HttpStatus.OK);\n\t\t }\n\t }",
"@Override\n\tpublic ResponseEntity<?> getAllEmployees(String eventToken) {\n\t\ttry {\n\t\t\tif(this.verifyIfAdmin(eventToken)) {\n\t\t\t\tIterable<Employee> employees= employeeRepository.findAll();\n\t\t\t\tList<Employee> employeeList = new ArrayList<>();\n\t\t\t\tfor(Employee emp: employees) {\n\t\t\t\t\temployeeList.add(emp);\n\t\t\t\t}\n\t\t\t\treturn ResponseEntity.status(HttpStatus.OK).body(employeeList);\n\t\t\t}\n\t\t\treturn ResponseEntity.status(HttpStatus.UNAUTHORIZED).body(null);\n\t\t}catch(Exception e){\n\t\t\tlogger.error(e.getMessage());\n\t\t}\n\t\treturn ResponseEntity.status(HttpStatus.BAD_REQUEST).body(null);\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}",
"@Test\r\n public void testGetAllEMployees() throws Exception {\r\n try {\r\n EmployeeDAOImpl instance = new EmployeeDAOImpl();\r\n List<Employee> result = instance.getAllEMployees();\r\n assertTrue(result != null);\r\n assertTrue(result.size() > 0);\r\n } catch (Exception ex) {\r\n assertTrue(ex.getMessage().contains(\"NoDataFromDatabase\"));\r\n }\r\n }",
"@Override\r\n\tpublic List<Employee> getdetails() {\n\t\treturn empdao.findAll();\r\n\t}",
"@Override\n\t@Transactional\n\tpublic List<Employee> findAll() {\n\t\tSession currentSession = entityManager.unwrap(Session.class);\n\t\t\n\t\t//create query\n\t\tQuery<Employee> theQuery = currentSession.createQuery(\"from Employee\", Employee.class);\n\t\t\n\t\t//execute query\n\t\tList<Employee> employees = theQuery.getResultList();\n\t\t\n\t\t//currentSession.close();\n\t\t\n\t\treturn employees;\n\t}"
]
| [
"0.8359082",
"0.8189814",
"0.8094255",
"0.80643874",
"0.800002",
"0.79985315",
"0.7991181",
"0.799037",
"0.79460955",
"0.79309225",
"0.7928973",
"0.7922847",
"0.79184407",
"0.7881187",
"0.787923",
"0.78507316",
"0.7849925",
"0.7845951",
"0.78415704",
"0.7835584",
"0.78118503",
"0.7735985",
"0.77309644",
"0.77200687",
"0.7704398",
"0.77000445",
"0.7689583",
"0.7675401",
"0.76728255",
"0.7657582",
"0.76498395",
"0.76211625",
"0.76152056",
"0.756378",
"0.7547239",
"0.75116223",
"0.749822",
"0.74917513",
"0.7471476",
"0.7468856",
"0.74463487",
"0.7438092",
"0.7430982",
"0.7418177",
"0.7416893",
"0.74163145",
"0.7416071",
"0.73857105",
"0.73818886",
"0.7381789",
"0.7377017",
"0.7372982",
"0.7371489",
"0.73649895",
"0.735467",
"0.73534024",
"0.73429704",
"0.73378754",
"0.73338646",
"0.73094106",
"0.73013675",
"0.72822535",
"0.7257763",
"0.7230155",
"0.72176987",
"0.7216829",
"0.72051394",
"0.7195004",
"0.7195004",
"0.719453",
"0.7191239",
"0.7191108",
"0.7186898",
"0.7179796",
"0.71781534",
"0.7175213",
"0.71733016",
"0.716972",
"0.7166068",
"0.71301854",
"0.7100743",
"0.70551175",
"0.7054762",
"0.7045448",
"0.70402586",
"0.7021304",
"0.7011794",
"0.70093894",
"0.699339",
"0.69887286",
"0.6987358",
"0.6973383",
"0.6968284",
"0.6967305",
"0.69596046",
"0.69457644",
"0.6924133",
"0.68952227",
"0.6880858",
"0.6879001",
"0.6867498"
]
| 0.0 | -1 |
1. OnlineVisaManagement Application Function Name:updateDepartment Input Parameters:department object Return Type:department object Author:suriyaS Description:update the department details in database and save it by calling findById() in department repository | public Department updateDepartment(Department department) {
return departmentRepository.save(department);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public Employee updateEmployeeDepartment(int employeeId, int departmentId) {\n return null;\n }",
"@Override\npublic int update(Department department) {\n\treturn departmentMapper.updateByPrimaryKey(department);\n}",
"@Override\n\tpublic boolean departmentUpdate(DepartmentForm departmentForm, int orgCode, HttpSession session, HttpServletRequest request) throws Exception {\n\t\tString category = departmentForm.getSpecificLevel();\n\n\t\t/*\n\t\t * List<State> stateList = null; stateList = new ArrayList<State>();\n\t\t * State state = new State(); StatePK statePK = null; statePK = new\n\t\t * StatePK(stateCode, stateVersion); stateList =\n\t\t * stateDao.getStateList(\"from State s where s.statePK.stateCode=\" +\n\t\t * stateCode + \" and s.statePK.stateVersion=\" + stateVersion +\n\t\t * \" and isactive=true\");\n\t\t */\n\n\t\t/*\n\t\t * Organization organizationbean = null; Organization\n\t\t * organizationbeanisActive = null;\n\t\t */\n\n\t\tSession session1 = null;\n\t\tTransaction tx1 = null;\n\t\tsession1 = sessionFactory.openSession();\n\t\ttx1 = session1.beginTransaction();\n\t\ttry {\n\t\t\tif (category.equalsIgnoreCase(\"S\")) {\n\t\t\t\t// stateVersion =\n\t\t\t\t// stateDao.getCurrentVersionbyStateCode(stateCode);\n\t\t\t\tInteger orgVersion = organizationDAO.getMaxOrganizationVersion(departmentForm.getOrgCode());\n\t\t\t\tOrganizationPK orgpk = new OrganizationPK(departmentForm.getOrgCode(), orgVersion);\n\t\t\t\torganizationDAO.updateDepartment(departmentForm, orgpk, session1);\n\t\t\t} else {\n\n\t\t\t\t// List<OrgLocatedAtLevels>\n\t\t\t\t// orgLocatedAtLevelsList=session1.createSQLQuery(\"select orgLocatedLevelCode from OrgLocatedAtLevels where olc=\"+orgCode+\" and locatedAtLevel='\"+category.charAt(0)+\"' and isactive=true\").list();\n\t\t\t\t// Integer\n\t\t\t\t// orgLocatedCode=Integer.parseInt(session1.createQuery(\"select orgLocatedLevelCode from OrgLocatedAtLevels where olc=\"+orgCode+\" and locatedAtLevel='\"+category.charAt(0)+\"' and isactive=true\").uniqueResult().toString());\n\t\t\t\tOrgLocatedAtLevels orgLocatedAtLevelsupdate = (OrgLocatedAtLevels) session1.get(OrgLocatedAtLevels.class, orgCode);\n\t\t\t\torgLocatedAtLevelsupdate.setOrgLevelSpecificName(departmentForm.getDeptNamecr());\n\t\t\t\torgLocatedAtLevelsupdate.setOrgLevelSpecificNameLocal(departmentForm.getDeptNameLocal());\n\t\t\t\torgLocatedAtLevelsupdate.setOrgLevelSpecificShortName(departmentForm.getShortDeptName());\n\t\t\t\tsession1.update(orgLocatedAtLevelsupdate);\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * if (departmentForm.isCorrection()== true) { OrganizationPK orgpk\n\t\t\t * = new OrganizationPK(departmentForm.getOrgCode(),orgVersion);\n\t\t\t * \n\t\t\t * organizationDAO.updateDepartment(departmentForm,orgpk, session1);\n\t\t\t * \n\t\t\t * }\n\t\t\t */\n\t\t\t/*\n\t\t\t * else if (departmentForm.isCorrection()== false) { OrganizationPK\n\t\t\t * orgpk2 = new\n\t\t\t * OrganizationPK(departmentForm.getOrgCode(),orgVersion);\n\t\t\t * organizationDAO\n\t\t\t * .updateisActive(organizationbeanisActive,orgpk2,session1); if\n\t\t\t * (orgVersion == 0) { orgVersion = orgVersion+1; } else {\n\t\t\t * orgVersion = orgVersion + 1; } OrganizationPK orgpk = new\n\t\t\t * OrganizationPK(departmentForm.getOrgCode(),orgVersion);\n\t\t\t * OrganizationType organizationType1=new OrganizationType(1); //1\n\t\t\t * is Organisation Type Code for Ministry\n\t\t\t * organizationbean.setOrganizationType(organizationType1);\n\t\t\t * organizationbean.setOrgNameLocal(\"\");\n\t\t\t * organizationbean.setOrganizationPK(orgpk);\n\t\t\t * organizationbean.setOrgName(departmentForm.getDeptName());\n\t\t\t * organizationbean.setShortName(departmentForm.getShortDeptName());\n\t\t\t * // organizationbean.setIslocalbodyspecific(departmentForm.\n\t\t\t * isLocalBodySpecific()); //\n\t\t\t * organizationbean.setOrgTypeCode(ministryForm.getOrgTypeCode());\n\t\t\t * // organizationbean.setLocalBodyType(localBodyType);\n\t\t\t * organizationbean.setOrgLevel('C'); ///pending.....\n\t\t\t * organizationbean.setIsactive(true);\n\t\t\t * organizationDAO.saveWithSession(organizationbean, session1);\n\t\t\t * govtOrderService.saveGovernmentOrder(\n\t\t\t * departmentForm.getOrderNo(), departmentForm.getOrderDate(),\n\t\t\t * departmentForm.getOrdereffectiveDate(),\n\t\t\t * departmentForm.getGazPubDate(), \"LGT\",\n\t\t\t * departmentForm.getOrderPath\n\t\t\t * (),departmentForm.getFilePath(),request);\n\t\t\t * \n\t\t\t * //\n\t\t\t * localGovtTypeDAO.SetGovermentOrderEntity(localBodyTypecode,'G');\n\t\t\t * \n\t\t\t * }\n\t\t\t */\n\t\t\ttx1.commit();\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tLOG.error(\"Exception-->\"+e);\n\t\t\ttx1.rollback();\n\t\t\treturn false;\n\t\t} finally {\n\t\t\tif (session1 != null && session1.isOpen()) {\n\t\t\t\tsession1.clear();\n\t\t\t\tsession1.close();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn true;\n\t}",
"void modifyDepartment(Department dRef);",
"public void updateDepartment(IBaseDTO dto) {\n\t\tString id=(String)dto.get(\"id\");\n\t\tSysDepartment sd=(SysDepartment)dao.loadEntity(SysDepartment.class,id);\n\t\tif(sd!=null)\n\t\t{\n\t\t\t\n\t\t\tsd.setName((String)dto.get(\"name\"));\n\t\t\tsd.setParentId((String)dto.get(\"parentId\"));\n\t\t\tsd.setRemarks((String)dto.get(\"remark\"));\n\t\t\tsd.setTagShow((String)dto.get(\"tagShow\"));\n\t\t\tsd.setAdmin((String)dto.get(\"admin\"));\n\t\t}\n\t\tcts.reload();\n\t\tdao.saveEntity(sd);\n\t}",
"@Modifying\n @Query(\"update Dept u set u.deptName = ?1 where u.deptId = ?2\")\n int updateDept(String deptName, Long deptId);",
"@Override\r\n public int deptUpdate(Dept dept) {\n return sqlSession.update(\"deptDAO.deptUpdate\", dept);\r\n }",
"@Test\n @IfProfileValue(name=\"dept-test-group\", values = {\"all\",\"dept-update\"})\n public void _2_4_1_updateExistDept() throws Exception {\n Department d = d_1;\n d.setDescription(\"修改部门1描述\");\n this.mockMvc.perform(put(\"/api/v1.0/companies/\"+\n d.getCompany()+\n \"/departments/\"+\n d.getId())\n .contentType(CONTENT_TYPE)\n .header(AUTHORIZATION, ACCESS_TOKEN)\n .content(json(d)))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$.id\",is(d.getId().toString())))\n .andExpect(jsonPath(\"$.description\",is(d.getDescription())));\n }",
"@RequestMapping(value = \"addUpdateDepartment\", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)\n protected void addUpdateDepartment(HttpServletRequest request, HttpServletResponse response) throws Exception {\n String json = \"\";\n String resultado = \"\";\n Integer idManagLab = 0;\n Integer department = 0;\n Integer idRecord = 0;\n\n\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(request.getInputStream(), \"UTF8\"));\n json = br.readLine();\n //Recuperando Json enviado desde el cliente\n JsonObject jsonpObject = new Gson().fromJson(json, JsonObject.class);\n\n if(jsonpObject.get(\"idManagLab\") != null && !jsonpObject.get(\"idManagLab\").getAsString().isEmpty() ) {\n idManagLab = jsonpObject.get(\"idManagLab\").getAsInt();\n }\n\n if (jsonpObject.get(\"department\") != null && !jsonpObject.get(\"department\").getAsString().isEmpty()) {\n department = jsonpObject.get(\"department\").getAsInt();\n }\n\n\n if (jsonpObject.get(\"idRecord\") != null && !jsonpObject.get(\"idRecord\").getAsString().isEmpty()) {\n idRecord = jsonpObject.get(\"idRecord\").getAsInt();\n }\n\n\n\n\n User usuario = seguridadService.getUsuario(seguridadService.obtenerNombreUsuario());\n\n if (idRecord == 0) {\n if (department != 0 && idManagLab!= 0) {\n\n //search record\n DepartamentoDireccion record = organizationChartService.getDepManagementRecord(idManagLab, department);\n\n if (record == null) {\n DepartamentoDireccion dep = new DepartamentoDireccion();\n dep.setFechaRegistro(new Timestamp(new Date().getTime()));\n dep.setUsuarioRegistro(usuario);\n dep.setDepartamento(laboratoriosService.getDepartamentoById(department));\n dep.setDireccionLab(organizationChartService.getManagmentLabById(idManagLab));\n dep.setPasivo(false);\n organizationChartService.addOrUpdateDepManagement(dep);\n } else {\n resultado = messageSource.getMessage(\"msg.existing.record.error\", null, null);\n throw new Exception(resultado);\n }\n\n }\n } else {\n DepartamentoDireccion rec = organizationChartService.getDepManagementById(idRecord);\n if (rec != null) {\n rec.setPasivo(true);\n organizationChartService.addOrUpdateDepManagement(rec);\n }\n }\n\n\n } catch (Exception ex) {\n logger.error(ex.getMessage(), ex);\n ex.printStackTrace();\n resultado = messageSource.getMessage(\"msg.add.depManag.error\", null, null);\n resultado = resultado + \". \\n \" + ex.getMessage();\n\n } finally {\n Map<String, String> map = new HashMap<String, String>();\n map.put(\"idManagLab\", idManagLab.toString());\n map.put(\"mensaje\", resultado);\n map.put(\"idRecord\", \"\");\n map.put(\"department\", \"\");\n String jsonResponse = new Gson().toJson(map);\n response.getOutputStream().write(jsonResponse.getBytes());\n response.getOutputStream().close();\n }\n }",
"@Override\n\tpublic Integer updateEmployee(EmployeeBean employeeBean, DepartmentBean departmentBean) {\n\t\t\n\t\tLOGGER.info(\"starts updateEmployee method\");\n\t\tLOGGER.info(\"Ends updateEmployee method\");\n\t\treturn adminEmployeeDao.updateEmployee(employeeBean);\n\t}",
"@Override\r\n\tpublic void updateDepartment(Department department) {\n\t\tDepartment d = getDepartmentById(department.getDepartment_id());\r\n\t\td.setDepartment_id(department.getDepartment_id());\r\n\t\td.setDescription(department.getDescription());\r\n\t\td.setName(department.getName());\r\n\t\td.setPostSet(department.getPostSet());\r\n\t\tgetHibernateTemplate().update(d);\r\n\t}",
"@Update({\n \"update dept\",\n \"set dept_name = #{deptName,jdbcType=VARCHAR}\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int updateByPrimaryKey(Dept record);",
"@GetMapping(\"/insertdepartment/{id}\")\n public String edit(@PathVariable(name = \"id\") Integer id,\n Model model){\n departmentDTO department = departmentService.getById(id);\n model.addAttribute(\"dpmtid\",department.getDpmtid());\n model.addAttribute(\"dpmtname\",department.getDpmtname());\n model.addAttribute(\"dpmtinfo\",department.getDpmtinfo());\n return \"insertdepartment\";\n }",
"@Override\r\n\tpublic Department updateDepartment(Long deptId, Department department) {\n\t\tDepartment dept = deptRepo.findById(deptId).get();\r\n\t\t\r\n\t\tif(Objects.nonNull(department.getDepartmentName())\r\n\t\t\t\t&& !department.getDepartmentName().isBlank()\r\n\t\t\t\t&& !department.getDepartmentName().isEmpty()) {\r\n\t\t\tdept.setDepartmentName(department.getDepartmentName());\r\n\t\t}\r\n\t\t\r\n\t\tif(Objects.nonNull(department.getDepartmentAddress())\r\n\t\t\t\t&& !department.getDepartmentAddress().isBlank()\r\n\t\t\t\t&& !department.getDepartmentAddress().isEmpty()) {\r\n\t\t\tdept.setDepartmentAddress(department.getDepartmentAddress());\r\n\t\t}\r\n\t\t\r\n\t\tif(Objects.nonNull(department.getDepartmentCode())\r\n\t\t\t\t&& !department.getDepartmentCode().isBlank()\r\n\t\t\t\t&& !department.getDepartmentCode().isEmpty()) {\r\n\t\t\tdept.setDepartmentCode(department.getDepartmentCode());\r\n\t\t}\r\n\t\t\r\n\t\treturn dept;\r\n\t}",
"public void updateEmployeeDetails(EmployeeDetails employeeDetails);",
"public void assignDepartment(String departmentName);",
"@Override\n\tpublic void update(DeptVO deptVO) {\n\t\t\n\t}",
"public Department save(Department department){\n\t\treturn departmentRepository.save(department);\n\t}",
"public void updateDepartment(Department department) {\n\t\tgetHibernateTemplate().update(department);\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t@RequestMapping(\"/updateemployee/{empId}\")\n\t\n\tpublic ModelAndView updateEmployee(@ModelAttribute(\"emppage\") Employee empk,@PathVariable (\"empId\") int empId,HttpServletRequest request, HttpServletResponse response) \n{\n\t\t\t\n\t\t\tHttpSession mlk = request.getSession();\n\t\t\t\n\t\t\t//String idv = request.getParameter(\"empId\");\n\t\t\t//int empId = (int)mlk.getAttribute(\"empp\");\n\t\t\tSystem.out.println(\"id val\"+empId);\n\t\t\tString empName=empk.getEmpName();\n\t\t\tSystem.out.println(\"employee Name\"+empName);\n\t\t\tString dob=empk.getDateOfBirth();\n\t\t\tSystem.out.println(\"dob \"+dob);\n\t\t\tString mailId=empk.getMailId();\n\t\t\tSystem.out.println(\"mail Id\"+mailId);\n\t\t\tString depsample = request.getParameter(\"deptEmpName\");\n\t\t\tList<Department> lsv = (List<Department>) mlk.getAttribute(\"lisdept\");\n\t\t\t\n\t\t\tint studeptid = 0;\n\t\t\tfor (Department department : lsv) {\n\t\t\t\tif(department.getDeptName().equals(depsample))\n\t\t\t\t{\n\t\t\t\t\tstudeptid= department.getDeptId();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"values update employee \"+ studeptid);\n\t\t\tlong mob = empk.getMobileNo();\n\t\t\tfloat sal = empk.getSalary();\n\t\t\tString comName = empk.getCompanyName();\n\t\t\tDepartment dv = new Department();\n\t\t\tdv.setDeptId(studeptid);\n\t\t\tEmployee emp = new Employee();\n\t\t\temp.setEmpId(empId);\n\t\t\temp.setEmpName(empName);\n\t\t\temp.setMailId(mailId);\n\t\t\temp.setDateOfBirth(dob);\n\t\t\temp.setDepartment(dv);;\n\t\t\temp.setMobileNo(mob);\n\t\t\temp.setSalary(sal);\n\t\t\temp.setCompanyName(comName);\n\t\t\t\n\t\t\tSystem.out.println(\"Values from update employee\"+empId + \" \"+empName+\" \"+mailId+ \" \"+dob + \" \"+studeptid+\" \"+mob+ \" \"+sal + \" \"+ comName);\n\t\t\t\n\t\t\tSystem.out.println(\"values for updating\");\n\t\t\t//System.out.println(empId+\" \"+empName + \" \"+ mailId+\" \"+dob+\" \"+studeptid);\n\t\t\t\n\t\t\tdeptEmpService.updateEmpServ(emp);\n\t\t\tHttpSession sea = request.getSession();\n\t\t\tsea.setAttribute(\"submitDone\",\"done\");\n\t\t\t//response.sendRedirect(\"listEmp?deptId=\"+studeptid);\n\t\t\treturn new ModelAndView(\"redirect:/listEmp?deptId=\"+studeptid);\n\t\t}",
"Department createOrUpdate(Department department);",
"public interface DepartmentService {\n Department saveDepartment(Department d);\n\n Department findByDepartmentId(String departmentId);\n\n void deleteByDepartmentId(String departmentId);\n\n void updateDepartment(Department d);\n\n boolean departmentExists(Department d);\n\n List<Department> findAll();\n\n void deleteAll();\n}",
"int updateByPrimaryKey(CrmDept record);",
"public void updateDepartment(int id, String newName) throws SQLException, Exception {\n\t\tif (xetIdCoTonTai(id) != true) {\n\t\t\tSystem.out.println(\"id khong ton tai vui long nhap id khac\");\n\t\t} else {\n\t\t\tConnection connection = jdbcUtils.connect();\n\t\t\t// Create a statement object\n\t\t\tString sql = \"\tUPDATE Department SET DepartmentName = ? WHERE DepartmentId = ?\";\n\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(sql);\n\n\t\t\t// set parameter\n\t\t\tpreparedStatement.setInt(2, id);\n\t\t\tpreparedStatement.setString(1, newName);\n\n\t\t\t// Step 4: execute query\n\t\t\tpreparedStatement.executeUpdate();\n\t\t\tSystem.out.println(\"Update thanh cong\");\n\t\t\tjdbcUtils.disconnect();\n\t\t}\n\t\t// public void deleteDepartment(int id) throws Exception {\n\t\t//\n\t\t// // check department id exist\n\t\t// if (!isDepartmentIdExists(id)) {\n\t\t// throw new Exception(\n\t\t// messagePoperties.getProperty(\"department.getDepartmentByID.cannotFindDepartmentById\")\n\t\t// + id);\n\t\t// }\n\t\t//\n\t\t// // if department id not exist delete\n\t\t//\n\t\t// // get connection\n\t\t// Connection connection = jdbcUtils.connect();\n\t\t//\n\t\t// // Create a statement object\n\t\t// String sql = \"DELETE FROM Department WHERE DepartmentID = ?\";\n\t\t// PreparedStatement preparedStatement =\n\t\t// connection.prepareStatement(sql);\n\t\t//\n\t\t// // set parameter\n\t\t// preparedStatement.setInt(1, id);\n\t\t//\n\t\t// // Step 4: execute query\n\t\t// preparedStatement.executeUpdate();\n\t\t//\n\t\t// // disconnect\n\t\t// jdbcUtils.disconnect();\n\t\t// }\n\t\t//\n\t\t// }\n\n\t}",
"public void saveDepartment(Department department) {\n\t\tgetHibernateTemplate().save(department);\n\t\t\n\t}",
"public void update(Department dep)\n\t{\n\t\tHRProtocol envelop = null;\n\t\tenvelop = new HRProtocol(HRPROTOCOL_UPDATE_DEPARTMENT_REQUEST, dep, null);\n\t\tsendEnvelop(envelop);\n\t\tenvelop = receiveEnvelop();\n\t\tif(envelop.getPassingCode() == HRPROTOCOL_UPDATE_DEPARTMENT_RESPONSE)\n\t\t{\t//Success in transition\n\t\t}else\n\t\t{\n\t\t\t//Error in transition. or other error codes.\n\t\t}\n\t}",
"@Override\r\n\tpublic Department saveDepartment(Department department) {\n\t\treturn deptRepo.save(department);\r\n\t}",
"@RequestMapping(value = \"/changeDept\", method = RequestMethod.POST)\r\n\tpublic String changeDept(HttpServletRequest request, HttpSession session) {\r\n\t\tIssueDAO issueDAO = (IssueDAO) ApplicationContextProvider.getApplicationContext().getBean(\"issueDAO\");\r\n\t\tDepartmentDAO deptDAO = (DepartmentDAO) ApplicationContextProvider.getApplicationContext()\r\n\t\t\t\t.getBean(\"departmentDAO\");\r\n\r\n\t\tint issueId = Integer.parseInt(request.getParameter(\"issueId\"));\r\n\t\tint deptId = Integer.parseInt(request.getParameter(\"deptId\"));\r\n\r\n\t\tUser user = (User) session.getAttribute(\"user\");\r\n\r\n\t\tIssue issue = null;\r\n\t\tDepartment dept = null;\r\n\t\ttry {\r\n\t\t\tissue = issueDAO.readById(issueId);\r\n\t\t\tdept = deptDAO.readById(deptId);\r\n\r\n\t\t\tAssignIssueCommand assign = new AssignIssueCommand(issue, dept, Status.NEW);\r\n\t\t\tassign.execute();\r\n\r\n\t\t\tIssueUpdates issueUpdate = new IssueUpdates();\r\n\r\n\t\t\tissueUpdate.setSubmittedBy(user);\r\n\t\t\tissueUpdate.setUpdateDate(new Date());\r\n\t\t\tString updateText = \"Change issue department to: \" + dept.getDeptName();\r\n\t\t\tCreateIssueUpdateCommand updateIssue = new CreateIssueUpdateCommand(updateText, issue, user, session);\r\n\t\t\tupdateIssue.execute();\r\n\t\t\t\r\n\t\t\tlogger.info(issue.getTitle()+\": department changed to: '\" + dept.getDeptName() + \"' by General Admin\");\r\n\r\n\t\t} catch (IssueDoesNotExistException | DepartmentDoesNotExistException e) {\r\n\t\t\tlogger.error(\"Issue or Department does not exist\", e);\r\n\t\t}\r\n\r\n\t\tString[] headers = request.getHeader(\"referer\").split(\"/\");\r\n\t\tString sendTo = headers[headers.length - 1];\r\n\t\tlogger.trace(\"redirecting to: \" + sendTo);\r\n\t\treturn \"redirect:/\" + sendTo;\r\n\t}",
"public static void updateDept() {\n\t}",
"public interface DepartmentService {\n public Department saveOrUpdate(Department department);\n public Optional<Department> getOne(Long departmentId);\n public void deleteOne(Long departmentId);\n public void deleteOne(Department department);\n public List<Department> getAll();\n public Department getByDepartmentCode(String code);\n public List<Department> getDepartmentByParentCode(String parentCode);\n public List<Department> getEmployeeCountByParentCode(String parentCode);\n public List<Department> getEmployeeAvgSalaryByParentCode(String parentCode);\n}",
"@Override\n public void setEmployeeDepartment(int employeeId, int departmentId) {\n\n }",
"public interface DeptService {\n\n List<Department> query();\n\n void saveOrUpdate(Department department);\n\n List<Department> findByDeptId(Department department);\n\n}",
"int updateByPrimaryKeySelective(CrmDept record);",
"public interface AdminDeptService {\n\n /**获取部门树\n * @return\n */\n @PostMapping(value =\"getDeptTree\", consumes = \"application/json; charset=UTF-8\" )\n Result getDeptTree() ;\n\n /**获取部门列表\n * @param dept\n * @return\n */\n @PostMapping(value =\"deptList\" , consumes = \"application/json; charset=UTF-8\")\n Result deptList(DeptHandle dept);\n\n /**获取部门信息\n * @param deptId\n * @return\n */\n @GetMapping(value =\"getDept\" , consumes = \"application/json; charset=UTF-8\")\n Result getDept(@RequestParam(value = \"deptId\") Long deptId) ;\n\n /**校验\n * @param deptName\n * @return\n */\n @PostMapping(value =\"checkDeptName\" , consumes = \"application/json; charset=UTF-8\")\n Result<Boolean> checkDeptName(@RequestParam(\"deptName\") String deptName);\n\n /**新增部门\n * @param deptHandle\n * @return\n */\n @PostMapping(value =\"addDept\" , consumes = \"application/json; charset=UTF-8\")\n Result addDept(@RequestBody DeptHandle deptHandle);\n\n /**删除部门\n * @param ids\n * @return\n */\n @PostMapping(value =\"deleteDepts\" , consumes = \"application/json; charset=UTF-8\")\n Result deleteDepts(@RequestBody String ids);\n\n /**修改部门\n * @param dept\n * @return\n */\n @PostMapping(value =\"updateDepts\" , consumes = \"application/json; charset=UTF-8\")\n Result updateDepts(@RequestBody DeptHandle dept);\n\n}",
"@Test\r\n public void testUpdateEmployee1() throws Exception {\r\n try {\r\n\r\n int employee_id = 0;\r\n int department_id = 1;\r\n int position_id = 1;\r\n int status = 1;\r\n String date = \"\";\r\n EmployeeDAOImpl instance = new EmployeeDAOImpl();\r\n boolean expResult = false;\r\n boolean result = instance.updateEmployee(employee_id, department_id, position_id, status, date);\r\n assertEquals(expResult, result);\r\n } catch (Exception ex) {\r\n assertTrue(ex.getMessage().contains(\"Wrong Required Parameters\"));\r\n }\r\n }",
"int updateByExample(@Param(\"record\") Dept record, @Param(\"example\") DeptExample example);",
"@Override\n public void setDepartmentEmployee(Employee employee, int departmentId) {\n\n }",
"public void setDepartment(Department department) {\n this.department = department;\n }",
"@Override\r\n\tpublic void addDepartment(Department department) {\n\r\n\t\tgetHibernateTemplate().save(department);\r\n\t}",
"public interface DeptService {\n\n public void saveDept(DeptVo deptVO);\n\n public List<DeptEntity> getDeptTree();\n\n public void updateDept(DeptVo deptVO);\n\n}",
"public void updateEmployee(Long employeeId, CreateOrEditEmployeeRequestDto employee) throws ApiDemoBusinessException;",
"public ResponseEntity<ApiMessageResponse> createDepartment(DepartmentRequest departmentRequest) {\n //Creating a new object of department model to save on database\n DepartmentModel departmentModel = new DepartmentModel(0L, departmentRequest.getName(), departmentRequest.getActive());\n\n departmentRepository.save(departmentModel); //Saving in database\n\n return new ResponseEntity<>(new ApiMessageResponse(201, \"Department Created\"), HttpStatus.CREATED);\n }",
"public void SetDepartmentID(String DepartmentID)\n {\n this.DepartmentID=DepartmentID;\n }",
"void assign (int departmentId, AssignEmployeeRequest empList);",
"public void setDepartmentId(Long departmentId) {\n this.departmentId = departmentId;\n }",
"public void setDepartmentId(Long departmentId) {\n this.departmentId = departmentId;\n }",
"public void setDepartmentId(Long departmentId) {\n this.departmentId = departmentId;\n }",
"public void setDepartment(Department d) {\r\n department = d;\r\n }",
"public void setDepartmentId(Integer departmentId) {\n this.departmentId = departmentId;\n }",
"public void setDepartmentId(Integer departmentId) {\n this.departmentId = departmentId;\n }",
"public void setDepartmentId(Integer departmentId) {\n this.departmentId = departmentId;\n }",
"public interface IDepartmentService {\n\n /**\n * 获取所有Department对象\n */\n public List<Department> getAllList();\n\n /**\n * 获取PageResult对象\n */\n public PageResult getQuery(BaseQuery query);\n\n /**\n * 获取Department对象\n */\n public Department get(Department department);\n\n /**\n * 保存Department对象\n */\n public void save(Department department);\n\n /**\n * 更新Department对象\n */\n public void update(Department department);\n\n /**\n * 更新Department对象\n */\n public void delete(Department department);\n\n /**\n * 批量删除Department对象\n * @param ids\n */\n public void batchDelete(List<Long> ids);\n}",
"@RequestMapping(value=\"/employeeupdt\", method=RequestMethod.POST)\npublic String UpdateSave(EmployeeRegmodel erm)\n{\n\tEmployeeRegmodel erm1 = ergserv.findOne(erm.getEmployee_id());\n\t\n\term1.setEmployee_address(erm.getEmployee_address());\n\term1.setEmail(erm.getEmail());\n\term1.setEmployee_dob(erm.getEmployee_dob());\n\term1.setEmployee_phoneno(erm.getEmployee_phoneno());\n\term1.setEmployee_password(erm.getEmployee_password());\n\term1.setEmployee_fullname(erm.getEmployee_fullname());\n\term1.setEmployee_fname(erm.getEmployee_fname());\n\t\n\tergserv.updateEmployeeRegmodel(erm1);\n\treturn \"update.jsp\";\n}",
"public void setDepartmentid(Integer departmentid) {\n this.departmentid = departmentid;\n }",
"public void setDepartmentid(Integer departmentid) {\n this.departmentid = departmentid;\n }",
"public abstract void updateEmployee(int id, Employee emp) throws DatabaseExeption;",
"public void update(NominaPuestoPk pk, NominaPuesto dto) throws NominaPuestoDaoException;",
"public void update(Department department) {\n\t entityManager.merge(department);\n\t return;\n\t }",
"@PutMapping(\"/products/{id}\")\r\n\tpublic Employee update(@RequestBody Employee employee, @PathVariable Integer id) {\r\n\t \r\n\t Employee exitEmployee= empService.get(id);\r\n\t empService.save(employee); \r\n\t return exitEmployee;\r\n\t}",
"public void saveOrUpdate(Department obj) {\n\t\t\n\t\tif( obj.getId() == null ) {// the department doesn't exist in the database\n\t\t\tdao.insert(obj);\n\t\t}else {\n\t\t\tdao.update(obj);\n\t\t}\n\t}",
"public EmployeeDTO updateEmployee(final EmployeeDTO createEmployeeDTO) throws ApplicationCustomException;",
"public Department getDepartmentById(Integer id);",
"public void assignDepartment() {\n\n Scanner stdin = new Scanner(System.in);\n try {\n ConnectToSqlDB.connectToSqlDatabase();\n System.out.println(\"You're about to transfer an employee to another Department \\nPlease state ID of employee: \");\n String inputEmployeeId = stdin.next();\n System.out.println(\"Please state the employee's new department: \");\n String inputDepartment = stdin.next();\n\n while ( (!inputDepartment.equals(\"Executive\")) && (!inputDepartment.equals(\"Development\")) &&\n (!inputDepartment.equals(\"Accounting\")) && (!inputDepartment.equals(\"Human_Resources\")) )\n {\n System.out.println(\"Please Enter a Valid Department\");\n inputDepartment = stdin.next();\n }\n stdin.close();\n\n ConnectToSqlDB.ps = ConnectToSqlDB.connect.prepareStatement(\"UPDATE employees SET department = '\" + inputDepartment + \"' WHERE employee_id = '\" +\n inputEmployeeId + \"';\");\n ConnectToSqlDB.ps.executeUpdate();\n\n System.out.println(\"Employee ID#\" + inputEmployeeId + \" is now a part of the \" + inputDepartment + \" Department.\");\n\n } catch (IOException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n\n }",
"int updateByPrimaryKey(Depart record);",
"public void update(RutaPk pk, Ruta dto) throws RutaDaoException;",
"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}",
"public void ModifyEmployee(int idEmployee , String firstName , String lastName, String name_department)\n\t{\n\t\tfor(int i = 0; i < departments.size() ; i++)\n\t\t{\n\t\t\tfor(Employee emp : departments.get(i).getEmployeeList())\n\t\t\t{\n\t\t\t\tif(emp.getIdEmployee()==idEmployee) \n\t\t\t\t{\n\t\t\t\t\temp.setName(firstName);\n\t\t\t\t\temp.setSurname(lastName);\n\t\t\t\t\temp.setDepartment(SearchDepartment(name_department));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"Department findById(long id);",
"int updateByPrimaryKeySelective(Dept record);",
"public void setDepartmentId(int value) {\n this.departmentId = value;\n }",
"private static void updateEmployeeHelper() {\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Insert Employee's ID\");\n\t\tString newID = input.nextLine();\n\t\t\n\t\tSystem.out.println(\"Insert Current name\");\n\t\tString newName = input.nextLine();\n\n\t\tSystem.out.println(\"Insert Old Department\");\n\t\tString oldDepartment = input.nextLine();\n\n\t\tSystem.out.println(\"Insert New Department\");\n\t\tString newDepartment = input.nextLine();\n\n\t\tems2.updateEmployee(newID, newName, oldDepartment, newDepartment);\n\t}",
"public void update(Employee employee){\n employeeRepository.save(employee);\n }",
"public void update(SmsAgendaGrupoPk pk, SmsAgendaGrupo dto) throws SmsAgendaGrupoDaoException;",
"public int ModifyDepartment(int idDepart , String newName)\n\t{\n\t\tfor(Department depart : departments)\n\t\t{\n\t\t\tif(depart.getIdDepartment()==idDepart) depart.setNameDepartment(newName);\n\t\t}\n\t\treturn -1;\n\t}",
"public Integer addDepartment(Department dep) {\n\n //the new User's id\n Integer id = null;\n\n Session session = ConnectionFactory.getInstance().getSession();\n\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n\n session.saveOrUpdate(dep);\n tx.commit();\n\n\n } catch (HibernateException e) {\n try {\n tx.rollback(); //error\n } catch (HibernateException he) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n return id;\n }",
"public void update(RelacionConceptoEmbalajePk pk, RelacionConceptoEmbalaje dto) throws RelacionConceptoEmbalajeDaoException;",
"public ResponseEntity<ApiMessageResponse> deleteDepartment(Long departmentId) {\n Optional<DepartmentModel> departmentModelOptional = departmentRepository.findById(departmentId);\n //Checking if the Department is available\n if (departmentModelOptional.isPresent()) {\n //If department found\n DepartmentModel departmentModel = departmentModelOptional.get();\n\n departmentRepository.delete(departmentModel);\n\n return new ResponseEntity<>(new ApiMessageResponse(200, \"Department info delete Successful\"),\n HttpStatus.OK);\n } else {\n //If No department found\n throw new ResponseStatusException(HttpStatus.NOT_FOUND, \"No Department found with ID: \" + departmentId);\n }\n }",
"int updateByExampleSelective(@Param(\"record\") Dept record, @Param(\"example\") DeptExample example);",
"public interface HRServiceAppModule extends ApplicationModule {\r\n void updateDepartmentName(Integer departmentId, String departmentName);\r\n}",
"public Department FindById(Department d) {\n\t\treturn ddi.FindById(d);\n\t}",
"@Override\npublic void deleteDepartmentDataById(Integer Id) {\n\tOptional<DepartmentEntity> emp= departmentRepository.findById(Id);\n\tif(emp.isPresent())\n\t{\n\t\tdepartmentRepository.deleteById(Id);\n\t}\n\telse\n\t{\n\t\tthrow new IdNotValidException();\n\t}\n}",
"public void update(FaqPk pk, Faq dto) throws FaqDaoException;",
"@Override\r\npublic int update(Detalle_pedido d) {\n\treturn detalle_pedidoDao.update(d);\r\n}",
"public void update(SgfensPedidoProductoPk pk, SgfensPedidoProducto dto) throws SgfensPedidoProductoDaoException;",
"@Override\r\n\tpublic int updateAdvertisement(AdvertisementDto dto) {\n\t\treturn session.update(\"kdc.advertisement.updateAdvertisement\", dto);\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t@RequestMapping(\"/editemployee\")\n\tpublic ModelAndView editEmployee(@ModelAttribute(\"emppage\") Employee emp,@PathParam(\"empId\") int empId,@PathParam(\"deptId\") int deptId,HttpServletRequest request, HttpServletResponse response)\n {\n\t\tSystem.out.println(\"employee id at edit employee is \"+empId);\n\t\t//int deptId = Integer.parseInt(request.getParameter(\"deptId\"));\n\t\tHttpSession sek = request.getSession();\n\t\t//Employee emp = (Employee) deptEmpService.readEmployeeServ(empId);\n\t\t//Department df = deptEmpService.showDeptServ(emp.getDepartment().getDeptId());\n\t\tList<Department> ldpnt = (List<Department>) sek.getAttribute(\"lisdept\");\n\t\tString deptName =null;\n\t\tfor (Department department : ldpnt) {\n\t\t\tif(department.getDeptId() == deptId)\n\t\t\t{\n\t\t\t\tdeptName=department.getDeptName();\n\t\t\t}\n\t\t}\n\t\t//System.out.println(\"edit page value\"+emp.getEmpName());\n\t\t\n\t\tList<Employee> listFromDept=(List<Employee>) sek.getAttribute(\"emplvaldept\");\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tsek.setAttribute(\"empp\", empId);\n\t\tModelAndView mcn = new ModelAndView(\"home3\");\n\t\tmcn.addObject(\"loggedInUser\", sek.getAttribute(\"loggedInUser\"));\n\t\tmcn.addObject(\"mainemps\", \"checktableedit\");\n\t\tmcn.addObject(\"empl\", empId);\n\t\tmcn.addObject(\"hom\", \"homep\");\n\t\tmcn.addObject(\"addlin\", \"anemp\");\n\t\tmcn.addObject(\"lis\", ldpnt);\n\t\tmcn.addObject(\"val\", listFromDept);\n\t\tmcn.addObject(\"deptName\", deptName);\n\t\t\n\t\t\treturn mcn;\n\t\t\n\t}",
"@PutMapping(path = \"/{employeeNumber}\")\n private ResponseEntity<EmployeeDto> update(@PathVariable(name = \"employeeNumber\") Long employeeNumber,\n @RequestBody EmployeeDto employeeDto){\n Employee employeeRequest = modelMapper.map(employeeDto, Employee.class);\n\n // Save data to DB using create method()\n // passing converted Dto -> entity as parameter\n Employee employee = employeeService.update(employeeNumber, employeeRequest);\n\n // Convert back from Entity -> Dto\n // for returning values to the front end\n EmployeeDto employeeResponse = modelMapper.map(employee, EmployeeDto.class);\n\n return ResponseEntity.ok().body(employeeResponse);\n }",
"@Override\n public ResponseEntity<Void> updateEmployee(int id, @Valid EmployeeDTO employeeDTO) throws RestException {\n Employee employeeUpdate = EmployeeToEmployeeDTOMapper.INSTANCE.employeeDTOToEmployee(employeeDTO);\n employeesService.updateEmployee(id, employeeUpdate);\n return new ResponseEntity<>(HttpStatus.OK);\n }",
"public interface DepartmentService {\n public Map<String,Object> departmentList();\n public Map<String,Object> departmentAdd(Map<String,Object> params);\n public Map<String,Object> departmentEdit(Map<String,Object> params);\n public Map<String,Object> departmentDelete(Map<String,Object> params);\n public Map<String,Object> departmentDeleteCascade(Map<String,Object> params);\n public Map<String,Object> departmentNewRoot();\n\n}",
"@RequestMapping(value = \"/groupps\",\n method = RequestMethod.PUT,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> update(@Valid @RequestBody GrouppDTO grouppDTO) throws URISyntaxException {\n log.debug(\"REST request to update Groupp : {}\", grouppDTO);\n if (grouppDTO.getId() == null) {\n return create(grouppDTO);\n }\n Groupp groupp = grouppMapper.grouppDTOToGroupp(grouppDTO);\n grouppRepository.save(groupp);\n grouppSearchRepository.save(groupp);\n return ResponseEntity.ok().build();\n }",
"AdPartner updateAdPartner(AdPartner adPartner);",
"int updateByPrimaryKey(R_dept_user record);",
"void updateUser(int id, UpdateUserDto updateUserDto);",
"@RequestMapping(value=\"/update\", method = RequestMethod.PUT)\r\n\t @ResponseBody\r\n//\t public String updateUser(Long id, String userName, String phone, String email, String password, Date dateOfBirth, String userNotes) {\r\n\t public UserDto update(UserDto userDto) \r\n\t {\r\n\t\t return service.update(userDto);\r\n\t }",
"@Override\r\n\tpublic int update(BigDecimal pk, DeptBean dept) throws SQLException {\n\t\tList params = new ArrayList();\r\n\t\tint rows = 0;\r\n\t\tdeptConn = this.getConnection();\r\n\t\tparams.add(dept.getDeptNo() );\r\n\t\tparams.add(dept.getDeptName() );\r\n\t\tparams.add(dept.getDeptLeader() );\r\n\t\tparams.add(dept.getDeptTel() );\r\n\t\tparams.add(dept.getParentDeptNo() );\r\n\t\tparams.add(dept.getDeptDesc() );\r\n\t\tparams.add(dept.getRemark() );\r\n\t\tparams.add(pk);\r\n\t\trows = this.executeUpdate(deptConn,SQL_UPDATE,params.toArray());\r\n\t\tif (deptConn != null) {\r\n\t\t\tthis.closeConnection(deptConn);\r\n\t\t}\r\n\t\treturn rows;\r\n\t}",
"void update(EmployeeDetail detail) throws DBException;",
"public void setDepartment(String department) {\n this.department = department;\n }",
"public void deleteDepartmentByDeptNo(int dept_no);",
"@RequestMapping(value=\"/{id}\",method=RequestMethod.PUT,consumes=MediaType.APPLICATION_JSON_VALUE)\r\n\t\tpublic void updateDoctor(@RequestBody Doctor doctor){\r\n\t\t\t\r\n\t\t\tdoctorService.updateDoctor(doctor);\r\n\t\t\t\r\n\t\t}",
"void deleteDepartmentById(Long id);"
]
| [
"0.75382495",
"0.7375082",
"0.72064495",
"0.71920097",
"0.71294725",
"0.71159595",
"0.69792736",
"0.69478035",
"0.69407654",
"0.68396175",
"0.6821238",
"0.68042374",
"0.6749021",
"0.67449164",
"0.6718238",
"0.6702602",
"0.66933346",
"0.66606057",
"0.6655564",
"0.66370445",
"0.66221136",
"0.66150755",
"0.65908164",
"0.6564094",
"0.65539896",
"0.6517354",
"0.6502278",
"0.6474612",
"0.6455696",
"0.6404204",
"0.63854384",
"0.63814884",
"0.63580114",
"0.6340467",
"0.63293993",
"0.6327128",
"0.63100773",
"0.6296576",
"0.62794894",
"0.6266511",
"0.6253165",
"0.6243443",
"0.6240183",
"0.62361425",
"0.62290126",
"0.62290126",
"0.62290126",
"0.62264633",
"0.6194754",
"0.6194754",
"0.6194754",
"0.61829627",
"0.6178857",
"0.6176713",
"0.6176713",
"0.6173443",
"0.61570823",
"0.615305",
"0.61525315",
"0.6135762",
"0.6124292",
"0.6106615",
"0.6102289",
"0.6095026",
"0.6094479",
"0.60891926",
"0.60876226",
"0.6082708",
"0.608269",
"0.60798997",
"0.6071816",
"0.60574055",
"0.6052704",
"0.6044911",
"0.6041559",
"0.6039192",
"0.6008443",
"0.6008166",
"0.6004951",
"0.5997059",
"0.5987293",
"0.5976669",
"0.59755766",
"0.59671676",
"0.5963549",
"0.59592706",
"0.5955435",
"0.5948812",
"0.5945753",
"0.5942915",
"0.5941905",
"0.594116",
"0.5929007",
"0.59288716",
"0.59246844",
"0.59015435",
"0.5901294",
"0.5886161",
"0.588111",
"0.58766276"
]
| 0.68595785 | 9 |
1. OnlineVisaManagement Application Function Name:deleteDepartment Input Parameters:department object Return Type:department object Author:suriyaS Description:delete the department from database by calling delete() in department repository | public void deleteDepartment(Department deparmentInDB) {
departmentRepository.delete(deparmentInDB);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void deleteDepartmentByDeptNo(int dept_no);",
"public void deleteDepartmentByDeptName(String dept_name);",
"@Override\npublic int delete(Department department) {\n\treturn 0;\n}",
"void deleteDepartmentById(Long id);",
"public boolean deleteDepartmentById(Integer id);",
"public String deleteDepartmentRow(Departmentdetails departmentDetailsFeed);",
"@Override\r\n\tpublic String deleteDepartment(Long deptId) {\n\t\tdeptRepo.deleteById(deptId);\r\n\t\treturn \"Deleted successfully\";\r\n\t}",
"@Override\n @Modifying\n @Query(value = \"delete from Dept where deptId = ?1\", nativeQuery = true)\n void deleteById(Long deptId);",
"public ResponseEntity<ApiMessageResponse> deleteDepartment(Long departmentId) {\n Optional<DepartmentModel> departmentModelOptional = departmentRepository.findById(departmentId);\n //Checking if the Department is available\n if (departmentModelOptional.isPresent()) {\n //If department found\n DepartmentModel departmentModel = departmentModelOptional.get();\n\n departmentRepository.delete(departmentModel);\n\n return new ResponseEntity<>(new ApiMessageResponse(200, \"Department info delete Successful\"),\n HttpStatus.OK);\n } else {\n //If No department found\n throw new ResponseStatusException(HttpStatus.NOT_FOUND, \"No Department found with ID: \" + departmentId);\n }\n }",
"@Override\n\tpublic void delete(Integer deptno) {\n\t\t\n\t}",
"@Override\r\n public int deptDelete(int dept_seq) {\n return sqlSession.delete(\"deptDAO.deptDelete\", dept_seq);\r\n }",
"public void deleteDepartment(Department a) {\n\n Session session = ConnectionFactory.getInstance().getSession();\n\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n\n session.delete(a);\n tx.commit();\n } catch (HibernateException e) {\n try {\n tx.rollback(); //error\n } catch (HibernateException he) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }",
"public String deleteEmployee(EmployeeDetails employeeDetails);",
"@Override\r\n\tpublic void deleteDepartment(Department department) {\n\t\tgetHibernateTemplate().delete(department);\r\n\t}",
"@Override\n\tpublic Integer deleteEmloyee(EmployeeBean employeeBean, DepartmentBean departmentBean) {\n\t\tLOGGER.info(\"starts deleteEmployee method\");\n\t\tLOGGER.info(\"Ends deleteEmployee method\");\n\t\treturn adminEmployeeDao.deleteEmloyee(employeeBean);\n\t}",
"public void deleteDepartment(String deptNum)\n\t{\n\t\tHRProtocol envelop = null;\n\t\tenvelop = new HRProtocol(HRPROTOCOL_DELETE_DEPARTMENT_REQUEST, deptNum, null);\n\t\tsendEnvelop(envelop);\n\t\tenvelop = receiveEnvelop();\n\t\tif(envelop.getPassingCode() == HRPROTOCOL_DELETE_DEPARTMENT_RESPONSE)\n\t\t{\t//Success in transition\n\t\t}else\n\t\t{\n\t\t\t//Error in transition. or other error codes.\n\t\t}\n\t}",
"int deleteByExample(DepartExample example);",
"@DeleteMapping(\"/company-departments/{id}\")\n @Timed\n public ResponseEntity<Void> deleteCompanyDepartment(@PathVariable Long id) {\n log.debug(\"REST request to delete CompanyDepartment : {}\", id);\n companyDepartmentRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"companyDepartment\", id.toString())).build();\n }",
"public void delete(Department department) {\n\t\tdepartmentRepository.delete(department);\n\t}",
"@Override\npublic void deleteDepartmentDataById(Integer Id) {\n\tOptional<DepartmentEntity> emp= departmentRepository.findById(Id);\n\tif(emp.isPresent())\n\t{\n\t\tdepartmentRepository.deleteById(Id);\n\t}\n\telse\n\t{\n\t\tthrow new IdNotValidException();\n\t}\n}",
"int deleteByPrimaryKey(String deptCode);",
"public int delDepById(String id)\r\n/* 122: */ {\r\n/* 123:102 */ String sql = \"delete from t_department where id=?\";\r\n/* 124:103 */ int i = 0;\r\n/* 125: */ try\r\n/* 126: */ {\r\n/* 127:105 */ this.ct = new ConnDb().getConn();\r\n/* 128:106 */ this.ps = this.ct.prepareStatement(sql);\r\n/* 129:107 */ this.ps.setString(1, id);\r\n/* 130:108 */ i = this.ps.executeUpdate();\r\n/* 131:109 */ return i;\r\n/* 132: */ }\r\n/* 133: */ catch (Exception e)\r\n/* 134: */ {\r\n/* 135:112 */ e.printStackTrace();\r\n/* 136:113 */ return -1;\r\n/* 137: */ }\r\n/* 138: */ finally\r\n/* 139: */ {\r\n/* 140:115 */ closeSourse();\r\n/* 141: */ }\r\n/* 142: */ }",
"int deleteByExample(DeptExample example);",
"public void deleteDepartmentUser(DepartmentUser a) {\n\n Session session = ConnectionFactory.getInstance().getSession();\n\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n\n session.delete(a);\n tx.commit();\n } catch (HibernateException e) {\n try {\n tx.rollback(); //error\n } catch (HibernateException he) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }",
"public String deleterPetDetails(int petId);",
"public void deleteDepartment(Department department) {\n\t\tgetHibernateTemplate().delete(department);\n\t}",
"public int delete(o dto);",
"public void deleteEmployee(Long employeeId) throws ApiDemoBusinessException;",
"@Test\n @IfProfileValue(name=\"dept-test-group\", values={\"all\",\"dept-del\"})\n public void _2_3_1_delExistDept() throws Exception {\n this.mockMvc.perform(delete(\"/api/v1.0/companies/\"+\n d_1.getCompany()+\n \"/departments/\"+\n d_1.getId())\n .header(AUTHORIZATION,ACCESS_TOKEN))\n .andDo(print())\n .andExpect(status().isOk());\n thrown.expect(NameNotFoundException.class);\n repository.findDepartment(d_1.getId());\n }",
"public interface DepartmentService {\n Department saveDepartment(Department d);\n\n Department findByDepartmentId(String departmentId);\n\n void deleteByDepartmentId(String departmentId);\n\n void updateDepartment(Department d);\n\n boolean departmentExists(Department d);\n\n List<Department> findAll();\n\n void deleteAll();\n}",
"@Delete({\n \"delete from dept\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int deleteByPrimaryKey(Integer id);",
"public boolean deleteDepartment(String abbreviation) {\n Connection connect = null;\n try {\n connect = DBConnection.getConnection();\n Statement stmt = connect.createStatement();\n if (stmt.executeUpdate(\"DELETE FROM \" + TABLE\n + \" WHERE \" + PKEY + \"=\\\"\" + abbreviation + \"\\\"\") == 1) {\n connect.commit();\n return true;\n }\n } catch (SQLException ex) {\n ex.printStackTrace();\n throw new RuntimeException(\"Delete Query failed!\");\n } finally {\n DBConnection.releaseConnection(connect);\n }\n return false;\n }",
"public void deleteDepartmentById(int id) {\n this.departmentDao.deleteById(id);\n }",
"public void deleteEquipoComunidad(EquipoComunidad equipoComunidad);",
"int deleteByExample(MedicalOrdersExecutePlanExample example);",
"public static void removeDept() {\n\t\tScanner sc = ReadFromConsole.sc;\n\t\tSystem.out.println(\"Enter Department Id: \");\n\t\tint deptId = sc.nextInt();\n\t\tboolean deletion = false;\n\t\tDepartment d = null;\n\t\tsc.nextLine();\n\n\t\t// loop thru all dept obj of the deptInfo list\n\t\tfor (Department dept : deptInfo) {\n\t\t\tif (dept.getDeptId() == deptId) {\n\t\t\t\tdeletion = true;\n\t\t\t\td = dept;\n\t\t\t}\n\t\t}\n\t\tif (deletion) {\n\t\t\tdeptInfo.remove(d);\n\t\t\tSystem.out.println(\"Department removed\");\n\t\t}\n\t}",
"@Override\n public void deleteEmployee(int employeeId) {\n\n }",
"@Override\n\tpublic void delete(ExperTypeVO expertypeVO) {\n\n\t}",
"@Override\r\n\tpublic void delete(Employee arg0) {\n\t\t\r\n\t}",
"public void deleteEmp(int empno) {\n\t\t\n\t}",
"public void deleteDistrict(District District);",
"public void eliminar(CategoriaArticuloServicio categoriaArticuloServicio)\r\n/* 24: */ {\r\n/* 25:53 */ this.categoriaArticuloServicioDao.eliminar(categoriaArticuloServicio);\r\n/* 26: */ }",
"int deleteByExample(DashboardGoodsExample example);",
"int logicalDeleteByExample(@Param(\"example\") DashboardGoodsExample example);",
"@Override\n\tpublic int delete(PrestationCDI obj) throws DAOException {\n\t\treturn 0;\n\t}",
"@RequestMapping( method = RequestMethod.DELETE)\r\n\tpublic void deleteEmp(@RequestParam(\"employeeBankId\") String employeeBankId, HttpServletRequest req) {\r\n\t\tlogger.info(\"deleteEmp is calling :\" + \"employeeBankId\" + employeeBankId);\r\n\t\tLong empBankId = Long.parseLong(employeeBankId);\r\n\t\tbankDetailsService.delete(empBankId);\r\n\t}",
"@DeleteMapping(\"/deleteEmployee/{id}\")\n\tpublic void deleteEmployee(@PathVariable Long id){\n repo.deleteById(id);\n\t}",
"void deleteByOrgId(String csaOrgId);",
"@Test\n public void testDeletePengguna() throws Exception {\n System.out.println(\"deletePengguna\");\n Long id = null;\n DaftarPengguna instance = new DaftarPengguna();\n instance.deletePengguna(id);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"@Test\r\n\tpublic void deleteTeam() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: deleteTeam \r\n\t\tTeam team_1 = new wsdm.domain.Team();\r\n\t\tservice.deleteTeam(team_1);\r\n\t}",
"public void delete(Employee employee){\n employeeRepository.delete(employee);\n }",
"public interface IDepartmentService {\n\n /**\n * 获取所有Department对象\n */\n public List<Department> getAllList();\n\n /**\n * 获取PageResult对象\n */\n public PageResult getQuery(BaseQuery query);\n\n /**\n * 获取Department对象\n */\n public Department get(Department department);\n\n /**\n * 保存Department对象\n */\n public void save(Department department);\n\n /**\n * 更新Department对象\n */\n public void update(Department department);\n\n /**\n * 更新Department对象\n */\n public void delete(Department department);\n\n /**\n * 批量删除Department对象\n * @param ids\n */\n public void batchDelete(List<Long> ids);\n}",
"@Override\r\n\tpublic int delete(CommonParamDomain t) {\n\t\treturn getPersistanceManager().delete(getNamespace() + \".delete\", t);\r\n\t}",
"public void delete()\n {\n call(\"Delete\");\n }",
"@Override\n\tpublic void deleteEmployeeById(int empId) {\n\t\t\n\t}",
"int deleteByPrimaryKey(String depCode);",
"int deleteByExample(HospitalTypeExample example);",
"@Override\n\tpublic void deleteEmployee(Employee employee) {\n\t\t\n\t}",
"int deleteByExample(organize_infoBeanExample example);",
"public void deleteEmployee(ActionRequest request, ActionResponse response) throws SystemException, PortalException {\n\t\tString stringKey = request.getParameter(\"deleteKey\");\n\t\tlong employeeId = Long.valueOf(stringKey);\n\t\tEmployee employee = EmployeeLocalServiceUtil.getEmployee(employeeId);\n\t\tServiceContext serviceContext = ServiceContextFactory.getInstance(DLFolder.class.getName(), request);\n\t\tEmployeeLocalServiceUtil.deleteEmployee(employeeId);\n\t\tResourceLocalServiceUtil.deleteResource(serviceContext.getCompanyId(), Employee.class.getName(),\n\t\t\t\tResourceConstants.SCOPE_INDIVIDUAL, employee.getEmployeeId());\n\t\tif (employee.getFileEntryId() > 0) {\n\t\t\tDLFileEntryLocalServiceUtil.deleteDLFileEntry(employee.getFileEntryId());\n\t\t}\n\t\tresponse.setRenderParameter(\"mvcPath\", \"/html/employee/view.jsp\");\n\t}",
"int deleteByExample(Drug_OutWarehouseExample example);",
"public abstract Employee deleteEmployee(int id) throws DatabaseExeption;",
"@Test\r\n\tpublic void deleteFunctionTest(){\r\n\t\tSystem.out.println(\"TEST STARTED: deleteFunctionTest()\");\r\n\t\tLong orgId = null;\r\n\t\tLong funcId = null;\r\n\t\ttry{\r\n\t\t\t//create the test organization\r\n\t\t\tString createOrgResp = org_service.createOrganization(CREATE_ORG_REQ_1);\r\n\t\t\torgId = getRecordId(createOrgResp);\r\n\t\t\tSystem.out.println(createOrgResp);\r\n\t\t\t\r\n\t\t\t//create the test function linked to the organization test\r\n\t\t\tString createFuncResp = func_service.createFunction(CREATE_FUNCTION_REQ_1.replace(\"$ID_ORG\", orgId.toString()));\r\n\t\t\tSystem.out.println(\"CreateFunction Response: \"+createFuncResp);\r\n\t\t\t\r\n\t\t\t//get the new function ID\r\n\t\t\tfuncId = getRecordId(createFuncResp);\r\n\t\t\t\r\n\t\t\t//check if the createFuncResp is a well formed JSON object.\t\t\t\r\n\t\t\tcheckJsonWellFormed(createFuncResp);\r\n\t\t\t\r\n\t\t\t//delete the test function created\r\n\t\t\tString deleteFuncResp = func_service.deleteFunction(DELETE_FUNC_REQ_1+funcId+REQ_END);\r\n\t\t\tSystem.out.println(\"DeleteFunction Response: \"+deleteFuncResp);\r\n\t\t\t\r\n\t\t\t//check if the deleteFuncResp is a well formed JSON object.\r\n\t\t\tcheckJsonWellFormed(deleteFuncResp);\r\n\r\n\t\t\tAssert.assertTrue(!deleteFuncResp.contains(\"\\\"status\\\":\\\"error\\\"\"));\r\n\t\t}catch (Exception e){\r\n\t\t\tAssert.fail(e.getMessage());\r\n\t\t}finally{\r\n\t\t\t//delete the test organization created\r\n\t\t\torg_service.deleteOrganization(DELETE_ORG_REQ_1+orgId+REQ_END);\t\t\t\r\n\t\t\tSystem.out.println(\"TEST ENDED: deleteFunctionTest()\");\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void deleteEmployee() {\n\n\t}",
"public void deleteCompany(Company obj);",
"void modifyDepartment(Department dRef);",
"int deleteByExample(RepaymentPlanInfoUnExample example);",
"void delete(int entityId);",
"@Override\r\n\tpublic int deleteEmployee(Connection con, Employee employee) {\n\t\treturn 0;\r\n\t}",
"int deleteByExample(CliStaffProjectExample example);",
"@Test\r\n public void testEliminar() {\r\n System.out.println(\"eliminar\");\r\n Integer idDepto = null;\r\n Departamento instance = new Departamento();\r\n instance.eliminar(idDepto);\r\n // TODO review the generated test code and remove the default call to fail.\r\n }",
"public void delete(){\r\n\r\n }",
"@Override\r\n\tpublic String delete() {\n\t\tList<Object> paramList=new ArrayList<Object>();\r\n\t\tparamList.add(admin.getAdminAccount());\r\n\t\tboolean mesg=false;\r\n\t\tif(adminDao.doDelete(paramList)==1)\r\n\t\t\tmesg=true;\r\n\t\tthis.setResultMesg(mesg, \"ɾ³ý\");\r\n\t\treturn SUCCESS;\r\n\t}",
"public void deleteDoctor() {\n\n\t\tSystem.out.println(\"\\n----Remove Doctor----\");\n\t\tSystem.out.print(\"Enter Doctor Id: \");\n\t\tScanner sc = new Scanner(System.in);\n\t\tString doctor_id = sc.nextLine();\n\n\t\ttry {\n\t\t\tif (doctorDao.searchById(doctor_id).size() == 0) {\n\t\t\t\tlogger.info(\"Doctor Not Found!\");\n\t\t\t} else {\n\n\t\t\t\ttry {\n\n\t\t\t\t\tdoctorDao.delete(doctor_id);\n\t\t\t\t\tlogger.info(\"Data Deleted Successfully...\");\n\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlogger.info(\"Data Deletion Unsuccessful...\");\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\t}",
"@Override\n\tpublic void deleteEPAData(int empId) {\n\t}",
"public boolean DeleteDepartment(int idDepart)\n\t{\n \tint index = getDepartmentIndex(idDepart);\n \tif(index>-1)\n \t{\n \t\tdepartments.remove(index);\n \t\treturn true;\n \t}\n \telse return false;\n\t}",
"public void delete() throws Exception{\n\t\tm_service = new DistrictService();\n\t\tString deleteId = \"3751~`~`~`~@~#\";\n\t\tDecoder objPD = new Decoder(deleteId);\n\t\tString objReturn = m_service.delete(objPD);\n\t\tSystem.out.println(objReturn);\n\t}",
"int deleteByExample(AdminExample example);",
"public void deleteExempleDirect(ExempleDirect exempleDirect) throws DaoException;",
"@Override\n\tpublic void deleteEmployee(Employee e) {\n\t\t\n\t}",
"int deleteByExample(MVoucherDTOCriteria example);",
"int deleteByPrimaryKey(@Param(\"nodeId\") String nodeId, @Param(\"departmentId\") String departmentId, @Param(\"jobId\") String jobId, @Param(\"processDictId\") String processDictId, @Param(\"uuid\") String uuid);",
"private void deleteEmployeeBooking() {\n BookingModel bookingModel1 = new BookingModel();\n try {\n bookingModel1.deleteBooking(employeeID);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }",
"public String checkDepartment(String departmentName);",
"int deleteByExample(InspectionAgencyExample example);",
"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}",
"int deleteByExample(MEsShoppingCartDTOCriteria example);",
"public void doDeleteAlbum(AlbumDTO dto)\n/* */ {\n/* 64 */ this.galleryManager.deleteAlbum(dto);\n/* 65 */ this.albumList.remove(dto);\n/* */ }",
"@Test\r\n public void testDeleteById() {\r\n System.out.println(\"deleteById\");\r\n int id = 0;\r\n AbonentDAL instance = new AbonentDAL();\r\n Abonent expResult = null;\r\n Abonent result = instance.deleteById(id);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }",
"public void deleteOneWord(Pojo.OneWord e){ \n template.delete(e); \n}",
"int deleteByExample(OrgMemberRecordExample example);",
"void deleteCatFood(Long catId, Long foodId);",
"int deleteByExample(NeeqCompanyAccountingFirmOnlineExample example);",
"@Override\r\n\tpublic void deleteEmployee(Employee t) {\n\t\t\r\n\t}",
"@DeleteMapping(\"/employees/{employeeId}\")\n\tpublic String deleteEmployee (@PathVariable int employeeId) {\n\t\tEmployee theEmployee = employeeService.fndById(employeeId);\n\t\t\n\t\t// if employee null\n\t\tif (theEmployee == null) {\n\t\t\tthrow new RuntimeException(\"Employee xx his idEmpl not found \"+ employeeId);\n\t\t\t \n\t\t}\n\t\temployeeService.deleteById(employeeId);\n\t\treturn \"the employe was deleted \"+ employeeId;\n\t\t\n\t}",
"@Override\n\tpublic int delete(ProductDTO dto) {\n\t\treturn 0;\n\t}",
"int deleteByExample(UserOperateProjectExample example);",
"int deleteByExample(SrHotelRoomInfoExample example);",
"public void delete() {\n\n }",
"int deleteByExample(SysTeamExample example);"
]
| [
"0.82681084",
"0.78771895",
"0.78744113",
"0.7864886",
"0.77397573",
"0.7567345",
"0.7556405",
"0.73008627",
"0.7270994",
"0.7229424",
"0.72228146",
"0.71939945",
"0.7037717",
"0.69265425",
"0.6860278",
"0.6858865",
"0.68158275",
"0.68065196",
"0.6788521",
"0.67883587",
"0.67499655",
"0.6706462",
"0.67024624",
"0.66446483",
"0.6595305",
"0.65738153",
"0.6514329",
"0.6508959",
"0.6475289",
"0.6428932",
"0.6401404",
"0.6395521",
"0.638031",
"0.6360938",
"0.6353973",
"0.63189197",
"0.63058",
"0.6268797",
"0.623948",
"0.6230914",
"0.6228783",
"0.620113",
"0.61942583",
"0.6194056",
"0.61725307",
"0.61570823",
"0.615665",
"0.61531633",
"0.6150691",
"0.61307025",
"0.6120861",
"0.6105511",
"0.60903794",
"0.6083633",
"0.6072991",
"0.60728854",
"0.60673267",
"0.60472655",
"0.6043105",
"0.60325044",
"0.6029548",
"0.602506",
"0.60139596",
"0.60035133",
"0.59925437",
"0.5991856",
"0.5980153",
"0.597015",
"0.5957365",
"0.5954137",
"0.5937041",
"0.59352773",
"0.5932981",
"0.59323007",
"0.59230417",
"0.59209734",
"0.5915177",
"0.59149534",
"0.59138733",
"0.590846",
"0.5903759",
"0.5900743",
"0.58949226",
"0.5893167",
"0.5888368",
"0.5881798",
"0.5876313",
"0.5875701",
"0.58738273",
"0.5868076",
"0.5865814",
"0.5862032",
"0.58554393",
"0.58510095",
"0.58434004",
"0.58366317",
"0.5836482",
"0.583471",
"0.583357",
"0.5832379"
]
| 0.73087925 | 7 |
TODO Autogenerated method stub | public static void main(String[] args) {
} | {
"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 |
adding an image of our choice | public void done(View view){
RequestQueue req = Volley.newRequestQueue(this);
String url = imageSrc.getText().toString();
ImageRequest imageReq = new ImageRequest(url, new Response.Listener<Bitmap>() {
@Override
public void onResponse(Bitmap response) {
imageView.setImageBitmap(response);
}
}, 0, 0, null, Bitmap.Config.RGB_565, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
Toast.makeText(MainActivity2.this, "Invalid image URL, try another one!", Toast.LENGTH_LONG).show();
}
});
req.add(imageReq);
//inserting data in our Realtime Database
reference = FirebaseDatabase.getInstance().getReference(id.getText().toString());
reference.child("imagesrc").setValue(imageSrc.getText().toString());
reference.child("latitude").setValue(lat.getText().toString());
reference.child("longitude").setValue(lon.getText().toString());
reference.child("description").setValue(description.getText().toString());
Intent intent = getIntent();
finish();
startActivity(intent);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addNewPicture() {\n ImageView imgView = (ImageView)findViewById(R.id.poll_object_btn_image);\n Resources res = getContext().getResources();\n if(this.type == \"generic\") {\n //add the new pciture for the generic type\n Bitmap bitmap = BitmapFactory.decodeResource(res, R.drawable.generic_new);\n imgView.setImageBitmap(bitmap);\n }else if(this.type == \"location\") {\n //add the new picture for the location type\n Bitmap bitmap = BitmapFactory.decodeResource(res, R.drawable.generic_new);\n imgView.setImageBitmap(bitmap);\n }else if(this.type == \"picture\") {\n //add the new picture for the picture type\n Bitmap bitmap = BitmapFactory.decodeResource(res, R.drawable.generic_new);\n imgView.setImageBitmap(bitmap);\n }\n }",
"private void showImage() {\n this.animalKind = (String) imageCbox.getSelectedItem();\n try {\n ImageIcon imageIcon = new ImageIcon(getClass().getResource(\"/\" + animalKind + \"E.png\")); // load the image to a imageIcon\n Image image = imageIcon.getImage(); // transform it\n Image newImg = image.getScaledInstance(120, 120, Image.SCALE_SMOOTH); // scale it the smooth way\n imageIcon = new ImageIcon(newImg);// transform it back\n imgLabel.setIcon(imageIcon);\n this.add(imgLabel, gbc);\n\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n repaint();\n }",
"Builder addImage(String value);",
"private void imageInitiation() {\n ImageIcon doggyImage = new ImageIcon(\"./data/dog1.jpg\");\n JLabel dogImage = new JLabel(doggyImage);\n dogImage.setSize(700,500);\n this.add(dogImage);\n }",
"Builder addImage(ImageObject value);",
"private void drawImage(){\n Integer resourceId = imageId.get(this.name);\n if (resourceId != null) {\n drawAbstract(resourceId);\n } else {\n drawNone();\n }\n }",
"Builder addImage(URL value);",
"public void addImg(){\n // Add other bg images\n Image board = new Image(\"sample/img/board.jpg\");\n ImageView boardImg = new ImageView();\n boardImg.setImage(board);\n boardImg.setFitHeight((tileSize* dimension)+ (tileSize*2) );\n boardImg.setFitWidth( (tileSize* dimension)+ (tileSize*2) );\n\n Tile infoTile = new Tile(getTileSize(), getTileSize()*7);\n infoTile.setTranslateX(getTileSize()*3);\n infoTile.setTranslateY(getTileSize()*6);\n\n tileGroup.getChildren().addAll(boardImg, infoTile);\n\n }",
"private void galleryAddPic() {\n\t}",
"public void addImage(Image img, int x, int y) {\n\n\t}",
"public void setImageView() {\n \timage = new Image(\"/Model/boss3.png\", true);\n \tboss = new ImageView(image); \n }",
"public void changePicture() {\n ImageView imgView = (ImageView)findViewById(R.id.poll_object_btn_image);\n Resources res = getContext().getResources();\n if(type == \"generic\") {\n //add the new picture for the generic type\n Bitmap bitmap = BitmapFactory.decodeResource(res,R.drawable.generic_view);\n imgView.setImageBitmap(bitmap);\n }\n else if(type == \"location\") {\n //add the new picture for the location type\n Bitmap bitmap = BitmapFactory.decodeResource(res,R.drawable.generic_view);\n imgView.setImageBitmap(bitmap);\n }\n else if(type == \"picture\"){\n //add the new picture for the picture type\n Bitmap bitmap = BitmapFactory.decodeResource(res,R.drawable.generic_view);\n imgView.setImageBitmap(bitmap);\n }\n }",
"Person addImage(String name, String imagePath);",
"private RoundImage img(String imgAddress) {\n return new RoundImage(\"frontend/src/images/books.png\",\"64px\",\"64px\");\n }",
"private static void addImage(ImageEnum imageEnum, String path) {\n \t\tif (!new File(path).exists()) {\n \t\t\tSystem.out.println(\"Could not find file \\\"\" + path + \"\\\".\\n\"\n \t\t\t + \"The program will exit now.\");\n \t\t\tSystem.exit(1);\n \t\t}\n \t\t// add new ImageIcon to image list\n \t\tallImages.put(imageEnum, new ImageIcon(path));\n \t}",
"void setImage(String image);",
"private void createImage()\n {\n GreenfootImage image = new GreenfootImage(width, height);\n setImage(\"Player.png\");\n }",
"private void setImage(ActorType type) {\n switch (type) {\n case TREE: image = new Image(\"src/res/images/tree.png\"); break;\n case GOLDENTREE: image = new Image(\"src/res/images/gold-tree.png\"); break;\n case STOCKPILE: image = new Image(\"src/res/images/cherries.png\"); break;\n case HOARD: image = new Image(\"src/res/images/hoard.png\"); break;\n case PAD: image = new Image(\"src/res/images/pad.png\"); break;\n case FENCE: image = new Image(\"src/res/images/fence.png\"); break;\n case SIGNUP: image = new Image(\"src/res/images/up.png\"); break;\n case SIGNDOWN: image = new Image(\"src/res/images/down.png\"); break;\n case SIGNLEFT: image = new Image(\"src/res/images/left.png\"); break;\n case SIGNRIGHT: image = new Image(\"src/res/images/right.png\"); break;\n case POOL: image = new Image(\"src/res/images/pool.png\"); break;\n case GATHERER: image = new Image(\"src/res/images/gatherer.png\"); break;\n case THIEF: image = new Image(\"src/res/images/thief.png\"); break;\n default: System.err.println(\"error: no preset image for this actor type: \"+type.toString());\n }\n }",
"private void setImageDynamic(){\n questionsClass.setQuestions(currentQuestionIndex);\n String movieName = questionsClass.getPhotoName();\n ImageView ReferenceToMovieImage = findViewById(R.id.Movie);\n int imageResource = getResources().getIdentifier(movieName, null, getPackageName());\n Drawable img = getResources().getDrawable(imageResource);\n ReferenceToMovieImage.setImageDrawable(img);\n }",
"public ImagePanel() {\n\t\ttry {\n\t\t\tthis.image.add(ImageIO.read(new File(this.getClass().getResource(\"/Avertissement/frigorest.png\").getPath())));\n\t\t\tthis.image.add(ImageIO.read(new File(this.getClass().getResource(\"/Avertissement/frigono.png\").getPath())));\n\t\t\tthis.image.add(ImageIO.read(new File(this.getClass().getResource(\"/Avertissement/frigolow.png\").getPath())));\n\t\t\tthis.image.add(ImageIO.read(new File(this.getClass().getResource(\"/Avertissement/frigohigh.png\").getPath())));\n\t\t\tthis.image.add(ImageIO.read(new File(this.getClass().getResource(\"/Avertissement/frigocondensation.png\").getPath())));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void setUpImage() {\n Bitmap icon = BitmapFactory.decodeResource( this.getResources(), R.drawable.hotel_icon );\n map.addImage( MARKER_IMAGE_ID, icon );\n }",
"public void AddImgToRecyclerView()\n {\n imgsource = new Vector();\n Resources res = getResources();\n imgsource.add(res.getIdentifier(\"@drawable/add_overtime_schedule\", null, getPackageName()));\n imgsource.add(res.getIdentifier(\"@drawable/add_overtime\", null, getPackageName()));\n imgsource.add(res.getIdentifier(\"@drawable/clock_in\", null, getPackageName()));\n imgsource.add(res.getIdentifier(\"@drawable/vacation\", null, getPackageName()));\n imgsource.add(res.getIdentifier(\"@drawable/document\", null, getPackageName()));\n imgsource.add(res.getIdentifier(\"@drawable/order\", null, getPackageName()));\n }",
"public void setTempImage()\n {\n URL url = this.getClass().getResource(lastselection.getImage());\n\t\tImage image = Toolkit.getDefaultToolkit().getImage(url);\n\t\ttempImage = new PImage(image);\n\t\ttempImage.setBounds(0,0,65,170);\n\t\ttempImage.setTransparency(0);\n\t\tlayer.addChild(tempImage);\n\t}",
"public void openCustomPictureCreator() {\n\n\t\tFXMLLoader fxmlL = new FXMLLoader(getClass().getResource(\"AvatarDrawingTool.fxml\"));\n\t\ttry {\n\t\t\tBorderPane login = (BorderPane) fxmlL.load();\n\n\t\t\tScene scene = new Scene(login, 600, 400);\n\n\t\t\tStage stage = new Stage();\n\t\t\tstage.setScene(scene);\n\t\t\tstage.initModality(Modality.APPLICATION_MODAL);\n\n\t\t\tstage.showAndWait();\n\t\t\t\n\t\t\tif(custom) {\n\t\t\t\tsetImg();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@FXML\r\n public void imageButtonClicked() {\r\n File file = fileChooser.showOpenDialog(viewHandler.getPrimaryStage());\r\n if (file != null) {\r\n try {\r\n viewModel.setImageurl(ImageConverter.ImageToByte(file));\r\n Image img = new Image(new ByteArrayInputStream(viewModel.getImageurl()));\r\n dogPicture.setFill(new ImagePattern(img));\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }",
"public void defaultImageDisplay(){\n ClassLoader cl = this.getClass().getClassLoader();\n ImageIcon icon = new ImageIcon(cl.getResource(\"pictures/NewInventory/defaultPic.png\"));\n // this.finalImage = icon.getImage();\n Image img = icon.getImage().getScaledInstance(entryImage.getWidth(), entryImage.getHeight(), Image.SCALE_SMOOTH);\n entryImage.setIcon(new ImageIcon(img));\n }",
"private void addImgList() {\n\t\tdogImg.add(\"./data/img/labrador.jpg\");\t\t\t\t\n\t\tdogImg.add(\"./data/img/germanshepherd.jpg\");\t\n\t\tdogImg.add(\"./data/img/bulldog.jpg\");\t\t\t\t\t\t\t\t\n\t\tdogImg.add(\"./data/img/rottweiler.jpg\");\n\t\tdogImg.add(\"./data/img/husky.jpg\");\n\n\t}",
"public void createImage() {\n\t\tBufferedImage crab1ststep = null;\n\t\tBufferedImage crab2ndstep = null;\n\t\tBufferedImage crabhalf = null;\n\t\tBufferedImage crabfull = null;\n\t\tBufferedImage eye6 = null;\n\t\tBufferedImage eye5 = null;\n\t\tBufferedImage eye4 = null;\n\t\tBufferedImage eye3 = null;\n\t\tBufferedImage eye2 = null;\n\t\tBufferedImage eye1 = null;\n\t\tBufferedImage eyeClosed = null;\n\t\ttry {\n\t\t crabImage = ImageIO.read(new File(\"src/images/crab.png\"));\n\t\t crab1ststep = ImageIO.read(new File(\"src/images/crab1ststep.png\"));\n\t\t crab2ndstep = ImageIO.read(new File(\"src/images/crab2ndstep.png\"));\n\t\t crabhalf = ImageIO.read(new File(\"src/images/crabhalf.png\"));\n\t\t crabfull = ImageIO.read(new File(\"src/images/crabfull.png\"));\n\t\t crabWin = ImageIO.read(new File(\"src/images/crabwin.png\"));\n\t\t crabLose = ImageIO.read(new File(\"src/images/crablose.png\"));\n\t\t eye6 = ImageIO.read(new File(\"src/images/crab_eye6.png\"));\n\t\t eye5 = ImageIO.read(new File(\"src/images/crab_eye5.png\"));\n\t\t eye4 = ImageIO.read(new File(\"src/images/crab_eye4.png\"));\n\t\t eye3 = ImageIO.read(new File(\"src/images/crab_eye3.png\"));\n\t\t eye2 = ImageIO.read(new File(\"src/images/crab_eye2.png\"));\n\t\t eye1 = ImageIO.read(new File(\"src/images/crab_eye1.png\"));\n\t\t eyeClosed = ImageIO.read(new File(\"src/images/eyes_closed.png\"));\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"bad\");\n\t\t}\n//\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n//\t\tcrabAni.add(crab1ststep);\n\t\tcrabAni.add(crab1ststep);\n\t\tcrabAni.add(crab1ststep);\n\t\tcrabAni.add(crab1ststep);\n\t\tcrabAni.add(crab1ststep);\n\t\tcrabAni.add(crab1ststep);\n//\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n//\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\t\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabfull);\n\t\tcrabAni2.add(crabfull);\n\t\tcrabAni2.add(crabfull);\n\t\tcrabAni2.add(crabfull);\n\t\tcrabAni2.add(crabfull);\n\t\tcrabAni2.add(crabfull);\n\t\t\n\t\tblink.add(eye6);\n\t\tblink.add(eye6);\n//\t\tblink.add(eye5);\n//\t\tblink.add(eye5);\n\t\tblink.add(eye4);\n\t\tblink.add(eye4);\n//\t\tblink.add(eye3);\n//\t\tblink.add(eye3);\n\t\tblink.add(eye2);\n\t\tblink.add(eye2);\n//\t\tblink.add(eye1);\n//\t\tblink.add(eye1);\n\t\tblink.add(eyeClosed);\n\t\tblink.add(eyeClosed);\n\t\tblink.add(eyeClosed);\n\t\tblink.add(eyeClosed);\n//\t\tblink.add(eye1);\n//\t\tblink.add(eye1);\n\t\tblink.add(eye2);\n\t\tblink.add(eye2);\n//\t\tblink.add(eye3);\n//\t\tblink.add(eye3);\n\t\tblink.add(eye4);\n\t\tblink.add(eye4);\n//\t\tblink.add(eye5);\n//\t\tblink.add(eye5);\n\t\tblink.add(eye6);\n\t\tblink.add(eye6);\n\t}",
"public void cambiarEstadoImagen(){\n ImageIcon respuesta=new ImageIcon();\n if(oportunidades==0){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado7.jpg\"));\n }\n if(oportunidades==1){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado6.jpg\"));\n }\n if(oportunidades==2){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado5.jpg\"));\n }\n if(oportunidades==3){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado4.jpg\"));\n }\n if(oportunidades==4){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado3.jpg\"));\n }\n if(oportunidades==5){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado2.jpg\"));\n }\n if(oportunidades==6){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado1.jpg\"));\n }\n if(oportunidades==7){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado0.jpg\"));\n }\n this.imgAhorcado=respuesta; \n }",
"private void addImage(int row, int col, String imageName,\n\t\t\t\t\t\t\t\t\t\t\t\tString imageFileName) {\n\t\tDirectionalPanel panel = nextEmpty(row, col);\n\t\tif (panel != null) {\n\t\t\tpanel.setImage(imageFileName);\n\t\t\tpanel.setImageName(imageName);\n\t\t\tpanel.invalidate();\n\t\t\tpanel.repaint();\n\t\t}\n\t}",
"public void addImage(View view) {\n Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(intent, RESULT_LOAD_IMAGE);\n }",
"public void addPicture() {\n FileChooser chooser = new FileChooser();\n chooser.setTitle(\"Upload your pic for this post\");\n file = chooser.showOpenDialog(null);\n if (file != null) {\n\n Image profilePicImage = new Image(file.toURI().toString());\n try {\n this.postPic = new FileInputStream(file).readAllBytes();\n } catch (IOException ioException) {\n ioException.printStackTrace();\n }\n postImage.setImage(profilePicImage);\n }\n }",
"Builder addImage(ImageObject.Builder value);",
"@Override\n public String GetImagePart() {\n return \"coal\";\n }",
"public void setImg(){\n if(PicSingleton.getInstance().getPicToShape() != null){\n\n mResultImg.setImageDrawable(PicSingleton.getInstance().getPicShaped());\n }\n }",
"public void setImage(Image itemImg) \n {\n img = itemImg;\n }",
"public void changeImage(){\n if(getImage()==storeItemImg) setImage(selected);\n else setImage(storeItemImg);\n }",
"public void setImg(String mapSelect){\n\t\ttry {\n\t\t if (mapSelect.equals(\"map01.txt\")){\n\t\t\timg = ImageIO.read(new File(\"space.jpg\"));\n\t\t\timg2 = ImageIO.read(new File(\"metal.png\"));\n\n\t\t }\t\n\t\t if (mapSelect.equals(\"map02.txt\")){\n\t\t\t\timg = ImageIO.read(new File(\"forest.jpg\"));\n\t\t\t\timg2 = ImageIO.read(new File(\"leaf.png\"));\n\t\t\t\timg3 = ImageIO.read(new File(\"log.png\"));\n\t\t }\n\t\t if (mapSelect.equals(\"map03.txt\")){\n\t\t\t\timg = ImageIO.read(new File(\"spinx.jpg\"));\n\t\t\t\timg2 = ImageIO.read(new File(\"pyramid.png\"));\n\t\t\t\timg3 = ImageIO.read(new File(\"sandy.png\"));\n\t\t\t\t\n\t\t }\n\t\t if (mapSelect.equals(\"map04.txt\")){\n\t\t\t\timg = ImageIO.read(new File(\"doublebg.png\"));\n\t\t\t\timg2 = ImageIO.read(new File(\"cloud.png\"));\n\t\t\t\t\n\t\t }\n\t\t\t\n\t\t}\n\t\t catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\t\n\t\t}\n\t}",
"private void setImage(){\n if(objects.size() <= 0)\n return;\n\n IImage img = objects.get(0).getImgClass();\n boolean different = false;\n \n //check for different images.\n for(IDataObject object : objects){\n IImage i = object.getImgClass();\n \n if((img == null && i != null) || \n (img != null && i == null)){\n different = true;\n break;\n }else if (img != null && i != null){ \n \n if(!i.getName().equals(img.getName()) ||\n !i.getDir().equals(img.getDir())){\n different = true;\n break;\n }\n } \n }\n \n if(!different){\n image.setText(BUNDLE.getString(\"NoImage\"));\n if(img != null){\n imgName = img.getName();\n imgDir = img.getDir();\n image.setImage(img.getImage());\n }else{\n image.setImage(null);\n }\n }else{\n image.setText(BUNDLE.getString(\"DifferentImages\"));\n }\n \n image.repaint();\n }",
"public void loadInputImage()\n{\n selectInput(\"Select a file to process:\", \"imageLoader\"); // select image window -> imageLoader()\n}",
"void lSetImage(Image img);",
"private void setImage() {\r\n\t\ttry{\r\n\r\n\t\t\twinMessage = ImageIO.read(new File(\"obstacles/win.gif\"));\r\n\t\t\tcoin = ImageIO.read(new File(\"obstacles/Coin.gif\"));\r\n\t\t\toverMessage = ImageIO.read(new File(\"obstacles/over.gif\"));\r\n\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tSystem.err.println(\"Image file not found\");\r\n\t\t}\r\n\r\n\t}",
"@Override\n\tpublic void carregar() {\n\t\tSystem.out.println(\"carregar imagem png\");\n\t\t\n\t}",
"public static void loadFruitPic() {\n //images are from the public domain website: https://www.clipartmax.com/\n Toolkit toolkit = Toolkit.getDefaultToolkit();\n Banana.fruitPic = toolkit.getImage(\"Images/banana.png\");\n Banana.fruitSlice = toolkit.getImage(\"Images/bananaSlice.png\");\n }",
"@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t\t{\n\t\t\t\t\tpath = getLinkOfFoto();\n\t\t\t\t\tif(path.equals(\"\"))\n\t\t\t\t\t\treturn;\n\t\t\t\t\tactualCat.addFoto(path,actualCat.pathToImage(path));\n\t\t\t\t\tredraw(actualCat, panel);\n\t\t\t\t\t\n\t\t\t\t}",
"public void createImageSet() {\n\t\t\n\t\t\n\t\tString image_folder = getLevelImagePatternFolder();\n \n String resource = \"0.png\";\n ImageIcon ii = new ImageIcon(this.getClass().getResource(image_folder + resource));\n images.put(\"navigable\", ii.getImage());\n\n\t}",
"GameItem(String rarity, String name, String pickuptext, String effect, ArrayList<Double> stack){\n this.rarity = rarity;\n this.name = name;\n this.pickuptext = pickuptext;\n this.effect = effect;\n this.stack = stack;\n // this.imageloc = \"/../../../pictures/items/\"+this.rarity+\"/\"+this.name+\".png\";\n //this.img = new javax.swing.ImageIcon(getClass().getResource(this.imageloc));\n //Icon\n }",
"@Override\n public void onClick(View view) {\n\n photoStorage.addImage(currentLabel, currentVisibleImagePath);\n addImage.setEnabled(false);\n }",
"private void selectImage() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(\n Intent.createChooser(\n intent,\n \"Select Image from here...\"),\n PICK_IMAGE_REQUEST);\n }",
"private void helperDisplayInputImage()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//---- Get currently selected file index in the combo box\r\n\t\t\tint index = mainFormLink.getComponentPanelLeft().getComponentComboboxFileName().getSelectedIndex();\r\n\r\n\t\t\t//---- Check the index if the action is invoked by image deletion then causes error\r\n\t\t\tint imageCount = DataController.getTable().getTableSize();\r\n\r\n\t\t\tif (index >= 0 && index < imageCount)\r\n\t\t\t{\r\n\t\t\t\t//---- Get file path of the table\r\n\r\n\t\t\t\tString filePath = DataController.getTable().getElement(index).getDataFile().getFilePath();\r\n\r\n\t\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().displayPolygonStop();\r\n\t\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().loadImage(filePath);\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}",
"private void selectImage() {\n final CharSequence[] items = {\"Take Photo\", \"Choose from Library\",\n \"Cancel\"};\n\n AlertDialog.Builder builder = new AlertDialog.Builder(Timetable.this);\n builder.setTitle(\"Add Photo!\");\n builder.setItems(items, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int item) {\n if (items[item].equals(\"Take Photo\")) {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n startActivityForResult(intent, REQUEST_CAMERA);\n } else if (items[item].equals(\"Choose from Library\")) {\n Intent intent = new Intent(\n Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.setType(\"image/*\");\n startActivityForResult(\n Intent.createChooser(intent, \"Select File\"),\n SELECT_FILE);\n } else if (items[item].equals(\"Cancel\")) {\n dialog.dismiss();\n }\n }\n });\n builder.show();\n }",
"public AddByImage(JPanel parent) {\n this.parent = parent;\n initComponents();\n }",
"public void changeImage() {\r\n this.image = ColourDoor.image2;\r\n }",
"void setImage(Layer layer, Image image);",
"java.lang.String getImage();",
"private void enhanceImage(){\n }",
"public void addPng(ImageView png){\n vertexImages.add(png);\n }",
"@FXML\n public void pickOwnPicture(ActionEvent event) {\n FileChooser fc = new FileChooser();\n fc.getExtensionFilters().addAll(new FileChooser.ExtensionFilter(\"Image Files\", \"*.jpg\", \"*.png\"));\n File selectedFile = fc.showOpenDialog(null);\n\n\n if (selectedFile != null) {\n pathToFile = selectedFile.getAbsolutePath();\n ;\n Image img = new Image(selectedFile.toURI().toString());\n\n ImageView mainImageView = new ImageView(img);\n mainImageView.setPreserveRatio(true);\n mainImageView.setFitWidth(imageStackPane.getWidth());\n mainImageView.setFitHeight(imageStackPane.getHeight());\n imageStackPane.getChildren().clear();\n imageStackPane.getChildren().add(mainImageView);\n\n\n }\n }",
"public void selectedImageButtonPushed(ActionEvent event) throws IOException {\n // get the Stage to open a new window\n Stage stage = (Stage)((Node)event.getSource()).getScene().getWindow();\n FileChooser fileChooser = new FileChooser();\n fileChooser.setTitle(\"open Image\");\n //filter for .jpg and .png\n FileChooser.ExtensionFilter imageFilter = new FileChooser.ExtensionFilter(\"Image Files\",\"*.jpg\",\"*.png\");\n fileChooser.getExtensionFilters().add(imageFilter);\n // set the start directory\n String userDirectoryString = System.getProperty(\"user.home\")+\"\\\\Pictures\";\n File userDirectory = new File(userDirectoryString);\n // confirm that system can reach the directory\n if (!userDirectory.canRead())\n userDirectory = new File(System.getProperty(\"user.home\"));\n //set the file chooser to select initial directory\n fileChooser.setInitialDirectory(userDirectory);\n File imageFile = fileChooser.showOpenDialog(stage);\n if (imageFile != null && imageFile.isFile())\n {\n selectImage.setImage(new Image(imageFile.toURI().toString()));\n }\n }",
"ElementImage createElementImage();",
"protected Image addImage(String href, Panel hp, String stylename, Hyperlink hyperlink) {\n if (href == null) {\n return null;\n }\n if (href.equals(\"\")) {\n return null;\n }\n final Image image = new Image();\n image.setUrl(mywebapp.getUrl(href));\n addImage(image, hp, stylename, hyperlink);\n return image;\n }",
"private void loadShipImage() {\r\n\t\tshipImageView = Ship.getImage();\r\n\t\tshipImageView.setX(ship.getCurrentLocation().x * scalingFactor);\r\n\t\tshipImageView.setY(ship.getCurrentLocation().y * scalingFactor);\r\n\r\n\t\troot.getChildren().add(shipImageView);\r\n\r\n\t}",
"void selectImage(String path);",
"private void setImageOnGUI() {\n\n // Capture position and set to the ImageView\n if (AppConstants.fullScreenBitmap != null) {\n fullScreenSnap.setImageBitmap(AppConstants.fullScreenBitmap);\n }\n\n }",
"private void change_im_tool4(int boo){\r\n if(boo == 0){ //IMAGEN SI EL USUARIO ESTA INHABILITADO\r\n im_tool4.setImage(new Image(getClass().getResourceAsStream(\"/Images/img07.png\")));\r\n }else{ //IMAGEN PARA HABILITAR AL USUARIO\r\n im_tool4.setImage(new Image(getClass().getResourceAsStream(\"/Images/img06.png\")));\r\n }\r\n }",
"private ImageView setStartMenuImage() {\r\n Image image = null;\r\n try {\r\n image = new Image(new FileInputStream(\"images/icon1.png\"));\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n ImageView imageView = new ImageView(image);\r\n imageView.setFitHeight(HEIGHT / 4);\r\n imageView.setPreserveRatio(true);\r\n return imageView;\r\n }",
"@OnClick(R.id.add_photo_layout)\n public void onClickAddPhoto() {\n Intent intent = new Intent(Intent.ACTION_GET_CONTENT);\n intent.setType(\"image/*\");\n startActivityForResult(Intent.createChooser(intent, getString(R.string.choose_image_from)), 8);\n }",
"public void drawImage()\n {\n imageMode(CORNERS);\n //image(grayImgToFit, firstCellPosition[0], firstCellPosition[1]);\n image(canvas, firstCellPosition[0], firstCellPosition[1]);\n //image(tileMiniaturesV[0],10,250);\n //if(avaragedImgs.length > 4)\n // image(avaragedImgs[3],200,200);\n //getTileIntensityAtIndex(15,15);\n //println(tiles[7].getEndBrightness());\n \n }",
"public String ImageControl(String image) {\n \n String tmp = null;\n \n if (image != null && !image.isEmpty()){\n tmp = image;\n } else {\n int num = (new Random()).nextInt(4);\n tmp = \"icon\"+num+\".png\";\n }\n \n return tmp;\n }",
"private void changeGraphic(ToggleButton toggleButton, Image diceImage){\n\t toggleButton.setGraphic(new ImageView(diceImage));\n\t}",
"Image createImage();",
"public void setImage(String image){\n this.image = image;\n }",
"@Override\n\tpublic void loadImages() {\n\t\tsuper.setImage((new ImageIcon(\"pacpix/QuestionCandy.png\")).getImage());\t\n\t}",
"protected void setPic() {\n }",
"private void addImg(File url) {\n if (url != null) {\n //On charge l'image en memoire dans la variable img\n panImg.chargerIMG(url);\n lstImg.addImg(panImg.getImg(), url);\n }\n }",
"@UiHandler(\"addObservatoryImage\")\r\n\tvoid onAddObservatoryImageClicked(ClickEvent event) {\r\n\t\tpresenter.goToCreateObservatoryActivity();\r\n\r\n\t}",
"private void addImage(ImageRegistry reg, String imagePath) {\n \n final Bundle bundle = Platform.getBundle(ID);\n \n final Path attachImgPath = new Path(imagePath);\n final ImageDescriptor attachImg = ImageDescriptor.createFromURL(\n FileLocator.find(bundle, attachImgPath, null));\n reg.put(imagePath, attachImg);\n \n }",
"private void jMenuItem1ActionPerformed(ActionEvent evt) {\n\n\t\tif (!entry.isDisabled) {\n\n\t\t\tBufferedImage selectedImage;\n\n\t\t\tJFileChooser _fileChooser = new JFileChooser();\n\t\t\tint retval = _fileChooser.showOpenDialog(Main.this);\n\n\t\t\t/**\n\t\t\t * extensions of images user is allowed to choose\n\t\t\t */\n\t\t\tfinal String[] okFileExtensions = new String[] { \"jpg\", \"png\", \"gif\", \"bmp\", \"jpeg\" };\n\t\t\tFile file;\n\n\t\t\tif (retval == JFileChooser.APPROVE_OPTION) {\n\t\t\t\ttry {\n\t\t\t\t\tfile = _fileChooser.getSelectedFile();\n\t\t\t\t\tBoolean flag = false;\n\t\t\t\t\tfor (String extension : okFileExtensions) {\n\t\t\t\t\t\tif (file.getName().toLowerCase().endsWith(extension)) {\n\t\t\t\t\t\t\toutputFile = file;\n\t\t\t\t\t\t\tfileExtension = extension;\n\t\t\t\t\t\t\tflag = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!flag) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(this, \"Please choose a jpg, jpeg, png, bmp or gif file only.\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tentry.SavedImages.clear();\n\t\t\t\t\tentry.RedoImages.clear();\n\t\t\t\t\tselectedImage = ImageIO.read(file);\n\t\t\t\t\tImage tmg = createImage(((Image) selectedImage).getWidth(this), ((Image) selectedImage).getHeight(this));\n\t\t\t\t\tGraphics tg = tmg.getGraphics();\n\t\t\t\t\ttg.drawImage(selectedImage, 0, 0, null);\n\t\t\t\t\tentry.SavedImages.push(selectedImage);\n\t\t\t\t\tentryImage = tmg;\n\t\t\t\t\tentry.showImage(entryImage);\n\t\t\t\t\tentry.setPreferredSize(new Dimension(entryImage.getWidth(this), entryImage.getHeight(this)));\n\t\t\t\t\tint w = Math.min(entryImage.getWidth(this) + 3, getContentPane().getWidth());\n\t\t\t\t\tint h = Math.min(entryImage.getHeight(this) + 3, getContentPane().getHeight());\n\t\t\t\t\tpictureScrollPane.setBounds((getContentPane().getWidth() - w) / 2, (getContentPane().getHeight() - h) / 2, w, h);\n\t\t\t\t\tpictureScrollPane.setViewportView(entry);\n\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\tLogger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public int addPicture(byte[] arg0, int arg1) {\n\t\treturn 0;\n\t}",
"public void setImage(Image img) {\r\n this.img = img;\r\n }",
"public void processAddImageOverlay() {\n PropertiesManager props = PropertiesManager.getPropertiesManager();\n\n // AND NOW ASK THE USER FOR THE FILE TO OPEN\n FileChooser fc = new FileChooser();\n fc.setInitialDirectory(new File(PATH_WORK));\n fc.setTitle(props.getProperty(LOAD_WORK_TITLE));\n File imageOverlayFile = fc.showOpenDialog(app.getGUI().getWindow());\n \n // SEND THE IMAGE FILE TO DATA MANAGER\n dataManager.setImageOverlayFile(imageOverlayFile);\n \n // CHANGE THE CURSOR\n Scene scene = app.getGUI().getPrimaryScene();\n scene.setCursor(Cursor.CROSSHAIR);\n \n // CHANGE THE STATE\n dataManager.setState(mmmState.ADD_IMAGE_MODE);\n }",
"String getImage();",
"private void setImageRestaurant(String type, ImageView imageView){\n\n switch (type){\n case Restaurante.TYPE_ITALIAN:\n imageView.setImageResource(R.drawable.italian);\n break;\n case Restaurante.TYPE_MEXICAN:\n imageView.setImageResource(R.drawable.mexicano);\n break;\n case Restaurante.TYPE_ASIAN:\n imageView.setImageResource(R.drawable.japones);\n break;\n case Restaurante.TYPE_BURGER :\n imageView.setImageResource(R.drawable.hamburguesa);\n break;\n case Restaurante.TYPE_TAKEAWAY :\n imageView.setImageResource(R.drawable.takeaway);\n default:\n imageView.setImageResource(R.drawable.restaurante);\n break;\n }\n\n }",
"@Override\r\n\tpublic int getImage() {\n\t\treturn Parametre.BALLE;\r\n\t}",
"public MakeProfile(){\r\n try{\r\n i = ImageIO.read(new File(\"../images/New Profile.png\"));\r\n repaint();\r\n }\r\n catch(IOException e){\r\n }\r\n \r\n }",
"public void setImg(String img) {\n this.img = img;\n }",
"public void setActiveImage() {\n\t\tsetGraphic(new ImageView(activePiece));\n\t\tisActiveImageOn = true;\t\t\n\t}",
"public void picLoader() {\n if (num==0){\n image.setImageResource(R.drawable.mario);\n }\n if(num==1){\n image.setImageResource(R.drawable.luigi);\n }\n if(num==2){\n image.setImageResource(R.drawable.peach);\n }\n if(num==3){\n image.setImageResource(R.drawable.rosalina);\n }\n }",
"public iAddCancion(int _id, String _miImagen) {\n this.id = _id;\n this.miImagen = _miImagen;\n initComponents();\n dameTodoAlbum(id);\n Image img = new ImageIcon(\"src/img/\"+miImagen).getImage();\n ImageIcon img2 = new ImageIcon(img.getScaledInstance(jLabelMiImagen.getWidth(), jLabelMiImagen.getHeight(), Image.SCALE_SMOOTH));\n\n jLabelMiImagen.setIcon(img2);\n }",
"public void numberImage(){\r\n\t\t//Randomly generated values displayed on the canvas\r\n\t\tString strArray = String.valueOf(Arrays.toString(randArray));\r\n\t\tstrArray = strArray.substring(1, strArray.length()-1).replace(\",\", \"\");\r\n\t\tnumberImage = new GLabel(strArray,250,250 );\r\n\t\tnumberImage.setColor(Color.green);\r\n\t\tnumberImage.setFont(\"Arial-40\");\r\n\t\tcanvas.add(numberImage);\r\n\t}",
"public void openImage() {\n InputStream f = Controller.class.getResourceAsStream(\"route.png\");\n img = new Image(f, mapImage.getFitWidth(), mapImage.getFitHeight(), false, true);\n h = (int) img.getHeight();\n w = (int) img.getWidth();\n pathNodes = new GraphNodeAL[h * w];\n mapImage.setImage(img);\n //makeGrayscale();\n }",
"private void btnBrowseActionPerformed(java.awt.event.ActionEvent evt) {\n String []imageTypes = new String[]{\".jpg\", \".png\", \".gif\"};\n\n if (imageFileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {\n getFileLocation = imageFileChooser.getSelectedFile();\n\n String getImageType = getFileLocation.getName();\n getImageType = getImageType.substring(getImageType.indexOf(\".\"));\n\n if (checkImageType(getImageType, imageTypes)) {\n\n lblImage.setIcon( new ImageIcon(new ImageIcon(getFileLocation.getAbsolutePath()).getImage().getScaledInstance(lblImage.getWidth(), lblImage.getHeight(), Image.SCALE_DEFAULT)));\n txtfImageLocation2.setText(getFileLocation.getName());\n\n } else {\n JOptionPane.showMessageDialog(this, \"invalid file type\", \"upload\", JOptionPane.ERROR_MESSAGE);\n }\n } else {\n JOptionPane.showMessageDialog(this, \"upload an image\", \"upload \", JOptionPane.ERROR_MESSAGE);\n }\n }",
"public void makeImage() {\n image = new GreenfootImage(\"highscoreb.png\");\n \n image.setFont(new Font(\"Arial\", false, false, 50));\n image.setColor(Color.WHITE);\n image.setFont(new Font(\"Arial\", false, false, 25));\n renderer.drawShadowString(image, name, 25, getHeight() - 50);\n setBackground(image);\n }",
"public Label getPic(){\n //try {//getPic is only called if isPic is true, so side1 would contain picture path\n /*BufferedImage unsized = ImageIO.read(new File(side1));\n BufferedImage resized = resizeImage(unsized,275,250, unsized.getType());\n frontPic.setIcon(new ImageIcon(resized));*/\n\n\t\t\tImage image = new Image(new File(side1).toURI().toString());\n\t\t\tImageView iv = new ImageView(image);\n\t\t\tLabel imageLabel = new Label(\"Image\");\n\t\t\timageLabel.setGraphic(iv);\n\t\t\treturn imageLabel;\n /*} catch (IOException ex) {\n System.out.println(\"Trouble reading from the file: \" + ex.getMessage());\n }\n return frontPic;*/\n }",
"public Mario(){\n setImage(\"06.png\");\n \n }",
"public void titleImage(){\r\n\t\tint x = 75;\r\n\t\tint y = 100;\r\n\t\t//Title is displayed\r\n\t\tString title = \"Ticket Master\";\r\n\t\ttitleImage = new GLabel(title,x,y);\r\n\t\ttitleImage.setColor(Color.green);\r\n\t\ttitleImage.setFont(\"Arial-100\");\r\n\t\tcanvas.add(titleImage);\r\n\t}",
"private void iconImage() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"icon.jpg\")));\n }",
"public void addImage(JLabel label) {\n\t\ttry {\n\t\t\tImage img = ImageIO.read(new File(\"Images/help.png\"));\n\t\t\tlabel.setIcon(new ImageIcon(img));\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t}\n\n\t\tthis.add( label, BorderLayout.CENTER );\n\t}",
"private void choseImage() {\n Intent intent = new Intent(Intent.ACTION_GET_CONTENT);\n intent.setType(\"image/*\");\n\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivityForResult(intent, GALLERY_REQ_CODE);\n } else {\n Toast.makeText(this, R.string.no_image_picker, Toast.LENGTH_SHORT).show();\n }\n }",
"private void drawImages() {\n\t\t\r\n\t}",
"private void createImageFiles() {\n\t\tswitchIconClosed = Icon.createImageIcon(\"/images/events/switchImageClosed.png\");\n\t\tswitchIconOpen = Icon.createImageIcon(\"/images/events/switchImageOpen.png\");\n\t\tswitchIconEmpty = Icon.createImageIcon(\"/images/events/switchImageEmpty.png\");\n\t\tswitchIconOff = Icon.createImageIcon(\"/images/events/switchImageOff.png\");\n\t\tswitchIconOn = Icon.createImageIcon(\"/images/events/switchImageOn.png\");\n\t\tleverIconClean = Icon.createImageIcon(\"/images/events/leverImageClean.png\");\n\t\tleverIconRusty = Icon.createImageIcon(\"/images/events/leverImageRusty.png\");\n\t\tleverIconOn = Icon.createImageIcon(\"/images/events/leverImageOn.png\");\n\t}"
]
| [
"0.7361306",
"0.7216157",
"0.71798766",
"0.70269704",
"0.6973207",
"0.6801188",
"0.6799555",
"0.67336375",
"0.67324996",
"0.6679115",
"0.664307",
"0.6622035",
"0.6602736",
"0.6589449",
"0.64988124",
"0.6493767",
"0.6488505",
"0.64446855",
"0.6425669",
"0.64099",
"0.6403192",
"0.64009875",
"0.63882375",
"0.6370314",
"0.6369481",
"0.63686615",
"0.63374364",
"0.6336132",
"0.6315703",
"0.6309223",
"0.63088816",
"0.630789",
"0.6293374",
"0.6288365",
"0.6259303",
"0.62571836",
"0.62427026",
"0.62224966",
"0.6201346",
"0.61794096",
"0.6175409",
"0.6171982",
"0.6171804",
"0.61686105",
"0.6146916",
"0.61463106",
"0.6144551",
"0.6132289",
"0.6126889",
"0.6126199",
"0.61189187",
"0.6118",
"0.6109878",
"0.61044234",
"0.61028486",
"0.61014295",
"0.6095575",
"0.60946643",
"0.6093057",
"0.6091543",
"0.6090787",
"0.6089187",
"0.6082141",
"0.6080198",
"0.607757",
"0.6076806",
"0.6071046",
"0.6069893",
"0.60671216",
"0.60588926",
"0.6057871",
"0.6056115",
"0.60526806",
"0.60507977",
"0.6050152",
"0.60459304",
"0.6032515",
"0.60178375",
"0.6012986",
"0.60100424",
"0.59999657",
"0.59995943",
"0.5995933",
"0.5992688",
"0.5991634",
"0.59851474",
"0.5983561",
"0.59809357",
"0.5980201",
"0.5973024",
"0.59722245",
"0.5967985",
"0.5967002",
"0.59573287",
"0.5953672",
"0.59478194",
"0.59423256",
"0.5933284",
"0.5930518",
"0.5928219",
"0.59200186"
]
| 0.0 | -1 |
Interface definition of the storage backend used. | public interface FileStoreInterface {
boolean isAuthenticated();
@Nullable
List<String> get(String path);
void archive(String path, List<String> lines);
void startLogin(Activity caller, int i);
void deauthenticate();
void browseForNewFile(Activity act, String path, FileSelectedListener listener, boolean txtOnly);
void modify(String mTodoName, List<String> original,
List<String> updated,
List<String> added,
List<String> removed);
int getType();
void setEol(String eol);
boolean isSyncing();
public boolean initialSyncDone();
void invalidateCache();
void sync();
String readFile(String file);
boolean supportsSync();
public interface FileSelectedListener {
void fileSelected(String file);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface IStorageManager {\n\n\tpublic String getStorageType();\n\n\tpublic String getStorageId();\n\n\tpublic void initialize(String configFile) throws Exception;\n}",
"public interface StorageModel {\n}",
"interface Storage {\n String getStorageSize() ;\n}",
"public interface Storage {\n\n String getId();\n}",
"public interface BlockStorageManagementController extends StorageController {\n\n /**\n * Add Storage system to SMIS Provider\n * \n * @param storage : URI of the storage system to add to the providers\n * @param providers : array of URIs where this system must be added\n * @param primaryProvider : indicate if the first provider in the list must\n * be treated as the active provider\n * @throws InternalException\n */\n public void addStorageSystem(URI storage, URI[] providers, boolean primaryProvider, String opId) throws InternalException;\n\n /**\n * Validate storage provider connection.\n * \n * @param ipAddress the ip address\n * @param portNumber the port number\n * @param interfaceType\n * @return true, if successful\n */\n public boolean validateStorageProviderConnection(String ipAddress, Integer portNumber, String interfaceType);\n}",
"public StorageUnit beStorageUnit();",
"OStorage getStorage();",
"public interface Storage extends ClientListStorage, UserPrefsStorage, PolicyListStorage {\n\n @Override\n Optional<UserPrefs> readUserPrefs() throws DataConversionException, IOException;\n\n @Override\n void saveUserPrefs(ReadOnlyUserPrefs userPrefs) throws IOException;\n\n @Override\n Path getClientListFilePath();\n\n @Override\n Optional<ReadOnlyClientList> readClientList() throws DataConversionException, IOException;\n\n @Override\n void saveClientList(ReadOnlyClientList clientList) throws IOException;\n\n @Override\n Path getPolicyListFilePath();\n\n @Override\n Optional<PolicyList> readPolicyList() throws DataConversionException, IOException;\n\n @Override\n void savePolicyList(PolicyList policyList) throws IOException;\n}",
"public interface DBStorage {\n \n /**\n * Get the name of the storage vendor (DB vendor name)\n *\n * @return name of the storage vendor (DB vendor name)\n */\n String getStorageVendor();\n \n /**\n * Can this storage handle the requested database?\n *\n * @param dbm database meta data\n * @return if storage can handle the requested database\n */\n boolean canHandle(DatabaseMetaData dbm);\n \n /**\n * Get the ContentStorage singleton instance\n *\n * @param mode used storage mode\n * @return ContentStorage singleton instance\n * @throws FxNotFoundException if no implementation was found\n */\n ContentStorage getContentStorage(TypeStorageMode mode) throws FxNotFoundException;\n \n /**\n * Get the EnvironmentLoader singleton instance\n *\n * @return EnvironmentLoader singleton instance\n */\n EnvironmentLoader getEnvironmentLoader();\n \n /**\n * Get the SequencerStorage singleton instance\n *\n * @return SequencerStorage singleton instance\n */\n SequencerStorage getSequencerStorage();\n \n /**\n * Get the TreeStorage singleton instance\n *\n * @return TreeStorage singleton instance\n */\n TreeStorage getTreeStorage();\n \n /**\n * Get the LockStorage singleton instance\n *\n * @return LockStorage singleton instance\n */\n LockStorage getLockStorage();\n \n /**\n * Get a data selector for a sql search\n *\n * @param search current SqlSearch to operate on\n * @return data selector\n * @throws FxSqlSearchException on errors\n */\n DataSelector getDataSelector(SqlSearch search) throws FxSqlSearchException;\n \n /**\n * Get a data filter for a sql search\n *\n * @param con an open and valid connection\n * @param search current SqlSearch to operate on\n * @return DataFilter\n * @throws FxSqlSearchException on errors\n */\n DataFilter getDataFilter(Connection con, SqlSearch search) throws FxSqlSearchException;\n \n /**\n * Get the CMIS SQL Dialect implementation\n *\n * @param environment environment\n * @param contentEngine content engine in use\n * @param query query\n * @param returnPrimitives return primitives?\n * @return CMIS SQL Dialect implementation\n */\n SqlDialect getCmisSqlDialect(FxEnvironment environment, ContentEngine contentEngine, CmisSqlQuery query, boolean returnPrimitives);\n \n /**\n * Get the database vendor specific Boolean expression\n *\n * @param flag the flag to get the expression for\n * @return database vendor specific Boolean expression for <code>flag</code>\n */\n String getBooleanExpression(boolean flag);\n \n /**\n * Get the boolean <code>true</code> expression string for the database vendor\n *\n * @return the boolean <code>true</code> expression string for the database vendor\n */\n String getBooleanTrueExpression();\n \n /**\n * Get the boolean <code>false</code> expression string for the database vendor\n *\n * @return the boolean <code>false</code> expression string for the database vendor\n */\n String getBooleanFalseExpression();\n \n /**\n * Escape reserved words properly if needed\n *\n * @param query the query to escape\n * @return escaped query\n */\n String escapeReservedWords(String query);\n \n /**\n * Get a database vendor specific \"IF\" function\n *\n * @param condition the condition to check\n * @param exprtrue expression if condition is true\n * @param exprfalse expression if condition is false\n * @return database vendor specific \"IF\" function\n */\n String getIfFunction(String condition, String exprtrue, String exprfalse);\n \n /**\n * Get the database vendor specific operator to query regular expressions\n *\n * @param column column to match\n * @param regexp regexp to match the column against\n * @return database vendor specific operator to query regular expressions\n */\n String getRegExpLikeOperator(String column, String regexp);\n \n /**\n * Get the database vendor specific statement to enable or disable referential integrity checks.\n * When in a transaction, be sure to check {@link #isDisableIntegrityTransactional()}\n * since not all databases support this in a transactional context.\n *\n * @param enable enable or disable checks?\n * @return database vendor specific statement to enable or disable referential integrity checks\n */\n String getReferentialIntegrityChecksStatement(boolean enable);\n \n /**\n * Return true if calling {@link #getReferentialIntegrityChecksStatement(boolean)} is possible\n * in a transactional context.\n *\n * @return true if calling {@link #getReferentialIntegrityChecksStatement(boolean)} is possible\n * in a transactional context\n */\n boolean isDisableIntegrityTransactional();\n \n /**\n * Get the sql code of the statement to fix referential integrity when removing selectlist items\n *\n * @return sql code of the statement to fix referential integrity when removing selectlist items\n */\n String getSelectListItemReferenceFixStatement();\n \n /**\n * Get a database vendor specific timestamp of the current time in milliseconds as Long\n *\n * @return database vendor specific timestamp of the current time in milliseconds as Long\n */\n String getTimestampFunction();\n \n /**\n * Get a database vendor specific concat statement\n *\n * @param text array of text to concatenate\n * @return concatenated text statement\n */\n String concat(String... text);\n \n /**\n * Get a database vendor specific concat_ws statement\n *\n * @param delimiter the delimiter to use\n * @param text array of text to concatenate\n * @return concatenated text statement\n */\n String concat_ws(String delimiter, String... text);\n \n /**\n * If a database needs a \" ... from dual\" to generate valid queries, it is returned here\n *\n * @return from dual (or equivalent) if needed\n */\n String getFromDual();\n \n /**\n * Get databas evendor specific limit statement\n *\n * @param hasWhereClause does the query already contain a where clause?\n * @param limit limit\n * @return limit statement\n */\n String getLimit(boolean hasWhereClause, long limit);\n \n /**\n * Get database vendor specific limit/offset statement\n *\n * @param hasWhereClause does the query already contain a where clause?\n * @param limit limit\n * @param offset offset\n * @return limit/offset statement\n */\n String getLimitOffset(boolean hasWhereClause, long limit, long offset);\n \n /**\n * Get database vendor specific limit/offset statement using the specified variable name\n *\n * @param var name of the variable to use\n * @param hasWhereClause does the query already contain a where clause?\n * @param limit limit\n * @param offset offset\n * @return limit/offset statement\n */\n String getLimitOffsetVar(String var, boolean hasWhereClause, long limit, long offset);\n \n /**\n * Get the statement to get the last content change timestamp\n *\n * @param live live version included?\n * @return statement to get the last content change timestamp\n */\n String getLastContentChangeStatement(boolean live);\n \n /**\n * Format a date to be used in a query condition (properly escaped)\n *\n * @param date the date to format\n * @return formatted date\n */\n String formatDateCondition(Date date);\n \n /**\n * Correctly escape a flat storage column if needed\n *\n * @param column name of the column\n * @return escaped column (if needed)\n */\n String escapeFlatStorageColumn(String column);\n \n /**\n * Returns true if the SqlError is a foreign key violation.\n *\n * @param exc the exception\n * @return true if the SqlError is a foreign key violation\n */\n boolean isForeignKeyViolation(Exception exc);\n \n /**\n * Returns true if the given exception was caused by a query timeout.\n *\n * @param e the exception to be examined\n * @return true if the given exception was caused by a query timeout\n * @since 3.1\n */\n boolean isQueryTimeout(Exception e);\n \n /**\n * Does the database rollback a connection if it encounters a constraint violation? (eg Postgres does...)\n *\n * @return database rollbacks a connection if it encounters a constraint violation\n */\n boolean isRollbackOnConstraintViolation();\n \n /**\n * Returns true if the SqlError is a unique constraint violation.\n *\n * @param exc the exception\n * @return true if the SqlError is a unique constraint violation\n */\n boolean isUniqueConstraintViolation(Exception exc);\n \n /**\n * Returns true if the given SqlException indicates a deadlock.\n *\n * @param exc the exception\n * @return true if the given SqlException indicates a deadlock.\n * @since 3.1\n */\n boolean isDeadlock(Exception exc);\n \n /**\n * When accessing the global configuration - does the config table has to be prefixed with the schema?\n * (eg in postgres no schemas are supported for JDBC URL's hence it is not required)\n *\n * @return access to configuration tables require the configuration schema to be prepended\n */\n boolean requiresConfigSchema();\n \n /**\n * Get a connection to the database using provided parameters and (re)create the database and/or schema\n *\n * @param database name of the database\n * @param schema name of the schema\n * @param jdbcURL JDBC connect URL\n * @param jdbcURLParameters optional JDBC URL parameters\n * @param user name of the db user\n * @param password password\n * @param createDB create the database?\n * @param createSchema create the schema?\n * @param dropDBIfExist drop the database if it exists?\n * @return an open connection to the database with the schema set as default\n * @throws Exception on errors\n */\n Connection getConnection(String database, String schema, String jdbcURL, String jdbcURLParameters, String user, String password, boolean createDB, boolean createSchema, boolean dropDBIfExist) throws Exception;\n \n /**\n * Initialize a configuration schema\n *\n * @param con an open and valid connection to the database\n * @param schema the schema to create\n * @param dropIfExist drop the schema if it exists?\n * @return success\n * @throws Exception on errors\n */\n boolean initConfiguration(Connection con, String schema, boolean dropIfExist) throws Exception;\n \n /**\n * Initialize a division\n *\n * @param con an open and valid connection to the database\n * @param schema the schema to create\n * @param dropIfExist drop the schema if it exists?\n * @return success\n * @throws Exception on errors\n */\n boolean initDivision(Connection con, String schema, boolean dropIfExist) throws Exception;\n \n /**\n * Export all data of a division to an OutputStream as ZIP\n *\n * @param con an open and valid connection to the database to be exported\n * @param out OutputStream that will be used to create the zip file\n * @throws Exception on errors\n */\n void exportDivision(Connection con, OutputStream out) throws Exception;\n \n /**\n * Import a complete division from a zip stream\n *\n * @param con an open and valid connection\n * @param zip zip archive that contains an exported divison\n * @throws Exception on errors\n */\n void importDivision(Connection con, ZipFile zip) throws Exception;\n }",
"public interface IStorageManager {\n public IStorageBook getValue(String key);\n\n public void addStorageBook(String key, IStorageBook book);\n\n public void clear();\n\n public boolean isEmpty();\n\n public void remove(String key);\n}",
"public interface StorageService {\n\n /**\n * List all the {@link Bucket}s in a given {@link com.google.openbidder.ui.entity.Project}.\n */\n List<Bucket> listAllBuckets(ProjectUser projectUser);\n\n /**\n * List all the objects in a given {@link Bucket}.\n */\n BucketContents listAllObjectsInBucket(ProjectUser projectUser, String bucketName);\n\n /**\n * List all objects in a given {@link Bucket} with a prefix.\n */\n BucketContents listAllObjectsInBucket(\n ProjectUser projectUser,\n String bucketName,\n String objectPrefix);\n\n /**\n * Remove the specified object.\n */\n void deleteObject(ProjectUser projectUser, String bucketName, String objectName);\n}",
"public Storage getStorage() {\n return this.storage;\n }",
"public interface SCStorage\r\n{\r\n\t/**\r\n\t * The server will register a driver before making any method calls\r\n\t *\r\n\t * @param driver the driver\r\n\t */\r\n\tpublic void setStorageServerDriver(SCStorageServerDriver driver);\r\n\r\n\t/**\r\n\t * Open the storage at the given path\r\n\t *\r\n\t * @param path path to the storage\r\n\t * @throws IOException errors\r\n\t */\r\n\tpublic void\topen(File path) throws IOException;\r\n\r\n\t/**\r\n\t * Return the object associated with the given key\r\n\t *\r\n\t * @param key the key\r\n\t * @return the object or null if not found\r\n\t * @throws IOException errors\r\n\t */\r\n\tpublic SCDataSpec get(String key) throws IOException;\r\n\r\n\t/**\r\n\t * Add an object to the storage\r\n\t *\r\n\t * @param key key\r\n\t * @param data object\r\n\t * @param groups associated groups or null\r\n\t */\r\n\tpublic void put(String key, SCDataSpec data, SCGroupSpec groups);\r\n\r\n\t/**\r\n\t * Close the storage. The storage instance will be unusable afterwards.\r\n\t *\r\n\t * @throws IOException errors\r\n\t */\r\n\tpublic void close() throws IOException;\r\n\r\n\t/**\r\n\t * Return the keys that match the given regular expression\r\n\t *\r\n\t * @param regex expression\r\n\t * @return matching keys\r\n\t */\r\n\tpublic Set<String> regexFindKeys(String regex);\r\n\r\n\t/**\r\n\t * Remove the given object\r\n\t *\r\n\t * @param key key of the object\r\n\t * @throws IOException errors\r\n\t */\r\n\tpublic void remove(String key) throws IOException;\r\n\r\n\t/**\r\n\t * sccache supports associative keys via {@link SCGroup}. This method deletes all objects\r\n\t * associated with the given group.\r\n\t *\r\n\t * @param group the group to delete\r\n\t * @return list of keys deleted.\r\n\t * @throws IOException errors\r\n\t */\r\n\tpublic List<String> removeGroup(SCGroup group) throws IOException;\r\n\r\n\t/**\r\n\t * sccache supports associative keys via {@link SCGroup}. This method lists all keys\r\n\t * associated with the given group.\r\n\t *\r\n\t * @param group the group to list\r\n\t * @return list of keys\r\n\t * @throws IOException errors\r\n\t */\r\n\tpublic List<String> listGroup(SCGroup group) throws IOException;\r\n\r\n\t/**\r\n\t * Returns storage statistics\r\n\t *\r\n\t * @param verbose if true, verbose stats are returned\r\n\t * @return list of stats\r\n\t * @throws IOException errors\r\n\t */\r\n\tpublic List<String> dumpStats(boolean verbose) throws IOException;\r\n\r\n\t/**\r\n\t * Write a tab delimited file with information about the key index\r\n\t *\r\n\t * @param f the file to write to\r\n\t * @throws IOException errors\r\n\t */\r\n\tpublic void writeKeyData(File f) throws IOException;\r\n}",
"public interface StorageService {\n\t\n\t/**\n\t * Storage.\n\t *\n\t * @param storage the storage\n\t * @return the storage state\n\t */\n\tpublic StorageState storage(ArrayList<StorageVO> storage);\n\t\n}",
"public interface IStorage extends Serializable {\n\n /**\n * Removes all stored values.\n */\n void clear();\n\n /**\n * Removes the value stored under the given key (if one exists).\n *\n * @return {@code true} if a successful.\n */\n StoragePrimitive remove(String key);\n\n /**\n * Adds all mappings in {@code val} to this storage object, overwriting any existing values.\n *\n * @see #addAll(String, IStorage)\n */\n void addAll(IStorage val);\n\n /**\n * Adds all mappings in {@code val} to this storage object, where all keys are prefixed with\n * {@code prefix}. Any existing values are overwritten.\n */\n void addAll(String prefix, IStorage val);\n\n /**\n * @return All stored keys.\n * @see #getKeys(String)\n */\n Collection<String> getKeys();\n\n /**\n * @return A collection of all stored keys matching the given prefix, or all stored keys if the prefix is\n * {@code null}.\n */\n Collection<String> getKeys(@Nullable String prefix);\n\n /**\n * @return {@code true} if this storage object contains a mapping for the given key.\n */\n boolean contains(String key);\n\n /**\n * Returns raw value stored under the given key.\n */\n StoragePrimitive get(String key);\n\n /**\n * Returns value stored under the given key converted to a boolean.\n *\n * @param defaultValue This value is returned instead if no value was stored under the given key, or if\n * the value couldn't be converted to the desired return type.\n * @see #getString(String, String)\n */\n boolean getBoolean(String key, boolean defaultValue);\n\n /**\n * Convenience method for retrieving a 32-bit signed integer. This is equivalent to calling\n * {@link IStorage#getDouble(String, double)} and casting the result to int.\n *\n * @see #getDouble(String, double)\n */\n int getInt(String key, int defaultValue);\n\n /**\n * Convenience method for retrieving a 64-bit signed integer. This is equivalent to calling\n * {@link IStorage#getDouble(String, double)} and casting the result to long.\n *\n * @see #getDouble(String, double)\n */\n long getLong(String keyTotal, long defaultValue);\n\n /**\n * Returns value stored under the given key converted to a double.\n *\n * @param defaultValue This value is returned instead if no value was stored under the given key, or if\n * the value couldn't be converted to the desired return type.\n * @see #getString(String, String)\n */\n double getDouble(String key, double defaultValue);\n\n /**\n * Returns value stored under the given key converted to a string.\n *\n * @param defaultValue This value is returned instead if no value was stored under the given key.\n */\n String getString(String key, String defaultValue);\n\n /**\n * Stores a value under the given key. If {@code null}, removes any existing mapping for the given key\n * instead.\n */\n void set(String key, @Nullable StoragePrimitive val);\n\n /**\n * Stores a boolean value under the given key.\n *\n * @see #setString(String, String)\n */\n void setBoolean(String key, boolean val);\n\n /**\n * Convenience method for storing an integer. All values are stored as double-precision floating point\n * internally.\n *\n * @see #setDouble(String, double)\n */\n void setInt(String key, int val);\n\n /**\n * Convenience method for storing a long. All values are stored as double-precision floating point\n * internally.\n *\n * @see #setDouble(String, double)\n */\n void setLong(String key, long val);\n\n /**\n * Stores a double-precision floating point value under the given key.\n *\n * @see #setString(String, String)\n */\n void setDouble(String key, double val);\n\n /**\n * Stores a string value under the given key.\n *\n * @param val The value to store. If {@code null}, removes any existing mapping for the given key instead.\n */\n void setString(String key, String val);\n\n}",
"@Override\n\tpublic void setStorage() {\n\t\tcom.setStorage(\"256g SSD\");\n\t}",
"public interface DistributeStorage<T> {\n public void store(String path, T t, boolean create) throws StorageException;\n\n public T get(String path, Class<T> tClass) throws StorageException;\n\n public void del(String path) throws StorageException;\n\n public boolean exist(String path) throws StorageException;\n}",
"public String getStoragePath() {\n return this.storagePath;\n }",
"public com.hps.july.persistence.StoragePlaceAccessBean getStorage() {\n\treturn storage;\n}",
"public DataStorage getDataStorage();",
"public short getStorageType() {\n\treturn storageType;\n }",
"protected abstract RegistryStorage storage();",
"public void setStorage(Storage storage) {\n this.storage = storage;\n }",
"public interface CameraStorage {\n\n /**\n * Lists all of support storage's type\n */\n public static enum STORAGE_TYPE {\n LOCAL_DEFAULT,\n REMOTE_DEFAULT //not implemented\n }\n\n /**\n * Sets the root path which can be a file description, uri, url for storage accessing\n *\n * @param root\n */\n public void setRoot(String root);\n\n /**\n * Gets the root path which is a file path, uri, url etc.\n *\n * @return\n */\n public String getRoot();\n\n /**\n * Saves a record to storage\n *\n * @param record\n * @return\n */\n public boolean save(CameraRecord record);\n\n /**\n * Gets a list of thumbnails which are used to represent the record that accessing from storage\n *\n * @return\n */\n public List<CameraRecord> loadThumbnail();\n\n /**\n * Loads a resource of record which can be a image or video\n *\n * @param record\n * @return\n */\n public Object loadResource(CameraRecord record);\n\n}",
"public DefaultStorage() {\n }",
"public interface StorageStats {\n\n /**\n * Returns storage usage for all resources.\n *\n * @return a list of storage resource usage objects\n */\n List<StorageResourceUsage> getStorageResourceUsage();\n\n /**\n * Returns the storage usage for the specified resource.\n *\n * @param resourceName the name of the resource\n * @return a storage resource usage object\n */\n StorageResourceUsage getStorageResourceUsage(String resourceName);\n\n\n long getTotalStorageUsage(DataCategory dataCategory);\n\n long getTotalStorageUsage(DataCategory dataCategory, String projectId);\n\n}",
"public interface IWritableStorage extends IStorage {\n\n\tpublic void setContents(InputStream source, IProgressMonitor monitor) throws CoreException;\n\t\n\tpublic IStatus validateEdit(Object context);\n}",
"@NonNull\n public StorageReference getStorage() {\n return getTask().getStorage();\n }",
"@Override\n\tpublic String getStorageLabel() {\n\t\treturn BusBehavior.class.getCanonicalName();\n\t}",
"public Integer supportedStorageGb() {\n return this.supportedStorageGb;\n }",
"public String storageAccount() {\n return this.storageAccount;\n }",
"public interface DataStore {\n\n Bucket loadBucket(String bucketName);\n\n List<Bucket> loadBuckets();\n\n void saveBucket(Bucket bucket);\n\n void deleteBucket(String bucketName);\n\n Blob loadBlob(String bucketName, String blobKey);\n\n List<Blob> loadBlobs(String bucketName);\n\n void saveBlob(String bucketName, Blob blob);\n\n void deleteBlob(String bucketName, String blobKey);\n}",
"String getStorageVendor();",
"public interface Storage {\n\n public Collection<Developers> values();\n\n public int add(final Developers developer);\n\n public void edit(final Developers developer);\n\n public void delete(final int id);\n\n public Developers get(final int id);\n\n public Developers findByName(String name);\n\n public void close();\n}",
"@Nullable public String getStorageKey() {\n return storageKey;\n }",
"@Nullable public String getStorageContext() {\n return storageContext;\n }",
"private StorageSystemConfiguration() {\r\n super(IStorageSystemConfiguration.TYPE_ID);\r\n }",
"public interface StorageService {\n\n /**\n * Return the ReplicatSet configuration (list of services able to pin a file)\n * @return ReplicaSet List of PinningService\n */\n Set<PinningService> getReplicaSet();\n \n /**\n * Write content on the storage layer\n * @param content InputStream\n * @param noPin Disable persistence, require to pin/persist asynchrounsly (can improve the writing performance)\n * @return Content ID (hash, CID)\n */\n String write(InputStream content, boolean noPin);\n\n /**\n * Write content on the storage layer\n * @param content Byte array\n * @param noPin Disable persistence, require to pin/persist asynchrounsly (can improve the writing performance)\n * @return Content ID (hash, CID)\n */\n String write(byte[] content, boolean noPin);\n\n /**\n * Read content from the storage layer and write it in a ByteArrayOutputStream\n * @param id Content ID (hash, CID\n * @return content\n */\n OutputStream read(String id);\n \n /**\n * Read content from the storage layer and write it the OutputStream provided\n * @param id Content ID (hash, CID\n * @param output OutputStream to write content to\n * @return Outputstream passed as argument\n */\n OutputStream read(String id, OutputStream output);\n}",
"public StorageLocation getStorageLocation() {\n return this.storageLocation;\n }",
"public interface IStorageService {\n List<Storage> findStorageList();\n}",
"protected void setStorage(IStorage aStorage)\n\t{\n\n\t\tthis.storage = aStorage;\n\t}",
"public KVCommInterface getStore();",
"public JStorage storage() {\n return new JStorage(TH.THTensor_(storage)(this));\n }",
"public interface Backend {\n\t\n\t/**\n\t * read a user from storage into memory\n\t * @param id - the user's id to be read from storage\n\t * @return \n\t */\n\tpublic User read(String id);\n\t\n\t/**\n\t * write a user to storage\n\t * @param id - the user's id to be written to storage\n\t */\n\tpublic void write(String id);\n\t\n\t/**\n\t * add an user\n\t * @param user - the user to be added\n\t * @return true on success, false otherwise\n\t */\n\tpublic boolean addUser(User user);\n\t/**\n\t * delete an user\n\t * @param id - the id of user to be deleted\n\t * @return true on success, false otherwise\n\t */\n\tpublic boolean deleteUser(String id);\n\t\n\t\n\t/**\n\t * @return a list of existing users\n\t */\n\tpublic List<User> getUsers();\n}",
"@Override\n public boolean isStorageConnected() {\n return true;\n }",
"public IntegerStorage getiStorage() {\n\t\treturn iStorage;\n\t}",
"public IntegerStorage getiStorage() {\n\t\treturn iStorage;\n\t}",
"@NonnullAfterInit public StorageSerializer getStorageSerializer() {\n return storageSerializer;\n }",
"BlobStore getBlobStore();",
"public TFileStorageType getFileStorageType() {\n\n\t\treturn fileStorageType;\n\t}",
"public interface IDocumentStorage<L> {\n\t/**\n\t * Returns the current location (of the current document).\n\t * @return the current location\n\t */\n\tpublic L getDocumentLocation();\n\n\t/**\n\t * Sets the current location (of the current document), can be used by a save-as action.\n\t * @param documentLocation\n\t */\n\tpublic void setDocumentLocation(L documentLocation);\n\n\t/**\n\t * Adds an IDocumentStorageListener that will be notified when the current location changes.\n\t * @param documentStorageListener\n\t */\n\n\tpublic void addDocumentStorageListener(IDocumentStorageListener<L> documentStorageListener);\n\t/**\n\t * Removes an IDocumentStorageListener.\n\t * @param documentStorageListener\n\t */\n\tpublic void removeDocumentStorageListener(IDocumentStorageListener<L> documentStorageListener);\n\n\t/**\n\t * Creates a new documents and sets it as the current one, can be used by a new action.\n\t */\n\tpublic void newDocument();\n\n\t/**\n\t * Loads a documents from the provided location and sets it as the current one, can be used by an open action.\n\t */\n\tpublic void openDocument(L documentLocation) throws IOException;\n\n\t/**\n\t * Saves the current document (to the current location), can be used by a save action.\n\t */\n\tpublic void saveDocument() throws IOException;\n\n\t/**\n\t * Returns the set of IDocumentImporters, can be used by an import action.\n\t * @return\n\t */\n\tpublic Collection<IDocumentImporter> getDocumentImporters();\n}",
"public interface InternalStorageInterface {\n\n boolean isUserLogged();\n\n void saveToken(String token);\n\n void saveUser(User user);\n\n User getUser();\n\n String getToken();\n\n void onLogOut();\n\n void saveProductId (Integer id);\n\n int getProductId();\n\n}",
"public java.lang.Boolean getStoragePolicySupported() {\r\n return storagePolicySupported;\r\n }",
"@Override\r\n\tpublic void addStorageUnit() {\r\n\t}",
"LockStorage getLockStorage();",
"public String getStorageRegion() {\n return this.StorageRegion;\n }",
"public interface StorageFactory {\n\n\t<T> List<T> createList();\n\t\n\t<T> Set<T> createSet();\n\t\n\t<V> Map<Character, V> createMap();\n\t\n}",
"public StorageAccount storageAccount() {\n return this.storageAccount;\n }",
"public StorageAccount storageAccount() {\n return this.storageAccount;\n }",
"String backend();",
"public StorageClassEnum getBucketStorageClass()\n {\n return storageClass;\n }",
"public void setStorageLocation(String storageLocation) {\n this.storageLocation = storageLocation;\n }",
"public interface SerializableStorage {\n\n /**\n * Method to save the binary data\n *\n * @param uuid identifier for the data\n * @param context binary data to save\n * @throws FailedToStoreDataInStorage in case when storage has failed to save the data\n */\n void store(UUID uuid, byte[] context) throws FailedToStoreDataInStorage;\n\n /**\n * Method to retrieve stored data\n *\n * @param uuid identifier for the data\n * @return binary data\n * @throws FailedToRetrieveStorageData in case when storage has faile to retrieve the data\n * @throws DataNotFoundInStorage in case when data has not been found\n */\n byte[] retrieve(UUID uuid) throws FailedToRetrieveStorageData, DataNotFoundInStorage;\n\n /**\n * Method to delete stored data from storage\n *\n * @param uuid identifier for the data\n * @throws DataNotFoundInStorage in case when data has not been found\n * @throws FailedToDeleteDataInStorage in case when storage has failed to delete the data\n */\n void delete(UUID uuid) throws DataNotFoundInStorage, FailedToDeleteDataInStorage;\n\n /**\n * Method to retrieve an occupied data size. Lets suppose it measured in bytes\n * @return occupied place size in bytes\n */\n long getOccupiedSize();\n}",
"public HashMap<String, T> getStorage();",
"public interface StorageCallbacks {\n void onNewTrip(Trip trip);\n void onUpdatedTrip(Trip updatedTrip);\n void onDeletedTrip(String deletedTripId);\n void onFullRefresh();\n}",
"public void setStorageServerDriver(SCStorageServerDriver driver);",
"public Integer getStorageSize() {\n\t return this.storageSize;\n\t}",
"com.google.privacy.dlp.v2.CloudStorageOptions getCloudStorageOptions();",
"public IStorage getStorage() throws CoreException\n\t{\n\n\t\treturn this.storage;\n\t}",
"public final StorageType mo102949f() {\n return StorageType.CACHE;\n }",
"public VPlexStorageVolumeInfo getStorageVolumeInfo() {\n return storageVolumeInfo;\n }",
"public interface FileSystemConfig {\n\n}",
"private InternalStorage() {}",
"public interface Storage {\n String SPLITTER = \" &&& \";\n\n /**\n * Gets the list of tasks held by the storage.\n * @return the list of tasks\n */\n TaskList getList();\n\n /**\n * Writes the task to the storage file.\n * @param task the task that is to be written in the task\n * @throws InvalidCommandException should never been thrown unless the file path is not working\n */\n void addToList(Task task) throws InvalidCommandException;\n\n /**\n * Re-writes the storage file because of deletion or marking-as-done executed.\n * @param list the new task list used for updating the storage file\n * @throws InvalidCommandException should never been thrown unless the file path is not working\n */\n void reWrite(TaskList list) throws InvalidCommandException;\n}",
"void saveStorage(StorageEntity storage);",
"public interface ExternalBlobIO {\n /**\n * Write data to blob store\n * @param in: InputStream containing data to be written\n * @param actualSize: size of data in stream, or -1 if size is unknown. To be used by implementor for optimization where possible\n * @param mbox: Mailbox which contains the blob. Can optionally be used by store for partitioning\n * @return locator string for the stored blob, unique identifier created by storage protocol\n * @throws IOException\n * @throws ServiceException\n */\n String writeStreamToStore(InputStream in, long actualSize, Mailbox mbox) throws IOException, ServiceException;\n\n /**\n * Create an input stream for reading data from blob store\n * @param locator: identifier string for the blob as returned from write operation\n * @param mbox: Mailbox which contains the blob. Can optionally be used by store for partitioning\n * @return InputStream containing the data\n * @throws IOException\n */\n InputStream readStreamFromStore(String locator, Mailbox mbox) throws IOException;\n\n /**\n * Delete a blob from the store\n * @param locator: identifier string for the blob\n * @param mbox: Mailbox which contains the blob. Can optionally be used by store for partitioning\n * @return true on success false on failure\n * @throws IOException\n */\n boolean deleteFromStore(String locator, Mailbox mbox) throws IOException;\n}",
"public int getItemStorage() {\n return itemStorage_;\n }",
"StorageEntity getStorageById(Integer id);",
"public StorageProfile storageProfile() {\n return this.storageProfile;\n }",
"public int getItemStorage() {\n return itemStorage_;\n }",
"@java.lang.Deprecated\n public io.kubernetes.client.openapi.models.V1StorageOSPersistentVolumeSource getStorageos();",
"@Nullable\n BigInteger getStorageGb();",
"Map<String, Object> getStorageInputMap() {\n return this.storageInputMap;\n }",
"public StorageConfig() {\n }",
"java.lang.String getArtifactStorage();",
"public StorageConfiguration() {\n }",
"public interface StorageListener {\n\n /***\n * <p>Event listener for all starge node changes.</p>\n *\n * @param event the type of event causing the call\n * @param oldNode the old node content\n * @param newNode the new node content\n */\n void gotStorageChange(EventType event, Node oldNode, Node newNode);\n\n}",
"public interface BlobStore {\n\n /**\n * Validation pattern for namespace.\n */\n public static Pattern VALID_NAMESPACE_PATTERN = Pattern.compile(\"[A-Za-z0-9_-]+\");\n\n\n /**\n * Validation pattern for id.\n */\n public static Pattern VALID_ID_PATTERN = Pattern.compile(\"[A-Za-z0-9_.:-]+\");\n\n /**\n * Store a new object inside the blob store.\n *\n * @param namespace Namespace of the object.\n * @param id Id of the object.\n * @param version Version of the object.\n * @param content The actual content.\n * @throws StageException\n */\n public void store(String namespace, String id, long version, String content) throws StageException;\n\n /**\n * Return latest version for given object.\n *\n * @param namespace Namespace of the object.\n * @param id Id of the object.\n * @return Latest version (usual integer comparison)\n * @throws StageException\n */\n public long latestVersion(String namespace, String id) throws StageException;\n\n /**\n * Validates if given object exists on at least one version.\n *\n * @param namespace Namespace of the object.\n * @param id Id of the object.\n * @return If given object in given namespace exists\n */\n public boolean exists(String namespace, String id);\n\n /**\n * Validates if given object exists on given version.\n *\n * @param namespace Namespace of the object.\n * @param id Id of the object.\n * @param version Version of the object.\n * @return If given object on given in given namespace exists\n */\n public boolean exists(String namespace, String id, long version);\n\n /**\n * Return all versions associated with given object.\n *\n * @param namespace Namespace of the object.\n * @param id Id of the object.\n * @return Set of all stored versions.\n * @throws StageException\n */\n public Set<Long> allVersions(String namespace, String id);\n\n /**\n * Retrieve given object.\n *\n * @param namespace Namespace of the object.\n * @param id Id of the object.\n * @param version Version of the object.\n * @return Object itself\n * @throws StageException\n */\n public String retrieve(String namespace, String id, long version) throws StageException;\n\n /**\n * Sub-interface to encapsulate tuple of content with it's version.\n */\n public interface VersionedContent {\n /**\n * Version of the content.\n */\n long version();\n\n /**\n * Actual content\n */\n String content();\n }\n\n /**\n * Convenience method to return latest version for given object.\n *\n * @param namespace Namespace of the object.\n * @param id Id of the object.\n * @return Object itself\n * @throws StageException\n */\n public VersionedContent retrieveLatest(String namespace, String id) throws StageException;\n\n /**\n * Delete given object from the store.\n *\n * @param namespace Namespace of the object.\n * @param id Id of the object.\n * @param version Version of the object.\n * @throws StageException\n */\n public void delete(String namespace, String id, long version) throws StageException;\n\n /**\n * Delete all versions of given object.\n *\n * @param namespace Namespace of the object.\n * @param id Id of the object.\n * @throws StageException\n */\n public void deleteAllVersions(String namespace, String id) throws StageException;\n}",
"public long getUsedStorage() {\n return usedStorage;\n }",
"public void setStorageLocation(StorageLocation storageLocation) {\n this.storageLocation = storageLocation;\n }",
"public static Object getInternalStorageDirectory() {\n\n FileObject root = Repository.getDefault().getDefaultFileSystem().getRoot();\n\n //FileObject dir = root.getFileObject(\"Storage\");\n \n //return dir;\n return null;\n }",
"public void setStorage(String storage) {\n if (storage == null || storage.equals(\"\") || storage.equals(\" \")) {\n throw new IllegalArgumentException(\"storage must be provided\");\n }\n this.storage = storage;\n }",
"int getItemStorage();",
"public interface SessionStorage extends Closeable {\n\n\t/** Allocate an identifier, but nothing is stored until it is saved.\n\t * However if the session is not used, the identifier must be freed by calling the remove method. */\n\tString allocateId() throws SessionStorageException;\n\t\n\t/** Load a session, returns false if the session does not exist or expired. */\n\tAsyncSupplier<Boolean, SessionStorageException> load(String id, ISession session);\n\t\n\t/** Remove a session, which must not be loaded. */\n\tvoid remove(String id);\n\t\n\t/** Release a session without saving. */\n\tvoid release(String id);\n\t\n\t/** Save a session. */\n\tIAsync<SessionStorageException> save(String id, ISession session);\n\t\n\t/** Return the time in milliseconds after a session expires, 0 or negative value means never. */\n\tlong getExpiration();\n\t\n}",
"public String getStorageLocation() {\n\t\treturn io.getFile();\n\t}",
"public StorageManagerImpl()\n {\n if (log.isDebugEnabled())\n {\n log.debug(\"Creating Instance of StorageManagerImpl\");\n }\n storageProxyHolder = new Hashtable();\n\n try\n {\n initializeStorageProxies();\n nRegister();\n }\n catch (Throwable throwable)\n {\n if (log.isErrorEnabled())\n {\n log.error(\"Failed to create StorageManager object\", throwable);\n }\n throwable.printStackTrace();\n }\n }",
"public Long getStorageRecordId() {\n return storageRecordId;\n }",
"public interface IStore<T> {\t\n\t\n\tpublic final static int default_capacity = 999;\t\n\t\n\tpublic int getSize(); //Return the number of objects stored\n\t//public void setSizer(IStoreSizer storeSizer); //Allows for size to be determined by an external party. \n\tpublic T get(int index); // Return the object stored at the corresponding index value\n\tpublic int getCapacity(); //Return the maximum number of IRegisteredParcel objects that can be stored by this Store\n\tpublic T put(int index, T t); //Place input Object at the specified index and return existing object\n\tpublic void clear(); //return oldStore and set new . used for Clearing the store.\n\tpublic IStore<T> clone(); //Return a clone of the current store that is an image frozen at invocation time.\n}",
"public void setStorageType(short type) {\n\tstorageType = type;\n }",
"public interface WxOpenConfigStorage {\n\n /**\n * Gets component app id.\n *\n * @return the component app id\n */\n String getComponentAppId();\n\n /**\n * Sets component app id.\n *\n * @param componentAppId the component app id\n */\n void setComponentAppId(String componentAppId);\n\n /**\n * Gets component app secret.\n *\n * @return the component app secret\n */\n String getComponentAppSecret();\n\n /**\n * Sets component app secret.\n *\n * @param componentAppSecret the component app secret\n */\n void setComponentAppSecret(String componentAppSecret);\n\n /**\n * Gets component token.\n *\n * @return the component token\n */\n String getComponentToken();\n\n /**\n * Sets component token.\n *\n * @param componentToken the component token\n */\n void setComponentToken(String componentToken);\n\n /**\n * Gets component aes key.\n *\n * @return the component aes key\n */\n String getComponentAesKey();\n\n /**\n * Sets component aes key.\n *\n * @param componentAesKey the component aes key\n */\n void setComponentAesKey(String componentAesKey);\n\n /**\n * Gets component verify ticket.\n *\n * @return the component verify ticket\n */\n String getComponentVerifyTicket();\n\n /**\n * Sets component verify ticket.\n *\n * @param componentVerifyTicket the component verify ticket\n */\n void setComponentVerifyTicket(String componentVerifyTicket);\n\n /**\n * Gets component access token.\n *\n * @return the component access token\n */\n String getComponentAccessToken();\n\n /**\n * Is component access token expired boolean.\n *\n * @return the boolean\n */\n boolean isComponentAccessTokenExpired();\n\n /**\n * Expire component access token.\n */\n void expireComponentAccessToken();\n\n /**\n * Update component access token.\n *\n * @param componentAccessToken the component access token\n */\n void updateComponentAccessToken(WxOpenComponentAccessToken componentAccessToken);\n\n /**\n * Gets http proxy host.\n *\n * @return the http proxy host\n */\n String getHttpProxyHost();\n\n /**\n * Gets http proxy port.\n *\n * @return the http proxy port\n */\n int getHttpProxyPort();\n\n /**\n * Gets http proxy username.\n *\n * @return the http proxy username\n */\n String getHttpProxyUsername();\n\n /**\n * Gets http proxy password.\n *\n * @return the http proxy password\n */\n String getHttpProxyPassword();\n\n /**\n * http 请求重试间隔\n * <pre>\n * {@link me.chanjar.weixin.mp.api.impl.BaseWxMpServiceImpl#setRetrySleepMillis(int)}\n * {@link cn.binarywang.wx.miniapp.api.impl.BaseWxMaServiceImpl#setRetrySleepMillis(int)}\n * </pre>\n */\n int getRetrySleepMillis();\n\n /**\n * http 请求最大重试次数\n * <pre>\n * {@link me.chanjar.weixin.mp.api.impl.BaseWxMpServiceImpl#setMaxRetryTimes(int)}\n * {@link cn.binarywang.wx.miniapp.api.impl.BaseWxMaServiceImpl#setMaxRetryTimes(int)}\n * </pre>\n */\n int getMaxRetryTimes();\n\n /**\n * Gets apache http client builder.\n *\n * @return the apache http client builder\n */\n ApacheHttpClientBuilder getApacheHttpClientBuilder();\n\n /**\n * Gets wx mp config storage.\n *\n * @param appId the app id\n * @return the wx mp config storage\n */\n WxMpConfigStorage getWxMpConfigStorage(String appId);\n\n /**\n * Gets wx ma config.\n *\n * @param appId the app id\n * @return the wx ma config\n */\n WxMaConfig getWxMaConfig(String appId);\n\n /**\n * Gets component access token lock.\n *\n * @return the component access token lock\n */\n Lock getComponentAccessTokenLock();\n\n /**\n * Gets lock by key.\n *\n * @param key the key\n * @return the lock by key\n */\n Lock getLockByKey(String key);\n\n /**\n * 应该是线程安全的\n *\n * @param componentAccessToken 新的accessToken值\n * @param expiresInSeconds 过期时间,以秒为单位\n */\n void updateComponentAccessToken(String componentAccessToken, int expiresInSeconds);\n\n /**\n * 是否自动刷新token\n *\n * @return the boolean\n */\n boolean autoRefreshToken();\n\n /**\n * Gets authorizer refresh token.\n *\n * @param appId the app id\n * @return the authorizer refresh token\n */\n String getAuthorizerRefreshToken(String appId);\n\n /**\n * Sets authorizer refresh token.\n *\n * @param appId the app id\n * @param authorizerRefreshToken the authorizer refresh token\n */\n void setAuthorizerRefreshToken(String appId, String authorizerRefreshToken);\n\n /**\n * setAuthorizerRefreshToken(String appId, String authorizerRefreshToken) 方法重载方法\n *\n * @param appId the app id\n * @param authorizerRefreshToken the authorizer refresh token\n */\n void updateAuthorizerRefreshToken(String appId, String authorizerRefreshToken);\n\n /**\n * Gets authorizer access token.\n *\n * @param appId the app id\n * @return the authorizer access token\n */\n String getAuthorizerAccessToken(String appId);\n\n /**\n * Is authorizer access token expired boolean.\n *\n * @param appId the app id\n * @return the boolean\n */\n boolean isAuthorizerAccessTokenExpired(String appId);\n\n /**\n * 强制将access token过期掉\n *\n * @param appId the app id\n */\n void expireAuthorizerAccessToken(String appId);\n\n /**\n * 应该是线程安全的\n *\n * @param appId the app id\n * @param authorizerAccessToken 要更新的WxAccessToken对象\n */\n void updateAuthorizerAccessToken(String appId, WxOpenAuthorizerAccessToken authorizerAccessToken);\n\n /**\n * 应该是线程安全的\n *\n * @param appId the app id\n * @param authorizerAccessToken 新的accessToken值\n * @param expiresInSeconds 过期时间,以秒为单位\n */\n void updateAuthorizerAccessToken(String appId, String authorizerAccessToken, int expiresInSeconds);\n\n /**\n * Gets jsapi ticket.\n *\n * @param appId the app id\n * @return the jsapi ticket\n */\n String getJsapiTicket(String appId);\n\n /**\n * Is jsapi ticket expired boolean.\n *\n * @param appId the app id\n * @return the boolean\n */\n boolean isJsapiTicketExpired(String appId);\n\n /**\n * 强制将jsapi ticket过期掉\n *\n * @param appId the app id\n */\n void expireJsapiTicket(String appId);\n\n /**\n * 应该是线程安全的\n *\n * @param appId the app id\n * @param jsapiTicket 新的jsapi ticket值\n * @param expiresInSeconds 过期时间,以秒为单位\n */\n void updateJsapiTicket(String appId, String jsapiTicket, int expiresInSeconds);\n\n /**\n * Gets card api ticket.\n *\n * @param appId the app id\n * @return the card api ticket\n */\n String getCardApiTicket(String appId);\n\n\n /**\n * Is card api ticket expired boolean.\n *\n * @param appId the app id\n * @return the boolean\n */\n boolean isCardApiTicketExpired(String appId);\n\n /**\n * 强制将卡券api ticket过期掉\n *\n * @param appId the app id\n */\n void expireCardApiTicket(String appId);\n\n /**\n * 应该是线程安全的\n *\n * @param appId the app id\n * @param cardApiTicket 新的cardApi ticket值\n * @param expiresInSeconds 过期时间,以秒为单位\n */\n void updateCardApiTicket(String appId, String cardApiTicket, int expiresInSeconds);\n\n /**\n * 设置第三方平台基础信息\n *\n * @param componentAppId 第三方平台 appid\n * @param componentAppSecret 第三方平台 appsecret\n * @param componentToken 消息校验Token\n * @param componentAesKey 消息加解密Key\n */\n void setWxOpenInfo(String componentAppId, String componentAppSecret, String componentToken, String componentAesKey);\n}"
]
| [
"0.7593782",
"0.7546623",
"0.721929",
"0.6959119",
"0.693427",
"0.6906994",
"0.6891492",
"0.67729455",
"0.67664033",
"0.6762321",
"0.6728626",
"0.66663355",
"0.6511549",
"0.6404725",
"0.6370931",
"0.6361312",
"0.6329479",
"0.631542",
"0.6283259",
"0.62804544",
"0.62798244",
"0.62606287",
"0.6237499",
"0.622624",
"0.6206991",
"0.62045133",
"0.61799765",
"0.6136506",
"0.6136013",
"0.6119177",
"0.61170727",
"0.61033446",
"0.60962397",
"0.6090649",
"0.6082829",
"0.6066642",
"0.6044847",
"0.6039071",
"0.6005284",
"0.60045266",
"0.59986037",
"0.59937274",
"0.5973866",
"0.5965232",
"0.5956235",
"0.59495294",
"0.59495294",
"0.59391",
"0.59354466",
"0.592058",
"0.5903841",
"0.59006596",
"0.5883559",
"0.5865845",
"0.5863968",
"0.5861168",
"0.58468485",
"0.5844502",
"0.5844502",
"0.5836227",
"0.5834792",
"0.58310056",
"0.5810837",
"0.57905895",
"0.5789948",
"0.5778566",
"0.57779604",
"0.57702553",
"0.57684547",
"0.5760739",
"0.5756318",
"0.5754192",
"0.57454324",
"0.5741987",
"0.5739292",
"0.57219505",
"0.57027453",
"0.56983316",
"0.5698265",
"0.56774265",
"0.56773144",
"0.5651416",
"0.56494665",
"0.56436896",
"0.56430626",
"0.56427336",
"0.5632284",
"0.56320167",
"0.5616425",
"0.5615657",
"0.5603228",
"0.55957997",
"0.5593358",
"0.5588306",
"0.55870706",
"0.5586891",
"0.558371",
"0.5577915",
"0.5564663",
"0.5564006"
]
| 0.6077634 | 35 |
Zakladny konstruktor dolezity pri volani newInstance pri vytvarani kopii objektu. | public ItemMenu() {
super(null, null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }",
"Reproducible newInstance();",
"public Kullanici() {}",
"private void __sep__Constructors__() {}",
"public SlanjePoruke() {\n }",
"Klassenstufe createKlassenstufe();",
"public Propuestas() {}",
"public TebakNusantara()\n {\n }",
"public ControllerProtagonista() {\n\t}",
"public CarWashConfigPK() {\n }",
"public CMObject newInstance();",
"private Params()\n {\n }",
"public Pasien() {\r\n }",
"private Instantiation(){}",
"public Propiedad(){\n\t}",
"public ProduktController() {\r\n }",
"public Veiculo() {\r\n\r\n }",
"public Parameters() {\n\t}",
"private ConfigProperties() {\n\n }",
"private PerksFactory() {\n\n\t}",
"public prueba()\r\n {\r\n }",
"public OVChipkaart() {\n\n }",
"private Conf() {\n // empty hidden constructor\n }",
"public Aktie() {\n }",
"public KeyVaultProperties() {\n }",
"public ParameterizedInstantiateFactory() {\r\n super();\r\n }",
"public Pitonyak_09_02() {\r\n }",
"private Builder()\n {\n }",
"public Vehiculo() {\r\n }",
"private ObiWanKenobi(){\n }",
"public PanoramaConfig() {\n }",
"private DTOFactory() {\r\n \t}",
"public Properties(){\n\n }",
"public TipoInformazioniController() {\n\n\t}",
"public Producto (){\n\n }",
"private Builder() {\n }",
"private Builder() {\n }",
"public Kendaraan() {\n }",
"private VegetableFactory() {\n }",
"public Postoj() {}",
"private StickFactory() {\n\t}",
"public AntrianPasien() {\r\n\r\n }",
"public NhanVien()\n {\n }",
"public Nota() {\n }",
"public void crearAutomovil(){\r\n automovil = new Vehiculo();\r\n automovil.setMarca(\"BMW\");\r\n automovil.setModelo(2010);\r\n automovil.setPlaca(\"TWS435\");\r\n }",
"public TmKabupaten() {\n\t}",
"public Kanban() {\r\n\t}",
"public Pizza() {\n this(\"small\", 1, 1, 1);\n }",
"public ProdutoDTO()\n {\n super();\n }",
"public ProductoDTO(){\r\n\t\t\r\n\t}",
"public Produto() {}",
"public Alojamiento() {\r\n\t}",
"public ObjectFactoryMenu() {\n }",
"public CrearQuedadaVista() {\n }",
"public StratmasParameterFactory() \n {\n this.typeMapping = createTypeMapping();\n }",
"public Kreditkarte(){\n\t\n\t}",
"public Persona(){\n \n }",
"public Persona(){\n \n }",
"public Ov_Chipkaart() {\n\t\t\n\t}",
"public Venda() {\n }",
"public BaseParameters(){\r\n\t}",
"public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }",
"public Producto() {\r\n }",
"public Overview() {\n\t\t// It will work whenever i create object with using no parameter const\n\t\tSystem.out.println(\"This is constructor\");\n\t}",
"public Transportista() {\n }",
"public EnvioPersonaPK() {\r\n }",
"public ObjectFactory() {\n\t}",
"public KorisniciREST() {\n }",
"public PrnPrivitakVo() {\r\n\t\tsuper();\r\n\t}",
"public AfiliadoVista() {\r\n }",
"public Constructor(){\n\t\t\n\t}",
"public Musik(){}",
"private ObjectFactory() { }",
"private Builder() {\n super(tr.com.siparis.sistemi.kafka.model.Kullanici.SCHEMA$);\n }",
"private OptimoveConfig() {\n }",
"private Builder() {\n\t\t}",
"public T newInstance();",
"public Car(){\n\t\t\n\t}",
"public ConfigExample() {\n }",
"public AtributoAsientoBean() {\n }",
"private Builder() {}",
"public ViatgesDTO() {\n \n }",
"public Exercicio(){\n \n }",
"public ObjectFactory() {\r\n\t}",
"@Test\n\tpublic void testCtor() {\n\t\tSnacksHot nachos = new SnacksHot(\"Chips\", 3, \"100gr\", \"img/icons/box.png\");\n\t\ttry {\n\t\t\tSnacksHot k = new SnacksHot(\"Chips\", 3, \"100gr\", \"img/icons/box.png\");\n\t\t\tassertNotEquals(null, k);\n\t\t\tassertEquals(\"object should be created with valid Nachos\", nachos, k.getName());\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tfail(\"died calling ctor\");\n\t\t}\n\t}",
"private ConfigurationKeys() {\n // empty constructor.\n }",
"public Plato(){\n\t\t\n\t}",
"public Object createNew(String typename, Object... args) \n\t\tthrows \tIllegalAccessException, \n\t\t\tInstantiationException, \n\t\t\tClassNotFoundException,\n\t\t\tNoSuchMethodException,\n\t\t\tInvocationTargetException \n\t{\n\t\tswitch(args.length) \n\t\t{\n\t\tcase 1 : return Class.forName(typename).getConstructor(args[0].getClass()).newInstance(args[0]);\n\t\tcase 2 : return Class.forName(typename).getConstructor(args[0].getClass(), args[1].getClass()).\n\t\t\tnewInstance(args[0], args[1]);\n\t\t}\n\t\treturn null;\n\t}",
"public Oveja() {\r\n this.nombreOveja = \"Oveja\";\r\n }",
"public Odontologo() {\n }",
"public Persona() {\n\t}",
"public ObjectFactory() {}",
"public ObjectFactory() {}",
"public ObjectFactory() {}",
"public PokemonPark(){\n super(\"Pokemon Park\", \"Una vez por turno blabla\");\n }",
"public QLNhanVien(){\n \n }",
"public Documento() {\n\n\t}",
"private Settings()\n {}",
"public TV() {\r\n\t}",
"private static Object createObject(String className, String namespace) {\n try {\n // get constructor\n Constructor<?> constructor = Class.forName(className).getConstructor(new Class[] {String.class});\n // create object\n return constructor.newInstance(new Object[] {namespace});\n } catch (ClassNotFoundException cnfe) {\n throw new ReviewerStatisticsConfigurationException(\n \"error occurs when trying to create object via reflection.\", cnfe);\n } catch (NoSuchMethodException nsme) {\n throw new ReviewerStatisticsConfigurationException(\n \"error occurs when trying to create object via reflection.\", nsme);\n } catch (InstantiationException ie) {\n throw new ReviewerStatisticsConfigurationException(\n \"error occurs when trying to create object via reflection.\", ie);\n } catch (IllegalAccessException iae) {\n throw new ReviewerStatisticsConfigurationException(\n \"error occurs when trying to create object via reflection.\", iae);\n } catch (InvocationTargetException ite) {\n throw new ReviewerStatisticsConfigurationException(\n \"error occurs when trying to create object via reflection.\", ite);\n }\n }",
"private UsineJoueur() {}"
]
| [
"0.60966635",
"0.6060381",
"0.6043978",
"0.58636695",
"0.5716092",
"0.5682127",
"0.5601993",
"0.5576848",
"0.5562273",
"0.55511373",
"0.55462056",
"0.55419326",
"0.55238163",
"0.552126",
"0.5507629",
"0.54591274",
"0.54589635",
"0.5449684",
"0.5441711",
"0.544137",
"0.5428232",
"0.54193974",
"0.54178864",
"0.54096663",
"0.54013836",
"0.5395823",
"0.5392349",
"0.5389959",
"0.5382871",
"0.5378045",
"0.53736514",
"0.53708905",
"0.5368811",
"0.5365138",
"0.53635883",
"0.53626454",
"0.53626454",
"0.535268",
"0.5350382",
"0.53458315",
"0.5339216",
"0.53317904",
"0.5313841",
"0.5293134",
"0.5293112",
"0.52840596",
"0.52727723",
"0.5270658",
"0.52667487",
"0.5261187",
"0.525795",
"0.525713",
"0.52558935",
"0.52464885",
"0.52433634",
"0.5238464",
"0.5237142",
"0.5237142",
"0.523498",
"0.52344143",
"0.52340215",
"0.52295583",
"0.52247536",
"0.5220972",
"0.5202492",
"0.5202427",
"0.5202137",
"0.52018064",
"0.5200412",
"0.5199068",
"0.51885265",
"0.5188509",
"0.5188036",
"0.51868784",
"0.51853734",
"0.5180655",
"0.51799566",
"0.5173477",
"0.5173161",
"0.51663256",
"0.51632446",
"0.51623887",
"0.5158287",
"0.5156931",
"0.51525295",
"0.514454",
"0.5143094",
"0.514063",
"0.5136045",
"0.51351774",
"0.51333964",
"0.5129437",
"0.5129437",
"0.5129437",
"0.51285523",
"0.5123468",
"0.512115",
"0.51172084",
"0.51157796",
"0.511462",
"0.5110101"
]
| 0.0 | -1 |
Konstruktor ktory vytvori instanciu/objekt/menu typu ItemMenu. Menu nastavujeme z ktoreho menu bolo vytvorene a nasledne pre aky predmet sme ho vytvorili. Parametre x,y sluzia ako pozicie kde vykreslujeme menu. | public ItemMenu(AbstractInMenu source, Item item, int x, int y) {
super(source.getEntity(), source.getInput());
this.sourceMenu = source;
this.item = item;
this.activated = false;
this.xPos = x - width;
this.yPos = y;
setItemMenu();
setGraphics();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ItemMenu() {\n super(null, null);\n }",
"public ItemMenu(JDealsController sysCtrl) {\n super(\"Item Menu\", sysCtrl);\n\n this.addItem(\"Add general good\", new Callable() {\n @Override\n public Object call() throws Exception {\n return addItem(ProductTypes.GOODS);\n }\n });\n this.addItem(\"Restourant Event\", new Callable() {\n @Override\n public Object call() throws Exception {\n return addItem(ProductTypes.RESTOURANT);\n }\n });\n this.addItem(\"Travel Event\", new Callable() {\n @Override\n public Object call() throws Exception {\n return addItem(ProductTypes.TRAVEL);\n }\n });\n }",
"@Override\r\n\tpublic void createMenu(Menu menu) {\n\r\n\t}",
"private void createMenu(){\n\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n JMenu Opcje = new JMenu(\"Opcje\");\n mbar.add(Opcje);\n JMenuItem Ustawienia = new JMenuItem(\"Ustawienia\");\n /** Obsluga zdarzen wcisniecia przycisku ustawien w menu */\n Ustawienia.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if(Justawienia==null)\n Justawienia =new JUstawienia();\n Justawienia.setVisible(true);\n if (controller.timer!=null)\n controller.timer.stop();\n }\n });\n Opcje.add(Ustawienia);\n Opcje.addSeparator();\n JMenuItem Info = new JMenuItem(\"Info\");\n /** Obsluga zdarzen wcisniecia przycisku info w menu */\n Info.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n controller.WyswietlInfo();\n }\n });\n Opcje.add(Info);\n }",
"private void initializeMenu() {\n menu = new Menu(parent.getShell());\n MenuItem item1 = new MenuItem(menu, SWT.NONE);\n item1.setText(Resources.getMessage(\"LatticeView.9\")); //$NON-NLS-1$\n item1.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n model.getClipboard().addToClipboard(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.CLIPBOARD, selectedNode));\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n \n MenuItem item2 = new MenuItem(menu, SWT.NONE);\n item2.setText(Resources.getMessage(\"LatticeView.10\")); //$NON-NLS-1$\n item2.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n controller.actionApplySelectedTransformation();\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n }",
"private void setMenu() {\n\n if (tree.isEmpty() || !treeGrid.anySelected()) {\n mainMenu.setItems(newMenuItem, new MenuItemSeparator(), settingMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecord() == null) {\n mainMenu.setItems(renameMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecords().length > 1) {\n ListGridRecord[] selectedNode = treeGrid.getSelectedRecords();\n if (isSameExtension(selectedNode, Extension.FP)) {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem, exportMenuItem);\n } else if (isSameExtension(selectedNode, Extension.FPS)) {\n mainMenu.setItems(newFPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.BPS)) {\n mainMenu.setItems(newBPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.SCSS)) {\n mainMenu.setItems(newSCSItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n }\n } else if (tree.isFolder(treeGrid.getSelectedRecord())) {\n mainMenu.setItems(newMenuItem, deleteMenu, renameMenuItem, copyMenuItem, pasteMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem, downloadMenuItem,\n copyPathMenuItem);\n } else {\n FileTreeNode selectedNode = (FileTreeNode) treeGrid.getSelectedRecord();\n VMResource resource = selectedNode.getResource();\n if (resource instanceof VMDirectory) {\n return;\n }\n Extension extension = ((VMFile) resource).getExtension();\n if (extension == null) {\n mainMenu.setItems(openWithMenuItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n } else\n switch (extension) {\n case ARC:\n mainMenu.setItems(newBPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FM:\n mainMenu.setItems(newFMCItem, newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FMC:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case TC:\n mainMenu.setItems(newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n case FPS:\n mainMenu.setItems(newFPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, exportMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BPS:\n mainMenu.setItems(newBPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCSS:\n mainMenu.setItems(newSCSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCS:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n default:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n }\n }\n }",
"private void setItemMenu() {\n choices = new ArrayList<>();\n \n choices.add(Command.INFO);\n if (item.isUsable()) {\n choices.add(Command.USE);\n }\n if (item.isEquipped()) {\n choices.add(Command.UNEQUIP);\n } else {\n if (item.isEquipable()) {\n choices.add(Command.EQUIP);\n }\n }\n \n if (item.isActive()) {\n choices.add(Command.UNACTIVE);\n } else {\n if (item.isActivable()) {\n choices.add(Command.ACTIVE);\n }\n }\n if (item.isDropable()) {\n choices.add(Command.DROP);\n }\n if (item.isPlaceable()) {\n choices.add(Command.PLACE);\n }\n choices.add(Command.DESTROY);\n choices.add(Command.CLOSE);\n \n this.height = choices.size() * hItemBox + hGap * 2;\n }",
"private void updateMenu() {\n if(customMenu || !menuDirty) {\n return;\n }\n \n // otherwise, reset up the menu.\n menuDirty = false;\n menu.removeAll();\n Icon emptyIcon = null; \n for(Action action : actions) {\n if(action.getValue(Action.SMALL_ICON) != null) {\n emptyIcon = new EmptyIcon(16, 16);\n break;\n }\n }\n \n selectedComponent = null;\n selectedLabel = null;\n \n for (Action action : actions) {\n \n // We create the label ourselves (instead of using JMenuItem),\n // because JMenuItem adds lots of bulky insets.\n\n ActionLabel menuItem = new ActionLabel(action);\n JComponent panel = wrapItemForSelection(menuItem);\n \n if (action != selectedAction) {\n panel.setOpaque(false);\n menuItem.setForeground(UIManager.getColor(\"MenuItem.foreground\"));\n } else {\n selectedComponent = panel;\n selectedLabel = menuItem;\n selectedComponent.setOpaque(true);\n selectedLabel.setForeground(UIManager.getColor(\"MenuItem.selectionForeground\"));\n }\n \n if(menuItem.getIcon() == null) {\n menuItem.setIcon(emptyIcon);\n }\n attachListeners(menuItem);\n decorateMenuComponent(menuItem);\n menuItem.setBorder(BorderFactory.createEmptyBorder(0, 6, 2, 6));\n\n menu.add(panel);\n }\n \n if (getText() == null) {\n menu.add(Box.createHorizontalStrut(getWidth()-4));\n } \n \n for(MenuCreationListener listener : menuCreationListeners) {\n listener.menuCreated(this, menu);\n }\n }",
"private void setUpMenu() {\n\t\tresideMenu = new ResideMenu(this);\n\t\tresideMenu.setBackground(R.drawable.menu_background);\n\t\tresideMenu.attachToActivity(this);\n\t\tresideMenu.setMenuListener(menuListener);\n\t\t// valid scale factor is between 0.0f and 1.0f. leftmenu'width is\n\t\t// 150dip.\n\t\tresideMenu.setScaleValue(0.6f);\n\n\t\t// create menu items;\n\t\titemGame = new ResideMenuItem(this, R.drawable.icon_game,\n\t\t\t\tgetResources().getString(R.string.strGame));\n\t\titemBook = new ResideMenuItem(this, R.drawable.icon_book,\n\t\t\t\tgetResources().getString(R.string.strBook));\n\t\titemNews = new ResideMenuItem(this, R.drawable.icon_news,\n\t\t\t\tgetResources().getString(R.string.strNews));\n\t\t// itemSettings = new ResideMenuItem(this, R.drawable.icon_setting,\n\t\t// getResources().getString(R.string.strSetting));\n\t\titemLogin = new ResideMenuItem(this, R.drawable.icon_share,\n\t\t\t\tgetResources().getString(R.string.strShare));\n\t\titemBookPDF = new ResideMenuItem(this, R.drawable.icon_bookpdf,\n\t\t\t\tgetResources().getString(R.string.strBookPDF));\n\t\titemMore = new ResideMenuItem(this, R.drawable.icon_more,\n\t\t\t\tgetResources().getString(R.string.strMore));\n\n\t\titemGame.setOnClickListener(this);\n\t\titemBook.setOnClickListener(this);\n\t\titemNews.setOnClickListener(this);\n\t\t// itemSettings.setOnClickListener(this);\n\t\titemBookPDF.setOnClickListener(this);\n\t\titemMore.setOnClickListener(this);\n\t\titemLogin.setOnClickListener(this);\n\n\t\tresideMenu.addMenuItem(itemBookPDF, ResideMenu.DIRECTION_LEFT);\n\t\tresideMenu.addMenuItem(itemBook, ResideMenu.DIRECTION_LEFT);\n\t\tresideMenu.addMenuItem(itemNews, ResideMenu.DIRECTION_LEFT);\n\t\t// resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_RIGHT);\n\n\t\tresideMenu.addMenuItem(itemGame, ResideMenu.DIRECTION_RIGHT);\n\t\tresideMenu.addMenuItem(itemLogin, ResideMenu.DIRECTION_RIGHT);\n\t\tresideMenu.addMenuItem(itemMore, ResideMenu.DIRECTION_RIGHT);\n\n\t\t// You can disable a direction by setting ->\n\t\t// resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n\t\tfindViewById(R.id.title_bar_left_menu).setOnClickListener(\n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\t\tresideMenu.openMenu(ResideMenu.DIRECTION_LEFT);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tfindViewById(R.id.title_bar_right_menu).setOnClickListener(\n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\t\tresideMenu.openMenu(ResideMenu.DIRECTION_RIGHT);\n\t\t\t\t\t}\n\t\t\t\t});\n\t}",
"public void initMenu(){\n\t}",
"public void createItemListPopupMenu() {\n\n\t\tremoveAll();\n\t\tadd(addMenuItem);\n\t\tadd(editMenuItem);\n\t\tadd(deleteMenuItem);\n\t\tadd(moveUpMenuItem);\n\t\tadd(moveDownMenuItem);\n\t\taddSeparator();\n\t\tadd(midiLearnMenuItem);\n\t\tadd(midiUnlearnMenuItem);\n\t\taddSeparator();\n\t\tadd(sendMidiMenuItem);\n\t}",
"public Menu createToolsMenu();",
"@Override\n\tpublic void setUpMenu() {\n\t\t\n\t}",
"public Menu createViewMenu();",
"public JMTMenuBar createMenu() {\r\n \t\tJMTMenuBar menu = new JMTMenuBar(JMTImageLoader.getImageLoader());\r\n \t\t// File menu\r\n \t\tMenuAction action = new MenuAction(\"File\", new AbstractJmodelAction[] { newModel, openModel, saveModel, saveModelAs, closeModel, null, exit });\r\n \t\tmenu.addMenu(action);\r\n \r\n \t\t// Edit menu\r\n \t\taction = new MenuAction(\"Edit\", new AbstractJmodelAction[] {\r\n \t\t// editUndo, editRedo, null\r\n \t\t\t\tactionCut, actionCopy, actionPaste, actionDelete, null, takeScreenShot });\r\n \t\tmenu.addMenu(action);\r\n \r\n \t\t// Define menu\r\n \t\taction = new MenuAction(\"Define\",\r\n \t\t\t\tnew AbstractJmodelAction[] { editUserClasses, editMeasures, editSimParams, editPAParams, null, editDefaults });\r\n \t\tmenu.addMenu(action);\r\n \r\n \t\t// Solve menu\r\n \t\taction = new MenuAction(\"Solve\", new AbstractJmodelAction[] { simulate, pauseSimulation, stopSimulation, null, switchToExactSolver, null,\r\n \t\t\t\tshowResults });\r\n \t\tmenu.addMenu(action);\r\n \r\n \t\t// Help menu\r\n \t\taction = new MenuAction(\"Help\", new AbstractJmodelAction[] { openHelp, null, about });\r\n \t\tmenu.addMenu(action);\r\n \r\n \t\treturn menu;\r\n \t}",
"private void setUpMenu() {\n resideMenu = new ResideMenu(this);\n\n resideMenu.setBackground(R.drawable.menu_background);\n resideMenu.attachToActivity(this);\n resideMenu.setMenuListener(menuListener);\n resideMenu.setScaleValue(0.6f);\n\n // create menu items;\n itemHome = new ResideMenuItem(this, R.drawable.icon_profile, \"Home\");\n itemSerre = new ResideMenuItem(this, R.drawable.serre, \"GreenHouse\");\n itemControl = new ResideMenuItem(this, R.drawable.ctrl, \"Control\");\n itemTable = new ResideMenuItem(this, R.drawable.database, \"Parametre\");\n\n // itemProfile = new ResideMenuItem(this, R.drawable.user, \"Profile\");\n // itemSettings = new ResideMenuItem(this, R.drawable.stat_n, \"Statistique\");\n itemPicture = new ResideMenuItem(this, R.drawable.cam, \"Picture\");\n itemLog = new ResideMenuItem(this, R.drawable.log, \"Log file \");\n\n itemLogout = new ResideMenuItem(this, R.drawable.logout, \"Logout\");\n\n\n\n itemHome.setOnClickListener(this);\n itemSerre.setOnClickListener(this);\n itemControl.setOnClickListener(this);\n itemTable.setOnClickListener(this);\n\n// itemProfile.setOnClickListener(this);\n // itemSettings.setOnClickListener(this);\n itemLogout.setOnClickListener(this);\n itemPicture.setOnClickListener(this);\n itemLog.setOnClickListener(this);\n\n\n resideMenu.addMenuItem(itemHome, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemSerre, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemControl, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemTable, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemLog, ResideMenu.DIRECTION_LEFT);\n\n\n // resideMenu.addMenuItem(itemProfile, ResideMenu.DIRECTION_RIGHT);\n // resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_RIGHT);\n resideMenu.addMenuItem(itemPicture, ResideMenu.DIRECTION_RIGHT);\n\n resideMenu.addMenuItem(itemLogout, ResideMenu.DIRECTION_RIGHT);\n\n // You can disable a direction by setting ->\n // resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n findViewById(R.id.title_bar_left_menu).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n resideMenu.openMenu(ResideMenu.DIRECTION_LEFT);\n }\n });\n findViewById(R.id.title_bar_right_menu).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n resideMenu.openMenu(ResideMenu.DIRECTION_RIGHT);\n }\n });\n }",
"void setParent(IMenu menuItem);",
"protected abstract void addMenuOptions();",
"public void componentesimplementacionIsmael() {\n\t\t// En el menu bar Ismael\n\t\tmenuIsmael = new JMenu(\"Ismael\");\n\t\tmenuBar.add(menuIsmael);\n\n\t\t// SUBMENU\n\t\tsubMenuRecientes = new JMenu(\"Recientes\");\n\t\titemSubMenuRecientes = new ArrayList<>();\n\t\trutasRecientes = new ArrayList<>();\n\t\ttry {\n\t\t\trutasRecientes = manejadorFichero.obtenerLineasDelFichero();\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\tif (!rutasRecientes.isEmpty()) {\n\t\t\tfor (int i = 0; i < rutasRecientes.size(); i++) {\n\t\t\t\tJMenuItem textoSubmenu = new JMenuItem(rutasRecientes.get(i));\n\t\t\t\titemSubMenuRecientes.add(textoSubmenu);\n\t\t\t\tsubMenuRecientes.add(textoSubmenu);\n\t\t\t}\n\t\t}\n\t\tmenuIsmael.add(subMenuRecientes);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\t// Fuente\n\t\titemFuente = new JMenuItem(\"Fuente\");\n\t\titemFuente.setEnabled(false);\n\t\titemFuente.setMnemonic(KeyEvent.VK_F);\n\t\titemFuente.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemFuente);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\titemSeleccionarTodo = new JMenuItem(\"Selec.Todo\");\n\t\titemSeleccionarTodo.setEnabled(false);\n\t\titemSeleccionarTodo.setMnemonic(KeyEvent.VK_N);\n\t\titemSeleccionarTodo.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemSeleccionarTodo);\n\n\t\titemSeleccionarTodoYCopiar = new JMenuItem(\"Selec All+Copy\");\n\t\titemSeleccionarTodoYCopiar.setEnabled(false);\n\t\titemSeleccionarTodoYCopiar.setMnemonic(KeyEvent.VK_M);\n\t\titemSeleccionarTodoYCopiar.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemSeleccionarTodoYCopiar);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\titemHora = new JMenuItem(\"Hora\");\n\t\titemHora.setEnabled(true);\n\t\titemHora.setMnemonic(KeyEvent.VK_H);\n\t\titemHora.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_H, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemHora);\n\n\t}",
"@Command\n\t@NotifyChange({\"lstSubMenu\",\"lstLastMenu\",\"lstMainMenu\"})\n\tpublic void fillSubMenu(@BindingParam(\"item\") MenuModel item)\n\t{\n\t\t\t\t\n\t\tfor (MenuModel obj : lstMainMenu) \n\t\t{\n\t\tobj.setSclassName(\"defaultmenuitem\");\t\n\t\t}\n\t\titem.setSclassName(\"menuitem\");\n\t\t\t\n\t\tlstSubMenu=mData.getSubMenuList(item.getMenuid(),1,companyroleid);\n\t\tlstLastMenu=new ArrayList<MenuModel>();\n\t\t//Messagebox.show(item.getTitle());\n\t\t//BindUtils.postNotifyChange(null, null, this, \"*\");\t\t\n\t}",
"public void initializeMenuItems() {\n menuItems = new LinkedHashMap<TestingOption, MenuDrawerItem>();\n menuItems.put(TestingOption.TESTING_OPTION, create(TestingOption.TESTING_OPTION, getResources().getString(R.string.testing_section).toUpperCase(), MenuDrawerItem.SECTION_TYPE));\n menuItems.put(TestingOption.ANNOTATION_OPTION, create(TestingOption.ANNOTATION_OPTION, getResources().getString(R.string.option_annotation_POI), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.MAP_VIEW_SETTINGS_OPTION, create(TestingOption.MAP_VIEW_SETTINGS_OPTION, getResources().getString(R.string.option_map_view_settings), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.MAP_CACHE_OPTION, create(TestingOption.MAP_CACHE_OPTION, getResources().getString(R.string.option_map_cache), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.LAST_RENDERED_FRAME_OPTION, create(TestingOption.LAST_RENDERED_FRAME_OPTION, getResources().getString(R.string.option_last_rendered_frame), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.ANIMATION_CUSTOM_VIEW_OPTION, create(TestingOption.ANIMATION_CUSTOM_VIEW_OPTION, getResources().getString(R.string.option_ccp_animation_custom_view), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.BOUNDING_BOX_OPTION, create(TestingOption.BOUNDING_BOX_OPTION, getResources().getString(R.string.option_bounding_box), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.INTERNALIZATION_OPTION, create(TestingOption.INTERNALIZATION_OPTION, getResources().getString(R.string.option_internalization), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.ANIMATE_OPTION, create(TestingOption.ANIMATE_OPTION, getResources().getString(R.string.option_animate), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.MAP_STYLE_OPTION, create(TestingOption.MAP_STYLE_OPTION, getResources().getString(R.string.option_map_style), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.SCALE_VIEW_OPTION, create(TestingOption.SCALE_VIEW_OPTION, getResources().getString(R.string.option_scale_view), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.CALLOUT_VIEW_OPTION, create(TestingOption.CALLOUT_VIEW_OPTION, getResources().getString(R.string.option_callout_view), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.ROUTING_OPTION, create(TestingOption.ROUTING_OPTION, getResources().getString(R.string.option_routing), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.ROUTE_WITH_POINTS, create(TestingOption.ROUTE_WITH_POINTS, getResources().getString(R.string.option_routing_with_points),MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.MAP_VERSION_OPTION, create(TestingOption.MAP_VERSION_OPTION, getResources().getString(R.string.option_map_version_information), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.OVERLAYS_OPTION, create(TestingOption.OVERLAYS_OPTION, getResources().getString(R.string.option_overlays), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.POI_TRACKER, create(TestingOption.POI_TRACKER, getResources().getString(R.string.option_poi_tracker), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.POSITION_LOGGING_OPTION, create(TestingOption.POSITION_LOGGING_OPTION, getResources().getString(R.string.option_position_logging), MenuDrawerItem.ITEM_TYPE));\n\n list = new ArrayList<MenuDrawerItem>(menuItems.values());\n drawerList.setAdapter(new MenuDrawerAdapter(DebugMapActivity.this, R.layout.element_menu_drawer_item, list));\n drawerList.setOnItemClickListener(new DrawerItemClickListener());\n\n }",
"@Override\n\t\t\tpublic void create(SwipeMenu menu) {\n\t\t\t\tSwipeMenuItem openItem = new SwipeMenuItem(getActivity()\n\t\t\t\t\t\t.getApplicationContext());\n\t\t\t\topenItem.setWidth(dp2px(60));\n\t\t\t\topenItem.setIcon(R.drawable.list_delete);\n\t\t\t\topenItem.setBackground(R.color.deep_pink);\n\t\t\t\tmenu.addMenuItem(openItem);\n\n\t\t\t\t// Edit Item\n\t\t\t\tSwipeMenuItem editItem = new SwipeMenuItem(getActivity()\n\t\t\t\t\t\t.getApplicationContext());\n\t\t\t\teditItem.setBackground(R.color.deep_yellow);\n\t\t\t\teditItem.setWidth(dp2px(60));\n\t\t\t\teditItem.setIcon(R.drawable.total_swipeedit);\n\t\t\t\tmenu.addMenuItem(editItem);\n\n\t\t\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }",
"public void setMenu ( Object menu ) {\r\n\t\tgetStateHelper().put(PropertyKeys.menu, menu);\r\n\t\thandleAttribute(\"menu\", menu);\r\n\t}",
"@Override\n\tpublic void modifyMenuItem(MenuItem menuItem) \n\t{\n\t\tList<MenuItem> list=this.menuItemList;\n\t\tfor(MenuItem m:list)\n\t\t{\n\t\t\tif(m.getId()==menuItem.getId())\n\t\t\t{\n\t\t\t\tm.setName(menuItem.getName());\n\t\t\t\tm.setPrice(menuItem.getPrice());\n\t\t\t\tm.setCategory(menuItem.getCategory());\n\t\t\t\tm.setDateOfLaunch(menuItem.getDateOfLaunch());\n\t\t\t\tm.setFreeDelivery(menuItem.isFreeDelivery());\n\t\t\t\tm.setActive(menuItem.isActive());\n\t\t\t}\n\t\t}\n\t}",
"public Item() {\n\t\tmenu.add(new Item(\"Snickers\", 10, 1.50, \"1\"));\n\t\tmenu.add(new Item(\"Chips\", 10, .50, \"2\"));\n\t\tmenu.add(new Item(\"Coke\", 10, 1.75, \"3\"));\n\n\t}",
"void setMenuItem(MenuItem menuItem);",
"public Menu getStartMenu() {\n Menu menu = new Menu(new Point(475, 0), 672-475, 320, 8, 1, new Cursor(new Point(0, 7)), \"exit\");\n Button PokedexButton = new Button(new Point(475, 0), 672-475, 40, \"Pokédex\", new Point(0, 7), \"Pokédex\");\n Button PokemonButton = new Button(new Point(475, 40), 672-475, 40, \"Pokémon\", new Point(0, 6), \"Pokémon\");\n Button BagButton = new Button(new Point(475, 80), 672-475, 40, \"Bag\", new Point(0, 5), \"Bag\");\n Button PokenavButton = new Button(new Point(475, 120), 672-475, 40, \"Pokénav\", new Point(0, 4), \"Pokénav\");\n Button PlayerButton = new Button(new Point(475, 160), 672-475, 40, trainer.getName(), new Point(0, 3), trainer.getName());\n Button SaveButton = new Button(new Point(475, 200), 672-475, 40, \"save\", new Point(0, 2), \"Save\");\n Button OptionButton = new Button(new Point(475, 240), 672-475, 40, \"add_menu_other\", new Point(0, 1), \"Options\");\n Button ExitButton = new Button(new Point(475, 280), 672-475, 40, \"exit\", new Point(0, 0), \"exit\");\n menu.addButton(PokedexButton);\n menu.addButton(PokemonButton);\n menu.addButton(BagButton);\n menu.addButton(PokenavButton);\n menu.addButton(PlayerButton);\n menu.addButton(SaveButton);\n menu.addButton(OptionButton);\n menu.addButton(ExitButton);\n menu.getButton(menu.getCursor().getPos()).Highlight();\n return menu;\n }",
"public MenuBox(MenuItem item , boolean line){\n\n getChildren().addAll(item);\n }",
"public MenuItem(){\n\n }",
"void drawMenu(IMenu menuToBeRendered);",
"private void makePOSMenu() {\r\n\t\tJMenu POSMnu = new JMenu(\"Punto de Venta\");\r\n\t\tboolean isAccesible = false;\r\n\r\n\t\tif (StoreCore.getAccess(\"Cotizaciones\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Cotizaciones\", \r\n\t\t\t\t\timageLoader.getImage(\"quote.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 't',\r\n\t\t\t\t\t\"Ver el listado de cotizaciones\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F4, 0), Quote.class);\r\n\t\t\tPOSMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Compra\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Compras\", \r\n\t\t\t\t\timageLoader.getImage(\"purchase.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'c',\r\n\t\t\t\t\t\"Ver el listado de facturas\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F5, 0), Purchase.class);\r\n\r\n\t\t\tPOSMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Facturacion\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Facturacion\", \r\n\t\t\t\t\timageLoader.getImage(\"invoice.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'f',\r\n\t\t\t\t\t\"Ver el listado de facturas\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F6, 0), Invoice.class);\r\n\r\n\t\t\tPOSMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (isAccesible) {\r\n\t\t\tPOSMnu.setMnemonic('p');\r\n\t\t\tadd(POSMnu);\r\n\t\t}\r\n\t}",
"public Menu getMenu() { return this.menu; }",
"IMenuFactory getMenuFactory();",
"@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 }",
"public JMenu addMenuItem (String texte, JMenu menu) {\n return addMenuItem (texte,menu,\"\");\n }",
"public void buildMenu() {\n\t\tthis.Menu = new uPanel(this.layer, 0, 0, (int) (this.getWidth() * 2), (int) (this.getHeight() * 3)) {\r\n\t\t\t@Override\r\n\t\t\tpublic boolean handleEvent(uEvent event) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick() {\r\n\t\t\t\tsuper.onClick();\r\n\t\t\t\tthis.space.sortLayer(this.layer);\r\n\t\t\t\tthis.castEvent(\"MENUPANEL_CLICK\");\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.screen.addPrehide(this.Menu);\r\n\r\n\t\tthis.Node.addChild(this.Menu.getNode());\r\n\r\n\t}",
"private MenuBar.MenuItem createMenuItem(View vista, String menuAddress, Resource menuIcon) {\n MenuBar.MenuItem menuItem;\n MenuCommand cmd = new MenuCommand(menuBar, vista);\n menuItem = menuBar.addItem(menuAddress, menuIcon, cmd);\n menuItem.setStyleName(AMenuBar.MENU_DISABILITATO);\n\n return menuItem;\n }",
"private JMenuItem getSauvegardejMenuItem() {\r\n\t\tif (SauvegardejMenuItem == null) {\r\n\t\t\tSauvegardejMenuItem = new JMenuItem();\r\n\t\t\tSauvegardejMenuItem.setText(\"Sauvegarde\");\r\n\t\t\tSauvegardejMenuItem.setIcon(new ImageIcon(getClass().getResource(\"/sauvegarde_petit.png\")));\r\n\t\t\tSauvegardejMenuItem.setFont(new Font(\"Dialog\", Font.PLAIN, 12));\r\n\t\t\tSauvegardejMenuItem.setActionCommand(\"Sauvegarde\");\r\n\t\t\tSauvegardejMenuItem.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\t//System.out.println(\"actionPerformed()\"); // TODO Auto-generated Event stub actionPerformed()\r\n\t\t\t\t\tif (e.getActionCommand().equals(\"Sauvegarde\")) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tHistorique.ecrire(\"Ouverture de : \"+e);\r\n\t\t\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tnew FEN_Sauvegarde();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn SauvegardejMenuItem;\r\n\t}",
"public interface MenuItem {\n\tpublic int getBasePrice();\n\tpublic int getAddOnPrice();\n\tpublic int getTotalGuestPrice(int additionalGuestTotal);\n\tpublic String getName();\n\tpublic String getDetails();\n}",
"private JMenu brugerMenuSetup() {\n JMenu brugerMenu = generalMenuSetup(\"Bruger\");\n JMenuItem logUdItem = new JMenuItem(\"Log ud\");\n brugerMenu.add(logUdItem);\n logUdItem.addActionListener(\n e -> System.exit(0)\n );\n JMenuItem minListeItem = new JMenuItem(\"Min liste\");\n brugerMenu.add(minListeItem);\n\n return brugerMenu;\n }",
"public void initializeMenuItems() {\n\t\tuserMenuButton = new MenuButton();\n\t\tmenu1 = new MenuItem(bundle.getString(\"mVmenu1\")); //\n\t\tmenu2 = new MenuItem(bundle.getString(\"mVmenu2\")); //\n\t}",
"public interface IMenuItem {\r\n\r\n\t/**\r\n\t * Returns an unique identifier of this element.\r\n\t * \r\n\t * @return an unique identifier of this element.\r\n\t */\r\n\tString getId();\r\n\r\n\t/**\r\n\t * Sets an unique identifier for this element. \r\n\t * \r\n\t * @param id\r\n\t *\t\t\tan unique identifier for this element.\r\n\t */\r\n\tvoid setId(String id);\r\n\r\n\t/**\r\n\t * Returns the key in the resource bundle to obtain the label of this element. \r\n\t * \r\n\t * @return the key in the resource bundle to obtain the label of this element.\r\n\t */\r\n\tString getKey();\r\n\r\n\t/**\r\n\t * Returns the key in the resource bundle to obtain the description\r\n\t * of this element. \r\n\t * \r\n\t * @return\r\n\t * \t\tthe key in the resource bundle to obtain the description\r\n\t *\t\tof this element.\r\n\t */\r\n\tString getDescriptionKey();\r\n\r\n\t/**\r\n\t * Returns the icon path of the element.\r\n\t * \r\n\t * @return the icon path of the element.\r\n\t */\r\n\tString getIcon();\r\n\r\n\t/**\r\n\t * Return the parent element or <code>null</code> if it is the root node.\r\n\t * \r\n\t * @return the parent element.\r\n\t */\r\n\tIMenuItem getParent();\r\n\r\n\t/**\r\n\t * Sets the parent element.\r\n\t * \r\n\t * @param menuItem\r\n\t *\t\t\tthe parent element.\r\n\t */\r\n\tvoid setParent(IMenu menuItem);\r\n\r\n\t/**\r\n\t * Returns an {@link java.util.Iterator} object of {@link IMenuItem} that\r\n\t * reprensets the path from this node to the root node.\r\n\t * \r\n\t * @return an {@link java.util.Iterator} object of {@link IMenuItem}.\r\n\t */\r\n\tIterator getMenuPath();\r\n\r\n\t/**\r\n\t * Returns an {@link String} with the action to executed.\r\n\t * \r\n\t * @return an {@link String} with the action to executed.\r\n\t */\r\n\tString getReference();\r\n\r\n\t/**\r\n\t * Sets the security roles that are allowed for this element.\r\n\t * \r\n\t * @param roles\r\n\t * \t\t\tComma-separated list of security roles.\r\n\t */\r\n\tvoid setRole(String roles);\r\n\r\n\t/**\r\n * Returns a <code>Set</code> with the security roles that are allowed\r\n * in this element.\r\n\t * \r\n\t * @return a <code>Set</code> with the security roles, it can be empty. \r\n\t */\r\n\tSet getRoles();\r\n\r\n\t/**\r\n * Appends <code>actionListener</code> to the end of the listener list. \r\n\t * \r\n\t * @param actionListener\r\n\t * element to be appended to this list.\r\n\t */\r\n\tvoid addActionListener(IActionListener actionListener);\r\n\r\n\t/**\r\n * Returns an iterator over the listeners in this element. \r\n\t * \r\n\t * @return an iterator over the listeners in this menu.\r\n\t */\r\n\tIterator actionListeners();\r\n\r\n\t/**\r\n\t * Method needed by this element to allow to be visited by an {@link IMenuVisitor}. \r\n\t * \r\n\t * @param visitor\r\n\t *\t\t\tan implementation of the {@link IMenuVisitor}.\r\n\t * @throws MenuVisitorException\r\n\t * if an unexpected error occurs.\r\n\t */\r\n\tvoid visit(IMenuVisitor visitor) throws MenuVisitorException;\r\n\r\n}",
"public void generateMenu(){\n menuBar = new JMenuBar();\n\n JMenu file = new JMenu(\"Datei\");\n JMenu tools = new JMenu(\"Werkzeuge\");\n JMenu help = new JMenu(\"Hilfe\");\n\n JMenuItem open = new JMenuItem(\"Öffnen \");\n JMenuItem save = new JMenuItem(\"Speichern \");\n JMenuItem exit = new JMenuItem(\"Beenden \");\n JMenuItem preferences = new JMenuItem(\"Einstellungen \");\n JMenuItem about = new JMenuItem(\"Über das Projekt \");\n\n\n file.add(open);\n file.add(save);\n file.addSeparator();\n file.add(exit);\n tools.add(preferences);\n help.add(about);\n\n menuBar.add(file);\n menuBar.add(tools);\n menuBar.add(help);\n }",
"public void setMenuItem(MenuItem menuItem) {\n this.menuItem = menuItem;\n }",
"private void constructMenuItems()\n\t{\n\t\tthis.saveImageMenuItem = ComponentGenerator.generateMenuItem(\"Save Image\", this, KeyStroke.getKeyStroke(KeyEvent.VK_S, ActionEvent.CTRL_MASK));\n\t\tthis.quitMenuItem = ComponentGenerator.generateMenuItem(\"Quit\", this, KeyStroke.getKeyStroke(KeyEvent.VK_Q, ActionEvent.CTRL_MASK));\n\t\tthis.undoMenuItem = ComponentGenerator.generateMenuItem(\"Undo\", this, KeyStroke.getKeyStroke(KeyEvent.VK_Z, ActionEvent.CTRL_MASK));\n\t\tthis.redoMenuItem = ComponentGenerator.generateMenuItem(\"Redo\", this, KeyStroke.getKeyStroke(KeyEvent.VK_Y, ActionEvent.CTRL_MASK));\n\t\tthis.removeImageMenuItem = ComponentGenerator.generateMenuItem(\"Remove Image from Case\", this);\n\t\tthis.antiAliasMenuItem = ComponentGenerator.generateMenuItem(\"Apply Anti Aliasing\", this);\n\t\tthis.brightenMenuItem = ComponentGenerator.generateMenuItem(\"Brighten by 10%\", this);\n\t\tthis.darkenMenuItem = ComponentGenerator.generateMenuItem(\"Darken by 10%\", this);\n\t\tthis.grayscaleMenuItem = ComponentGenerator.generateMenuItem(\"Convert to Grayscale\", this);\n\t\tthis.resizeMenuItem = ComponentGenerator.generateMenuItem(\"Resize Image\", this);\n\t\tthis.cropMenuItem = ComponentGenerator.generateMenuItem(\"Crop Image\", this);\n\t\tthis.rotate90MenuItem = ComponentGenerator.generateMenuItem(\"Rotate Image 90\\u00b0 Right\", this);\n\t\tthis.rotate180MenuItem = ComponentGenerator.generateMenuItem(\"Rotate Image 180\\u00b0 Right\", this);\n\t\tthis.rotate270MenuItem = ComponentGenerator.generateMenuItem(\"Rotate Image 270\\u00b0 Right\", this);\n\t}",
"@Test\n public void testMenu() {\n MAIN_MENU[] menusDefined = MAIN_MENU.values();\n\n // get menu items\n List<String> menuList = rootPage.menu().items();\n _logger.debug(\"Menu items:{}\", menuList);\n // check the count\n Assert.assertEquals(menuList.size(), menusDefined.length, \"Number of menus test\");\n // check the names\n for (String item : menuList) {\n Assert.assertNotNull(MAIN_MENU.fromText(item), \"Checking menu: \" + item);\n }\n // check the navigation\n for (MAIN_MENU item : menusDefined) {\n _logger.debug(\"Testing menu:[{}]\", item.getText());\n rootPage.menu().select(item.getText());\n Assert.assertEquals(item.getText(), rootPage.menu().selected());\n }\n }",
"@Test\n public void testMenuFactoryGetMenuItem() {\n Menu menuController = menuFactory.getMenu();\n menuController.addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n assertEquals(MENU_NAME, menuController.getMenuItem(1).getName());\n assertEquals(MENU_DESCRIPTION, menuController.getMenuItem(1).getDescription());\n assertEquals(MENU_PRICE, menuController.getMenuItem(1).getPrice());\n }",
"private void addMenu(){\n //Where the GUI is created:\n \n Menu menu = new Menu(\"Menu\");\n MenuItem menuItem1 = new MenuItem(\"Lista de Libros\");\n MenuItem menuItem2 = new MenuItem(\"Nuevo\");\n\n menu.getItems().add(menuItem1);\n menu.getItems().add(menuItem2);\n \n menuItem1.setOnAction(new EventHandler<ActionEvent>() { \n @Override\n public void handle(ActionEvent event) {\n gridPane.getChildren().clear();\n cargarListaGeneradores( 2, biblioteca.getBiblioteca());\n }\n });\n \n menuItem2.setOnAction(new EventHandler<ActionEvent>() { \n @Override\n public void handle(ActionEvent event) {\n gridPane.getChildren().clear();\n addUIControls() ;\n }\n });\n \n menuBar.getMenus().add(menu);\n }",
"public CFComponentMenu(CFComponent component) {\n\t\tsuper(component.getCFScene());\n\t\tthis.owner = component;\n\t\tthis.menuItems = new ArrayList<CFComponentMenuItem>();\n\t}",
"@Override\n public void create(SwipeMenu menu) {\n SwipeMenuItem item1 = new SwipeMenuItem(\n getApplicationContext());\n item1.setBackground(new ColorDrawable(Color.DKGRAY));\n // set width of an option (px)\n item1.setWidth(200);\n item1.setTitle(\"Action 1\");\n item1.setTitleSize(18);\n item1.setTitleColor(Color.WHITE);\n menu.addMenuItem(item1);\n\n SwipeMenuItem item2 = new SwipeMenuItem(\n getApplicationContext());\n // set item background\n item2.setBackground(new ColorDrawable(Color.RED));\n item2.setWidth(200);\n item2.setTitle(\"Action 2\");\n item2.setTitleSize(18);\n item2.setTitleColor(Color.WHITE);\n menu.addMenuItem(item2);\n }",
"@Override\n protected void onCreateContextMenu(ContextMenu menu) {\n super.onCreateContextMenu(menu);\n }",
"public Edit_Menu(MainPanel mp) {\r\n mainPanel = mp;\r\n setText(\"Засах\");\r\n// Uitem.setEnabled(false);//TODO : nemsen\r\n Ritem.setEnabled(false);//TODO : nemsen\r\n add(Uitem);\r\n add(Ritem);\r\n }",
"IMenuView getMenuView();",
"private void createMenu(){\n \n menuBar = new JMenuBar();\n \n game = new JMenu(\"Rummy\");\n game.setMnemonic('R');\n \n newGame = new JMenuItem(\"New Game\");\n newGame.setMnemonic('N');\n newGame.addActionListener(menuListener);\n \n \n \n exit = new JMenuItem(\"Exit\");\n exit.setMnemonic('E');\n exit.addActionListener(menuListener); \n \n \n \n }",
"public AbstractMenu(MenuLoader menuLoader) \r\n\t{}",
"@Override\n public boolean onMenuItemClick(MenuItem item) {\n return true;\n }",
"private void addFormatItemsToMenu(javax.swing.JComponent m){\r\n\r\n\r\n jMenuItemFillCell = new javax.swing.JMenuItem();\r\n jMenuItemFillCell.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_maximise.png\")));\r\n jMenuItemFillCell.setText(it.businesslogic.ireport.util.I18n.getString(\"fillCell\", \"Fill the cell\"));\r\n jMenuItemFillCell.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n FormatCommand.getCommand( OperationType.ELEMENT_MAXIMIZE).execute();\r\n }\r\n });\r\n\r\n m.add(jMenuItemFillCell);\r\n\r\n jMenuItemFillCellH = new javax.swing.JMenuItem();\r\n jMenuItemFillCellH.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_hmaximise.png\")));\r\n jMenuItemFillCellH.setText(it.businesslogic.ireport.util.I18n.getString(\"fillCellHorizontally\", \"Fill the cell (horizontally)\"));\r\n jMenuItemFillCellH.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n FormatCommand.getCommand( OperationType.ELEMENT_MAXIMIZE_H).execute();\r\n }\r\n });\r\n\r\n m.add(jMenuItemFillCellH);\r\n\r\n jMenuItemFillCellV = new javax.swing.JMenuItem();\r\n\r\n jMenuItemFillCellV.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_vmaximise.png\")));\r\n jMenuItemFillCellV.setText(it.businesslogic.ireport.util.I18n.getString(\"fillCellVertically\", \"Fill the cell (vertically)\"));\r\n jMenuItemFillCellV.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n FormatCommand.getCommand( OperationType.ELEMENT_MAXIMIZE_V).execute();\r\n }\r\n });\r\n\r\n m.add(jMenuItemFillCellV);\r\n\r\n\r\n jMenuAlign = new javax.swing.JMenu();\r\n jMenuAlign.setText(it.businesslogic.ireport.util.I18n.getString(\"align\", \"Align...\"));\r\n\r\n jMenuItemAlignLeft = new javax.swing.JMenuItem();\r\n\r\n jMenuItemAlignLeft.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_align_left.png\")));\r\n jMenuItemAlignLeft.setText(it.businesslogic.ireport.util.I18n.getString(\"alignLeft\", \"Align left\"));\r\n jMenuItemAlignLeft.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemAlignLeftActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuAlign.add(jMenuItemAlignLeft);\r\n\r\n jMenuItemAlignRight = new javax.swing.JMenuItem();\r\n jMenuItemAlignRight.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_align_right.png\")));\r\n jMenuItemAlignRight.setText(it.businesslogic.ireport.util.I18n.getString(\"alignRight\", \"Align right\"));\r\n jMenuItemAlignRight.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemAlignRightActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuAlign.add(jMenuItemAlignRight);\r\n\r\n jMenuItemAlignTop = new javax.swing.JMenuItem();\r\n jMenuItemAlignTop.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_align_top.png\")));\r\n jMenuItemAlignTop.setText(it.businesslogic.ireport.util.I18n.getString(\"alignTop\", \"Align top\"));\r\n jMenuItemAlignTop.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemAlignTopActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuAlign.add(jMenuItemAlignTop);\r\n\r\n jMenuItemAlignBottom = new javax.swing.JMenuItem();\r\n jMenuItemAlignBottom.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_align_bottom.png\")));\r\n jMenuItemAlignBottom.setText(it.businesslogic.ireport.util.I18n.getString(\"alignBottom\", \"Align bottom\"));\r\n jMenuItemAlignBottom.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemAlignBottomActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuAlign.add(jMenuItemAlignBottom);\r\n\r\n jSeparator19 = new javax.swing.JSeparator();\r\n jMenuAlign.add(jSeparator19);\r\n\r\n jMenuItemAlignVerticalAxis = new javax.swing.JMenuItem();\r\n jMenuItemAlignVerticalAxis.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_center_axis.png\")));\r\n jMenuItemAlignVerticalAxis.setText(it.businesslogic.ireport.util.I18n.getString(\"alignVerticalAxis\", \"Align vertical axis\"));\r\n jMenuItemAlignVerticalAxis.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemAlignVerticalAxisActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuAlign.add(jMenuItemAlignVerticalAxis);\r\n\r\n jMenuItemAlignHorizontalAxis = new javax.swing.JMenuItem();\r\n jMenuItemAlignHorizontalAxis.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_vcenter_axis.png\")));\r\n jMenuItemAlignHorizontalAxis.setText(it.businesslogic.ireport.util.I18n.getString(\"alignHorizontalAxis\", \"Align horizontal axis\"));\r\n jMenuItemAlignHorizontalAxis.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemAlignHorizontalAxisActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuAlign.add(jMenuItemAlignHorizontalAxis);\r\n\r\n m.add(jMenuAlign);\r\n\r\n jMenuSize = new javax.swing.JMenu();\r\n jMenuSize.setText(it.businesslogic.ireport.util.I18n.getString(\"size\", \"Size...\"));\r\n jMenuItemSameWidth = new javax.swing.JMenuItem();\r\n jMenuItemSameWidth.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_same_hsize.png\")));\r\n jMenuItemSameWidth.setText(it.businesslogic.ireport.util.I18n.getString(\"sameWidth\", \"Same width\"));\r\n jMenuItemSameWidth.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemSameWidthActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuSize.add(jMenuItemSameWidth);\r\n\r\n jMenuItemSameWidthMax = new javax.swing.JMenuItem();\r\n jMenuItemSameWidthMax.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_same_hsize_plus.png\")));\r\n jMenuItemSameWidthMax.setText(it.businesslogic.ireport.util.I18n.getString(\"sameWidthMax\", \"Same width (max)\"));\r\n jMenuItemSameWidthMax.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemSameWidthMaxActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuSize.add(jMenuItemSameWidthMax);\r\n\r\n jMenuItemSameWidthMin = new javax.swing.JMenuItem();\r\n jMenuItemSameWidthMin.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_same_hsize_min.png\")));\r\n jMenuItemSameWidthMin.setText(it.businesslogic.ireport.util.I18n.getString(\"sameWidthMin\", \"Same width (min)\"));\r\n jMenuItemSameWidthMin.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemSameWidthMinActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuSize.add(jMenuItemSameWidthMin);\r\n\r\n jSeparator17 = new javax.swing.JSeparator();\r\n jMenuSize.add(jSeparator17);\r\n\r\n jMenuItemSameHeight = new javax.swing.JMenuItem();\r\n jMenuItemSameHeight.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_same_vsize.png\")));\r\n jMenuItemSameHeight.setText(it.businesslogic.ireport.util.I18n.getString(\"sameHeight\", \"Same height\"));\r\n jMenuItemSameHeight.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemSameHeightActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuSize.add(jMenuItemSameHeight);\r\n\r\n jMenuItemSameHeightMin = new javax.swing.JMenuItem();\r\n jMenuItemSameHeightMin.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_same_vsize_min.png\")));\r\n jMenuItemSameHeightMin.setText(it.businesslogic.ireport.util.I18n.getString(\"sameHeightMin\", \"Same height (min)\"));\r\n jMenuItemSameHeightMin.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemSameHeightMinActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuSize.add(jMenuItemSameHeightMin);\r\n\r\n jMenuItemSameHeightMax = new javax.swing.JMenuItem();\r\n jMenuItemSameHeightMax.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_same_vsize_plus.png\")));\r\n jMenuItemSameHeightMax.setText(it.businesslogic.ireport.util.I18n.getString(\"sameHeightMax\", \"Same height (max)\"));\r\n jMenuItemSameHeightMax.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemSameHeightMaxActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuSize.add(jMenuItemSameHeightMax);\r\n\r\n jSeparator18 = new javax.swing.JSeparator();\r\n jMenuSize.add(jSeparator18);\r\n\r\n jMenuItemSameSize = new javax.swing.JMenuItem();\r\n jMenuItemSameSize.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_same_size.png\")));\r\n jMenuItemSameSize.setText(it.businesslogic.ireport.util.I18n.getString(\"sameSize\", \"Same size\"));\r\n jMenuItemSameSize.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemSameSizeActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuSize.add(jMenuItemSameSize);\r\n\r\n m.add(jMenuSize);\r\n\r\n jMenuPosition = new javax.swing.JMenu();\r\n jMenuPosition.setText(it.businesslogic.ireport.util.I18n.getString(\"position\", \"Position...\"));\r\n jMenuItemCenterH = new javax.swing.JMenuItem();\r\n jMenuItemCenterH.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_hcenter.png\")));\r\n jMenuItemCenterH.setText(it.businesslogic.ireport.util.I18n.getString(\"centerHorizontallyCellBased\", \"Center horizontally (cell based)\"));\r\n jMenuItemCenterH.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemCenterHActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuPosition.add(jMenuItemCenterH);\r\n\r\n jMenuItemCenterV = new javax.swing.JMenuItem();\r\n jMenuItemCenterV.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_vcenter.png\")));\r\n jMenuItemCenterV.setText(it.businesslogic.ireport.util.I18n.getString(\"centerVerticallyCellBased\", \"Center vertically (cell based)\"));\r\n jMenuItemCenterV.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemCenterVActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuPosition.add(jMenuItemCenterV);\r\n\r\n jMenuItemCenterInCell = new javax.swing.JMenuItem();\r\n jMenuItemCenterInCell.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_ccenter.png\")));\r\n jMenuItemCenterInCell.setText(it.businesslogic.ireport.util.I18n.getString(\"centerInCell\", \"Center in cell\"));\r\n jMenuItemCenterInCell.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemCenterInBandActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuPosition.add(jMenuItemCenterInCell);\r\n\r\n jMenuItemJoinLeft = new javax.swing.JMenuItem();\r\n jMenuItemJoinLeft.setText(it.businesslogic.ireport.util.I18n.getString(\"joinSidesLeft\", \"Join sides left\"));\r\n jMenuItemJoinLeft.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemJoinLeftActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuPosition.add(jMenuItemJoinLeft);\r\n\r\n jMenuItemJoinRight = new javax.swing.JMenuItem();\r\n jMenuItemJoinRight.setText(it.businesslogic.ireport.util.I18n.getString(\"joinSidesRight\", \"Join sides right\"));\r\n jMenuItemJoinRight.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemJoinRightActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuPosition.add(jMenuItemJoinRight);\r\n\r\n m.add(jMenuPosition);\r\n\r\n jSeparator5 = new javax.swing.JSeparator();\r\n m.add(jSeparator5);\r\n\r\n jMenuHSpacing = new javax.swing.JMenu();\r\n jMenuHSpacing.setText(it.businesslogic.ireport.util.I18n.getString(\"horizontalSpacing\", \"Horizontal spacing...\"));\r\n\r\n jMenuItemHSMakeEqual = new javax.swing.JMenuItem();\r\n jMenuItemHSMakeEqual.setText(it.businesslogic.ireport.util.I18n.getString(\"makeEqual\", \"Make equal\"));\r\n jMenuItemHSMakeEqual.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemHSMakeEqualActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuHSpacing.add(jMenuItemHSMakeEqual);\r\n\r\n jMenuItemHSIncrease = new javax.swing.JMenuItem();\r\n jMenuItemHSIncrease.setText(it.businesslogic.ireport.util.I18n.getString(\"increase\", \"Increase\"));\r\n jMenuItemHSIncrease.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemHSIncreaseActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuHSpacing.add(jMenuItemHSIncrease);\r\n\r\n jMenuItemHSDecrease = new javax.swing.JMenuItem();\r\n jMenuItemHSDecrease.setText(it.businesslogic.ireport.util.I18n.getString(\"decrease\", \"Decrease\"));\r\n jMenuItemHSDecrease.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemHSDecreaseActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuHSpacing.add(jMenuItemHSDecrease);\r\n\r\n jMenuItemHSRemove = new javax.swing.JMenuItem();\r\n jMenuItemHSRemove.setText(it.businesslogic.ireport.util.I18n.getString(\"remove\", \"Remove\"));\r\n jMenuItemHSRemove.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemHSRemoveActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuHSpacing.add(jMenuItemHSRemove);\r\n\r\n m.add(jMenuHSpacing);\r\n\r\n jMenuVSpacing = new javax.swing.JMenu();\r\n jMenuVSpacing.setText(it.businesslogic.ireport.util.I18n.getString(\"verticalSpacing\", \"Vertical spacing\"));\r\n jMenuItemVSMakeEqual = new javax.swing.JMenuItem();\r\n jMenuItemVSMakeEqual.setText(it.businesslogic.ireport.util.I18n.getString(\"makeEqual\", \"Make equal\"));\r\n jMenuItemVSMakeEqual.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemVSMakeEqualActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuVSpacing.add(jMenuItemVSMakeEqual);\r\n\r\n jMenuItemVSIncrease = new javax.swing.JMenuItem();\r\n jMenuItemVSIncrease.setText(it.businesslogic.ireport.util.I18n.getString(\"increase\", \"Increase\"));\r\n jMenuItemVSIncrease.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemVSIncreaseActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuVSpacing.add(jMenuItemVSIncrease);\r\n\r\n jMenuItemVSDecrease = new javax.swing.JMenuItem();\r\n jMenuItemVSDecrease.setText(it.businesslogic.ireport.util.I18n.getString(\"decrease\", \"Decrease\"));\r\n jMenuItemVSDecrease.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemVSDecreaseActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuVSpacing.add(jMenuItemVSDecrease);\r\n\r\n jMenuItemVSRemove = new javax.swing.JMenuItem();\r\n jMenuItemVSRemove.setText(it.businesslogic.ireport.util.I18n.getString(\"remove\", \"Remove\"));\r\n jMenuItemVSRemove.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemVSRemoveActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuVSpacing.add(jMenuItemVSRemove);\r\n\r\n m.add(jMenuVSpacing);\r\n\r\n jSeparator8 = new javax.swing.JSeparator();\r\n m.add(jSeparator8);\r\n\r\n jMenuItemBringToFront = new javax.swing.JMenuItem();\r\n jMenuItemBringToFront.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/sendtofront.png\")));\r\n jMenuItemBringToFront.setText(it.businesslogic.ireport.util.I18n.getString(\"bringToFront\", \"Bring to front\"));\r\n jMenuItemBringToFront.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemBringToFrontActionPerformed(evt);\r\n }\r\n });\r\n\r\n m.add(jMenuItemBringToFront);\r\n\r\n jMenuItemSendToBack = new javax.swing.JMenuItem();\r\n jMenuItemSendToBack.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/sendtoback.png\")));\r\n jMenuItemSendToBack.setText(it.businesslogic.ireport.util.I18n.getString(\"sendToBack\", \"Send to back\"));\r\n jMenuItemSendToBack.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemSendToBackActionPerformed(evt);\r\n }\r\n });\r\n\r\n m.add(jMenuItemSendToBack);\r\n\r\n }",
"private void codigoInicial() {\r\n itemPanels = new itemPanel[5];\r\n itemPanels[0] = new itemPanel(null, null, false);\r\n itemPanels[1] = new itemPanel(null, null, false);\r\n itemPanels[2] = new itemPanel(null, null, false);\r\n itemPanels[3] = new itemPanel(null, null, false);\r\n itemPanels[4] = new itemPanel(null, null, false);\r\n\r\n setSize(1082, 662);\r\n jpaneMenu.setBackground(AtributosGUI.color_principal);\r\n setLocationRelativeTo(null);\r\n\r\n\r\n java.awt.Color color_primario = AtributosGUI.color_principal;\r\n\r\n jpanePerfil.setBackground(color_primario);\r\n jpaneHorario.setBackground(color_primario);\r\n jpaneCursos.setBackground(color_primario);\r\n jpaneTramites.setBackground(color_primario);\r\n jpaneSalud.setBackground(color_primario);\r\n jpaneMenuItems.setBackground(color_primario);\r\n\r\n jlblCursos.setFont(AtributosGUI.item_label_font);\r\n jlblHorario.setFont(AtributosGUI.item_label_font);\r\n jlblPerfil.setFont(AtributosGUI.item_label_font);\r\n jlblSalud.setFont(AtributosGUI.item_label_font);\r\n jlblTramites.setFont(AtributosGUI.item_label_font);\r\n\r\n jlblCursos.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n jlblHorario.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n jlblPerfil.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n jlblSalud.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n jlblTramites.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n\r\n jpaneActiveCursos.setBackground(AtributosGUI.item_Off_panel_active);\r\n jpaneActiveHorario.setBackground(AtributosGUI.item_Off_panel_active);\r\n jpaneActivePerfil.setBackground(AtributosGUI.item_Off_panel_active);\r\n jpaneActiveSalud.setBackground(AtributosGUI.item_Off_panel_active);\r\n jpaneActiveTramites.setBackground(AtributosGUI.item_Off_panel_active);\r\n\r\n \r\n\r\n }",
"public void InitializeMenu(){\n\t\tmnbBar = new JMenuBar();\n\t\tmnuFile = new JMenu(\"File\");\n\t\tmnuFormat = new JMenu(\"Format\");\n\t\tmniOpen = new JMenuItem(\"Open\");\n\t\tmniExit = new JMenuItem(\"Exit\");\n\t\tmniSave = new JMenuItem(\"Save\");\n\t\tmniSaveAs = new JMenuItem(\"Save as\");\n\t\tmniSaveAs.setMnemonic(KeyEvent.VK_A);\n\t\tmniSave.setMnemonic(KeyEvent.VK_S);\n\t\tmniChangeBgColor = new JMenuItem(\"Change Backgroud Color\");\n\t\tmniChangeFontColor = new JMenuItem(\"Change Font Color\");\n\t\t//them menu item vao menu file\n\t\tmnuFile.add(mniOpen);\n\t\tmnuFile.addSeparator();\n\t\tmnuFile.add(mniExit);\n\t\tmnuFile.add(mniSaveAs);\n\t\tmnuFile.add(mniSave);\n\t\t//them menu item vao menu format\n\t\tmnuFormat.add(mniChangeBgColor);\n\t\tmnuFormat.addSeparator();\n\t\tmnuFormat.add(mniChangeFontColor);\n\t\t//them menu file va menu format vao menu bar\n\t\tmnbBar.add(mnuFile);\n\t\tmnbBar.add(mnuFormat);\n\t\t//thiet lap menubar thanh menu chinh cua frame\n\t\tsetJMenuBar(mnbBar);\n\t}",
"public interface IMenu {\r\n public class MenuItem {\r\n \r\n public static final MenuItem SEPARATOR = new MenuItem(\"SEPARATOR\", \"Separator\");\r\n \r\n private String menuId;\r\n private String menuText;\r\n private boolean checked;\r\n \r\n public MenuItem(String menuId, String menuText) {\r\n this.menuId = menuId;\r\n this.menuText = menuText;\r\n }\r\n\r\n public MenuItem(String menuText, boolean checked) {\r\n this.menuText = menuText; \r\n this.checked = checked;\r\n }\r\n\r\n public String getMenuId() {\r\n return menuId;\r\n }\r\n\r\n public void setMenuId(String menuId) {\r\n this.menuId = menuId;\r\n }\r\n\r\n public String getMenuText() {\r\n return menuText;\r\n }\r\n\r\n public void setMenuText(String menuText) {\r\n this.menuText = menuText;\r\n }\r\n\r\n public boolean isChecked() {\r\n return checked;\r\n }\r\n\r\n public void setChecked(boolean checked) {\r\n this.checked = checked;\r\n }\r\n }\r\n \r\n /**\r\n * Callback function for Caller when the MenuItem is clicked\r\n * \r\n * @param menuItemSelected The selected MenuItem\r\n */\r\n public void menuClicked(MenuItem menuItemSelected);\r\n}",
"public void addMenu(Menu menu) {\r\n\t\titems.add(menu);\r\n\t}",
"@Override\n\t\tpublic void openMenu() {\n\t\t}",
"private void constructMenus()\n\t{\n\t\tthis.fileMenu = new JMenu(\"File\");\n\t\tthis.editMenu = new JMenu(\"Edit\");\n\t\tthis.caseMenu = new JMenu(\"Case\");\n\t\tthis.imageMenu = new JMenu(\"Image\");\n\t\tthis.fileMenu.add(this.saveImageMenuItem);\n\t\tthis.fileMenu.addSeparator();\n\t\tthis.fileMenu.add(this.quitMenuItem);\n\t\tthis.editMenu.add(this.undoMenuItem);\n\t\tthis.editMenu.add(this.redoMenuItem);\n\t\tthis.caseMenu.add(this.removeImageMenuItem);\n\t\tthis.imageMenu.add(this.antiAliasMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.brightenMenuItem);\n\t\tthis.imageMenu.add(this.darkenMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.grayscaleMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.resizeMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.cropMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.rotate90MenuItem);\n\t\tthis.imageMenu.add(this.rotate180MenuItem);\n\t\tthis.imageMenu.add(this.rotate270MenuItem);\n\t}",
"public void setUpEditMenu() {\n add(editMenu);\n\n //editMenu.add(cutItem);\n //editMenu.add(copyItem);\n //editMenu.add(pasteItem);\n //editMenu.addSeparator();\n clearAllItems.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n world.deleteAllEntities();\n }\n });\n editMenu.add(clearAllItems);\n editMenu.addSeparator();\n JMenuItem loadVectors = new JMenuItem(\"Load stimulus vectors...\");\n loadVectors.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n SFileChooser chooser = new SFileChooser(\".\", \"Load vectors\");\n File theFile = chooser.showOpenDialog();\n if (theFile != null) {\n double[][] vecs = Utils.getDoubleMatrix(theFile);\n world.loadStimulusVectors(vecs);\n }\n }\n });\n editMenu.add(loadVectors);\n\n }",
"protected void fillMenu(MenuBar menuBar) {\n\t\tMenu fileMenu = new Menu(\"Файл\");\n\t\n\t\tMenuItem loginMenuItem = new MenuItem(\"Сменить пользователя\");\n\t\tloginMenuItem.setOnAction(actionEvent -> main.logout());\n\t\n\t\tMenuItem exitMenuItem = new MenuItem(\"Выход (выключить планшет)\");\n\t\texitMenuItem.setOnAction(actionEvent -> main.requestShutdown());\n\t\texitMenuItem.setAccelerator(KeyCombination.keyCombination(\"Alt+F4\"));\n\t\n\t\n\t\tfileMenu.getItems().addAll( loginMenuItem,\n\t\t\t\tnew SeparatorMenuItem(), exitMenuItem);\n\t\n\t\n\t\n\t\tMenu navMenu = new Menu(\"Навигация\");\n\t\n\t\tMenuItem navHomeMap = new MenuItem(\"На общую карту\");\n\t\t//navHomeMap.setOnAction(actionEvent -> setMapData(bigMapData));\n\t\tnavHomeMap.setOnAction(actionEvent -> setMapData(main.ml.getRootMap()));\n\t\n\t\tMenu navMaps = new Menu(\"Карты\");\n\t\t//navMaps.setOnAction(actionEvent -> setMapData(bigMapData));\n\t\tmain.ml.fillMapsMenu( navMaps, this );\n\t\n\t\tMenuItem navOverview = new MenuItem(\"Обзор\");\n\t\tnavOverview.setOnAction(actionEvent -> setOverviewScale());\n\t\n\t\tnavMenu.getItems().addAll( navHomeMap, navMaps, new SeparatorMenuItem(), navOverview );\n\t\n\t\t\n\t\t\n\t\tMenu dataMenu = new Menu(\"Данные\");\n\t\n\t\tServerUnitType.forEach(t -> {\n\t\t\tMenuItem dataItem = new MenuItem(t.getDisplayName());\n\t\t\tdataItem.setOnAction(actionEvent -> new EntityListWindow(t, main.rc, main.sc));\n\t\n\t\t\tdataMenu.getItems().add(dataItem);\t\t\t\n\t\t});\n\t\t\n\t\t//dataMenu.Menu debugMenu = new Menu(\"Debug\");\n\t\t//MenuItem d1 = new MenuItem(\"На общую карту\");\n\t\t//d1.setOnAction(actionEvent -> setMapData(main.ml.getRootMap()));\n\t\n\t\t\n\t\t/*\n\t Menu webMenu = new Menu(\"Web\");\n\t CheckMenuItem htmlMenuItem = new CheckMenuItem(\"HTML\");\n\t htmlMenuItem.setSelected(true);\n\t webMenu.getItems().add(htmlMenuItem);\n\t\n\t CheckMenuItem cssMenuItem = new CheckMenuItem(\"CSS\");\n\t cssMenuItem.setSelected(true);\n\t webMenu.getItems().add(cssMenuItem);\n\t\n\t Menu sqlMenu = new Menu(\"SQL\");\n\t ToggleGroup tGroup = new ToggleGroup();\n\t RadioMenuItem mysqlItem = new RadioMenuItem(\"MySQL\");\n\t mysqlItem.setToggleGroup(tGroup);\n\t\n\t RadioMenuItem oracleItem = new RadioMenuItem(\"Oracle\");\n\t oracleItem.setToggleGroup(tGroup);\n\t oracleItem.setSelected(true);\n\t\n\t sqlMenu.getItems().addAll(mysqlItem, oracleItem,\n\t new SeparatorMenuItem());\n\t\n\t Menu tutorialManeu = new Menu(\"Tutorial\");\n\t tutorialManeu.getItems().addAll(\n\t new CheckMenuItem(\"Java\"),\n\t new CheckMenuItem(\"JavaFX\"),\n\t new CheckMenuItem(\"Swing\"));\n\t\n\t sqlMenu.getItems().add(tutorialManeu);\n\t\t */\n\t\n\t\tMenu aboutMenu = new Menu(\"О системе\");\n\t\n\t\tMenuItem version = new MenuItem(\"Версия\");\n\t\tversion.setOnAction(actionEvent -> showAbout());\n\t\n\t\tMenuItem aboutDz = new MenuItem(\"Digital Zone\");\n\t\taboutDz.setOnAction(actionEvent -> main.getHostServices().showDocument(Defs.HOME_URL));\n\t\n\t\tMenuItem aboutVita = new MenuItem(\"VitaSoft\");\n\t\taboutVita.setOnAction(actionEvent -> main.getHostServices().showDocument(\"vtsft.ru\"));\n\t\n\t\taboutMenu.getItems().addAll( version, new SeparatorMenuItem(), aboutDz, aboutVita );\n\t\n\t\t// --------------- Menu bar\n\t\n\t\t//menuBar.getMenus().addAll(fileMenu, webMenu, sqlMenu);\n\t\tmenuBar.getMenus().addAll(fileMenu, navMenu, dataMenu, aboutMenu );\n\t}",
"public MyMenu() {\n this(DSL.name(\"MY_MENU\"), null);\n }",
"@Override\n\t\t\tpublic void menuSelected(MenuItem selectedItem)\n\t\t\t{\n\n\t\t\t}",
"@Override\n\t\t\tpublic void menuSelected(MenuItem selectedItem)\n\t\t\t{\n\n\t\t\t}",
"@Override\r\n\tpublic void onMenuItemSelected(MenuItem item) {\n\r\n\t}",
"public interface Menu {\n\n /**\n * Add an item to the menu.\n *\n * @param title Title of the item (which will be interpreted as plain text and\n * HTML-escaped if necessary)\n * @param callback Code to execute when the item is selected\n * @return A MenuItem representing the added item\n */\n MenuItem addItem(String title, Command callback);\n\n /**\n * Add an item to the menu.\n *\n * @param title Title of the item, as a {@link SafeHtml}\n * @param callback Code to execute when the item is selected\n * @return A MenuItem representing the added item\n */\n MenuItem addItem(SafeHtml title, Command callback);\n}",
"public AdminMenu(JDealsController sysCtrl) {\n super(\"Select Menu\", sysCtrl);\n\n this.addItem(\"Admin Panel\", new Callable() {\n @Override\n public Boolean call() throws Exception {\n new AdminCommandList(getSysCtrl()).runMenu();\n return true;\n }\n });\n\n this.addItem(\"Default Menu\", new Callable() {\n @Override\n public Boolean call() throws Exception {\n new UserMenu(getSysCtrl()).runMenu();\n return true;\n }\n });\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu2, menu);\n this.menu=menu;\n if(idName!=null) {menu.getItem(1).setVisible(false);\n menu.getItem(2).setVisible(true);}\n if(create) menu.getItem(0).setVisible(false);\n else menu.getItem(0).setVisible(true);\n /* if(extrasBundle!=null) if(extrasBundle.getBoolean(\"From Option\")==true) {\n menu.getItem(1).setVisible(false);\n menu.getItem(0).setVisible(true);\n\n }*/\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// Primero configura el menu de MenuActivity\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\t// Activa el item\n\t\tMenuItem item = menu.findItem(R.id.menu_borrar_busquedas);\t\t\n\t\tif (item !=null) {\n\t\t\titem.setEnabled(true);\n\t\t\titem.setVisible(true);\n\t\t}\t\t\n\t\treturn true;\n\t}",
"public MainMenu() {\n super();\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.select_items, menu);\n return true;\n }",
"@Override\n public void create(SwipeMenu menu) {\n SwipeMenuItem goodItem = new SwipeMenuItem(getContext());\n // set item background\n goodItem.setBackground(new ColorDrawable(Color.rgb(0x30, 0xB1, 0xF5)));\n // set item width\n goodItem.setWidth(dp2px(90));\n // set a icon\n goodItem.setIcon(R.mipmap.ic_action_good);\n // add to menu\n menu.addMenuItem(goodItem);\n // create \"delete\" item\n SwipeMenuItem deleteItem = new SwipeMenuItem(getContext());\n // set item background\n deleteItem.setBackground(new ColorDrawable(Color.rgb(0xF9, 0x3F, 0x25)));\n // set item width\n deleteItem.setWidth(dp2px(90));\n // set a icon\n deleteItem.setIcon(R.mipmap.ic_action_discard);\n // add to menu\n menu.addMenuItem(deleteItem);\n }",
"void addMenu(V object);",
"public JMenu addMenuItem (String texte, JMenu menu,String toolTipText) {\n JMenuItem item = new JMenuItem(texte);\n item.addActionListener(this);\n menu.add(item);\n menu.addSeparator();\n item.setToolTipText(toolTipText);\n return menu;\n }",
"@Override\n public boolean onPrepareOptionsMenu (Menu menu) {\n \n return super.onPrepareOptionsMenu (menu);\n \n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuItem item1 = menu.add(Menu.NONE, MENU_ID_ITEM1, Menu.NONE, \"設定削除\");\n\t\titem1.setIcon(android.R.drawable.ic_menu_delete);\n\t\tMenuItem item2 = menu.add(Menu.NONE, MENU_ID_ITEM2, Menu.NONE, \"終了\");\n\t\titem2.setIcon(android.R.drawable.ic_menu_close_clear_cancel);\n\t\treturn true;\n\t}",
"private MenuManager createEditMenu() {\n\t\tMenuManager menu = new MenuManager(\"&Edition\", Messages.getString(\"IU.Strings.40\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tmenu.add(new GroupMarker(Messages.getString(\"IU.Strings.41\"))); //$NON-NLS-1$\n\n\t\tmenu.add(getAction(ActionFactory.UNDO.getId()));\n\t\tmenu.add(getAction(ActionFactory.REDO.getId()));;\n\n\t\tmenu.add(new GroupMarker(IWorkbenchActionConstants.UNDO_EXT));\n\t\tmenu.add(new Separator());\n\t\tmenu.add(getAction(ActionFactory.CUT.getId()));\n\t\tmenu.add(getAction(ActionFactory.COPY.getId()));\n\t\tmenu.add(getAction(ActionFactory.PASTE.getId()));\n\t\tmenu.add(new GroupMarker(IWorkbenchActionConstants.CUT_EXT));\n\t\tmenu.add(new Separator());\n\t\tmenu.add(getAction(ActionFactory.DELETE.getId()));\n\t\tmenu.add(getAction(ActionFactory.SELECT_ALL.getId()));\n\t\tmenu.add(getAction(ActionFactory.FIND.getId()));\n\t\tmenu.add(new Separator());\n\t\tmenu.add(getAction(ActionFactory.PREFERENCES.getId()));\n\t\treturn menu;\n\t}",
"private void createMenu() {\n\t\tJMenuBar mb = new JMenuBar();\n\t\tsetJMenuBar(mb);\n\t\tmb.setVisible(true);\n\t\t\n\t\tJMenu menu = new JMenu(\"File\");\n\t\tmb.add(menu);\n\t\t//mb.getComponent();\n\t\tmenu.add(new JMenuItem(\"Exit\"));\n\t\t\n\t\t\n\t}",
"public Menu() {\n\n\t}",
"private void makeUtilitiesMenu() {\r\n\t\tJMenu utilitiesMnu = new JMenu(\"Utilidades\");\r\n\t\tboolean isAccesible = false;\r\n\r\n\t\tif (StoreCore.getAccess(\"Reportes\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Reportes\",\r\n\t\t\t\t\timageLoader.getImage(\"reports.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'r',\r\n\t\t\t\t\t\"Ver los reportes del sistema\", null,\r\n\t\t\t\t\tReports.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"ConsultarPrecios\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Consultar Precios\",\r\n\t\t\t\t\timageLoader.getImage(\"money.gif\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'p',\r\n\t\t\t\t\t\"Consultar los precios de los productos\", null,\r\n\t\t\t\t\tPriceRead.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Calculadora\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Calculadora Impuesto\",\r\n\t\t\t\t\timageLoader.getImage(\"pc.gif\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'c',\r\n\t\t\t\t\t\"Calculadora de impuesto\", null, Calculator.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tutilitiesMnu.addSeparator();\r\n\t\tif (StoreCore.getAccess(\"Categorias\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Categorias Inventario\",\r\n\t\t\t\t\timageLoader.getImage(\"group.gif\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'i',\r\n\t\t\t\t\t\"Manejar las categorias del inventario\", null, Groups.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Impuestos\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Impuestos\");\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 't',\r\n\t\t\t\t\t\"Manejar el listado de impuestos\", null, Tax.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Ciudades\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Ciudades\");\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'u',\r\n\t\t\t\t\t\"Manejar el listado de ciudades\", null, City.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (isAccesible) {\r\n\t\t\tutilitiesMnu.setMnemonic('u');\r\n\t\t\tadd(utilitiesMnu);\r\n\t\t}\r\n\t}",
"UmsMenu getItem(Long id);",
"public ChessMenuBar() {\n String[] menuCategories = {\"File\", \"Options\", \"Help\"};\n String[] menuItemLists =\n {\"New game/restart,Exit\", \"Toggle graveyard,Toggle game log\",\n \"About\"};\n for (int i = 0; i < menuCategories.length; i++) {\n JMenu currMenu = new JMenu(menuCategories[i]);\n String[] currMenuItemList = menuItemLists[i].split(\",\");\n for (int j = 0; j < currMenuItemList.length; j++) {\n JMenuItem currItem = new JMenuItem(currMenuItemList[j]);\n currItem.addActionListener(new MenuListener());\n currMenu.add(currItem);\n }\n this.add(currMenu);\n }\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_item, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_item, menu);\n return true;\n }",
"IMenu getMainMenu();",
"protected abstract List<OpcionMenu> inicializarOpcionesMenu();",
"private JMenuBar createMenuBar()\r\n {\r\n UIManager.put(\"Menu.selectionBackground\", new Color(0xDA,0xDD,0xED));\r\n UIManager.put(\"MenuItem.selectionForeground\", Color.LIGHT_GRAY);\r\n JMenuBar menuBar = new JMenuBar();\r\n JMenu menu = new JMenu(\"Fil\");\r\n UIManager.put(\"MenuItem.selectionBackground\", menu.getBackground());\r\n menuItemSave = new JMenuItem(\"Lagre\");\r\n UIManager.put(\"MenuItem.selectionBackground\", menuItemSave.getBackground());\r\n menuItemSave.setForeground(Color.LIGHT_GRAY);\r\n menuItemSave.setBorder(BorderFactory.createEmptyBorder());\r\n menuItemSave.setAccelerator(KeyStroke.getKeyStroke('S', Event.CTRL_MASK));\r\n menuItemSave.addActionListener(listener);\r\n menu.add(menuItemSave);\r\n menuItemPrint = new JMenuItem(\"Skriv ut\");\r\n menuItemPrint.setForeground(Color.LIGHT_GRAY);\r\n menuItemPrint.setBorder(BorderFactory.createEmptyBorder());\r\n menuItemPrint.setAccelerator(KeyStroke.getKeyStroke('P', Event.CTRL_MASK));\r\n menuItemPrint.addActionListener(listener);\r\n menu.add(menuItemPrint);\r\n menu.addSeparator();\r\n menuItemLogout = new JMenuItem(\"Logg av\");\r\n menuItemLogout.setForeground(Color.LIGHT_GRAY);\r\n menuItemLogout.setBorder(BorderFactory.createEmptyBorder());\r\n menuItemLogout.addActionListener(listener);\r\n menuItemLogout.setAccelerator(KeyStroke.getKeyStroke('L', Event.CTRL_MASK));\r\n menu.add(menuItemLogout);\r\n UIManager.put(\"MenuItem.selectionBackground\", new Color(0xDA,0xDD,0xED));\r\n UIManager.put(\"MenuItem.selectionForeground\", Color.BLACK);\r\n menuItemClose = new JMenuItem(\"Avslutt\");\r\n menuItemClose.setAccelerator(KeyStroke.getKeyStroke('A', Event.CTRL_MASK));\r\n menuItemClose.addActionListener(listener);\r\n menuBar.add(menu);\r\n menu.add(menuItemClose);\r\n JMenu menu2 = new JMenu(\"Om\");\r\n menuItemAbout = new JMenuItem(\"Om\");\r\n menuItemAbout.setAccelerator(KeyStroke.getKeyStroke('O', Event.CTRL_MASK));\r\n menuItemAbout.addActionListener(listener);\r\n menuItemAbout.setBorder(BorderFactory.createEmptyBorder());\r\n menu2.add(menuItemAbout);\r\n menuBar.add(menu2);\r\n \r\n return menuBar;\r\n }",
"protected void getViewMenuItems(List items, boolean forMenuBar) {\n super.getViewMenuItems(items, forMenuBar);\n items.add(GuiUtils.MENU_SEPARATOR);\n List paramItems = new ArrayList();\n paramItems.add(GuiUtils.makeCheckboxMenuItem(\"Show Parameter Table\",\n this, \"showTable\", null));\n paramItems.add(doMakeChangeParameterMenuItem());\n List choices = getDataChoices();\n for (int i = 0; i < choices.size(); i++) {\n paramItems.addAll(getParameterMenuItems(i));\n }\n\n items.add(GuiUtils.makeMenu(\"Parameters\", paramItems));\n\n JMenu chartMenu = new JMenu(\"Chart\");\n chartMenu.add(\n GuiUtils.makeCheckboxMenuItem(\n \"Show Thumbnail in Legend\", getChart(), \"showThumb\", null));\n List chartMenuItems = new ArrayList();\n getChart().addViewMenuItems(chartMenuItems);\n GuiUtils.makeMenu(chartMenu, chartMenuItems);\n items.add(chartMenu);\n items.add(doMakeProbeMenu(new JMenu(\"Probe\")));\n\n }",
"private void makeStockMenu() {\r\n\t\tJMenu stockMnu = new JMenu(\"Inventario\");\r\n\t\tboolean isAccesible = false;\r\n\r\n\t\tif (StoreCore.getAccess(\"Inventario\")) {\r\n\t\t\tisAccesible = true;\r\n\r\n\t\t\tif (StoreCore.getAccess(\"AgregarInventario\")) {\r\n\t\t\t\tJMenuItem addItem = new JMenuItem(\"Agregar Articulo\");\r\n\t\t\t\taddItem.setMnemonic('a');\r\n\t\t\t\taddItem.setToolTipText(\"Agregar rapidamente un nuevo articulo\");\r\n\t\t\t\taddItem.addActionListener(new ActionListener() {\r\n\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\t\tnew AddStockItem(\"\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\t\t\tstockMnu.add(addItem);\r\n\t\t\t}\r\n\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Listar Inventario\",\r\n\t\t\t\t\timageLoader.getImage(\"world.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'v', \"Ver el inventario\",\r\n\t\t\t\t\tKeyStroke.getKeyStroke(KeyEvent.VK_F2, 0), Stock.class);\r\n\t\t\tstockMnu.add(menuItem);\r\n\t\t\tstockMnu.addSeparator();\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Kardex\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Ver Kardex\", \r\n\t\t\t\t\timageLoader.getImage(\"kardexSingle.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'k', \"Ver el kardex\", null,\r\n\t\t\t\t\tKardex.class);\r\n\t\t\tstockMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (isAccesible) {\r\n\t\t\tstockMnu.setMnemonic('i');\r\n\t\t\tadd(stockMnu);\r\n\t\t}\r\n\t}",
"public Menu()\n {\n \n }",
"@Override\n public void menuSelected(MenuEvent e) {\n \n }",
"private JMenu createLanguageMenu() {\n\t\tAction nestoAction = new AbstractAction() {\n\n\t\t\t/** The generated serial user ID */\n\t\t\tprivate static final long serialVersionUID = -4439263551767223123L;\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJMenuItem src = (JMenuItem) e.getSource();\n\t\t\t\tString arg = src.getText();\n\t\t\t\tLocalizationProvider.getInstance().setLanguage(arg);\n\t\t\t\tLocalizationProvider.getInstance().fire();\n\t\t\t}\n\t\t};\n\n\t\titemHR = new JMenuItem(nestoAction);\n\t\titemHR.setText(\"hr\");\n\t\titemEN = new JMenuItem(nestoAction);\n\t\titemEN.setText(\"en\");\n\t\titemDE = new JMenuItem(nestoAction);\n\t\titemDE.setText(\"de\");\n\n\t\tlangMenu = new JMenu(flp.getString(\"lang\"));\n\n\t\tlangMenu.add(itemHR);\n\t\tlangMenu.add(itemEN);\n\t\tlangMenu.add(itemDE);\n\n\t\treturn langMenu;\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n getMenuInflater().inflate(R.menu.menu,menu);\r\n return super.onCreateOptionsMenu(menu);\r\n }",
"private void buildMenu() {\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n\n JMenu fileMenu = new JMenu(\"File\");\n fileMenu.addMenuListener(this);\n\n JMenuItem openItem = new JMenuItem(\"Open\");\n openItem.setEnabled(false);\n JMenuItem newItem = new JMenuItem(\"New\");\n newItem.setEnabled(false);\n saveItem = new JMenuItem(\"Save\");\n saveItem.setEnabled(false);\n saveAsItem = new JMenuItem(\"Save As\");\n saveAsItem.setEnabled(false);\n reloadCalItem = new JMenuItem(RELOAD_CAL);\n exitItem = new JMenuItem(EXIT);\n\n mbar.add(makeMenu(fileMenu, new Object[]{newItem, openItem, null,\n reloadCalItem, null,\n saveItem, saveAsItem, null, exitItem}, this));\n\n JMenu viewMenu = new JMenu(\"View\");\n mbar.add(viewMenu);\n JMenuItem columnItem = new JMenuItem(COLUMNS);\n columnItem.addActionListener(this);\n JMenuItem logItem = new JMenuItem(LOG);\n logItem.addActionListener(this);\n JMenu satMenu = new JMenu(\"Satellite Image\");\n JMenuItem irItem = new JMenuItem(INFRA_RED);\n irItem.addActionListener(this);\n JMenuItem wvItem = new JMenuItem(WATER_VAPOUR);\n wvItem.addActionListener(this);\n satMenu.add(irItem);\n satMenu.add(wvItem);\n viewMenu.add(columnItem);\n viewMenu.add(logItem);\n viewMenu.add(satMenu);\n\n observability = new JCheckBoxMenuItem(\"Observability\", true);\n observability.setToolTipText(\"Check that the source is observable.\");\n remaining = new JCheckBoxMenuItem(\"Remaining\", true);\n remaining.setToolTipText(\n \"Check that the MSB has repeats remaining to be observed.\");\n allocation = new JCheckBoxMenuItem(\"Allocation\", true);\n allocation.setToolTipText(\n \"Check that the project still has sufficient time allocated.\");\n\n String ZOA = System.getProperty(\"ZOA\", \"true\");\n boolean tickZOA = true;\n if (\"false\".equalsIgnoreCase(ZOA)) {\n tickZOA = false;\n }\n\n zoneOfAvoidance = new JCheckBoxMenuItem(\"Zone of Avoidance\", tickZOA);\n localQuerytool.setZoneOfAvoidanceConstraint(!tickZOA);\n\n disableAll = new JCheckBoxMenuItem(\"Disable All\", false);\n JMenuItem cutItem = new JMenuItem(\"Cut\",\n new ImageIcon(ClassLoader.getSystemResource(\"cut.gif\")));\n cutItem.setEnabled(false);\n JMenuItem copyItem = new JMenuItem(\"Copy\",\n new ImageIcon(ClassLoader.getSystemResource(\"copy.gif\")));\n copyItem.setEnabled(false);\n JMenuItem pasteItem = new JMenuItem(\"Paste\",\n new ImageIcon(ClassLoader.getSystemResource(\"paste.gif\")));\n pasteItem.setEnabled(false);\n\n mbar.add(makeMenu(\"Edit\",\n new Object[]{\n cutItem,\n copyItem,\n pasteItem,\n null,\n makeMenu(\"Constraints\", new Object[]{observability,\n remaining, allocation, zoneOfAvoidance, null,\n disableAll}, this)}, this));\n\n mbar.add(SampClient.getInstance().buildMenu(this, sorter, table));\n\n JMenu helpMenu = new JMenu(\"Help\");\n helpMenu.setMnemonic('H');\n\n mbar.add(makeMenu(helpMenu, new Object[]{new JMenuItem(INDEX, 'I'),\n new JMenuItem(ABOUT, 'A')}, this));\n\n menuBuilt = true;\n }",
"private void setUpMenu() {\n resideMenu = new ResideMenu(this);\n resideMenu.setBackground(R.drawable.menu_background);\n resideMenu.attachToActivity(this);\n\n //resideMenu.setMenuListener(menuListener);\n //scaling activity slide ke menu\n resideMenu.setScaleValue(0.7f);\n\n itemHome = new ResideMenuItem(this, R.drawable.ic_home, \"Home\");\n itemProfile = new ResideMenuItem(this, R.drawable.ic_profile, \"Profile\");\n //itemCalendar = new ResideMenuItem(this, R.drawable.ic_calendar, \"Calendar\");\n itemSchedule = new ResideMenuItem(this, R.drawable.ic_schedule, \"Schedule\");\n //itemExams = new ResideMenuItem(this, R.drawable.ic_exams, \"Exams\");\n //itemSettings = new ResideMenuItem(this, R.drawable.ic_setting, \"Settings\");\n //itemChat = new ResideMenuItem(this, R.drawable.ic_chat, \"Chat\");\n //itemTask = new ResideMenuItem(this, R.drawable.ic_task, \"Task\");\n\n\n resideMenu.addMenuItem(itemHome, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemProfile, ResideMenu.DIRECTION_LEFT);\n // resideMenu.addMenuItem(itemCalendar, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemSchedule, ResideMenu.DIRECTION_LEFT);\n //resideMenu.addMenuItem(itemExams, ResideMenu.DIRECTION_LEFT);\n //resideMenu.addMenuItem(itemTask, ResideMenu.DIRECTION_LEFT);\n //resideMenu.addMenuItem(itemChat, ResideMenu.DIRECTION_LEFT);\n //resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_LEFT);\n\n // matikan slide ke kanan\n resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n itemHome.setOnClickListener(this);\n itemSchedule.setOnClickListener(this);\n itemProfile.setOnClickListener(this);\n //itemSettings.setOnClickListener(this);\n\n\n }"
]
| [
"0.7403254",
"0.714617",
"0.71303064",
"0.69891447",
"0.68302375",
"0.68204343",
"0.68062824",
"0.67960864",
"0.6720121",
"0.6706336",
"0.6704265",
"0.66949743",
"0.6662704",
"0.6658924",
"0.65930367",
"0.6572683",
"0.655443",
"0.65412384",
"0.6527589",
"0.6505582",
"0.645352",
"0.6447634",
"0.6441545",
"0.6436533",
"0.640315",
"0.6396093",
"0.63872516",
"0.6384804",
"0.637979",
"0.63790756",
"0.63770074",
"0.63571674",
"0.63565296",
"0.634855",
"0.6336204",
"0.63356125",
"0.6334472",
"0.6326128",
"0.63246685",
"0.6317065",
"0.63108504",
"0.63076067",
"0.6306026",
"0.6303488",
"0.62990737",
"0.62985545",
"0.62969184",
"0.62948686",
"0.6290641",
"0.6287967",
"0.62802535",
"0.6278545",
"0.62719893",
"0.6267785",
"0.62676835",
"0.6263724",
"0.6257374",
"0.6248503",
"0.62392503",
"0.6234248",
"0.6224032",
"0.62164193",
"0.6213061",
"0.6210876",
"0.6209162",
"0.6201673",
"0.6198432",
"0.6192535",
"0.6192535",
"0.6192368",
"0.6190935",
"0.61850816",
"0.61811405",
"0.6166534",
"0.6164637",
"0.6139271",
"0.6138463",
"0.6134547",
"0.6133565",
"0.6130817",
"0.61301064",
"0.61282724",
"0.6126815",
"0.6124544",
"0.6123537",
"0.6121666",
"0.6120011",
"0.6119703",
"0.6119703",
"0.6118128",
"0.61166257",
"0.6115595",
"0.6111946",
"0.610673",
"0.61031574",
"0.61027586",
"0.6099534",
"0.60951716",
"0.6092578",
"0.6092452"
]
| 0.6539659 | 18 |
Metoda ktora initializuje toto menu s novymi udajmi. Novymi udajmi je entita zadana parametrom pre ktoru vytvarame menu. Parameter origMenu sluzi ako vzor pre toto menu z ktoreho ziskavame pozadie tohoto menu. | @Override
public ItemMenu initialize(AbstractInMenu origMenu, Entity e1, Entity e2) {
this.toDraw = origMenu.getDrawImage();
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void test_setMenuLorg_eclipse_swt_widgets_Menu () {\n\tcontrol.setMenu(null);\n\n\tMenu m = new Menu(control);\n\tcontrol.setMenu(m);\n\tassertEquals(m, control.getMenu());\n}",
"private void initializeMenu() {\n menu = new Menu(parent.getShell());\n MenuItem item1 = new MenuItem(menu, SWT.NONE);\n item1.setText(Resources.getMessage(\"LatticeView.9\")); //$NON-NLS-1$\n item1.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n model.getClipboard().addToClipboard(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.CLIPBOARD, selectedNode));\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n \n MenuItem item2 = new MenuItem(menu, SWT.NONE);\n item2.setText(Resources.getMessage(\"LatticeView.10\")); //$NON-NLS-1$\n item2.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n controller.actionApplySelectedTransformation();\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n }",
"@Override\n\tpublic void setUpMenu() {\n\t\t\n\t}",
"public void initMenu(){\n\t}",
"public void setUpEditMenu() {\n add(editMenu);\n\n //editMenu.add(cutItem);\n //editMenu.add(copyItem);\n //editMenu.add(pasteItem);\n //editMenu.addSeparator();\n clearAllItems.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n world.deleteAllEntities();\n }\n });\n editMenu.add(clearAllItems);\n editMenu.addSeparator();\n JMenuItem loadVectors = new JMenuItem(\"Load stimulus vectors...\");\n loadVectors.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n SFileChooser chooser = new SFileChooser(\".\", \"Load vectors\");\n File theFile = chooser.showOpenDialog();\n if (theFile != null) {\n double[][] vecs = Utils.getDoubleMatrix(theFile);\n world.loadStimulusVectors(vecs);\n }\n }\n });\n editMenu.add(loadVectors);\n\n }",
"private void initMenu()\n {\n bar = new JMenuBar();\n fileMenu = new JMenu(\"File\");\n crawlerMenu = new JMenu(\"Crawler\"); \n aboutMenu = new JMenu(\"About\");\n \n bar.add(fileMenu);\n bar.add(crawlerMenu);\n bar.add(aboutMenu);\n \n exit = new JMenuItem(\"Exit\");\n preferences = new JMenuItem(\"Preferences\");\n author = new JMenuItem(\"Author\");\n startCrawlerItem = new JMenuItem(\"Start\");\n stopCrawlerItem = new JMenuItem(\"Stop\");\n newIndexItem = new JMenuItem(\"New index\");\n openIndexItem = new JMenuItem(\"Open index\");\n \n stopCrawlerItem.setEnabled(false);\n \n fileMenu.add(newIndexItem);\n fileMenu.add(openIndexItem);\n fileMenu.add(exit);\n aboutMenu.add(author);\n crawlerMenu.add(startCrawlerItem);\n crawlerMenu.add(stopCrawlerItem);\n crawlerMenu.add(preferences);\n \n author.addActionListener(this);\n preferences.addActionListener(this);\n exit.addActionListener(this);\n startCrawlerItem.addActionListener(this);\n stopCrawlerItem.addActionListener(this);\n newIndexItem.addActionListener(this);\n openIndexItem.addActionListener(this);\n \n frame.setJMenuBar(bar);\n }",
"private JMenu brugerMenuSetup() {\n JMenu brugerMenu = generalMenuSetup(\"Bruger\");\n JMenuItem logUdItem = new JMenuItem(\"Log ud\");\n brugerMenu.add(logUdItem);\n logUdItem.addActionListener(\n e -> System.exit(0)\n );\n JMenuItem minListeItem = new JMenuItem(\"Min liste\");\n brugerMenu.add(minListeItem);\n\n return brugerMenu;\n }",
"public void overrideMenu(JPopupMenu menu) {\n this.menu = menu;\n customMenu = true;\n initMenu(true);\n }",
"private void setUpMenuBar_CompareMenu(){\r\n\t\t// Add the rotate flip menu.\r\n\t\tthis.compareMenu \t\t = new JMenu(\"Compare\");\r\n\t\tthis.compareMenuItem \t\t = new JMenuItem(STR_COMPARE);\r\n\t\t// Add the action listeners for the rotate/flip effects menu.\r\n\t\tthis.compareMenuItem.addActionListener(this);\r\n\t\tthis.compareMenu.add(compareMenuItem);\r\n\t\tthis.menuBar.add(compareMenu);\r\n\r\n\t}",
"public void InitializeMenu(){\n\t\tmnbBar = new JMenuBar();\n\t\tmnuFile = new JMenu(\"File\");\n\t\tmnuFormat = new JMenu(\"Format\");\n\t\tmniOpen = new JMenuItem(\"Open\");\n\t\tmniExit = new JMenuItem(\"Exit\");\n\t\tmniSave = new JMenuItem(\"Save\");\n\t\tmniSaveAs = new JMenuItem(\"Save as\");\n\t\tmniSaveAs.setMnemonic(KeyEvent.VK_A);\n\t\tmniSave.setMnemonic(KeyEvent.VK_S);\n\t\tmniChangeBgColor = new JMenuItem(\"Change Backgroud Color\");\n\t\tmniChangeFontColor = new JMenuItem(\"Change Font Color\");\n\t\t//them menu item vao menu file\n\t\tmnuFile.add(mniOpen);\n\t\tmnuFile.addSeparator();\n\t\tmnuFile.add(mniExit);\n\t\tmnuFile.add(mniSaveAs);\n\t\tmnuFile.add(mniSave);\n\t\t//them menu item vao menu format\n\t\tmnuFormat.add(mniChangeBgColor);\n\t\tmnuFormat.addSeparator();\n\t\tmnuFormat.add(mniChangeFontColor);\n\t\t//them menu file va menu format vao menu bar\n\t\tmnbBar.add(mnuFile);\n\t\tmnbBar.add(mnuFormat);\n\t\t//thiet lap menubar thanh menu chinh cua frame\n\t\tsetJMenuBar(mnbBar);\n\t}",
"public void setMenuHook(java.awt.Menu menu);",
"protected void initializeNavigationMenu() {\n\t\tfinal JMenu navigationMenu = new JMenu(\"Navigation\");\n\t\tthis.add(navigationMenu);\n\t\t// Revert to Picked\n\t\tfinal JMenuItem revertPickedItem = new JMenuItem();\n\t\trevertPickedItem.setAction(this.commands\n\t\t\t\t.findById(GUICmdGraphRevert.DEFAULT_ID));\n\t\trevertPickedItem.setAccelerator(KeyStroke.getKeyStroke('R',\n\t\t\t\tInputEvent.ALT_DOWN_MASK));\n\t\tnavigationMenu.add(revertPickedItem);\n\t}",
"public void initializeMenuItems() {\n\t\tuserMenuButton = new MenuButton();\n\t\tmenu1 = new MenuItem(bundle.getString(\"mVmenu1\")); //\n\t\tmenu2 = new MenuItem(bundle.getString(\"mVmenu2\")); //\n\t}",
"public void initMenu() {\n\t\t\r\n\t\treturnToGame = new JButton(\"Return to Game\");\r\n\t\treturnToGame.setBounds(900, 900, 0, 0);\r\n\t\treturnToGame.setBackground(Color.BLACK);\r\n\t\treturnToGame.setForeground(Color.WHITE);\r\n\t\treturnToGame.setVisible(false);\r\n\t\treturnToGame.addActionListener(this);\r\n\t\t\r\n\t\treturnToStart = new JButton(\"Main Menu\");\r\n\t\treturnToStart.setBounds(900, 900, 0, 0);\r\n\t\treturnToStart.setBackground(Color.BLACK);\r\n\t\treturnToStart.setForeground(Color.WHITE);\r\n\t\treturnToStart.setVisible(false);\r\n\t\treturnToStart.addActionListener(this);\r\n\t\t\r\n\t\t//add(menubackground);\r\n\t\tadd(returnToGame);\r\n\t\tadd(returnToStart);\r\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}",
"private void createMenu(){\n\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n JMenu Opcje = new JMenu(\"Opcje\");\n mbar.add(Opcje);\n JMenuItem Ustawienia = new JMenuItem(\"Ustawienia\");\n /** Obsluga zdarzen wcisniecia przycisku ustawien w menu */\n Ustawienia.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if(Justawienia==null)\n Justawienia =new JUstawienia();\n Justawienia.setVisible(true);\n if (controller.timer!=null)\n controller.timer.stop();\n }\n });\n Opcje.add(Ustawienia);\n Opcje.addSeparator();\n JMenuItem Info = new JMenuItem(\"Info\");\n /** Obsluga zdarzen wcisniecia przycisku info w menu */\n Info.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n controller.WyswietlInfo();\n }\n });\n Opcje.add(Info);\n }",
"private void menuSetup()\n {\n menuChoices = new String []\n {\n \"Add a new product\",\n \"Remove a product\",\n \"Rename a product\",\n \"Print all products\",\n \"Deliver a product\",\n \"Sell a product\",\n \"Search for a product\",\n \"Find low-stock products\",\n \"Restock low-stock products\",\n \"Quit the program\" \n };\n }",
"private void constructMenus()\n\t{\n\t\tthis.fileMenu = new JMenu(\"File\");\n\t\tthis.editMenu = new JMenu(\"Edit\");\n\t\tthis.caseMenu = new JMenu(\"Case\");\n\t\tthis.imageMenu = new JMenu(\"Image\");\n\t\tthis.fileMenu.add(this.saveImageMenuItem);\n\t\tthis.fileMenu.addSeparator();\n\t\tthis.fileMenu.add(this.quitMenuItem);\n\t\tthis.editMenu.add(this.undoMenuItem);\n\t\tthis.editMenu.add(this.redoMenuItem);\n\t\tthis.caseMenu.add(this.removeImageMenuItem);\n\t\tthis.imageMenu.add(this.antiAliasMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.brightenMenuItem);\n\t\tthis.imageMenu.add(this.darkenMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.grayscaleMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.resizeMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.cropMenuItem);\n\t\tthis.imageMenu.addSeparator();\n\t\tthis.imageMenu.add(this.rotate90MenuItem);\n\t\tthis.imageMenu.add(this.rotate180MenuItem);\n\t\tthis.imageMenu.add(this.rotate270MenuItem);\n\t}",
"private void createMenu(){\n \n menuBar = new JMenuBar();\n \n game = new JMenu(\"Rummy\");\n game.setMnemonic('R');\n \n newGame = new JMenuItem(\"New Game\");\n newGame.setMnemonic('N');\n newGame.addActionListener(menuListener);\n \n \n \n exit = new JMenuItem(\"Exit\");\n exit.setMnemonic('E');\n exit.addActionListener(menuListener); \n \n \n \n }",
"public void overrideMenuNoRestyle(JPopupMenu menu) {\n this.menu = menu;\n customMenu = true;\n initMenu(false);\n }",
"private void initMenu() {\n \n JMenuBar menuBar = new JMenuBar();\n \n JMenu commands = new JMenu(\"Commands\");\n \n JMenuItem add = new JMenuItem(\"Add\");\n add.addActionListener((ActionEvent e) -> {\n changeState(\"Add\");\n });\n commands.add(add);\n \n JMenuItem search = new JMenuItem(\"Search\");\n search.addActionListener((ActionEvent e) -> {\n changeState(\"Search\");\n });\n commands.add(search);\n \n JMenuItem quit = new JMenuItem(\"Quit\");\n quit.addActionListener((ActionEvent e) -> {\n System.out.println(\"QUITING\");\n System.exit(0);\n });\n commands.add(quit);\n \n menuBar.add(commands);\n \n setJMenuBar(menuBar);\n }",
"private void initSildeMenu(){\n metrics = new DisplayMetrics();\n getWindowManager().getDefaultDisplay().getMetrics(metrics);\n leftMenuWidth = (int) ((metrics.widthPixels) * 0.70);\n\n // init main view\n ll_mainLayout = (LinearLayout) findViewById(R.id.ll_mainlayout);\n\n // init left menu\n ll_menuLayout = (LinearLayout) findViewById(R.id.ll_menuLayout);\n leftMenuLayoutPrams = (FrameLayout.LayoutParams) ll_menuLayout\n .getLayoutParams();\n leftMenuLayoutPrams.width = leftMenuWidth;\n ll_menuLayout.setLayoutParams(leftMenuLayoutPrams);\n\n // init ui\n menu1 = (ImageView) findViewById(R.id.menu);\n\n menu1.setOnClickListener(this); // 메뉴 눌렀을때 밑에 switch문 보셈\n\n }",
"@Override\r\n\tpublic void createMenu(Menu menu) {\n\r\n\t}",
"protected void fillMenu(MenuBar menuBar) {\n\t\tMenu fileMenu = new Menu(\"Файл\");\n\t\n\t\tMenuItem loginMenuItem = new MenuItem(\"Сменить пользователя\");\n\t\tloginMenuItem.setOnAction(actionEvent -> main.logout());\n\t\n\t\tMenuItem exitMenuItem = new MenuItem(\"Выход (выключить планшет)\");\n\t\texitMenuItem.setOnAction(actionEvent -> main.requestShutdown());\n\t\texitMenuItem.setAccelerator(KeyCombination.keyCombination(\"Alt+F4\"));\n\t\n\t\n\t\tfileMenu.getItems().addAll( loginMenuItem,\n\t\t\t\tnew SeparatorMenuItem(), exitMenuItem);\n\t\n\t\n\t\n\t\tMenu navMenu = new Menu(\"Навигация\");\n\t\n\t\tMenuItem navHomeMap = new MenuItem(\"На общую карту\");\n\t\t//navHomeMap.setOnAction(actionEvent -> setMapData(bigMapData));\n\t\tnavHomeMap.setOnAction(actionEvent -> setMapData(main.ml.getRootMap()));\n\t\n\t\tMenu navMaps = new Menu(\"Карты\");\n\t\t//navMaps.setOnAction(actionEvent -> setMapData(bigMapData));\n\t\tmain.ml.fillMapsMenu( navMaps, this );\n\t\n\t\tMenuItem navOverview = new MenuItem(\"Обзор\");\n\t\tnavOverview.setOnAction(actionEvent -> setOverviewScale());\n\t\n\t\tnavMenu.getItems().addAll( navHomeMap, navMaps, new SeparatorMenuItem(), navOverview );\n\t\n\t\t\n\t\t\n\t\tMenu dataMenu = new Menu(\"Данные\");\n\t\n\t\tServerUnitType.forEach(t -> {\n\t\t\tMenuItem dataItem = new MenuItem(t.getDisplayName());\n\t\t\tdataItem.setOnAction(actionEvent -> new EntityListWindow(t, main.rc, main.sc));\n\t\n\t\t\tdataMenu.getItems().add(dataItem);\t\t\t\n\t\t});\n\t\t\n\t\t//dataMenu.Menu debugMenu = new Menu(\"Debug\");\n\t\t//MenuItem d1 = new MenuItem(\"На общую карту\");\n\t\t//d1.setOnAction(actionEvent -> setMapData(main.ml.getRootMap()));\n\t\n\t\t\n\t\t/*\n\t Menu webMenu = new Menu(\"Web\");\n\t CheckMenuItem htmlMenuItem = new CheckMenuItem(\"HTML\");\n\t htmlMenuItem.setSelected(true);\n\t webMenu.getItems().add(htmlMenuItem);\n\t\n\t CheckMenuItem cssMenuItem = new CheckMenuItem(\"CSS\");\n\t cssMenuItem.setSelected(true);\n\t webMenu.getItems().add(cssMenuItem);\n\t\n\t Menu sqlMenu = new Menu(\"SQL\");\n\t ToggleGroup tGroup = new ToggleGroup();\n\t RadioMenuItem mysqlItem = new RadioMenuItem(\"MySQL\");\n\t mysqlItem.setToggleGroup(tGroup);\n\t\n\t RadioMenuItem oracleItem = new RadioMenuItem(\"Oracle\");\n\t oracleItem.setToggleGroup(tGroup);\n\t oracleItem.setSelected(true);\n\t\n\t sqlMenu.getItems().addAll(mysqlItem, oracleItem,\n\t new SeparatorMenuItem());\n\t\n\t Menu tutorialManeu = new Menu(\"Tutorial\");\n\t tutorialManeu.getItems().addAll(\n\t new CheckMenuItem(\"Java\"),\n\t new CheckMenuItem(\"JavaFX\"),\n\t new CheckMenuItem(\"Swing\"));\n\t\n\t sqlMenu.getItems().add(tutorialManeu);\n\t\t */\n\t\n\t\tMenu aboutMenu = new Menu(\"О системе\");\n\t\n\t\tMenuItem version = new MenuItem(\"Версия\");\n\t\tversion.setOnAction(actionEvent -> showAbout());\n\t\n\t\tMenuItem aboutDz = new MenuItem(\"Digital Zone\");\n\t\taboutDz.setOnAction(actionEvent -> main.getHostServices().showDocument(Defs.HOME_URL));\n\t\n\t\tMenuItem aboutVita = new MenuItem(\"VitaSoft\");\n\t\taboutVita.setOnAction(actionEvent -> main.getHostServices().showDocument(\"vtsft.ru\"));\n\t\n\t\taboutMenu.getItems().addAll( version, new SeparatorMenuItem(), aboutDz, aboutVita );\n\t\n\t\t// --------------- Menu bar\n\t\n\t\t//menuBar.getMenus().addAll(fileMenu, webMenu, sqlMenu);\n\t\tmenuBar.getMenus().addAll(fileMenu, navMenu, dataMenu, aboutMenu );\n\t}",
"private void setupMenu() {\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\tJMenuItem conn = new JMenuItem(connectAction);\n\t\tJMenuItem exit = new JMenuItem(\"退出\");\n\t\texit.addActionListener(new AbstractAction() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\texit();\n\t\t\t}\n\t\t});\n\t\tJMenu file = new JMenu(\"客户端\");\n\t\tfile.add(conn);\n\t\tmenuBar.add(file);\n\t\tsetJMenuBar(menuBar);\n\t}",
"private void initializeMenuBar()\r\n\t{\r\n\t\tJMenuBar menuBar = new SmsMenuBar(this);\r\n\t\tsetJMenuBar(menuBar);\r\n\t}",
"public void mo21810a(Menu menu, MenuInflater menuInflater) {\n }",
"private void setMenu() {\n\n if (tree.isEmpty() || !treeGrid.anySelected()) {\n mainMenu.setItems(newMenuItem, new MenuItemSeparator(), settingMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecord() == null) {\n mainMenu.setItems(renameMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecords().length > 1) {\n ListGridRecord[] selectedNode = treeGrid.getSelectedRecords();\n if (isSameExtension(selectedNode, Extension.FP)) {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem, exportMenuItem);\n } else if (isSameExtension(selectedNode, Extension.FPS)) {\n mainMenu.setItems(newFPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.BPS)) {\n mainMenu.setItems(newBPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.SCSS)) {\n mainMenu.setItems(newSCSItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n }\n } else if (tree.isFolder(treeGrid.getSelectedRecord())) {\n mainMenu.setItems(newMenuItem, deleteMenu, renameMenuItem, copyMenuItem, pasteMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem, downloadMenuItem,\n copyPathMenuItem);\n } else {\n FileTreeNode selectedNode = (FileTreeNode) treeGrid.getSelectedRecord();\n VMResource resource = selectedNode.getResource();\n if (resource instanceof VMDirectory) {\n return;\n }\n Extension extension = ((VMFile) resource).getExtension();\n if (extension == null) {\n mainMenu.setItems(openWithMenuItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n } else\n switch (extension) {\n case ARC:\n mainMenu.setItems(newBPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FM:\n mainMenu.setItems(newFMCItem, newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FMC:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case TC:\n mainMenu.setItems(newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n case FPS:\n mainMenu.setItems(newFPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, exportMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BPS:\n mainMenu.setItems(newBPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCSS:\n mainMenu.setItems(newSCSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCS:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n default:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n }\n }\n }",
"private void initializeMenuBar() {\n\t\tthis.hydraMenu = new HydraMenu(this.commands);\n\t\tthis.setJMenuBar(this.hydraMenu);\n\t}",
"private void setUpMenu() {\n\t\tresideMenu = new ResideMenu(this);\n\t\tresideMenu.setBackground(R.drawable.menu_background);\n\t\tresideMenu.attachToActivity(this);\n\t\tresideMenu.setMenuListener(menuListener);\n\t\t// valid scale factor is between 0.0f and 1.0f. leftmenu'width is\n\t\t// 150dip.\n\t\tresideMenu.setScaleValue(0.6f);\n\n\t\t// create menu items;\n\t\titemGame = new ResideMenuItem(this, R.drawable.icon_game,\n\t\t\t\tgetResources().getString(R.string.strGame));\n\t\titemBook = new ResideMenuItem(this, R.drawable.icon_book,\n\t\t\t\tgetResources().getString(R.string.strBook));\n\t\titemNews = new ResideMenuItem(this, R.drawable.icon_news,\n\t\t\t\tgetResources().getString(R.string.strNews));\n\t\t// itemSettings = new ResideMenuItem(this, R.drawable.icon_setting,\n\t\t// getResources().getString(R.string.strSetting));\n\t\titemLogin = new ResideMenuItem(this, R.drawable.icon_share,\n\t\t\t\tgetResources().getString(R.string.strShare));\n\t\titemBookPDF = new ResideMenuItem(this, R.drawable.icon_bookpdf,\n\t\t\t\tgetResources().getString(R.string.strBookPDF));\n\t\titemMore = new ResideMenuItem(this, R.drawable.icon_more,\n\t\t\t\tgetResources().getString(R.string.strMore));\n\n\t\titemGame.setOnClickListener(this);\n\t\titemBook.setOnClickListener(this);\n\t\titemNews.setOnClickListener(this);\n\t\t// itemSettings.setOnClickListener(this);\n\t\titemBookPDF.setOnClickListener(this);\n\t\titemMore.setOnClickListener(this);\n\t\titemLogin.setOnClickListener(this);\n\n\t\tresideMenu.addMenuItem(itemBookPDF, ResideMenu.DIRECTION_LEFT);\n\t\tresideMenu.addMenuItem(itemBook, ResideMenu.DIRECTION_LEFT);\n\t\tresideMenu.addMenuItem(itemNews, ResideMenu.DIRECTION_LEFT);\n\t\t// resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_RIGHT);\n\n\t\tresideMenu.addMenuItem(itemGame, ResideMenu.DIRECTION_RIGHT);\n\t\tresideMenu.addMenuItem(itemLogin, ResideMenu.DIRECTION_RIGHT);\n\t\tresideMenu.addMenuItem(itemMore, ResideMenu.DIRECTION_RIGHT);\n\n\t\t// You can disable a direction by setting ->\n\t\t// resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n\t\tfindViewById(R.id.title_bar_left_menu).setOnClickListener(\n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\t\tresideMenu.openMenu(ResideMenu.DIRECTION_LEFT);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tfindViewById(R.id.title_bar_right_menu).setOnClickListener(\n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\t\tresideMenu.openMenu(ResideMenu.DIRECTION_RIGHT);\n\t\t\t\t\t}\n\t\t\t\t});\n\t}",
"private void voltarMenu() {\n\t\tmenu = new TelaMenu();\r\n\t\tmenu.setVisible(true);\r\n\t\tthis.dispose();\r\n\t}",
"private void setElementoMenuActual() {\n\t\tif(elementoMenuActual!=null) {\n\t\t\telementoMenuActual.setSeleccionado(false);\n\t\t}\n\t\telementoMenuActual = elementosMenu.get(indiceElementoMenuActual);\n\t\telementoMenuActual.setSeleccionado(true);\n\t}",
"private void initMenu(JFrame newBoard) {\n JMenuBar menuBar = new JMenuBar();\n setJMenuBar(menuBar);\n \n // Define and add menu items.\n JMenu fileMenu = new JMenu(\"File\");\n menuBar.add(fileMenu);\n \n // Add the same and load actions.\n JMenuItem saveAction = new JMenuItem(\"SAVE\");\n JMenuItem loadAction = new JMenuItem(\"OPEN\");\n fileMenu.add(saveAction);\n fileMenu.add(loadAction);\n \n saveAction.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent ex) {\n\n try {\n FileOutputStream fileOutput = new FileOutputStream(\"test.gam\");\n @SuppressWarnings(\"resource\")\n ObjectOutputStream objOutput = new ObjectOutputStream(fileOutput);\n objOutput.writeObject(newBoard);\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n\n }\n });\n \n loadAction.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e2) {\n \n try {\n FileInputStream fileInput = new FileInputStream(\"test.gam\");\n @SuppressWarnings(\"resource\")\n ObjectInputStream obInput = new ObjectInputStream(fileInput);\n JFrame tempBoard = (JFrame) obInput.readObject();\n tempBoard.setVisible(true);\n } catch (ClassNotFoundException | IOException e3) {\n e3.printStackTrace();\n }\n\n }\n });\n }",
"private void setUpMenu() {\n resideMenu = new ResideMenu(this);\n\n resideMenu.setBackground(R.drawable.menu_background);\n resideMenu.attachToActivity(this);\n resideMenu.setMenuListener(menuListener);\n resideMenu.setScaleValue(0.6f);\n\n // create menu items;\n itemHome = new ResideMenuItem(this, R.drawable.icon_profile, \"Home\");\n itemSerre = new ResideMenuItem(this, R.drawable.serre, \"GreenHouse\");\n itemControl = new ResideMenuItem(this, R.drawable.ctrl, \"Control\");\n itemTable = new ResideMenuItem(this, R.drawable.database, \"Parametre\");\n\n // itemProfile = new ResideMenuItem(this, R.drawable.user, \"Profile\");\n // itemSettings = new ResideMenuItem(this, R.drawable.stat_n, \"Statistique\");\n itemPicture = new ResideMenuItem(this, R.drawable.cam, \"Picture\");\n itemLog = new ResideMenuItem(this, R.drawable.log, \"Log file \");\n\n itemLogout = new ResideMenuItem(this, R.drawable.logout, \"Logout\");\n\n\n\n itemHome.setOnClickListener(this);\n itemSerre.setOnClickListener(this);\n itemControl.setOnClickListener(this);\n itemTable.setOnClickListener(this);\n\n// itemProfile.setOnClickListener(this);\n // itemSettings.setOnClickListener(this);\n itemLogout.setOnClickListener(this);\n itemPicture.setOnClickListener(this);\n itemLog.setOnClickListener(this);\n\n\n resideMenu.addMenuItem(itemHome, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemSerre, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemControl, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemTable, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemLog, ResideMenu.DIRECTION_LEFT);\n\n\n // resideMenu.addMenuItem(itemProfile, ResideMenu.DIRECTION_RIGHT);\n // resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_RIGHT);\n resideMenu.addMenuItem(itemPicture, ResideMenu.DIRECTION_RIGHT);\n\n resideMenu.addMenuItem(itemLogout, ResideMenu.DIRECTION_RIGHT);\n\n // You can disable a direction by setting ->\n // resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n findViewById(R.id.title_bar_left_menu).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n resideMenu.openMenu(ResideMenu.DIRECTION_LEFT);\n }\n });\n findViewById(R.id.title_bar_right_menu).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n resideMenu.openMenu(ResideMenu.DIRECTION_RIGHT);\n }\n });\n }",
"public SipsaMenu(ISipsaMenu controlador) {\n initComponents();\n\n Configuracion configuracion = Configuracion.getInstancia();\n this.setIconImage(configuracion.getIcono());\n this.setLocationRelativeTo(null);\n this.controlador = controlador;\n }",
"public Menu_Ingreso() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"private void createMenu()\n\t{\n\t\tfileMenu = new JMenu(\"File\");\n\t\thelpMenu = new JMenu(\"Help\");\n\t\ttoolsMenu = new JMenu(\"Tools\");\n\t\t\n\t\tmenuBar = new JMenuBar();\n\t\t\n\t\texit = new JMenuItem(\"Exit\");\t\t\n\t\treadme = new JMenuItem(\"Readme\");\n\t\tabout = new JMenuItem(\"About\");\n\t\tsettings = new JMenuItem(\"Settings\");\n\t\t\t\t\n\t\tfileMenu.add (exit);\n\t\t\n\t\thelpMenu.add (readme);\n\t\thelpMenu.add (about);\t\n\t\t\n\t\ttoolsMenu.add (settings);\n\t\t\n\t\tmenuBar.add(fileMenu);\n\t\tmenuBar.add(toolsMenu);\n\t\tmenuBar.add(helpMenu);\t\t\n\t\t\t\t\n\t\tdefaultMenuBackground = menuBar.getBackground();\n\t\tdefaultMenuForeground = fileMenu.getForeground();\n\t\t\n\t}",
"public void setSuperMenu(Menu superMenu) {\n\tthis.superMenu = superMenu;\n }",
"private void setUpMenuBar() {\r\n\t\t// Create menu bar.\r\n\t\tthis.menuBar = new JMenuBar();\r\n\t\t\r\n\t\t// Create each sub-menu in the menu bar\r\n\t\tthis.setUpMenuBar_FileMenu();\r\n\t\t//this.setUpMenuBar_ZoomMenu();\r\n\t\tthis.setUpMenuBar_CompareMenu();\t\r\n\t\tthis.pictureFrame.setJMenuBar(menuBar);\r\n\t}",
"public SysMenuParams(SysMenu menu) {\n\t\tthis.menuName = menu.getMenuName();\n\t\tsetVisible(menu.getVisible());\n\t\tsetStatus(menu.getStatus());\n\t}",
"public MyMenu(Name alias) {\n this(alias, MY_MENU);\n }",
"public void setMenuOverrideName(String menuName) {\n this.context.put(\"menuName\", menuName);\n }",
"private void createMenus() {\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\t\r\n\t\tJMenu fileMenu = new LJMenu(\"file\", flp);\r\n\t\tmenuBar.add(fileMenu);\r\n\t\t\r\n\t\tfileMenu.add(new JMenuItem(createBlankDocument));\r\n\t\tfileMenu.add(new JMenuItem(openDocumentAction));\r\n\t\tfileMenu.add(new JMenuItem(saveDocumentAction));\r\n\t\tfileMenu.add(new JMenuItem(saveDocumentAsAction));\r\n\t\tfileMenu.add(new JMenuItem(closeCurrentTabAction));\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(new JMenuItem(getStatsAction));\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(new JMenuItem(exitAction));\r\n\t\t\r\n\t\tJMenu editMenu = new LJMenu(\"edit\", flp);\r\n\t\tmenuBar.add(editMenu);\r\n\t\t\r\n\t\teditMenu.add(new JMenuItem(copyAction));\r\n\t\teditMenu.add(new JMenuItem(pasteAction));\r\n\t\teditMenu.add(new JMenuItem(cutAction));\r\n\t\t\r\n\t\tJMenu langMenu = new LJMenu(\"lang\", flp);\r\n\t\tJMenuItem hr = new LJMenuItem(\"cro\", flp);\r\n\t\thr.addActionListener((l) -> { \r\n\t\t\tLocalizationProvider.getInstance().setLanguage(\"hr\");\r\n\t\t\tcurrentLang = \"hr\";\r\n\t\t});\r\n\t\t\r\n\t\tlangMenu.add(hr);\r\n\t\tJMenuItem en = new LJMenuItem(\"eng\", flp);\r\n\t\ten.addActionListener((l) -> { \r\n\t\t\t LocalizationProvider.getInstance().setLanguage(\"en\");\r\n\t\t\t currentLang = \"en\";\r\n\t\t});\r\n\t\tlangMenu.add(en);\r\n\t\tJMenuItem de = new LJMenuItem(\"de\", flp);\r\n\t\tde.addActionListener((l) -> { \r\n\t\t\t LocalizationProvider.getInstance().setLanguage(\"de\");\r\n\t\t\t currentLang = \"de\";\r\n\t\t});\r\n\t\tlangMenu.add(de);\r\n\t\tmenuBar.add(langMenu);\r\n\t\t\r\n\t\tJMenu toolsMenu = new LJMenu(\"tools\", flp);\r\n\t\tJMenuItem toUp = new JMenuItem(toUpperCaseAction);\r\n\t\ttoolsMenu.add(toUp);\r\n\t\ttoggable.add(toUp);\r\n\t\ttoUp.setEnabled(false);\r\n\t\tJMenuItem toLow = new JMenuItem(toLowerCaseAction);\r\n\t\ttoolsMenu.add(toLow);\r\n\t\ttoggable.add(toLow);\r\n\t\ttoLow.setEnabled(false);\r\n\t\tJMenuItem inv = new JMenuItem(invertSelected);\r\n\t\ttoolsMenu.add(inv);\r\n\t\ttoggable.add(inv);\r\n\t\tinv.setEnabled(false);\r\n\t\tmenuBar.add(toolsMenu);\r\n\t\t\r\n\t\tJMenu sort = new LJMenu(\"sort\", flp);\r\n\t\tJMenuItem sortAsc = new JMenuItem(sortAscAction);\r\n\t\tsort.add(sortAsc);\r\n\t\ttoggable.add(sortAsc);\r\n\t\tJMenuItem sortDesc = new JMenuItem(sortDescAction);\r\n\t\tsort.add(sortDesc);\r\n\t\ttoggable.add(sortDesc);\r\n\t\tJMenuItem uniq = new JMenuItem(uniqueLinesAction);\r\n\t\ttoolsMenu.add(uniq);\r\n\t\ttoggable.add(uniq);\r\n\t\t\r\n\t\ttoolsMenu.add(sort);\r\n\t\tsetJMenuBar(menuBar);\r\n\r\n\t}",
"public void generateMenu(){\n menuBar = new JMenuBar();\n\n JMenu file = new JMenu(\"Datei\");\n JMenu tools = new JMenu(\"Werkzeuge\");\n JMenu help = new JMenu(\"Hilfe\");\n\n JMenuItem open = new JMenuItem(\"Öffnen \");\n JMenuItem save = new JMenuItem(\"Speichern \");\n JMenuItem exit = new JMenuItem(\"Beenden \");\n JMenuItem preferences = new JMenuItem(\"Einstellungen \");\n JMenuItem about = new JMenuItem(\"Über das Projekt \");\n\n\n file.add(open);\n file.add(save);\n file.addSeparator();\n file.add(exit);\n tools.add(preferences);\n help.add(about);\n\n menuBar.add(file);\n menuBar.add(tools);\n menuBar.add(help);\n }",
"public AdminMenu(JDealsController sysCtrl) {\n super(\"Select Menu\", sysCtrl);\n\n this.addItem(\"Admin Panel\", new Callable() {\n @Override\n public Boolean call() throws Exception {\n new AdminCommandList(getSysCtrl()).runMenu();\n return true;\n }\n });\n\n this.addItem(\"Default Menu\", new Callable() {\n @Override\n public Boolean call() throws Exception {\n new UserMenu(getSysCtrl()).runMenu();\n return true;\n }\n });\n }",
"private MenuBar setupMenu () {\n MenuBar mb = new MenuBar ();\n Menu fileMenu = new Menu (\"File\");\n openXn = makeMenuItem (\"Open Connection\", OPEN_CONNECTION);\n closeXn = makeMenuItem (\"Close Connection\", CLOSE_CONNECTION);\n closeXn.setEnabled (false);\n MenuItem exit = makeMenuItem (\"Exit\", EXIT_APPLICATION);\n fileMenu.add (openXn);\n fileMenu.add (closeXn);\n fileMenu.addSeparator ();\n fileMenu.add (exit);\n\n Menu twMenu = new Menu (\"Tw\");\n getWksp = makeMenuItem (\"Get Workspace\", GET_WORKSPACE);\n getWksp.setEnabled (false);\n twMenu.add (getWksp);\n\n mb.add (fileMenu);\n mb.add (twMenu);\n return mb;\n }",
"private void construireMenuBar() {\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\tthis.setJMenuBar(menuBar);\r\n\t\t\r\n\t\tJMenu menuFichier = new JMenu(\"Fichier\");\r\n\t\tmenuBar.add(menuFichier);\r\n\t\t\r\n\t\tJMenuItem itemCharger = new JMenuItem(\"Charger\", new ImageIcon(this.getClass().getResource(\"/images/charger.png\")));\r\n\t\tmenuFichier.add(itemCharger);\r\n\t\titemCharger.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O,KeyEvent.CTRL_DOWN_MASK));\r\n\t\titemCharger.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tJFileChooser fc = new JFileChooser();\r\n\t\t\t\tfc.setDialogTitle(\"Sélectionnez le circuit à charger\");\r\n\t\t\t\tint returnVal = fc.showOpenDialog(EditeurCircuit.this);\r\n\t\t\t\tif(returnVal == JFileChooser.APPROVE_OPTION) {\r\n\t\t\t\t\tFile file = fc.getSelectedFile();\r\n\t\t\t\t\tCircuit loadedTrack = (Circuit)Memento.objLoading(file);\r\n\t\t\t\t\tfor(IElement elem : loadedTrack) {\r\n\t\t\t\t\t\telem.setEditeurCircuit(EditeurCircuit.this);\r\n\t\t\t\t\t\tCircuit.getInstance().addElement(elem);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tCircuit.getInstance().estValide();\r\n\t\t\t\t\tEditeurCircuit.this.paint(EditeurCircuit.this.getGraphics());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJMenuItem itemSauvegarder = new JMenuItem(\"Sauvegarder\", new ImageIcon(this.getClass().getResource(\"/images/disquette.png\")));\r\n\t\tmenuFichier.add(itemSauvegarder);\r\n\t\titemSauvegarder.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,KeyEvent.CTRL_DOWN_MASK));\r\n\t\titemSauvegarder.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif(Circuit.getInstance().estValide()) {\r\n\t\t\t\t\tJFileChooser fc = new JFileChooser();\r\n\t\t\t\t\tfc.setDialogTitle(\"Sélectionnez le fichier de destination\");\r\n\t\t\t\t\tint returnVal = fc.showSaveDialog(EditeurCircuit.this);\r\n\t\t\t\t\tif(returnVal == JFileChooser.APPROVE_OPTION) {\r\n\t\t\t\t\t\tFile file = fc.getSelectedFile();\r\n\t\t\t\t\t\tint returnConfirm = JFileChooser.APPROVE_OPTION;\r\n\t\t\t\t\t\tif(file.exists()) {\r\n\t\t\t\t\t\t\tString message = \"Le fichier \"+file.getName()+\" existe déjà : voulez-vous le remplacer ?\";\r\n\t\t\t\t\t\t\treturnConfirm = JOptionPane.showConfirmDialog(EditeurCircuit.this, message, \"Fichier existant\", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(returnConfirm == JFileChooser.APPROVE_OPTION) {\r\n\t\t\t\t\t\t\tnew Memento(Circuit.getInstance(),file);\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\telse {\r\n\t\t\t\t\tString messageErreur;\r\n\t\t\t\t\tif(Circuit.getInstance().getElementDepart() == null) {\r\n\t\t\t\t\t\tmessageErreur = \"Le circuit doit comporter un élément de départ.\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tmessageErreur = \"Le circuit doit être fermé.\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tJOptionPane.showMessageDialog(EditeurCircuit.this,messageErreur,\"Erreur de sauvegarde\",JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tmenuFichier.addSeparator();\r\n\t\t\r\n\t\tJMenuItem itemQuitter = new JMenuItem(\"Quitter\", new ImageIcon(this.getClass().getResource(\"/images/quitter.png\")));\r\n\t\tmenuFichier.add(itemQuitter);\r\n\t\titemQuitter.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q,KeyEvent.CTRL_DOWN_MASK));\r\n\t\titemQuitter.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tEditeurCircuit.this.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJMenu menuEdition = new JMenu(\"Edition\");\r\n\t\tmenuBar.add(menuEdition);\r\n\t\t\r\n\t\tJMenuItem itemChangerTailleGrille = new JMenuItem(\"Changer la taille de la grille\", new ImageIcon(this.getClass().getResource(\"/images/resize.png\")));\r\n\t\tmenuEdition.add(itemChangerTailleGrille);\r\n\t\titemChangerTailleGrille.setAccelerator( KeyStroke.getKeyStroke(KeyEvent.VK_N,KeyEvent.CTRL_DOWN_MASK));\r\n\t\titemChangerTailleGrille.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tEditeurCircuit.this.dispose();\r\n\t\t\t\tnew MenuEditeurCircuit();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJMenuItem itemNettoyerGrille = new JMenuItem(\"Nettoyer la grille\", new ImageIcon(this.getClass().getResource(\"/images/clear.png\")));\r\n\t\tmenuEdition.add(itemNettoyerGrille);\r\n\t\titemNettoyerGrille.setAccelerator( KeyStroke.getKeyStroke(KeyEvent.VK_C,KeyEvent.CTRL_DOWN_MASK));\r\n\t\titemNettoyerGrille.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tEditeurCircuit.this.construireGrilleParDefaut();\r\n\t\t\t\tEditeurCircuit.this.repaint();\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"public Menu(String[] choices)\n {\n\t\n\tthis.choices = choices;\n }",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n \n //Definindo que somente Administradores podem vizualizar meno de Configuração\n if(\"Administrador\".equals(Form_LoginController.usuario_Nivel_Acesso))\n { \n //Menus para administrador:****************\n menu_Configuracao.setVisible(true);\n menu_Relatorios.setVisible(true);\n menuItem_RelatAcessos.setVisible(true);\n menu_Cadastro.setVisible(false);\n //******************************************\n }\n if(\"Supervisor\".equals(Form_LoginController.usuario_Nivel_Acesso))\n {\n //Menus para Supervisor:****************\n menu_Relatorios.setVisible(true);\n menuItem_RelatClientes.setVisible(true);\n menuItem_RelatDigitador.setVisible(true);\n //******************************************\n }\n }",
"public FormMenu() {\n initComponents();\n menuController = new MenuController(this);\n menuController.nonAktif();\n }",
"public Principal() {\n initComponents();\n this.setLocationRelativeTo(null);\n inicio.setEnabled(false);\n this.setTitle(\"Menu Principal\");\n menuA=\"Inicio\";\n menuB=\"\";\n }",
"public void initPlayerMenu() {\n Font f = new Font(\"Helvetica\", Font.BOLD, 16);\n\n menuPanel = new JPanel();\n menuPanel.setPreferredSize(new Dimension(buttonWidth, buttonHeight));\n menuPanel.setLayout(null);\n\n menuBar = new JMenuBar();\n menuBar.setPreferredSize(new Dimension(buttonWidth, buttonHeight));\n menuBar.setBounds(0, 0, buttonWidth, buttonHeight);\n menuBar.setLayout(null);\n\n playerMenu = new JMenu();\n playerMenu.setText(\"Players\");\n playerMenu.setFont(f);\n playerMenu.setBounds(0, 0, buttonWidth, buttonHeight);\n playerMenu.setBackground(new Color(0xeaf1f7));\n playerMenu.setHorizontalTextPosition(SwingConstants.CENTER);\n playerMenu.setOpaque(true);\n playerMenu.setBorder(BorderFactory.createBevelBorder(0));\n\n menuBar.add(playerMenu);\n menuPanel.add(menuBar);\n }",
"public void setOrigId (String origId) {\n this.origId = origId;\n }",
"public void setOrigId (String origId) {\n this.origId = origId;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.fake_main, menu);\n this.menu = menu;\n return true;\n }",
"private void buildMenu() {\r\n\t\tJMenuBar mainmenu = new JMenuBar();\r\n\t\tsetJMenuBar(mainmenu);\r\n\r\n\t\tui.fileMenu = new JMenu(\"File\");\r\n\t\tui.editMenu = new JMenu(\"Edit\");\r\n\t\tui.viewMenu = new JMenu(\"View\");\r\n\t\tui.helpMenu = new JMenu(\"Help\");\r\n\t\t\r\n\t\tui.fileNew = new JMenuItem(\"New...\");\r\n\t\tui.fileOpen = new JMenuItem(\"Open...\");\r\n\t\tui.fileImport = new JMenuItem(\"Import...\");\r\n\t\tui.fileSave = new JMenuItem(\"Save\");\r\n\t\tui.fileSaveAs = new JMenuItem(\"Save as...\");\r\n\t\tui.fileExit = new JMenuItem(\"Exit\");\r\n\r\n\t\tui.fileOpen.setAccelerator(KeyStroke.getKeyStroke('O', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.fileSave.setAccelerator(KeyStroke.getKeyStroke('S', InputEvent.CTRL_DOWN_MASK));\r\n\t\t\r\n\t\tui.fileImport.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doImport(); } });\r\n\t\tui.fileExit.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { dispose(); doExit(); } });\r\n\t\t\r\n\t\tui.fileOpen.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoLoad();\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.fileSave.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoSave();\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.fileSaveAs.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoSaveAs();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tui.editUndo = new JMenuItem(\"Undo\");\r\n\t\tui.editUndo.setEnabled(undoManager.canUndo()); \r\n\t\t\r\n\t\tui.editRedo = new JMenuItem(\"Redo\");\r\n\t\tui.editRedo.setEnabled(undoManager.canRedo()); \r\n\t\t\r\n\t\t\r\n\t\tui.editCut = new JMenuItem(\"Cut\");\r\n\t\tui.editCopy = new JMenuItem(\"Copy\");\r\n\t\tui.editPaste = new JMenuItem(\"Paste\");\r\n\t\t\r\n\t\tui.editCut.addActionListener(new Act() { @Override public void act() { doCut(true, true); } });\r\n\t\tui.editCopy.addActionListener(new Act() { @Override public void act() { doCopy(true, true); } });\r\n\t\tui.editPaste.addActionListener(new Act() { @Override public void act() { doPaste(true, true); } });\r\n\t\t\r\n\t\tui.editPlaceMode = new JCheckBoxMenuItem(\"Placement mode\");\r\n\t\t\r\n\t\tui.editDeleteBuilding = new JMenuItem(\"Delete building\");\r\n\t\tui.editDeleteSurface = new JMenuItem(\"Delete surface\");\r\n\t\tui.editDeleteBoth = new JMenuItem(\"Delete both\");\r\n\t\t\r\n\t\tui.editClearBuildings = new JMenuItem(\"Clear buildings\");\r\n\t\tui.editClearSurface = new JMenuItem(\"Clear surface\");\r\n\r\n\t\tui.editUndo.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doUndo(); } });\r\n\t\tui.editRedo.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doRedo(); } });\r\n\t\tui.editClearBuildings.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doClearBuildings(true); } });\r\n\t\tui.editClearSurface.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doClearSurfaces(true); } });\r\n\t\t\r\n\r\n\t\tui.editUndo.setAccelerator(KeyStroke.getKeyStroke('Z', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editRedo.setAccelerator(KeyStroke.getKeyStroke('Y', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editCut.setAccelerator(KeyStroke.getKeyStroke('X', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editCopy.setAccelerator(KeyStroke.getKeyStroke('C', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editPaste.setAccelerator(KeyStroke.getKeyStroke('V', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editPlaceMode.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F3, 0));\r\n\t\t\r\n\t\tui.editDeleteBuilding.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0));\r\n\t\tui.editDeleteSurface.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editDeleteBoth.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK));\r\n\t\t\r\n\t\tui.editDeleteBuilding.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doDeleteBuilding(); } });\r\n\t\tui.editDeleteSurface.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doDeleteSurface(); } });\r\n\t\tui.editDeleteBoth.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doDeleteBoth(); } });\r\n\t\tui.editPlaceMode.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doPlaceMode(ui.editPlaceMode.isSelected()); } });\r\n\t\t\r\n\t\tui.editPlaceRoads = new JMenu(\"Place roads\");\r\n\t\t\r\n\t\tui.editResize = new JMenuItem(\"Resize map\");\r\n\t\tui.editCleanup = new JMenuItem(\"Remove outbound objects\");\r\n\t\t\r\n\t\tui.editResize.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoResize();\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.editCleanup.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoCleanup();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tui.editCutBuilding = new JMenuItem(\"Cut: building\");\r\n\t\tui.editCutSurface = new JMenuItem(\"Cut: surface\");\r\n\t\tui.editPasteBuilding = new JMenuItem(\"Paste: building\");\r\n\t\tui.editPasteSurface = new JMenuItem(\"Paste: surface\");\r\n\t\tui.editCopyBuilding = new JMenuItem(\"Copy: building\");\r\n\t\tui.editCopySurface = new JMenuItem(\"Copy: surface\");\r\n\t\t\r\n\t\tui.editCutBuilding.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK));\r\n\t\tui.editCopyBuilding.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK));\r\n\t\tui.editPasteBuilding.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK));\r\n\t\t\r\n\t\tui.editCutBuilding.addActionListener(new Act() { @Override public void act() { doCut(false, true); } });\r\n\t\tui.editCutSurface.addActionListener(new Act() { @Override public void act() { doCut(true, false); } });\r\n\t\tui.editCopyBuilding.addActionListener(new Act() { @Override public void act() { doCopy(false, true); } });\r\n\t\tui.editCopySurface.addActionListener(new Act() { @Override public void act() { doCopy(true, false); } });\r\n\t\tui.editPasteBuilding.addActionListener(new Act() { @Override public void act() { doPaste(false, true); } });\r\n\t\tui.editPasteSurface.addActionListener(new Act() { @Override public void act() { doPaste(true, false); } });\r\n\t\t\r\n\t\tui.viewZoomIn = new JMenuItem(\"Zoom in\");\r\n\t\tui.viewZoomOut = new JMenuItem(\"Zoom out\");\r\n\t\tui.viewZoomNormal = new JMenuItem(\"Zoom normal\");\r\n\t\tui.viewBrighter = new JMenuItem(\"Daylight (1.0)\");\r\n\t\tui.viewDarker = new JMenuItem(\"Night (0.5)\");\r\n\t\tui.viewMoreLight = new JMenuItem(\"More light (+0.05)\");\r\n\t\tui.viewLessLight = new JMenuItem(\"Less light (-0.05)\");\r\n\t\t\r\n\t\tui.viewShowBuildings = new JCheckBoxMenuItem(\"Show/hide buildings\", renderer.showBuildings);\r\n\t\tui.viewShowBuildings.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_B, InputEvent.CTRL_DOWN_MASK));\r\n\t\t\r\n\t\tui.viewSymbolicBuildings = new JCheckBoxMenuItem(\"Minimap rendering mode\", renderer.minimapMode);\r\n\t\tui.viewSymbolicBuildings.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M, InputEvent.CTRL_DOWN_MASK));\r\n\t\t\r\n\t\tui.viewTextBackgrounds = new JCheckBoxMenuItem(\"Show/hide text background boxes\", renderer.textBackgrounds);\r\n\t\tui.viewTextBackgrounds.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewTextBackgrounds.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doToggleTextBackgrounds(); } });\r\n\t\t\r\n\t\tui.viewZoomIn.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doZoomIn(); } });\r\n\t\tui.viewZoomOut.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doZoomOut(); } });\r\n\t\tui.viewZoomNormal.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doZoomNormal(); } });\r\n\t\tui.viewShowBuildings.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doToggleBuildings(); } });\r\n\t\tui.viewSymbolicBuildings.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doToggleMinimap(); } });\r\n\t\t\r\n\t\tui.viewBrighter.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doBright(); } });\r\n\t\tui.viewDarker.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doDark(); } });\r\n\t\tui.viewMoreLight.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doMoreLight(); } });\r\n\t\tui.viewLessLight.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doLessLight(); } });\r\n\t\t\r\n\t\tui.viewZoomIn.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD9, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewZoomOut.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD3, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewZoomNormal.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD0, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewMoreLight.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD8, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewLessLight.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD2, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewBrighter.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD7, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewDarker.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD1, InputEvent.CTRL_DOWN_MASK));\r\n\t\t\r\n\t\tui.viewStandardFonts = new JCheckBoxMenuItem(\"Use standard fonts\", TextRenderer.USE_STANDARD_FONTS);\r\n\t\t\r\n\t\tui.viewStandardFonts.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoStandardFonts();\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.viewPlacementHints = new JCheckBoxMenuItem(\"View placement hints\", renderer.placementHints);\r\n\t\tui.viewPlacementHints.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoViewPlacementHints();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tui.helpOnline = new JMenuItem(\"Online wiki...\");\r\n\t\tui.helpOnline.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tdoHelp();\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.helpAbout = new JMenuItem(\"About...\");\r\n\t\tui.helpAbout.setEnabled(false); // TODO implement\r\n\t\t\r\n\t\tui.languageMenu = new JMenu(\"Language\");\r\n\t\t\r\n\t\tui.languageEn = new JRadioButtonMenuItem(\"English\", true);\r\n\t\tui.languageEn.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tsetLabels(\"en\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.languageHu = new JRadioButtonMenuItem(\"Hungarian\", false);\r\n\t\tui.languageHu.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tsetLabels(\"hu\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tButtonGroup bg = new ButtonGroup();\r\n\t\tbg.add(ui.languageEn);\r\n\t\tbg.add(ui.languageHu);\r\n\t\t\r\n\t\tui.fileRecent = new JMenu(\"Recent\");\r\n\t\tui.clearRecent = new JMenuItem(\"Clear recent\");\r\n\t\tui.clearRecent.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoClearRecent();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\taddAll(ui.fileRecent, ui.clearRecent);\r\n\t\t\r\n\t\taddAll(mainmenu, ui.fileMenu, ui.editMenu, ui.viewMenu, ui.languageMenu, ui.helpMenu);\r\n\t\taddAll(ui.fileMenu, ui.fileNew, null, ui.fileOpen, ui.fileRecent, ui.fileImport, null, ui.fileSave, ui.fileSaveAs, null, ui.fileExit);\r\n\t\taddAll(ui.editMenu, ui.editUndo, ui.editRedo, null, \r\n\t\t\t\tui.editCut, ui.editCopy, ui.editPaste, null, \r\n\t\t\t\tui.editCutBuilding, ui.editCopyBuilding, ui.editPasteBuilding, null, \r\n\t\t\t\tui.editCutSurface, ui.editCopySurface, ui.editPasteSurface, null, \r\n\t\t\t\tui.editPlaceMode, null, ui.editDeleteBuilding, ui.editDeleteSurface, ui.editDeleteBoth, null, \r\n\t\t\t\tui.editClearBuildings, ui.editClearSurface, null, ui.editPlaceRoads, null, ui.editResize, ui.editCleanup);\r\n\t\taddAll(ui.viewMenu, ui.viewZoomIn, ui.viewZoomOut, ui.viewZoomNormal, null, \r\n\t\t\t\tui.viewBrighter, ui.viewDarker, ui.viewMoreLight, ui.viewLessLight, null, \r\n\t\t\t\tui.viewShowBuildings, ui.viewSymbolicBuildings, ui.viewTextBackgrounds, ui.viewStandardFonts, ui.viewPlacementHints);\r\n\t\taddAll(ui.helpMenu, ui.helpOnline, null, ui.helpAbout);\r\n\t\t\r\n\t\taddAll(ui.languageMenu, ui.languageEn, ui.languageHu);\r\n\t\t\r\n\t\tui.fileNew.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tdoNew();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tui.toolbar = new JToolBar(\"Tools\");\r\n\t\tContainer c = getContentPane();\r\n\t\tc.add(ui.toolbar, BorderLayout.PAGE_START);\r\n\r\n\t\tui.toolbarCut = createFor(\"res/Cut24.gif\", \"Cut\", ui.editCut, false);\r\n\t\tui.toolbarCopy = createFor(\"res/Copy24.gif\", \"Copy\", ui.editCopy, false);\r\n\t\tui.toolbarPaste = createFor(\"res/Paste24.gif\", \"Paste\", ui.editPaste, false);\r\n\t\tui.toolbarRemove = createFor(\"res/Remove24.gif\", \"Remove\", ui.editDeleteBuilding, false);\r\n\t\tui.toolbarUndo = createFor(\"res/Undo24.gif\", \"Undo\", ui.editUndo, false);\r\n\t\tui.toolbarRedo = createFor(\"res/Redo24.gif\", \"Redo\", ui.editRedo, false);\r\n\t\tui.toolbarPlacementMode = createFor(\"res/Down24.gif\", \"Placement mode\", ui.editPlaceMode, true);\r\n\r\n\t\tui.toolbarUndo.setEnabled(false);\r\n\t\tui.toolbarRedo.setEnabled(false);\r\n\t\t\r\n\t\tui.toolbarNew = createFor(\"res/New24.gif\", \"New\", ui.fileNew, false);\r\n\t\tui.toolbarOpen = createFor(\"res/Open24.gif\", \"Open\", ui.fileOpen, false);\r\n\t\tui.toolbarSave = createFor(\"res/Save24.gif\", \"Save\", ui.fileSave, false);\r\n\t\tui.toolbarImport = createFor(\"res/Import24.gif\", \"Import\", ui.fileImport, false);\r\n\t\tui.toolbarSaveAs = createFor(\"res/SaveAs24.gif\", \"Save as\", ui.fileSaveAs, false);\r\n\t\tui.toolbarZoomNormal = createFor(\"res/Zoom24.gif\", \"Zoom normal\", ui.viewZoomNormal, false);\r\n\t\tui.toolbarZoomIn = createFor(\"res/ZoomIn24.gif\", \"Zoom in\", ui.viewZoomIn, false);\r\n\t\tui.toolbarZoomOut = createFor(\"res/ZoomOut24.gif\", \"Zoom out\", ui.viewZoomOut, false);\r\n\t\tui.toolbarBrighter = createFor(\"res/TipOfTheDay24.gif\", \"Daylight\", ui.viewBrighter, false);\r\n\t\tui.toolbarDarker = createFor(\"res/TipOfTheDayDark24.gif\", \"Night\", ui.viewDarker, false);\r\n\t\tui.toolbarHelp = createFor(\"res/Help24.gif\", \"Help\", ui.helpOnline, false);\r\n\r\n\t\t\r\n\t\tui.toolbar.add(ui.toolbarNew);\r\n\t\tui.toolbar.add(ui.toolbarOpen);\r\n\t\tui.toolbar.add(ui.toolbarSave);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarImport);\r\n\t\tui.toolbar.add(ui.toolbarSaveAs);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarCut);\r\n\t\tui.toolbar.add(ui.toolbarCopy);\r\n\t\tui.toolbar.add(ui.toolbarPaste);\r\n\t\t\r\n\t\tui.toolbar.add(ui.toolbarRemove);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarUndo);\r\n\t\tui.toolbar.add(ui.toolbarRedo);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarPlacementMode);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarZoomNormal);\r\n\t\tui.toolbar.add(ui.toolbarZoomIn);\r\n\t\tui.toolbar.add(ui.toolbarZoomOut);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarBrighter);\r\n\t\tui.toolbar.add(ui.toolbarDarker);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarHelp);\r\n\t\t\r\n\t}",
"public SysMenu(Name alias) {\n this(alias, SYS_MENU);\n }",
"private void initMenuBar() {\r\n\t\t// file menu\r\n\t\tJMenu fileMenu = new JMenu(\"File\");\r\n\t\tfileMenu.setMnemonic(KeyEvent.VK_F);\r\n\t\tadd(fileMenu);\r\n\r\n\t\tJMenuItem fileNewMenuItem = new JMenuItem(new NewAction(parent, main));\r\n\t\tfileNewMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileNewMenuItem);\r\n\t\tJMenuItem fileOpenMenuItem = new JMenuItem(new OpenAction(parent, main));\r\n\t\tfileOpenMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileOpenMenuItem);\r\n\r\n\t\tJMenuItem fileSaveMenuItem = new JMenuItem(new SaveAction(main));\r\n\t\tfileSaveMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileSaveMenuItem);\r\n\t\tJMenuItem fileSaveAsMenuItem = new JMenuItem(new SaveAsAction(main));\r\n\t\tfileSaveAsMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileSaveAsMenuItem);\r\n\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(recentMenu);\r\n\t\tfileMenu.addSeparator();\r\n\r\n\t\tJMenuItem exitMenuItem = new JMenuItem(new ExitAction(main));\r\n\t\texitMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(exitMenuItem);\r\n\r\n\t\t// tools menu\r\n\t\tJMenu toolsMenu = new JMenu(\"Application\");\r\n\t\ttoolsMenu.setMnemonic(KeyEvent.VK_A);\r\n\t\tadd(toolsMenu);\r\n\r\n\t\tJMenuItem defineCategoryMenuItem = new JMenuItem(\r\n\t\t\t\tnew DefineCategoryAction());\r\n\t\tdefineCategoryMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_C, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(defineCategoryMenuItem);\r\n\t\tJMenuItem defineBehaviorNetworkMenuItem = new JMenuItem(\r\n\t\t\t\tnew DefineBehaviorNetworkAction());\r\n\t\tdefineBehaviorNetworkMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_B, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(defineBehaviorNetworkMenuItem);\r\n\t\tJMenuItem startSimulationMenuItem = new JMenuItem(\r\n\t\t\t\tnew StartSimulationAction(main));\r\n\t\tstartSimulationMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_E, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(startSimulationMenuItem);\r\n\r\n\t\t// help menu\r\n\t\tJMenu helpMenu = new JMenu(\"Help\");\r\n\t\thelpMenu.setMnemonic(KeyEvent.VK_H);\r\n\t\tadd(helpMenu);\r\n\r\n\t\tJMenuItem helpMenuItem = new JMenuItem(new HelpAction(parent));\r\n\t\thelpMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_H,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\thelpMenu.add(helpMenuItem);\r\n\r\n\t\t// JCheckBoxMenuItem clock = new JCheckBoxMenuItem(new\r\n\t\t// ScheduleSaveAction(parent));\r\n\t\t// helpMenu.add(clock);\r\n\t\thelpMenu.addSeparator();\r\n\t\tJMenuItem showMemItem = new JMenuItem(new ShowMemAction(parent));\r\n\t\thelpMenu.add(showMemItem);\r\n\r\n\t\tJMenuItem aboutMenuItem = new JMenuItem(new AboutAction(parent));\r\n\t\thelpMenu.add(aboutMenuItem);\r\n\t}",
"public SysMenu() {\n this(DSL.name(\"sys_menu\"), null);\n }",
"public void initMenuContext(){\n GralMenu menuCurve = getContextMenu();\n //menuCurve.addMenuItemGthread(\"pause\", \"pause\", null);\n menuCurve.addMenuItem(\"refresh\", actionPaintAll);\n menuCurve.addMenuItem(\"go\", actionGo);\n menuCurve.addMenuItem(\"show All\", actionShowAll);\n //menuCurve.addMenuItemGthread(\"zoomOut\", \"zoom in\", null);\n menuCurve.addMenuItem(\"zoomBetweenCursor\", \"zoom between Cursors\", actionZoomBetweenCursors);\n menuCurve.addMenuItem(\"zoomOut\", \"zoom out\", actionZoomOut);\n menuCurve.addMenuItem(\"cleanBuffer\", \"clean Buffer\", actionCleanBuffer);\n //menuCurve.addMenuItemGthread(\"zoomOut\", \"to left\", null);\n //menuCurve.addMenuItemGthread(\"zoomOut\", \"to right\", null);\n \n }",
"public String chooseMenu() {\n String input = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"menu_id\");\n setName(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"name\"));\n setType(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"type\"));\n setMenu_id(Integer.parseInt(input));\n return \"EditMenu\";\n\n }",
"private void buildMenu() {\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n\n JMenu fileMenu = new JMenu(\"File\");\n fileMenu.addMenuListener(this);\n\n JMenuItem openItem = new JMenuItem(\"Open\");\n openItem.setEnabled(false);\n JMenuItem newItem = new JMenuItem(\"New\");\n newItem.setEnabled(false);\n saveItem = new JMenuItem(\"Save\");\n saveItem.setEnabled(false);\n saveAsItem = new JMenuItem(\"Save As\");\n saveAsItem.setEnabled(false);\n reloadCalItem = new JMenuItem(RELOAD_CAL);\n exitItem = new JMenuItem(EXIT);\n\n mbar.add(makeMenu(fileMenu, new Object[]{newItem, openItem, null,\n reloadCalItem, null,\n saveItem, saveAsItem, null, exitItem}, this));\n\n JMenu viewMenu = new JMenu(\"View\");\n mbar.add(viewMenu);\n JMenuItem columnItem = new JMenuItem(COLUMNS);\n columnItem.addActionListener(this);\n JMenuItem logItem = new JMenuItem(LOG);\n logItem.addActionListener(this);\n JMenu satMenu = new JMenu(\"Satellite Image\");\n JMenuItem irItem = new JMenuItem(INFRA_RED);\n irItem.addActionListener(this);\n JMenuItem wvItem = new JMenuItem(WATER_VAPOUR);\n wvItem.addActionListener(this);\n satMenu.add(irItem);\n satMenu.add(wvItem);\n viewMenu.add(columnItem);\n viewMenu.add(logItem);\n viewMenu.add(satMenu);\n\n observability = new JCheckBoxMenuItem(\"Observability\", true);\n observability.setToolTipText(\"Check that the source is observable.\");\n remaining = new JCheckBoxMenuItem(\"Remaining\", true);\n remaining.setToolTipText(\n \"Check that the MSB has repeats remaining to be observed.\");\n allocation = new JCheckBoxMenuItem(\"Allocation\", true);\n allocation.setToolTipText(\n \"Check that the project still has sufficient time allocated.\");\n\n String ZOA = System.getProperty(\"ZOA\", \"true\");\n boolean tickZOA = true;\n if (\"false\".equalsIgnoreCase(ZOA)) {\n tickZOA = false;\n }\n\n zoneOfAvoidance = new JCheckBoxMenuItem(\"Zone of Avoidance\", tickZOA);\n localQuerytool.setZoneOfAvoidanceConstraint(!tickZOA);\n\n disableAll = new JCheckBoxMenuItem(\"Disable All\", false);\n JMenuItem cutItem = new JMenuItem(\"Cut\",\n new ImageIcon(ClassLoader.getSystemResource(\"cut.gif\")));\n cutItem.setEnabled(false);\n JMenuItem copyItem = new JMenuItem(\"Copy\",\n new ImageIcon(ClassLoader.getSystemResource(\"copy.gif\")));\n copyItem.setEnabled(false);\n JMenuItem pasteItem = new JMenuItem(\"Paste\",\n new ImageIcon(ClassLoader.getSystemResource(\"paste.gif\")));\n pasteItem.setEnabled(false);\n\n mbar.add(makeMenu(\"Edit\",\n new Object[]{\n cutItem,\n copyItem,\n pasteItem,\n null,\n makeMenu(\"Constraints\", new Object[]{observability,\n remaining, allocation, zoneOfAvoidance, null,\n disableAll}, this)}, this));\n\n mbar.add(SampClient.getInstance().buildMenu(this, sorter, table));\n\n JMenu helpMenu = new JMenu(\"Help\");\n helpMenu.setMnemonic('H');\n\n mbar.add(makeMenu(helpMenu, new Object[]{new JMenuItem(INDEX, 'I'),\n new JMenuItem(ABOUT, 'A')}, this));\n\n menuBuilt = true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.other_menu, menu);\n return true;\n }",
"public startingMenu() {\r\n initComponents();\r\n }",
"private void createMenusNow()\n {\n JMenu debugMenu = myToolbox.getUIRegistry().getMenuBarRegistry().getMenu(MenuBarRegistry.MAIN_MENU_BAR,\n MenuBarRegistry.DEBUG_MENU);\n debugMenu.add(SwingUtilities.newMenuItem(\"DataTypeInfo - Print Summary\", e -> printSummary()));\n debugMenu.add(SwingUtilities.newMenuItem(\"DataTypeInfo - Tag Data Type\", e -> tagDataType()));\n }",
"private void setUpMenuBar_FileMenu(){\r\n\t\t// Add the file menu.\r\n\t\tthis.fileMenu = new JMenu(STR_FILE);\r\n\t\tthis.openMenuItem = new JMenuItem(STR_OPEN);\r\n\t\tthis.openMenuItem2 = new JMenuItem(STR_OPEN2);\r\n\t\tthis.resetMenuItem = new JMenuItem(STR_RESET);\r\n\t\tthis.saveMenuItem = new JMenuItem(STR_SAVE);\r\n\t\tthis.saveAsMenuItem = new JMenuItem(STR_SAVEAS);\r\n\t\tthis.exitMenuItem = new JMenuItem(STR_EXIT);\r\n\t\t\r\n\t\t// Add the action listeners for the file menu.\r\n\t\tthis.openMenuItem.addActionListener(this);\r\n\t\tthis.openMenuItem2.addActionListener(this);\r\n\t\tthis.resetMenuItem.addActionListener(this);\r\n\t\tthis.saveMenuItem.addActionListener(this);\r\n\t\tthis.saveAsMenuItem.addActionListener(this);\r\n\t\tthis.exitMenuItem.addActionListener(this);\r\n\t\t\r\n\t\t// Add the menu items to the file menu.\r\n\t\tthis.fileMenu.add(openMenuItem);\r\n\t\tthis.fileMenu.add(openMenuItem2);\r\n\t\tthis.fileMenu.add(resetMenuItem);\r\n\t\tthis.fileMenu.addSeparator();\r\n\t\tthis.fileMenu.add(saveMenuItem);\r\n\t\tthis.fileMenu.add(saveAsMenuItem);\r\n\t\tthis.fileMenu.addSeparator();\r\n\t\tthis.fileMenu.add(exitMenuItem);\r\n\t\tthis.menuBar.add(fileMenu);\r\n\t}",
"public MyMenu() {\n this(DSL.name(\"MY_MENU\"), null);\n }",
"MenuBar setMenu() {\r\n\t\t// initially set up the file chooser to look for cfg files in current directory\r\n\t\tMenuBar menuBar = new MenuBar(); // create main menu\r\n\r\n\t\tMenu mFile = new Menu(\"File\"); // add File main menu\r\n\t\tMenuItem mExit = new MenuItem(\"Exit\"); // whose sub menu has Exit\r\n\t\tmExit.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\tpublic void handle(ActionEvent t) { // action on exit\r\n\t\t\t\ttimer.stop(); // stop timer\r\n\t\t\t\tSystem.exit(0); // exit program\r\n\t\t\t}\r\n\t\t});\r\n\t\tmFile.getItems().addAll(mExit); // add load, save and exit to File menu\r\n\r\n\t\tMenu mHelp = new Menu(\"Help\"); // create Help menu\r\n\t\tMenuItem mAbout = new MenuItem(\"About\"); // add Welcome sub menu item\r\n\t\tmAbout.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent actionEvent) {\r\n\t\t\t\tshowAbout(); // whose action is to give welcome message\r\n\t\t\t}\r\n\t\t});\r\n\t\tmHelp.getItems().addAll(mAbout); // add Welcome and About to Run main item\r\n\r\n\t\tmenuBar.getMenus().addAll(mFile, mHelp); // set main menu with File, Config, Run, Help\r\n\t\treturn menuBar; // return the menu\r\n\t}",
"public AbstractMenu(MenuLoader menuLoader) \r\n\t{}",
"private void createMenus() {\n\t\tJMenuBar menuBar = new JMenuBar();\n\n\t\tfileMenu = new JMenu(flp.getString(\"file\"));\n\t\tmenuBar.add(fileMenu);\n\n\t\tfileMenu.add(new JMenuItem(new ActionNewDocument(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionOpen(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionSave(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionSaveAs(flp, this)));\n\t\tfileMenu.addSeparator();\n\t\tfileMenu.add(new JMenuItem(new ActionExit(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionStatistics(flp, this)));\n\n\t\teditMenu = new JMenu(flp.getString(\"edit\"));\n\n\t\teditMenu.add(new JMenuItem(new ActionCut(flp, this)));\n\t\teditMenu.add(new JMenuItem(new ActionCopy(flp, this)));\n\t\teditMenu.add(new JMenuItem(new ActionPaste(flp, this)));\n\n\t\ttoolsMenu = new JMenu(flp.getString(\"tools\"));\n\n\t\titemInvert = new JMenuItem(new ActionInvertCase(flp, this));\n\t\titemInvert.setEnabled(false);\n\t\ttoolsMenu.add(itemInvert);\n\n\t\titemLower = new JMenuItem(new ActionLowerCase(flp, this));\n\t\titemLower.setEnabled(false);\n\t\ttoolsMenu.add(itemLower);\n\n\t\titemUpper = new JMenuItem(new ActionUpperCase(flp, this));\n\t\titemUpper.setEnabled(false);\n\t\ttoolsMenu.add(itemUpper);\n\n\t\tsortMenu = new JMenu(flp.getString(\"sort\"));\n\t\tsortMenu.add(new JMenuItem(new ActionSortAscending(flp, this)));\n\t\tsortMenu.add(new JMenuItem(new ActionSortDescending(flp, this)));\n\n\t\tmenuBar.add(editMenu);\n\t\tmenuBar.add(createLanguageMenu());\n\t\tmenuBar.add(toolsMenu);\n\t\tmenuBar.add(sortMenu);\n\n\t\tthis.setJMenuBar(menuBar);\n\t}",
"public void setUpFileMenu() {\n add(fileMenu);\n fileMenu.add(new OpenAction(parent));\n fileMenu.add(new SaveAction(parent));\n fileMenu.add(new SaveAsAction(parent));\n fileMenu.addSeparator();\n fileMenu.add(new ShowWorldPrefsAction(parent.getWorldPanel()));\n fileMenu.add(new CloseAction(parent.getWorkspaceComponent()));\n }",
"public MenuKullanimi()\n {\n initComponents();\n setLocationRelativeTo(null);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n if (initMenu() == 0) {\n getMenuInflater().inflate(R.menu.menu_null, menu);\n } else {\n getMenuInflater().inflate(this.initMenu(), menu);\n }\n return true;\n }",
"public void buildMenu() {\n\t\tthis.Menu = new uPanel(this.layer, 0, 0, (int) (this.getWidth() * 2), (int) (this.getHeight() * 3)) {\r\n\t\t\t@Override\r\n\t\t\tpublic boolean handleEvent(uEvent event) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick() {\r\n\t\t\t\tsuper.onClick();\r\n\t\t\t\tthis.space.sortLayer(this.layer);\r\n\t\t\t\tthis.castEvent(\"MENUPANEL_CLICK\");\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.screen.addPrehide(this.Menu);\r\n\r\n\t\tthis.Node.addChild(this.Menu.getNode());\r\n\r\n\t}",
"private void init() {\n StateManager.setState(new MenuState());\n }",
"@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}",
"protected void fillMenuBar(IMenuManager menuBar){\n\t\tIWorkbenchWindow window = getActionBarConfigurer().getWindowConfigurer().getWindow();\n\t\tmenuBar.add(createFileMenu(window));\n\t\tmenuBar.add(createEditMenu());\n\t\tmenuBar.add(ToolsBoxFonctions.createToolBoxMenu(window));\n\t\tmenuBar.add(createHelpMenu(window));\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jMenuBar1 = new javax.swing.JMenuBar();\n jMenu1 = new javax.swing.JMenu();\n jMenu2 = new javax.swing.JMenu();\n jMenu3 = new javax.swing.JMenu();\n jmiConfSistema = new javax.swing.JMenuItem();\n jmiLoggerTrace = new javax.swing.JMenuItem();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Sistema Exemplo\");\n setAlwaysOnTop(true);\n setBackground(new java.awt.Color(255, 255, 255));\n setPreferredSize(new java.awt.Dimension(800, 600));\n\n jMenu1.setText(\"File\");\n jMenuBar1.add(jMenu1);\n\n jMenu2.setText(\"Edit\");\n jMenuBar1.add(jMenu2);\n\n jMenu3.setText(\"Configurações\");\n\n jmiConfSistema.setText(\"Configurações do Sistema\");\n jmiConfSistema.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jmiConfSistemaActionPerformed(evt);\n }\n });\n jMenu3.add(jmiConfSistema);\n\n jmiLoggerTrace.setText(\"Logger Tracer\");\n jmiLoggerTrace.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jmiLoggerTraceActionPerformed(evt);\n }\n });\n jMenu3.add(jmiLoggerTrace);\n jmiLoggerTrace.getAccessibleContext().setAccessibleName(\"Logger Trace\");\n\n jMenuBar1.add(jMenu3);\n\n setJMenuBar(jMenuBar1);\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, 666, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 486, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public void initializeMenuItems() {\n menuItems = new LinkedHashMap<TestingOption, MenuDrawerItem>();\n menuItems.put(TestingOption.TESTING_OPTION, create(TestingOption.TESTING_OPTION, getResources().getString(R.string.testing_section).toUpperCase(), MenuDrawerItem.SECTION_TYPE));\n menuItems.put(TestingOption.ANNOTATION_OPTION, create(TestingOption.ANNOTATION_OPTION, getResources().getString(R.string.option_annotation_POI), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.MAP_VIEW_SETTINGS_OPTION, create(TestingOption.MAP_VIEW_SETTINGS_OPTION, getResources().getString(R.string.option_map_view_settings), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.MAP_CACHE_OPTION, create(TestingOption.MAP_CACHE_OPTION, getResources().getString(R.string.option_map_cache), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.LAST_RENDERED_FRAME_OPTION, create(TestingOption.LAST_RENDERED_FRAME_OPTION, getResources().getString(R.string.option_last_rendered_frame), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.ANIMATION_CUSTOM_VIEW_OPTION, create(TestingOption.ANIMATION_CUSTOM_VIEW_OPTION, getResources().getString(R.string.option_ccp_animation_custom_view), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.BOUNDING_BOX_OPTION, create(TestingOption.BOUNDING_BOX_OPTION, getResources().getString(R.string.option_bounding_box), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.INTERNALIZATION_OPTION, create(TestingOption.INTERNALIZATION_OPTION, getResources().getString(R.string.option_internalization), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.ANIMATE_OPTION, create(TestingOption.ANIMATE_OPTION, getResources().getString(R.string.option_animate), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.MAP_STYLE_OPTION, create(TestingOption.MAP_STYLE_OPTION, getResources().getString(R.string.option_map_style), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.SCALE_VIEW_OPTION, create(TestingOption.SCALE_VIEW_OPTION, getResources().getString(R.string.option_scale_view), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.CALLOUT_VIEW_OPTION, create(TestingOption.CALLOUT_VIEW_OPTION, getResources().getString(R.string.option_callout_view), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.ROUTING_OPTION, create(TestingOption.ROUTING_OPTION, getResources().getString(R.string.option_routing), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.ROUTE_WITH_POINTS, create(TestingOption.ROUTE_WITH_POINTS, getResources().getString(R.string.option_routing_with_points),MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.MAP_VERSION_OPTION, create(TestingOption.MAP_VERSION_OPTION, getResources().getString(R.string.option_map_version_information), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.OVERLAYS_OPTION, create(TestingOption.OVERLAYS_OPTION, getResources().getString(R.string.option_overlays), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.POI_TRACKER, create(TestingOption.POI_TRACKER, getResources().getString(R.string.option_poi_tracker), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.POSITION_LOGGING_OPTION, create(TestingOption.POSITION_LOGGING_OPTION, getResources().getString(R.string.option_position_logging), MenuDrawerItem.ITEM_TYPE));\n\n list = new ArrayList<MenuDrawerItem>(menuItems.values());\n drawerList.setAdapter(new MenuDrawerAdapter(DebugMapActivity.this, R.layout.element_menu_drawer_item, list));\n drawerList.setOnItemClickListener(new DrawerItemClickListener());\n\n }",
"protected void initializeEditMenu() {\n\t\tfinal JMenu editMenu = new JMenu(\"Edit\");\n\t\tthis.add(editMenu);\n\t\t// History Mouse Mode\n\t\tfinal JMenu mouseModeSubMenu = new JMenu(\"History Mouse Mode\");\n\t\teditMenu.add(mouseModeSubMenu);\n\t\t// Transforming\n\t\tfinal JMenuItem transformingItem = new JMenuItem(\n\t\t\t\tthis.commands.findById(\"GUICmdGraphMouseMode.Transforming\"));\n\t\ttransformingItem.setAccelerator(KeyStroke.getKeyStroke('T',\n\t\t\t\tInputEvent.ALT_DOWN_MASK));\n\t\tmouseModeSubMenu.add(transformingItem);\n\t\t// Picking\n\t\tfinal JMenuItem pickingItem = new JMenuItem(\n\t\t\t\tthis.commands.findById(\"GUICmdGraphMouseMode.Picking\"));\n\t\tpickingItem.setAccelerator(KeyStroke.getKeyStroke('P',\n\t\t\t\tInputEvent.ALT_DOWN_MASK));\n\t\tmouseModeSubMenu.add(pickingItem);\n\t}",
"public void ajouterNouveauMenu(int idLigneprecedente, Menu nouveauMenu);",
"private void initMenubar() {\r\n\t\tsetJMenuBar(new MenuBar(controller));\r\n\t}",
"public EditImgMenuBar(EditImgPanel currentPanel)\n\t{\n\t\tsuper();\n\t\tif (currentPanel == null)\n\t\t{\n\t\t\tthrow new NullPointerException();\n\t\t}\n\t\tthis.currentPanel = currentPanel;\n\t\tthis.constructMenuItems();\n\t\tthis.constructMenus();\n\t\tthis.add(this.fileMenu);\n\t\tthis.add(this.editMenu);\n\t\tthis.add(this.caseMenu);\n\t\tthis.add(this.imageMenu);\n\t}",
"@Override\n public void onPrepareOptionsMenu(Menu menu) {\n if (mShowOptionsMenu && ViewConfiguration.get(getActivity()).hasPermanentMenuKey() &&\n isLayoutReady() && mDialpadChooser != null) {\n setupMenuItems(menu);\n }\n }",
"private void addMenu(){\n //Where the GUI is created:\n \n Menu menu = new Menu(\"Menu\");\n MenuItem menuItem1 = new MenuItem(\"Lista de Libros\");\n MenuItem menuItem2 = new MenuItem(\"Nuevo\");\n\n menu.getItems().add(menuItem1);\n menu.getItems().add(menuItem2);\n \n menuItem1.setOnAction(new EventHandler<ActionEvent>() { \n @Override\n public void handle(ActionEvent event) {\n gridPane.getChildren().clear();\n cargarListaGeneradores( 2, biblioteca.getBiblioteca());\n }\n });\n \n menuItem2.setOnAction(new EventHandler<ActionEvent>() { \n @Override\n public void handle(ActionEvent event) {\n gridPane.getChildren().clear();\n addUIControls() ;\n }\n });\n \n menuBar.getMenus().add(menu);\n }",
"private void initializeMenuForListView() {\n\t\tMenuItem sItem = new MenuItem(labels.get(Labels.PROP_INFO_ADD_S_MENU));\n\t\tsItem.setOnAction(event ->\n\t\t\taddSAction()\n\t\t);\n\t\t\n\t\tMenuItem scItem = new MenuItem(labels.get(Labels.PROP_INFO_ADD_SC_MENU));\n\t\tscItem.setOnAction(event ->\n\t\t\t\taddScAction()\n\t\t);\n\t\t\n\t\tContextMenu menu = new ContextMenu(sItem, scItem);\n\t\tfirstListView.setContextMenu(menu);\n\t\tsecondListView.setContextMenu(menu);\n\t}",
"private void setIconsMenus() {\n ImageIcon iconNew = new javax.swing.ImageIcon(getClass().getResource(\"/image/novo.png\"));\n ImageIcon iconSearch = new javax.swing.ImageIcon(getClass().getResource(\"/image/procurar.19px.png\"));\n\n JMenuItem[] miNew = new JMenuItem[]{miModuloNovo, miIrradiacaoGlobalMesNovo, miInversorNovo,\n miProjetoNovo, miUsuarioNovo, miNovoCliente, miFornecedorNovo, miEPNovo};\n for (JMenuItem mi : miNew) {\n mi.setIcon(iconNew);\n mi.setMnemonic(KeyEvent.VK_N);\n }\n\n JMenuItem[] miSearch = new JMenuItem[]{miModuloPesquisar, miIrradiacaoGlobalMesPesquisar, miInversorPesquisar,\n miProjetoPesquisar, miUsuarioPesquisar, miPesquisarCliente, miFornecedorPesquisar, miEPPesquisar};\n for (JMenuItem mi : miSearch) {\n mi.setIcon(iconSearch);\n mi.setMnemonic(KeyEvent.VK_P);\n }\n }",
"public void menuSetup(){\r\n menu.add(menuItemSave);\r\n menu.add(menuItemLoad);\r\n menu.add(menuItemRestart);\r\n menuBar.add(menu); \r\n topPanel.add(menuBar);\r\n bottomPanel.add(message);\r\n \r\n this.setLayout(new BorderLayout());\r\n this.add(topPanel, BorderLayout.NORTH);\r\n this.add(middlePanel, BorderLayout.CENTER);\r\n this.add(bottomPanel, BorderLayout.SOUTH);\r\n \r\n }",
"private void createMenus() {\r\n\t\t// File menu\r\n\t\tmenuFile = new JMenu(Constants.C_FILE_MENU_TITLE);\r\n\t\tmenuBar.add(menuFile);\r\n\t\t\r\n\t\tmenuItemExit = new JMenuItem(Constants.C_FILE_ITEM_EXIT_TITLE);\r\n\t\tmenuItemExit.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tactionOnClicExit();\t\t// Action triggered when the Exit item is clicked.\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuFile.add(menuItemExit);\r\n\t\t\r\n\t\t// Help menu\r\n\t\tmenuHelp = new JMenu(Constants.C_HELP_MENU_TITLE);\r\n\t\tmenuBar.add(menuHelp);\r\n\t\t\r\n\t\tmenuItemHelp = new JMenuItem(Constants.C_HELP_ITEM_HELP_TITLE);\r\n\t\tmenuItemHelp.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicHelp();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemHelp);\r\n\t\t\r\n\t\tmenuItemAbout = new JMenuItem(Constants.C_HELP_ITEM_ABOUT_TITLE);\r\n\t\tmenuItemAbout.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicAbout();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemAbout);\r\n\t\t\r\n\t\tmenuItemReferences = new JMenuItem(Constants.C_HELP_ITEM_REFERENCES_TITLE);\r\n\t\tmenuItemReferences.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicReferences();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemReferences);\r\n\t}",
"private static void gestorMenu(String ruta) {\t\t\n\t\tFile f = new File (ruta);\n\t\t// establece el directorio padre\n\t\tString base = f.getPath();\n\t\truta = f.getPath();\n\t\t// Presenta por pantalla el menu del programa\n\t\tmostrarMenu();\n\t\t// Inicia el tiempo\n\t\tlong tiempoInicial = System.currentTimeMillis();\n\t\tMenu(ruta, base, tiempoInicial, 0);\n\t}",
"ReturnCode createMenus(MmtConfig cfg, String menuJson);",
"public SysMenuParams() {\n\t\tsuper();\n\t}",
"public Menu() {\n\n\t}",
"public void initializeMenuBarLocalization() {\n\t\tmenuSettings.setText(bundle.getString(\"mVSettings\"));\n\t\tmenuItemPreferences.setText(bundle.getString(\"mVPreferences\"));\n\t\tuserSettings.setText(bundle.getString(\"mVUsersettings\"));\n\t\tloginoption.setText(bundle.getString(\"mVLogin\"));\n\t\tmenuHelp.setText(bundle.getString(\"mVHelp\"));\n\t\tmenuItemAbout.setText(bundle.getString(\"mVAbout\"));\n\t\tmenuItemUserguide.setText(bundle.getString(\"mVUserguide\"));\n\t\tmenuLanguage.setText(bundle.getString(\"mVLanguage\"));\n\t}",
"public void setMenu ( Object menu ) {\r\n\t\tgetStateHelper().put(PropertyKeys.menu, menu);\r\n\t\thandleAttribute(\"menu\", menu);\r\n\t}",
"private void prepare() {\n Menu menu = new Menu();\n addObject(menu, 523, 518);\n }",
"private void updateMenu() {\n if(customMenu || !menuDirty) {\n return;\n }\n \n // otherwise, reset up the menu.\n menuDirty = false;\n menu.removeAll();\n Icon emptyIcon = null; \n for(Action action : actions) {\n if(action.getValue(Action.SMALL_ICON) != null) {\n emptyIcon = new EmptyIcon(16, 16);\n break;\n }\n }\n \n selectedComponent = null;\n selectedLabel = null;\n \n for (Action action : actions) {\n \n // We create the label ourselves (instead of using JMenuItem),\n // because JMenuItem adds lots of bulky insets.\n\n ActionLabel menuItem = new ActionLabel(action);\n JComponent panel = wrapItemForSelection(menuItem);\n \n if (action != selectedAction) {\n panel.setOpaque(false);\n menuItem.setForeground(UIManager.getColor(\"MenuItem.foreground\"));\n } else {\n selectedComponent = panel;\n selectedLabel = menuItem;\n selectedComponent.setOpaque(true);\n selectedLabel.setForeground(UIManager.getColor(\"MenuItem.selectionForeground\"));\n }\n \n if(menuItem.getIcon() == null) {\n menuItem.setIcon(emptyIcon);\n }\n attachListeners(menuItem);\n decorateMenuComponent(menuItem);\n menuItem.setBorder(BorderFactory.createEmptyBorder(0, 6, 2, 6));\n\n menu.add(panel);\n }\n \n if (getText() == null) {\n menu.add(Box.createHorizontalStrut(getWidth()-4));\n } \n \n for(MenuCreationListener listener : menuCreationListeners) {\n listener.menuCreated(this, menu);\n }\n }",
"public Menu(SistemaOperativo sist) {\n initComponents();\n this.so = sist;\n }",
"public SysMenuExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"public void setLocalizedLanguageMenuItems() {\n\t\tif (!userMenuButton.getText().equals(\"\")) {\n\t\t\tloggedinuser.setText(bundle.getString(\"mVloggedin\"));\n\t\t\tmenu1.setText(bundle.getString(\"mVmenu1\"));\n\t\t\tmenu2.setText(bundle.getString(\"mVmenu2\"));\n\t\t}\n\t}"
]
| [
"0.6195864",
"0.6174241",
"0.60893816",
"0.59936297",
"0.5957127",
"0.5830151",
"0.58034",
"0.58032256",
"0.57731104",
"0.5729415",
"0.5708967",
"0.57087517",
"0.56733793",
"0.55821246",
"0.5553011",
"0.55480534",
"0.55476725",
"0.5533438",
"0.55304694",
"0.5520181",
"0.5508231",
"0.550365",
"0.5486654",
"0.54844016",
"0.54771405",
"0.5460755",
"0.5451996",
"0.54415375",
"0.5411896",
"0.54110634",
"0.54098815",
"0.53870094",
"0.5385312",
"0.53811556",
"0.5359855",
"0.53591835",
"0.5357781",
"0.5336186",
"0.5334849",
"0.5329024",
"0.53272617",
"0.5305895",
"0.5305753",
"0.5286719",
"0.52773184",
"0.5272372",
"0.5264058",
"0.526223",
"0.52620095",
"0.52588636",
"0.52537644",
"0.5242829",
"0.5242119",
"0.5242119",
"0.52369577",
"0.522898",
"0.52287555",
"0.52255875",
"0.521811",
"0.5212704",
"0.5212469",
"0.52115786",
"0.52049214",
"0.5204726",
"0.52012974",
"0.51949656",
"0.5191175",
"0.5185312",
"0.517453",
"0.51737416",
"0.51723415",
"0.51721746",
"0.51622504",
"0.51601386",
"0.51562786",
"0.5153935",
"0.5144849",
"0.512408",
"0.5121588",
"0.5120867",
"0.51202047",
"0.5118864",
"0.5116485",
"0.5112426",
"0.5111922",
"0.5110653",
"0.51094717",
"0.51077384",
"0.5107675",
"0.5103296",
"0.5101407",
"0.5098415",
"0.50907606",
"0.5083101",
"0.5078509",
"0.50716877",
"0.50706613",
"0.50699806",
"0.5069797",
"0.50601804"
]
| 0.669715 | 0 |
Metoda vrati sirku menu pre item menu | @Override
public int getWidth() {
return width;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setMenu() {\n\n if (tree.isEmpty() || !treeGrid.anySelected()) {\n mainMenu.setItems(newMenuItem, new MenuItemSeparator(), settingMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecord() == null) {\n mainMenu.setItems(renameMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecords().length > 1) {\n ListGridRecord[] selectedNode = treeGrid.getSelectedRecords();\n if (isSameExtension(selectedNode, Extension.FP)) {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem, exportMenuItem);\n } else if (isSameExtension(selectedNode, Extension.FPS)) {\n mainMenu.setItems(newFPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.BPS)) {\n mainMenu.setItems(newBPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.SCSS)) {\n mainMenu.setItems(newSCSItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n }\n } else if (tree.isFolder(treeGrid.getSelectedRecord())) {\n mainMenu.setItems(newMenuItem, deleteMenu, renameMenuItem, copyMenuItem, pasteMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem, downloadMenuItem,\n copyPathMenuItem);\n } else {\n FileTreeNode selectedNode = (FileTreeNode) treeGrid.getSelectedRecord();\n VMResource resource = selectedNode.getResource();\n if (resource instanceof VMDirectory) {\n return;\n }\n Extension extension = ((VMFile) resource).getExtension();\n if (extension == null) {\n mainMenu.setItems(openWithMenuItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n } else\n switch (extension) {\n case ARC:\n mainMenu.setItems(newBPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FM:\n mainMenu.setItems(newFMCItem, newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FMC:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case TC:\n mainMenu.setItems(newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n case FPS:\n mainMenu.setItems(newFPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, exportMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BPS:\n mainMenu.setItems(newBPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCSS:\n mainMenu.setItems(newSCSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCS:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n default:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n }\n }\n }",
"public void initMenu(){\n\t}",
"@Override\n\tpublic void setUpMenu() {\n\t\t\n\t}",
"private void initializeMenu() {\n menu = new Menu(parent.getShell());\n MenuItem item1 = new MenuItem(menu, SWT.NONE);\n item1.setText(Resources.getMessage(\"LatticeView.9\")); //$NON-NLS-1$\n item1.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n model.getClipboard().addToClipboard(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.CLIPBOARD, selectedNode));\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n \n MenuItem item2 = new MenuItem(menu, SWT.NONE);\n item2.setText(Resources.getMessage(\"LatticeView.10\")); //$NON-NLS-1$\n item2.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n controller.actionApplySelectedTransformation();\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n }",
"public void startMenu() {\n setTitle(\"Nier Protomata\");\n setSize(ICoord.LAST_COL + ICoord.ADD_SIZE,\n ICoord.LAST_ROW + ICoord.ADD_SIZE);\n \n setButton();\n }",
"private static void returnMenu() {\n\t\t\r\n\t}",
"static void afficherMenu() {\n\t\tSystem.out.println(\"\\n\\n\\n\\t\\tMENU PRINCIPAL\\n\");\n\t\tSystem.out.println(\"\\t1. Additionner deux nombres\\n\");\n\t\tSystem.out.println(\"\\t2. Soustraire deux nombres\\n\");\n\t\tSystem.out.println(\"\\t3. Multiplier deux nombres\\n\");\n\t\tSystem.out.println(\"\\t4. Deviser deux nombres\\n\");\n\t\tSystem.out.println(\"\\t0. Quitter\\n\");\n\t\tSystem.out.print(\"\\tFaites votre choix : \");\n\t}",
"public static void menuInicial() {\n System.out.println(\"Boas vindas à Arena pokemon Treinador!!!\");\n System.out.println(\"Digite 1 para fazer sua inscrição\");\n System.out.println(\"Digite 2 para sair\");\n\n }",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n \tmenu.findItem(R.id.menu_principla_4).setTitle(\"Notificacion\");\n \treturn true;\n }",
"private void createMenu(){\n\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n JMenu Opcje = new JMenu(\"Opcje\");\n mbar.add(Opcje);\n JMenuItem Ustawienia = new JMenuItem(\"Ustawienia\");\n /** Obsluga zdarzen wcisniecia przycisku ustawien w menu */\n Ustawienia.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if(Justawienia==null)\n Justawienia =new JUstawienia();\n Justawienia.setVisible(true);\n if (controller.timer!=null)\n controller.timer.stop();\n }\n });\n Opcje.add(Ustawienia);\n Opcje.addSeparator();\n JMenuItem Info = new JMenuItem(\"Info\");\n /** Obsluga zdarzen wcisniecia przycisku info w menu */\n Info.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n controller.WyswietlInfo();\n }\n });\n Opcje.add(Info);\n }",
"@Override\n public void menuSelected(MenuEvent e) {\n \n }",
"public static void proManagerUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the Project Manager's Information\");\n System.out.println(\"2 - Would you like to search for a Project Manager's information\");\n System.out.println(\"3 - Adding a new Project Manager's details\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }",
"private JMenu brugerMenuSetup() {\n JMenu brugerMenu = generalMenuSetup(\"Bruger\");\n JMenuItem logUdItem = new JMenuItem(\"Log ud\");\n brugerMenu.add(logUdItem);\n logUdItem.addActionListener(\n e -> System.exit(0)\n );\n JMenuItem minListeItem = new JMenuItem(\"Min liste\");\n brugerMenu.add(minListeItem);\n\n return brugerMenu;\n }",
"public static void afficherMenu() {\r\n System.out.println(\"\\n## Menu de l'application ##\\n\" +\r\n \" Actions Membres :\\n\"+\r\n \" [ 1] : Inscription d'un Membre\\n\" +\r\n \" [ 2] : Désinscription d'un Membre\\n\" +\r\n \" ( 3) : Afficher liste des Membres\\n\" +\r\n \" [ 4] : Payer Cotisation\\n\" +\r\n \" Actions vote Arbres d'un Membre :\\n\" +\r\n \" ( 5) : Voter pour un Arbre\\n\" +\r\n \" ( 6) : Afficher liste des votes\\n\" +\r\n \" ( 7) : Retirer un vote\\n\" +\r\n \" ( 8) : Supprimer les votes d'un Membre.\\n\" +\r\n \" ( 9) : Remplacer un vote\\n\" +\r\n \" Actions Arbres :\\n\" +\r\n \" (10) : Afficher la liste des Arbres\\n\" +\r\n // ...\r\n \" Actions Administration :\\n\" +\r\n \" (11) : Nommer nouveau Président\\n\" +\r\n // ...\r\n \"\\n ( 0) : Quitter l'application\\n\" +\r\n \" - Veuillez saisir une action. -\");\r\n }",
"public void menuListados() {\n\t\tSystem.out.println(\"MENU LISTADOS\");\n\t\tSystem.out.println(\"1. Personas con la misma actividad\");\n\t\tSystem.out.println(\"2. Cantidad de personas con la misma actividad\");\n\t\tSystem.out.println(\"0. Salir\");\n\t}",
"public void readTheMenu();",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main,menu);\n super.onCreateOptionsMenu(menu);\n\n menu.add(1, SALIR, 0, R.string.menu_salir);\n return true;\n }",
"public startingMenu() {\r\n initComponents();\r\n }",
"private JMenuItem getSauvegardejMenuItem() {\r\n\t\tif (SauvegardejMenuItem == null) {\r\n\t\t\tSauvegardejMenuItem = new JMenuItem();\r\n\t\t\tSauvegardejMenuItem.setText(\"Sauvegarde\");\r\n\t\t\tSauvegardejMenuItem.setIcon(new ImageIcon(getClass().getResource(\"/sauvegarde_petit.png\")));\r\n\t\t\tSauvegardejMenuItem.setFont(new Font(\"Dialog\", Font.PLAIN, 12));\r\n\t\t\tSauvegardejMenuItem.setActionCommand(\"Sauvegarde\");\r\n\t\t\tSauvegardejMenuItem.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\t//System.out.println(\"actionPerformed()\"); // TODO Auto-generated Event stub actionPerformed()\r\n\t\t\t\t\tif (e.getActionCommand().equals(\"Sauvegarde\")) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tHistorique.ecrire(\"Ouverture de : \"+e);\r\n\t\t\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tnew FEN_Sauvegarde();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn SauvegardejMenuItem;\r\n\t}",
"@Override\r\n\tpublic void onMenuItemSelected(MenuItem item) {\n\r\n\t}",
"public int menu() {\n System.out.println(\"MENU PRINCIPAL\\n\"\n + \"1 - CADASTRO DE PRODUTOS\\n\"\n + \"2 - MOVIMENTAÇÃO\\n\"\n + \"3 - REAJUSTE DE PREÇOS\\n\"\n + \"4 - RELATÓRIOS\\n\"\n + \"0 - FINALIZAR\\n\");\n return getEscolhaMenu(); \n }",
"@Override\n\t\tpublic void openMenu() {\n\t\t}",
"private void setUpMenu() {\n resideMenu = new ResideMenu(this);\n\n resideMenu.setBackground(R.drawable.menu_background);\n resideMenu.attachToActivity(this);\n resideMenu.setMenuListener(menuListener);\n resideMenu.setScaleValue(0.6f);\n\n // create menu items;\n itemHome = new ResideMenuItem(this, R.drawable.icon_profile, \"Home\");\n itemSerre = new ResideMenuItem(this, R.drawable.serre, \"GreenHouse\");\n itemControl = new ResideMenuItem(this, R.drawable.ctrl, \"Control\");\n itemTable = new ResideMenuItem(this, R.drawable.database, \"Parametre\");\n\n // itemProfile = new ResideMenuItem(this, R.drawable.user, \"Profile\");\n // itemSettings = new ResideMenuItem(this, R.drawable.stat_n, \"Statistique\");\n itemPicture = new ResideMenuItem(this, R.drawable.cam, \"Picture\");\n itemLog = new ResideMenuItem(this, R.drawable.log, \"Log file \");\n\n itemLogout = new ResideMenuItem(this, R.drawable.logout, \"Logout\");\n\n\n\n itemHome.setOnClickListener(this);\n itemSerre.setOnClickListener(this);\n itemControl.setOnClickListener(this);\n itemTable.setOnClickListener(this);\n\n// itemProfile.setOnClickListener(this);\n // itemSettings.setOnClickListener(this);\n itemLogout.setOnClickListener(this);\n itemPicture.setOnClickListener(this);\n itemLog.setOnClickListener(this);\n\n\n resideMenu.addMenuItem(itemHome, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemSerre, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemControl, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemTable, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemLog, ResideMenu.DIRECTION_LEFT);\n\n\n // resideMenu.addMenuItem(itemProfile, ResideMenu.DIRECTION_RIGHT);\n // resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_RIGHT);\n resideMenu.addMenuItem(itemPicture, ResideMenu.DIRECTION_RIGHT);\n\n resideMenu.addMenuItem(itemLogout, ResideMenu.DIRECTION_RIGHT);\n\n // You can disable a direction by setting ->\n // resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n findViewById(R.id.title_bar_left_menu).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n resideMenu.openMenu(ResideMenu.DIRECTION_LEFT);\n }\n });\n findViewById(R.id.title_bar_right_menu).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n resideMenu.openMenu(ResideMenu.DIRECTION_RIGHT);\n }\n });\n }",
"public void initializeMenuItems() {\n\t\tuserMenuButton = new MenuButton();\n\t\tmenu1 = new MenuItem(bundle.getString(\"mVmenu1\")); //\n\t\tmenu2 = new MenuItem(bundle.getString(\"mVmenu2\")); //\n\t}",
"private void updateMenuItems()\r\n\t {\r\n\t\t setListAdapter(new ArrayAdapter<String>(this,\r\n\t\t android.R.layout.simple_list_item_1, home_menu));\r\n\t\t \t \r\n\t }",
"@Override\r\npublic void menuSelected(MenuEvent arg0) {\n\t\r\n}",
"protected abstract void addMenuOptions();",
"@Override\n\tpublic void menuSelected(MenuEvent e) {\n\n\t}",
"@Override\r\n public void actionPerformed(ActionEvent e) {\n Menu_Produtos m2= new Menu_Produtos();\r\n \r\n }",
"public static void menu() {\n\t\tSystem.out.println(\"Menu:\");\n\t\tSystem.out.println(\"1: Create\");\n\t\tSystem.out.println(\"2: Merge\");\n\t\tSystem.out.println(\"3: Collection\");\n\t\tSystem.out.println(\"4: Upgrades\");\n\t\tSystem.out.println(\"5: Sell\");\n\t\tSystem.out.println(\"6: Identify Crystal\");\n\t\tSystem.out.println(\"\");\n\t}",
"public void InitializeMenu(){\n\t\tmnbBar = new JMenuBar();\n\t\tmnuFile = new JMenu(\"File\");\n\t\tmnuFormat = new JMenu(\"Format\");\n\t\tmniOpen = new JMenuItem(\"Open\");\n\t\tmniExit = new JMenuItem(\"Exit\");\n\t\tmniSave = new JMenuItem(\"Save\");\n\t\tmniSaveAs = new JMenuItem(\"Save as\");\n\t\tmniSaveAs.setMnemonic(KeyEvent.VK_A);\n\t\tmniSave.setMnemonic(KeyEvent.VK_S);\n\t\tmniChangeBgColor = new JMenuItem(\"Change Backgroud Color\");\n\t\tmniChangeFontColor = new JMenuItem(\"Change Font Color\");\n\t\t//them menu item vao menu file\n\t\tmnuFile.add(mniOpen);\n\t\tmnuFile.addSeparator();\n\t\tmnuFile.add(mniExit);\n\t\tmnuFile.add(mniSaveAs);\n\t\tmnuFile.add(mniSave);\n\t\t//them menu item vao menu format\n\t\tmnuFormat.add(mniChangeBgColor);\n\t\tmnuFormat.addSeparator();\n\t\tmnuFormat.add(mniChangeFontColor);\n\t\t//them menu file va menu format vao menu bar\n\t\tmnbBar.add(mnuFile);\n\t\tmnbBar.add(mnuFormat);\n\t\t//thiet lap menubar thanh menu chinh cua frame\n\t\tsetJMenuBar(mnbBar);\n\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void onLoadMenuShow(String result) {\n\n\t\t\t\t\t\t\t\t}",
"private void menuSetup()\n {\n menuChoices = new String []\n {\n \"Add a new product\",\n \"Remove a product\",\n \"Rename a product\",\n \"Print all products\",\n \"Deliver a product\",\n \"Sell a product\",\n \"Search for a product\",\n \"Find low-stock products\",\n \"Restock low-stock products\",\n \"Quit the program\" \n };\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_ski_detail, menu);\n return true;\n }",
"public void setUpEditMenu() {\n add(editMenu);\n\n //editMenu.add(cutItem);\n //editMenu.add(copyItem);\n //editMenu.add(pasteItem);\n //editMenu.addSeparator();\n clearAllItems.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n world.deleteAllEntities();\n }\n });\n editMenu.add(clearAllItems);\n editMenu.addSeparator();\n JMenuItem loadVectors = new JMenuItem(\"Load stimulus vectors...\");\n loadVectors.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n SFileChooser chooser = new SFileChooser(\".\", \"Load vectors\");\n File theFile = chooser.showOpenDialog();\n if (theFile != null) {\n double[][] vecs = Utils.getDoubleMatrix(theFile);\n world.loadStimulusVectors(vecs);\n }\n }\n });\n editMenu.add(loadVectors);\n\n }",
"public void componentesimplementacionIsmael() {\n\t\t// En el menu bar Ismael\n\t\tmenuIsmael = new JMenu(\"Ismael\");\n\t\tmenuBar.add(menuIsmael);\n\n\t\t// SUBMENU\n\t\tsubMenuRecientes = new JMenu(\"Recientes\");\n\t\titemSubMenuRecientes = new ArrayList<>();\n\t\trutasRecientes = new ArrayList<>();\n\t\ttry {\n\t\t\trutasRecientes = manejadorFichero.obtenerLineasDelFichero();\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\tif (!rutasRecientes.isEmpty()) {\n\t\t\tfor (int i = 0; i < rutasRecientes.size(); i++) {\n\t\t\t\tJMenuItem textoSubmenu = new JMenuItem(rutasRecientes.get(i));\n\t\t\t\titemSubMenuRecientes.add(textoSubmenu);\n\t\t\t\tsubMenuRecientes.add(textoSubmenu);\n\t\t\t}\n\t\t}\n\t\tmenuIsmael.add(subMenuRecientes);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\t// Fuente\n\t\titemFuente = new JMenuItem(\"Fuente\");\n\t\titemFuente.setEnabled(false);\n\t\titemFuente.setMnemonic(KeyEvent.VK_F);\n\t\titemFuente.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemFuente);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\titemSeleccionarTodo = new JMenuItem(\"Selec.Todo\");\n\t\titemSeleccionarTodo.setEnabled(false);\n\t\titemSeleccionarTodo.setMnemonic(KeyEvent.VK_N);\n\t\titemSeleccionarTodo.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemSeleccionarTodo);\n\n\t\titemSeleccionarTodoYCopiar = new JMenuItem(\"Selec All+Copy\");\n\t\titemSeleccionarTodoYCopiar.setEnabled(false);\n\t\titemSeleccionarTodoYCopiar.setMnemonic(KeyEvent.VK_M);\n\t\titemSeleccionarTodoYCopiar.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemSeleccionarTodoYCopiar);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\titemHora = new JMenuItem(\"Hora\");\n\t\titemHora.setEnabled(true);\n\t\titemHora.setMnemonic(KeyEvent.VK_H);\n\t\titemHora.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_H, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemHora);\n\n\t}",
"@Override\n public boolean onPrepareOptionsMenu (Menu menu) {\n \n return super.onPrepareOptionsMenu (menu);\n \n }",
"public void setMenu(){\n opciones='.';\n }",
"public String getParentMenu();",
"public void menu() {\n\t\tstate.menu();\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_spilen5, menu);\n return true;\n }",
"IMenu getMainMenu();",
"public Edit_Menu(MainPanel mp) {\r\n mainPanel = mp;\r\n setText(\"Засах\");\r\n// Uitem.setEnabled(false);//TODO : nemsen\r\n Ritem.setEnabled(false);//TODO : nemsen\r\n add(Uitem);\r\n add(Ritem);\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.menu_principal, menu);\n \t//Fin del menu\n \treturn true;\n }",
"@Override\n\t\t\tpublic void menuSelected(MenuItem selectedItem)\n\t\t\t{\n\n\t\t\t}",
"@Override\n\t\t\tpublic void menuSelected(MenuItem selectedItem)\n\t\t\t{\n\n\t\t\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_lihat_rekam_medis_inap, menu);\n return true;\n }",
"public static void readMenu(){\n\t\tSystem.out.println(\"Menu....\");\n\t\tSystem.out.println(\"=====================\");\n\t\tSystem.out.println(\"1. Book A Ticket\\t2. See Settings\\n3. Withdraw\\t4. Deposit\");\n\n\t}",
"@Override\n public boolean onMenuItemClick(MenuItem item) {\n return true;\n }",
"static void listerMenu() {\n System.out.println(\n \"-------------------------------------\\n\" +\n \"Saisir une option :\\n\" +\n \"1 : Liste des hôtes\\n\" +\n \"2 : Liste des logements\\n\" +\n \"3 : Liste des voyageurs\\n\" +\n \"4 : Liste des réservations\\n\" +\n \"5 : Fermer le programme\"\n );\n switch (Menu.choix(5)) {\n case 1:\n GestionHotes.listerHotes();\n break;\n case 2:\n GestionLogements.listerLogements();\n break;\n case 3:\n GestionVoyageurs.listerVoyageurs();\n break;\n case 4:\n GestionReservations.listerReservations();\n break;\n case 5:\n System.exit(0);\n break;\n }\n }",
"private void mainMenu() {\n System.out.println(\"Canteen Management System\");\n System.out.println(\"-----------------------\");\n System.out.println(\"1. Show Menu\");\n System.out.println(\"2.AcceptReject\");\n System.out.println(\"3.place orders\");\n System.out.println(\"4.show orders\");\n System.out.println(\"5. Exit\");\n mainMenuDetails();\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n if (navItemIndex == 0) {\n getMenuInflater().inflate(R.menu.main, menu);\n }\n\n // when fragment is spams, load the menu created for spams\n if (navItemIndex == 3) {\n getMenuInflater().inflate(R.menu.spams, menu);\n }\n return true;\n }",
"@Override\r\n\tpublic void createMenu(Menu menu) {\n\r\n\t}",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetSupportMenuInflater().inflate(R.menu.activity_display_selected_scripture,\n \t\t\t\tmenu);\n \t\treturn true;\n \t}",
"public static void imprimirMenu() {\r\n\tSystem.out.println(\"---------------------------menu---------------------------\");\r\n\tSystem.out.println(\"opciones: (ingrese como RF#)\");\r\n\tSystem.out.println(\"RF1: iniciar sesion \");\r\n System.out.println(\"RF2: registrarse al sistema\");\r\n\tSystem.out.println(\"RF3: Salir\");\r\n\t\r\n }",
"public static void f_menu(){\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n System.out.println(\"_/_/_/_/_/_/softvectorwhith/_/_/_/_/_/_/\");\n System.out.println(\"/_/_/_/version 1.0 2020-oct-29_/_/_/_/_/\");\n System.out.println(\"/_/maked by Andres Felipe Torres Lopez_/\");\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n }",
"public void visKontingenthaandteringMenu ()\r\n {\r\n System.out.println(\"Du har valgt kontingent.\");\r\n System.out.println(\"Hvad oensker du at foretage dig?\");\r\n System.out.println(\"1: Se priser\");\r\n System.out.println(\"2: Se medlemmer i restance\");\r\n System.out.println(\"0: Afslut\");\r\n\r\n }",
"public Menu getStartMenu() {\n Menu menu = new Menu(new Point(475, 0), 672-475, 320, 8, 1, new Cursor(new Point(0, 7)), \"exit\");\n Button PokedexButton = new Button(new Point(475, 0), 672-475, 40, \"Pokédex\", new Point(0, 7), \"Pokédex\");\n Button PokemonButton = new Button(new Point(475, 40), 672-475, 40, \"Pokémon\", new Point(0, 6), \"Pokémon\");\n Button BagButton = new Button(new Point(475, 80), 672-475, 40, \"Bag\", new Point(0, 5), \"Bag\");\n Button PokenavButton = new Button(new Point(475, 120), 672-475, 40, \"Pokénav\", new Point(0, 4), \"Pokénav\");\n Button PlayerButton = new Button(new Point(475, 160), 672-475, 40, trainer.getName(), new Point(0, 3), trainer.getName());\n Button SaveButton = new Button(new Point(475, 200), 672-475, 40, \"save\", new Point(0, 2), \"Save\");\n Button OptionButton = new Button(new Point(475, 240), 672-475, 40, \"add_menu_other\", new Point(0, 1), \"Options\");\n Button ExitButton = new Button(new Point(475, 280), 672-475, 40, \"exit\", new Point(0, 0), \"exit\");\n menu.addButton(PokedexButton);\n menu.addButton(PokemonButton);\n menu.addButton(BagButton);\n menu.addButton(PokenavButton);\n menu.addButton(PlayerButton);\n menu.addButton(SaveButton);\n menu.addButton(OptionButton);\n menu.addButton(ExitButton);\n menu.getButton(menu.getCursor().getPos()).Highlight();\n return menu;\n }",
"public void mousePressed(MouseEvent e) {\n JMenu menu = (JMenu)menuItem;\n if (!menu.isEnabled())\n return;\n MenuSelectionManager manager = \n MenuSelectionManager.defaultManager();\n if(menu.isTopLevelMenu()) {\n if(menu.isSelected()) {\n manager.clearSelectedPath();\n } else {\n Container cnt = menu.getParent();\n if(cnt != null && cnt instanceof JMenuBar) {\n MenuElement me[] = new MenuElement[2];\n me[0]=(MenuElement)cnt;\n me[1]=menu;\n manager.setSelectedPath(me); } } }\n MenuElement selectedPath[] = manager.getSelectedPath();\n if (selectedPath.length > 0 && \n selectedPath[selectedPath.length-1] != menu.getPopupMenu()) {\n if(menu.isTopLevelMenu() || \n menu.getDelay() == 0) {\n appendPath(selectedPath, menu.getPopupMenu());\n } else {\n setupPostTimer(menu); } } }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n if (navItemIndex == 0) {\n getMenuInflater().inflate(R.menu.main, menu);\n }\n// else if (navItemIndex == 1 ){\n// getMenuInflater().inflate(R.menu.search, menu);\n// }\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_principal, menu);//Menu Resource, Menu\n return true;\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.cartab, menu);\r\n //getMenuInflater().inflate(R.menu.menu_main, menu);\r\n return true;\r\n }",
"private void makePOSMenu() {\r\n\t\tJMenu POSMnu = new JMenu(\"Punto de Venta\");\r\n\t\tboolean isAccesible = false;\r\n\r\n\t\tif (StoreCore.getAccess(\"Cotizaciones\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Cotizaciones\", \r\n\t\t\t\t\timageLoader.getImage(\"quote.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 't',\r\n\t\t\t\t\t\"Ver el listado de cotizaciones\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F4, 0), Quote.class);\r\n\t\t\tPOSMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Compra\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Compras\", \r\n\t\t\t\t\timageLoader.getImage(\"purchase.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'c',\r\n\t\t\t\t\t\"Ver el listado de facturas\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F5, 0), Purchase.class);\r\n\r\n\t\t\tPOSMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Facturacion\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Facturacion\", \r\n\t\t\t\t\timageLoader.getImage(\"invoice.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'f',\r\n\t\t\t\t\t\"Ver el listado de facturas\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F6, 0), Invoice.class);\r\n\r\n\t\t\tPOSMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (isAccesible) {\r\n\t\t\tPOSMnu.setMnemonic('p');\r\n\t\t\tadd(POSMnu);\r\n\t\t}\r\n\t}",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n\treturn super.onPrepareOptionsMenu(menu);\n\n }",
"public void mouseEntered(MouseEvent e) {\n JMenu menu = (JMenu)menuItem;\n if (!menu.isEnabled())\n return;\n MenuSelectionManager manager = \n MenuSelectionManager.defaultManager();\n MenuElement selectedPath[] = manager.getSelectedPath(); \n if (!menu.isTopLevelMenu()) {\n if(!(selectedPath.length > 0 && \n selectedPath[selectedPath.length-1] == \n menu.getPopupMenu())) {\n if(menu.getDelay() == 0) {\n appendPath(getPath(), menu.getPopupMenu());\n } else {\n manager.setSelectedPath(getPath());\n setupPostTimer(menu); } }\n } else {\n if(selectedPath.length > 0 &&\n selectedPath[0] == menu.getParent()) {\n MenuElement newPath[] = new MenuElement[3];\n // A top level menu's parent is by definition \n // a JMenuBar\n newPath[0] = (MenuElement)menu.getParent();\n newPath[1] = menu;\n newPath[2] = menu.getPopupMenu();\n manager.setSelectedPath(newPath); } } }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu2, menu);\n this.menu=menu;\n if(idName!=null) {menu.getItem(1).setVisible(false);\n menu.getItem(2).setVisible(true);}\n if(create) menu.getItem(0).setVisible(false);\n else menu.getItem(0).setVisible(true);\n /* if(extrasBundle!=null) if(extrasBundle.getBoolean(\"From Option\")==true) {\n menu.getItem(1).setVisible(false);\n menu.getItem(0).setVisible(true);\n\n }*/\n return true;\n }",
"public void menuClicked(MenuItem menuItemSelected);",
"@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}",
"public static void f_menu() {\n System.out.println(\"----------------------------------------\");\n System.out.println(\"--------------DIGITALSOFT---------------\");\n System.out.println(\"-----version:1.0------28/04/2020.-------\");\n System.out.println(\"-----Angel Manuel Correa Rivera---------\");\n System.out.println(\"----------------------------------------\");\n }",
"static void mostrarMenu(){\n \t\t\n\t\tout.println();\n\t\tout.println(\"1. Crear lavadora.\");\n\t\tout.println(\"2. Mostrar lavadoras.\");\n\t\tout.println(\"3. Seleccionar lavadora.\");\n\t\tout.println(\"4. Cargar agua.\");\n\t\tout.println(\"5. Cargar ropa.\");\n\t\tout.println(\"6. Cargar detergente.\");\n\t\tout.println(\"7. Especificar tiempo.\");\n\t\tout.println(\"8. Drenar.\");\n\t\tout.println(\"9. Mostrar estado de la lavadora.\");\n\t\tout.println(\"10. Mostrar estado de la ropa.\");\n\t\tout.println(\"11. Pausar o Reanudar lavadora\");\n\t\tout.println(\"12. Probar sistema.\");\n\t\tout.println(\"13. Reiniciar sistema.\");\n\t\tout.println(\"22. Salir\");\n\t\tout.println((SELECTNOW != -1) ? \"!/*!/* Lv seleccionada: \" + SELECTNOW + \" !/*!/*\": \"\");\n\t\tout.println();\n\t}",
"private void updateMenu() {\n if(customMenu || !menuDirty) {\n return;\n }\n \n // otherwise, reset up the menu.\n menuDirty = false;\n menu.removeAll();\n Icon emptyIcon = null; \n for(Action action : actions) {\n if(action.getValue(Action.SMALL_ICON) != null) {\n emptyIcon = new EmptyIcon(16, 16);\n break;\n }\n }\n \n selectedComponent = null;\n selectedLabel = null;\n \n for (Action action : actions) {\n \n // We create the label ourselves (instead of using JMenuItem),\n // because JMenuItem adds lots of bulky insets.\n\n ActionLabel menuItem = new ActionLabel(action);\n JComponent panel = wrapItemForSelection(menuItem);\n \n if (action != selectedAction) {\n panel.setOpaque(false);\n menuItem.setForeground(UIManager.getColor(\"MenuItem.foreground\"));\n } else {\n selectedComponent = panel;\n selectedLabel = menuItem;\n selectedComponent.setOpaque(true);\n selectedLabel.setForeground(UIManager.getColor(\"MenuItem.selectionForeground\"));\n }\n \n if(menuItem.getIcon() == null) {\n menuItem.setIcon(emptyIcon);\n }\n attachListeners(menuItem);\n decorateMenuComponent(menuItem);\n menuItem.setBorder(BorderFactory.createEmptyBorder(0, 6, 2, 6));\n\n menu.add(panel);\n }\n \n if (getText() == null) {\n menu.add(Box.createHorizontalStrut(getWidth()-4));\n } \n \n for(MenuCreationListener listener : menuCreationListeners) {\n listener.menuCreated(this, menu);\n }\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu){\r\n getMenuInflater().inflate(R.menu.menu, menu); //Recibe como parametro el menu donde se situan las acciones\r\n return true; //Para que la barra sea visible\r\n }",
"public void menuActiviated() {\n\t\t\t((LinearLayout) PieMenu.getParent()).removeView(PieMenu);\n\t\t\tadd_shangpin.setVisibility(View.VISIBLE);\n\t\t\tif(text_details != null){\n\t\t\t\ttext_details.setText(\"\");\n\t\t\t}\n\t\t\t\n\t\t}",
"private void menuArmadura(){\n System.out.println(\"Escolha o local em que queira colocar a uma armadura:\");\n System.out.println(\"1 - Cabeça\");\n System.out.println(\"2 - Tronco\");\n System.out.println(\"3 - Pernas\");\n System.out.println(\"4 - Pés\");\n System.out.println(\"0 - Sair\");\n }",
"public void onMenuNew() {\n handleMenuOpen(null);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_skale, menu);\n return true;\n }",
"public static void architectUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the architects\");\n System.out.println(\"2 - Would you like to search for a architect's information\");\n System.out.println(\"3 - Adding a new architect's details\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }",
"private void mainMenu() {\r\n System.out.println(\"Canteen Management System\");\r\n System.out.println(\"-----------------------\");\r\n System.out.println(\"1. Show Menu\");\r\n System.out.println(\"2. Employee Login\");\r\n System.out.println(\"3. Vendor Login\");\r\n System.out.println(\"4. Exit\");\r\n mainMenuDetails();\r\n }",
"@Override\n\t\t\t\t\tpublic void onLoadMenuShow(String result) {\n\n\t\t\t\t\t}",
"public MenuTamu() {\n initComponents();\n \n }",
"private void initializeMenu(){\n\t\troot = new TreeField(new TreeFieldCallback() {\n\t\t\t\n\t\t\tpublic void drawTreeItem(TreeField treeField, Graphics graphics, int node,\n\t\t\t\t\tint y, int width, int indent) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tString text = treeField.getCookie(node).toString(); \n\t graphics.drawText(text, indent, y);\n\t\t\t}\n\t\t}, Field.FOCUSABLE){\n\t\t\tprotected boolean navigationClick(int status, int time) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif(!isAnimating()){\n\t\t\t\t\tMenuModel menu = (MenuModel) root.getCookie(root.getCurrentNode());\n\t\t\t\t\tif(menu.isChild()){\n\t\t\t\t\t\tonMenuSelected(menu);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\treturn super.navigationClick(status, time);\n\t\t\t}\n\t\t\t\n\t\t\tprotected boolean keyDown(int keycode, int time) {\n\t\t\t\tif(!isAnimating()){\n\t\t\t\t\tif(keycode == 655360){\n\t\t\t\t\t\tMenuModel menu = (MenuModel) root.getCookie(root.getCurrentNode());\n\t\t\t\t\t\tif(menu.isChild()){\n\t\t\t\t\t\t\tonMenuSelected(menu);\n\t\t\t\t\t\t\treturn true;\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\treturn super.keyDown(keycode, time);\n\t\t\t}\n\t\t};\n\t\troot.setDefaultExpanded(false);\n\n\t\t//home\n\t\tMenuModel home = new MenuModel(\"Home\", MenuModel.HOME, true);\n\t\thome.setId(root.addChildNode(0, home));\n\t\t\n\t\tint lastRootChildId = home.getId();\n\t\t\n\t\t//menu tree\n\t\tif(Singleton.getInstance().getMenuTree() != null){\n\t\t\tJSONArray menuTree = Singleton.getInstance().getMenuTree();\n\t\t\tif(menuTree.length() > 0){\n\t\t\t\tfor (int i = 0; i < menuTree.length(); i++) {\n\t\t\t\t\tif(!menuTree.isNull(i)){\n\t\t\t\t\t\tJSONObject node;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tnode = menuTree.getJSONObject(i);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//root menu tree (pria, wanita)\n\t\t\t\t\t\t\tboolean isChild = false;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString name = node.getString(\"name\");\n\t\t\t\t\t\t\tString url = node.getString(\"url\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tMenuModel treeNode = new MenuModel(\n\t\t\t\t\t\t\t\t\tname, url, MenuModel.JSON_TREE_NODE, isChild);\n\t\t\t\t\t\t\ttreeNode.setId(root.addSiblingNode(lastRootChildId, treeNode));\n\t\t\t\t\t\t\tlastRootChildId = treeNode.getId();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tif(!node.isNull(\"child\")){\n\t\t\t\t\t\t\t\t\tJSONArray childNodes = node.getJSONArray(\"child\");\n\t\t\t\t\t\t\t\t\tif(childNodes.length() > 0){\n\t\t\t\t\t\t\t\t\t\tfor (int j = childNodes.length() - 1; j >= 0; j--) {\n\t\t\t\t\t\t\t\t\t\t\tif(!childNodes.isNull(j)){\n\t\t\t\t\t\t\t\t\t\t\t\taddChildNode(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttreeNode.getId(), \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tchildNodes.getJSONObject(j));\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}\t\t\t\t\t\t\t\t\t\n\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\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (JSONException 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}\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\tif(Singleton.getInstance().getIsLogin()){\n\t\t\t//akun saya\n\t\t\tMenuModel myAccount = new MenuModel(\"Akun Saya\", MenuModel.MY_ACCOUNT, false);\n\t\t\tmyAccount.setId(root.addSiblingNode(lastRootChildId, myAccount));\n\t\t\t\n\t\t\tlastRootChildId = myAccount.getId();\n\t\t\t\n\t\t\t//akun saya->detail akun\n\t\t\tMenuModel profile = new MenuModel(\"Detail Akun\", MenuModel.PROFILE, true);\n\t\t\tprofile.setId(root.addChildNode(myAccount.getId(), profile));\n\t\t\t\n\t\t\t//akun saya->daftar pesanan\n\t\t\tMenuModel myOrderList = new MenuModel(\n\t\t\t\t\t\"Daftar Pesanan\", MenuModel.MY_ORDER, true);\n\t\t\tmyOrderList.setId(root.addSiblingNode(profile.getId(), myOrderList));\t\t\n\t\t\t\n\t\t\t//logout\n\t\t\tMenuModel logout = new MenuModel(\"Logout\", MenuModel.LOGOUT, true);\n\t\t\tlogout.setId(root.addSiblingNode(lastRootChildId, logout));\n\t\t\tlastRootChildId = logout.getId();\n\t\t} else{\n\t\t\t//login\n\t\t\tMenuModel login = new MenuModel(\"Login\", MenuModel.LOGIN, false);\n\t\t\tlogin.setId(root.addSiblingNode(lastRootChildId, login));\n\t\t\t\n\t\t\tlastRootChildId = login.getId();\n\t\t\t\n\t\t\t//login->login\n\t\t\tMenuModel loginMenu = new MenuModel(\"Login\", MenuModel.LOGIN_MENU, true);\n\t\t\tloginMenu.setId(root.addChildNode(login.getId(), loginMenu));\n\t\t\t\n\t\t\t//login->register\n\t\t\tMenuModel register = new MenuModel(\"Register\", MenuModel.REGISTER, true);\n\t\t\tregister.setId(root.addSiblingNode(loginMenu.getId(), register));\n\t\t}\n\t\t\n\t\tMenuUserModel menu = Singleton.getInstance().getMenu();\n\t\tif(menu != null){\n\t\t\t//sales\n\t\t\tif(menu.getMenuSalesOrder() || menu.isMenuSalesRetur()){\n\t\t\t\tMenuModel sales = new MenuModel(\"Sales\", MenuModel.SALES, false);\n\t\t\t\tsales.setId(root.addSiblingNode(lastRootChildId, sales));\n\t\t\t\tlastRootChildId = sales.getId();\n\t\t\t\t\n\t\t\t\t//sales retur\n\t\t\t\tif(menu.isMenuSalesRetur()){\n\t\t\t\t\tMenuModel salesRetur = new MenuModel(\n\t\t\t\t\t\t\t\"Sales Retur\", MenuModel.SALES_RETUR, true);\n\t\t\t\t\tsalesRetur.setId(root.addChildNode(sales.getId(), salesRetur));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//sales order\n\t\t\t\tif(menu.getMenuSalesOrder()){\n\t\t\t\t\tMenuModel salesOrder = new MenuModel(\n\t\t\t\t\t\t\t\"Sales Order\", MenuModel.SALES_ORDER, true);\n\t\t\t\t\tsalesOrder.setId(root.addChildNode(sales.getId(), salesOrder));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//cms product\n\t\t\tif(menu.getMenuCmsProduct() || menu.getMenuCmsProductGrosir()){\n\t\t\t\tMenuModel cmsProduct = new MenuModel(\n\t\t\t\t\t\t\"Produk\", MenuModel.CMS_PRODUCT, false);\n\t\t\t\tcmsProduct.setId(\n\t\t\t\t\t\troot.addSiblingNode(lastRootChildId, cmsProduct));\n\t\t\t\tlastRootChildId = cmsProduct.getId();\n\t\t\t\t\n\t\t\t\t//product retail\n\t\t\t\tif(menu.getMenuCmsProduct()){\n\t\t\t\t\tMenuModel productRetail = new MenuModel(\n\t\t\t\t\t\t\t\"Produk Retail\", MenuModel.CMS_PRODUCT_RETAIL, true);\n\t\t\t\t\tproductRetail.setId(\n\t\t\t\t\t\t\troot.addChildNode(cmsProduct.getId(), productRetail));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//product grosir\n\t\t\t\tif(menu.getMenuCmsProductGrosir()){\n\t\t\t\t\tMenuModel productGrosir = new MenuModel(\n\t\t\t\t\t\t\t\"Produk Grosir\", MenuModel.CMS_PRODUCT_GROSIR, true);\n\t\t\t\t\tproductGrosir.setId(\n\t\t\t\t\t\t\troot.addChildNode(cmsProduct.getId(), productGrosir));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\t//service\n\t\tMenuModel service = new MenuModel(\"Layanan\", MenuModel.SERVICE, false);\n\t\tservice.setId(root.addSiblingNode(lastRootChildId, service));\n\t\tlastRootChildId = service.getId();\n\t\tVector serviceList = Singleton.getInstance().getServices();\n\t\ttry {\n\t\t\tfor (int i = serviceList.size() -1; i >= 0; i--) {\n\t\t\t\tMenuFooterModel footer = (MenuFooterModel) serviceList.elementAt(i);\n\t\t\t\tMenuModel serviceMenu = new MenuModel(\n\t\t\t\t\t\tfooter.getCatTitle(), footer.getCatTautan(),\n\t\t\t\t\t\tMenuModel.SERVICE_MENU, true);\n\t\t\t\tserviceMenu.setId(root.addChildNode(service.getId(), serviceMenu));\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\n\t\t}\n\t\t\n\t\t//about\n\t\tMenuModel about = new MenuModel(\"Tentang Y2\", MenuModel.ABOUT, false);\n\t\tabout.setId(root.addSiblingNode(service.getId(), about));\n\t\tlastRootChildId = service.getId();\n\t\tVector aboutList = Singleton.getInstance().getAbouts();\n\t\ttry {\n\t\t\tfor (int i = aboutList.size() -1; i >= 0; i--) {\n\t\t\t\tMenuFooterModel footer = (MenuFooterModel) aboutList.elementAt(i);\n\t\t\t\tMenuModel aboutMenu = new MenuModel(\n\t\t\t\t\t\tfooter.getCatTitle(), footer.getCatTautan(), \n\t\t\t\t\t\tMenuModel.SERVICE_MENU, true);\n\t\t\t\taboutMenu.setId(root.addChildNode(service.getId(), aboutMenu));\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\t\n\t\tcontainer.add(root);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_paylasim, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n super.onCreateOptionsMenu(menu);\n\n // menu.add(0, MENU_START, 0, R.string.menu_start);\n // menu.add(0, MENU_RESUME, 0, R.string.menu_options);\n\n return true;\n }",
"public void prepareIdemen(ActionEvent event) {\n Submenu selected = this.getSelected();\n if (selected != null && idemenController.getSelected() == null) {\n idemenController.setSelected(selected.getIdemen());\n }\n }",
"private void setUpMenu() {\n resideMenu = new ResideMenu(this);\n resideMenu.setBackground(R.drawable.menu_background);\n resideMenu.attachToActivity(this);\n\n //resideMenu.setMenuListener(menuListener);\n //scaling activity slide ke menu\n resideMenu.setScaleValue(0.7f);\n\n itemHome = new ResideMenuItem(this, R.drawable.ic_home, \"Home\");\n itemProfile = new ResideMenuItem(this, R.drawable.ic_profile, \"Profile\");\n //itemCalendar = new ResideMenuItem(this, R.drawable.ic_calendar, \"Calendar\");\n itemSchedule = new ResideMenuItem(this, R.drawable.ic_schedule, \"Schedule\");\n //itemExams = new ResideMenuItem(this, R.drawable.ic_exams, \"Exams\");\n //itemSettings = new ResideMenuItem(this, R.drawable.ic_setting, \"Settings\");\n //itemChat = new ResideMenuItem(this, R.drawable.ic_chat, \"Chat\");\n //itemTask = new ResideMenuItem(this, R.drawable.ic_task, \"Task\");\n\n\n resideMenu.addMenuItem(itemHome, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemProfile, ResideMenu.DIRECTION_LEFT);\n // resideMenu.addMenuItem(itemCalendar, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemSchedule, ResideMenu.DIRECTION_LEFT);\n //resideMenu.addMenuItem(itemExams, ResideMenu.DIRECTION_LEFT);\n //resideMenu.addMenuItem(itemTask, ResideMenu.DIRECTION_LEFT);\n //resideMenu.addMenuItem(itemChat, ResideMenu.DIRECTION_LEFT);\n //resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_LEFT);\n\n // matikan slide ke kanan\n resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n itemHome.setOnClickListener(this);\n itemSchedule.setOnClickListener(this);\n itemProfile.setOnClickListener(this);\n //itemSettings.setOnClickListener(this);\n\n\n }",
"public static void imprimirMenuAdmin() {\r\n\tSystem.out.println(\"---------------------------menu---------------------------\");\r\n\tSystem.out.println(\"opciones: (ingrese la letra)\");\r\n\tSystem.out.println(\"A: despliega la opción taquilla\");\r\n System.out.println(\"B: despliega la opción informacion cliente\");\r\n\tSystem.out.println(\"C: Salir\");\r\n\tSystem.out.println(\"----------------------------------------------------------\");\r\n }",
"public menuAddStasiun() {\n initComponents();\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.magnus_presenca, menu);\n\t\treturn true;\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 setUpMenu() {\n\t\tresideMenu = new ResideMenu(this);\n\t\tresideMenu.setBackground(R.drawable.menu_background);\n\t\tresideMenu.attachToActivity(this);\n\t\tresideMenu.setMenuListener(menuListener);\n\t\t// valid scale factor is between 0.0f and 1.0f. leftmenu'width is\n\t\t// 150dip.\n\t\tresideMenu.setScaleValue(0.6f);\n\n\t\t// create menu items;\n\t\titemGame = new ResideMenuItem(this, R.drawable.icon_game,\n\t\t\t\tgetResources().getString(R.string.strGame));\n\t\titemBook = new ResideMenuItem(this, R.drawable.icon_book,\n\t\t\t\tgetResources().getString(R.string.strBook));\n\t\titemNews = new ResideMenuItem(this, R.drawable.icon_news,\n\t\t\t\tgetResources().getString(R.string.strNews));\n\t\t// itemSettings = new ResideMenuItem(this, R.drawable.icon_setting,\n\t\t// getResources().getString(R.string.strSetting));\n\t\titemLogin = new ResideMenuItem(this, R.drawable.icon_share,\n\t\t\t\tgetResources().getString(R.string.strShare));\n\t\titemBookPDF = new ResideMenuItem(this, R.drawable.icon_bookpdf,\n\t\t\t\tgetResources().getString(R.string.strBookPDF));\n\t\titemMore = new ResideMenuItem(this, R.drawable.icon_more,\n\t\t\t\tgetResources().getString(R.string.strMore));\n\n\t\titemGame.setOnClickListener(this);\n\t\titemBook.setOnClickListener(this);\n\t\titemNews.setOnClickListener(this);\n\t\t// itemSettings.setOnClickListener(this);\n\t\titemBookPDF.setOnClickListener(this);\n\t\titemMore.setOnClickListener(this);\n\t\titemLogin.setOnClickListener(this);\n\n\t\tresideMenu.addMenuItem(itemBookPDF, ResideMenu.DIRECTION_LEFT);\n\t\tresideMenu.addMenuItem(itemBook, ResideMenu.DIRECTION_LEFT);\n\t\tresideMenu.addMenuItem(itemNews, ResideMenu.DIRECTION_LEFT);\n\t\t// resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_RIGHT);\n\n\t\tresideMenu.addMenuItem(itemGame, ResideMenu.DIRECTION_RIGHT);\n\t\tresideMenu.addMenuItem(itemLogin, ResideMenu.DIRECTION_RIGHT);\n\t\tresideMenu.addMenuItem(itemMore, ResideMenu.DIRECTION_RIGHT);\n\n\t\t// You can disable a direction by setting ->\n\t\t// resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n\t\tfindViewById(R.id.title_bar_left_menu).setOnClickListener(\n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\t\tresideMenu.openMenu(ResideMenu.DIRECTION_LEFT);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tfindViewById(R.id.title_bar_right_menu).setOnClickListener(\n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\t\tresideMenu.openMenu(ResideMenu.DIRECTION_RIGHT);\n\t\t\t\t\t}\n\t\t\t\t});\n\t}",
"public ItemMenu(JDealsController sysCtrl) {\n super(\"Item Menu\", sysCtrl);\n\n this.addItem(\"Add general good\", new Callable() {\n @Override\n public Object call() throws Exception {\n return addItem(ProductTypes.GOODS);\n }\n });\n this.addItem(\"Restourant Event\", new Callable() {\n @Override\n public Object call() throws Exception {\n return addItem(ProductTypes.RESTOURANT);\n }\n });\n this.addItem(\"Travel Event\", new Callable() {\n @Override\n public Object call() throws Exception {\n return addItem(ProductTypes.TRAVEL);\n }\n });\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.inicio, menu);\r\n return true;\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main_3, menu);\n return true;\n }",
"void onMenuItemClicked();",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actividad_principal, menu);\n return true;\n }",
"static void montaMenu() {\n System.out.println(\"\");\r\n System.out.println(\"1 - Novo cliente\");\r\n System.out.println(\"2 - Lista clientes\");\r\n System.out.println(\"3 - Apagar cliente\");\r\n System.out.println(\"0 - Finalizar\");\r\n System.out.println(\"Digite a opcao desejada: \");\r\n System.out.println(\"\");\r\n }",
"public void initMenu() {\n\t\t\r\n\t\treturnToGame = new JButton(\"Return to Game\");\r\n\t\treturnToGame.setBounds(900, 900, 0, 0);\r\n\t\treturnToGame.setBackground(Color.BLACK);\r\n\t\treturnToGame.setForeground(Color.WHITE);\r\n\t\treturnToGame.setVisible(false);\r\n\t\treturnToGame.addActionListener(this);\r\n\t\t\r\n\t\treturnToStart = new JButton(\"Main Menu\");\r\n\t\treturnToStart.setBounds(900, 900, 0, 0);\r\n\t\treturnToStart.setBackground(Color.BLACK);\r\n\t\treturnToStart.setForeground(Color.WHITE);\r\n\t\treturnToStart.setVisible(false);\r\n\t\treturnToStart.addActionListener(this);\r\n\t\t\r\n\t\t//add(menubackground);\r\n\t\tadd(returnToGame);\r\n\t\tadd(returnToStart);\r\n\t}",
"private void voltarMenu() {\n\t\tmenu = new TelaMenu();\r\n\t\tmenu.setVisible(true);\r\n\t\tthis.dispose();\r\n\t}",
"private static void showMenu() {\n System.out.println(\"1. Dodaj zadanie\");\n System.out.println(\"2. Wykonaj zadanie.\");\n System.out.println(\"3. Zamknij program\");\n }",
"@Override\n public boolean onPrepareActionMode(ActionMode mode, Menu menu) {\n// if (mSelectedItem==1) {\n// MenuInflater inflater = mode.getMenuInflater();\n// inflater.inflate(R.menu.geo, menu);\n// }\n return true; // Return false if nothing is done\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.principal, menu);\n\n\n return true;\n }"
]
| [
"0.70244735",
"0.7012807",
"0.6879152",
"0.680205",
"0.6787193",
"0.673988",
"0.66919076",
"0.6636564",
"0.6615155",
"0.66005826",
"0.6571401",
"0.65443116",
"0.65323126",
"0.64908224",
"0.6446709",
"0.6429159",
"0.6423597",
"0.63971174",
"0.6389306",
"0.63803077",
"0.6375399",
"0.6374751",
"0.6374087",
"0.6367985",
"0.6357325",
"0.6355655",
"0.63451856",
"0.63361955",
"0.6335668",
"0.63308406",
"0.6329908",
"0.6324887",
"0.63236386",
"0.63227284",
"0.63186693",
"0.631813",
"0.6306517",
"0.63064784",
"0.6305711",
"0.6299934",
"0.6277693",
"0.6272201",
"0.62625843",
"0.62561965",
"0.62538415",
"0.62538415",
"0.62494135",
"0.62476414",
"0.62462616",
"0.6244437",
"0.62435687",
"0.6242921",
"0.6238021",
"0.62375367",
"0.6236591",
"0.62323654",
"0.6232245",
"0.6231024",
"0.6228828",
"0.6221896",
"0.6221446",
"0.6218728",
"0.62171274",
"0.621337",
"0.62105864",
"0.62098825",
"0.6201925",
"0.6195184",
"0.61882114",
"0.61827385",
"0.6177858",
"0.61755586",
"0.6167137",
"0.6166635",
"0.61665773",
"0.6162635",
"0.6160416",
"0.6158205",
"0.6156753",
"0.6156612",
"0.6153076",
"0.615176",
"0.61497647",
"0.6148999",
"0.61462474",
"0.6145632",
"0.61418843",
"0.61414844",
"0.6130298",
"0.6125681",
"0.612356",
"0.6121687",
"0.6118994",
"0.611867",
"0.6110562",
"0.6109411",
"0.6108034",
"0.6104677",
"0.6104226",
"0.6103574",
"0.61022025"
]
| 0.0 | -1 |
Metoda vrati vysku menu pre item menu | @Override
public int getHeight() {
return height;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setMenu() {\n\n if (tree.isEmpty() || !treeGrid.anySelected()) {\n mainMenu.setItems(newMenuItem, new MenuItemSeparator(), settingMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecord() == null) {\n mainMenu.setItems(renameMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecords().length > 1) {\n ListGridRecord[] selectedNode = treeGrid.getSelectedRecords();\n if (isSameExtension(selectedNode, Extension.FP)) {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem, exportMenuItem);\n } else if (isSameExtension(selectedNode, Extension.FPS)) {\n mainMenu.setItems(newFPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.BPS)) {\n mainMenu.setItems(newBPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.SCSS)) {\n mainMenu.setItems(newSCSItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n }\n } else if (tree.isFolder(treeGrid.getSelectedRecord())) {\n mainMenu.setItems(newMenuItem, deleteMenu, renameMenuItem, copyMenuItem, pasteMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem, downloadMenuItem,\n copyPathMenuItem);\n } else {\n FileTreeNode selectedNode = (FileTreeNode) treeGrid.getSelectedRecord();\n VMResource resource = selectedNode.getResource();\n if (resource instanceof VMDirectory) {\n return;\n }\n Extension extension = ((VMFile) resource).getExtension();\n if (extension == null) {\n mainMenu.setItems(openWithMenuItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n } else\n switch (extension) {\n case ARC:\n mainMenu.setItems(newBPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FM:\n mainMenu.setItems(newFMCItem, newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FMC:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case TC:\n mainMenu.setItems(newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n case FPS:\n mainMenu.setItems(newFPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, exportMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BPS:\n mainMenu.setItems(newBPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCSS:\n mainMenu.setItems(newSCSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCS:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n default:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n }\n }\n }",
"public void initMenu(){\n\t}",
"@Override\n\tpublic void setUpMenu() {\n\t\t\n\t}",
"private void initializeMenu() {\n menu = new Menu(parent.getShell());\n MenuItem item1 = new MenuItem(menu, SWT.NONE);\n item1.setText(Resources.getMessage(\"LatticeView.9\")); //$NON-NLS-1$\n item1.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n model.getClipboard().addToClipboard(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.CLIPBOARD, selectedNode));\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n \n MenuItem item2 = new MenuItem(menu, SWT.NONE);\n item2.setText(Resources.getMessage(\"LatticeView.10\")); //$NON-NLS-1$\n item2.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n controller.actionApplySelectedTransformation();\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n }",
"private static void returnMenu() {\n\t\t\r\n\t}",
"static void afficherMenu() {\n\t\tSystem.out.println(\"\\n\\n\\n\\t\\tMENU PRINCIPAL\\n\");\n\t\tSystem.out.println(\"\\t1. Additionner deux nombres\\n\");\n\t\tSystem.out.println(\"\\t2. Soustraire deux nombres\\n\");\n\t\tSystem.out.println(\"\\t3. Multiplier deux nombres\\n\");\n\t\tSystem.out.println(\"\\t4. Deviser deux nombres\\n\");\n\t\tSystem.out.println(\"\\t0. Quitter\\n\");\n\t\tSystem.out.print(\"\\tFaites votre choix : \");\n\t}",
"private void createMenu(){\n\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n JMenu Opcje = new JMenu(\"Opcje\");\n mbar.add(Opcje);\n JMenuItem Ustawienia = new JMenuItem(\"Ustawienia\");\n /** Obsluga zdarzen wcisniecia przycisku ustawien w menu */\n Ustawienia.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if(Justawienia==null)\n Justawienia =new JUstawienia();\n Justawienia.setVisible(true);\n if (controller.timer!=null)\n controller.timer.stop();\n }\n });\n Opcje.add(Ustawienia);\n Opcje.addSeparator();\n JMenuItem Info = new JMenuItem(\"Info\");\n /** Obsluga zdarzen wcisniecia przycisku info w menu */\n Info.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n controller.WyswietlInfo();\n }\n });\n Opcje.add(Info);\n }",
"@Override\n public void menuSelected(MenuEvent e) {\n \n }",
"private JMenu brugerMenuSetup() {\n JMenu brugerMenu = generalMenuSetup(\"Bruger\");\n JMenuItem logUdItem = new JMenuItem(\"Log ud\");\n brugerMenu.add(logUdItem);\n logUdItem.addActionListener(\n e -> System.exit(0)\n );\n JMenuItem minListeItem = new JMenuItem(\"Min liste\");\n brugerMenu.add(minListeItem);\n\n return brugerMenu;\n }",
"@Override\n public boolean onPrepareOptionsMenu (Menu menu) {\n \n return super.onPrepareOptionsMenu (menu);\n \n }",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n \tmenu.findItem(R.id.menu_principla_4).setTitle(\"Notificacion\");\n \treturn true;\n }",
"public void startMenu() {\n setTitle(\"Nier Protomata\");\n setSize(ICoord.LAST_COL + ICoord.ADD_SIZE,\n ICoord.LAST_ROW + ICoord.ADD_SIZE);\n \n setButton();\n }",
"private void updateMenuItems()\r\n\t {\r\n\t\t setListAdapter(new ArrayAdapter<String>(this,\r\n\t\t android.R.layout.simple_list_item_1, home_menu));\r\n\t\t \t \r\n\t }",
"protected abstract void addMenuOptions();",
"public int menu() {\n System.out.println(\"MENU PRINCIPAL\\n\"\n + \"1 - CADASTRO DE PRODUTOS\\n\"\n + \"2 - MOVIMENTAÇÃO\\n\"\n + \"3 - REAJUSTE DE PREÇOS\\n\"\n + \"4 - RELATÓRIOS\\n\"\n + \"0 - FINALIZAR\\n\");\n return getEscolhaMenu(); \n }",
"public void initializeMenuItems() {\n\t\tuserMenuButton = new MenuButton();\n\t\tmenu1 = new MenuItem(bundle.getString(\"mVmenu1\")); //\n\t\tmenu2 = new MenuItem(bundle.getString(\"mVmenu2\")); //\n\t}",
"public static void afficherMenu() {\r\n System.out.println(\"\\n## Menu de l'application ##\\n\" +\r\n \" Actions Membres :\\n\"+\r\n \" [ 1] : Inscription d'un Membre\\n\" +\r\n \" [ 2] : Désinscription d'un Membre\\n\" +\r\n \" ( 3) : Afficher liste des Membres\\n\" +\r\n \" [ 4] : Payer Cotisation\\n\" +\r\n \" Actions vote Arbres d'un Membre :\\n\" +\r\n \" ( 5) : Voter pour un Arbre\\n\" +\r\n \" ( 6) : Afficher liste des votes\\n\" +\r\n \" ( 7) : Retirer un vote\\n\" +\r\n \" ( 8) : Supprimer les votes d'un Membre.\\n\" +\r\n \" ( 9) : Remplacer un vote\\n\" +\r\n \" Actions Arbres :\\n\" +\r\n \" (10) : Afficher la liste des Arbres\\n\" +\r\n // ...\r\n \" Actions Administration :\\n\" +\r\n \" (11) : Nommer nouveau Président\\n\" +\r\n // ...\r\n \"\\n ( 0) : Quitter l'application\\n\" +\r\n \" - Veuillez saisir une action. -\");\r\n }",
"public static void proManagerUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the Project Manager's Information\");\n System.out.println(\"2 - Would you like to search for a Project Manager's information\");\n System.out.println(\"3 - Adding a new Project Manager's details\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }",
"private void setUpMenu() {\n resideMenu = new ResideMenu(this);\n\n resideMenu.setBackground(R.drawable.menu_background);\n resideMenu.attachToActivity(this);\n resideMenu.setMenuListener(menuListener);\n resideMenu.setScaleValue(0.6f);\n\n // create menu items;\n itemHome = new ResideMenuItem(this, R.drawable.icon_profile, \"Home\");\n itemSerre = new ResideMenuItem(this, R.drawable.serre, \"GreenHouse\");\n itemControl = new ResideMenuItem(this, R.drawable.ctrl, \"Control\");\n itemTable = new ResideMenuItem(this, R.drawable.database, \"Parametre\");\n\n // itemProfile = new ResideMenuItem(this, R.drawable.user, \"Profile\");\n // itemSettings = new ResideMenuItem(this, R.drawable.stat_n, \"Statistique\");\n itemPicture = new ResideMenuItem(this, R.drawable.cam, \"Picture\");\n itemLog = new ResideMenuItem(this, R.drawable.log, \"Log file \");\n\n itemLogout = new ResideMenuItem(this, R.drawable.logout, \"Logout\");\n\n\n\n itemHome.setOnClickListener(this);\n itemSerre.setOnClickListener(this);\n itemControl.setOnClickListener(this);\n itemTable.setOnClickListener(this);\n\n// itemProfile.setOnClickListener(this);\n // itemSettings.setOnClickListener(this);\n itemLogout.setOnClickListener(this);\n itemPicture.setOnClickListener(this);\n itemLog.setOnClickListener(this);\n\n\n resideMenu.addMenuItem(itemHome, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemSerre, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemControl, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemTable, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemLog, ResideMenu.DIRECTION_LEFT);\n\n\n // resideMenu.addMenuItem(itemProfile, ResideMenu.DIRECTION_RIGHT);\n // resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_RIGHT);\n resideMenu.addMenuItem(itemPicture, ResideMenu.DIRECTION_RIGHT);\n\n resideMenu.addMenuItem(itemLogout, ResideMenu.DIRECTION_RIGHT);\n\n // You can disable a direction by setting ->\n // resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n findViewById(R.id.title_bar_left_menu).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n resideMenu.openMenu(ResideMenu.DIRECTION_LEFT);\n }\n });\n findViewById(R.id.title_bar_right_menu).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n resideMenu.openMenu(ResideMenu.DIRECTION_RIGHT);\n }\n });\n }",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n\treturn super.onPrepareOptionsMenu(menu);\n\n }",
"public void menuListados() {\n\t\tSystem.out.println(\"MENU LISTADOS\");\n\t\tSystem.out.println(\"1. Personas con la misma actividad\");\n\t\tSystem.out.println(\"2. Cantidad de personas con la misma actividad\");\n\t\tSystem.out.println(\"0. Salir\");\n\t}",
"@Override\r\n\tpublic void onMenuItemSelected(MenuItem item) {\n\r\n\t}",
"private JMenuItem getSauvegardejMenuItem() {\r\n\t\tif (SauvegardejMenuItem == null) {\r\n\t\t\tSauvegardejMenuItem = new JMenuItem();\r\n\t\t\tSauvegardejMenuItem.setText(\"Sauvegarde\");\r\n\t\t\tSauvegardejMenuItem.setIcon(new ImageIcon(getClass().getResource(\"/sauvegarde_petit.png\")));\r\n\t\t\tSauvegardejMenuItem.setFont(new Font(\"Dialog\", Font.PLAIN, 12));\r\n\t\t\tSauvegardejMenuItem.setActionCommand(\"Sauvegarde\");\r\n\t\t\tSauvegardejMenuItem.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\t//System.out.println(\"actionPerformed()\"); // TODO Auto-generated Event stub actionPerformed()\r\n\t\t\t\t\tif (e.getActionCommand().equals(\"Sauvegarde\")) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tHistorique.ecrire(\"Ouverture de : \"+e);\r\n\t\t\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tnew FEN_Sauvegarde();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn SauvegardejMenuItem;\r\n\t}",
"@Override\n public boolean onMenuItemClick(MenuItem item) {\n return true;\n }",
"public void setMenu(){\n opciones='.';\n }",
"public String getParentMenu();",
"@Override\r\npublic void menuSelected(MenuEvent arg0) {\n\t\r\n}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu2, menu);\n this.menu=menu;\n if(idName!=null) {menu.getItem(1).setVisible(false);\n menu.getItem(2).setVisible(true);}\n if(create) menu.getItem(0).setVisible(false);\n else menu.getItem(0).setVisible(true);\n /* if(extrasBundle!=null) if(extrasBundle.getBoolean(\"From Option\")==true) {\n menu.getItem(1).setVisible(false);\n menu.getItem(0).setVisible(true);\n\n }*/\n return true;\n }",
"public void readTheMenu();",
"public void setUpEditMenu() {\n add(editMenu);\n\n //editMenu.add(cutItem);\n //editMenu.add(copyItem);\n //editMenu.add(pasteItem);\n //editMenu.addSeparator();\n clearAllItems.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n world.deleteAllEntities();\n }\n });\n editMenu.add(clearAllItems);\n editMenu.addSeparator();\n JMenuItem loadVectors = new JMenuItem(\"Load stimulus vectors...\");\n loadVectors.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n SFileChooser chooser = new SFileChooser(\".\", \"Load vectors\");\n File theFile = chooser.showOpenDialog();\n if (theFile != null) {\n double[][] vecs = Utils.getDoubleMatrix(theFile);\n world.loadStimulusVectors(vecs);\n }\n }\n });\n editMenu.add(loadVectors);\n\n }",
"@Override\r\n\tpublic void createMenu(Menu menu) {\n\r\n\t}",
"public static void menuInicial() {\n System.out.println(\"Boas vindas à Arena pokemon Treinador!!!\");\n System.out.println(\"Digite 1 para fazer sua inscrição\");\n System.out.println(\"Digite 2 para sair\");\n\n }",
"private void updateMenu() {\n if(customMenu || !menuDirty) {\n return;\n }\n \n // otherwise, reset up the menu.\n menuDirty = false;\n menu.removeAll();\n Icon emptyIcon = null; \n for(Action action : actions) {\n if(action.getValue(Action.SMALL_ICON) != null) {\n emptyIcon = new EmptyIcon(16, 16);\n break;\n }\n }\n \n selectedComponent = null;\n selectedLabel = null;\n \n for (Action action : actions) {\n \n // We create the label ourselves (instead of using JMenuItem),\n // because JMenuItem adds lots of bulky insets.\n\n ActionLabel menuItem = new ActionLabel(action);\n JComponent panel = wrapItemForSelection(menuItem);\n \n if (action != selectedAction) {\n panel.setOpaque(false);\n menuItem.setForeground(UIManager.getColor(\"MenuItem.foreground\"));\n } else {\n selectedComponent = panel;\n selectedLabel = menuItem;\n selectedComponent.setOpaque(true);\n selectedLabel.setForeground(UIManager.getColor(\"MenuItem.selectionForeground\"));\n }\n \n if(menuItem.getIcon() == null) {\n menuItem.setIcon(emptyIcon);\n }\n attachListeners(menuItem);\n decorateMenuComponent(menuItem);\n menuItem.setBorder(BorderFactory.createEmptyBorder(0, 6, 2, 6));\n\n menu.add(panel);\n }\n \n if (getText() == null) {\n menu.add(Box.createHorizontalStrut(getWidth()-4));\n } \n \n for(MenuCreationListener listener : menuCreationListeners) {\n listener.menuCreated(this, menu);\n }\n }",
"private void menuSetup()\n {\n menuChoices = new String []\n {\n \"Add a new product\",\n \"Remove a product\",\n \"Rename a product\",\n \"Print all products\",\n \"Deliver a product\",\n \"Sell a product\",\n \"Search for a product\",\n \"Find low-stock products\",\n \"Restock low-stock products\",\n \"Quit the program\" \n };\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n if (navItemIndex == 0) {\n getMenuInflater().inflate(R.menu.main, menu);\n }\n// else if (navItemIndex == 1 ){\n// getMenuInflater().inflate(R.menu.search, menu);\n// }\n return true;\n }",
"@Override\n\tpublic void menuSelected(MenuEvent e) {\n\n\t}",
"public void InitializeMenu(){\n\t\tmnbBar = new JMenuBar();\n\t\tmnuFile = new JMenu(\"File\");\n\t\tmnuFormat = new JMenu(\"Format\");\n\t\tmniOpen = new JMenuItem(\"Open\");\n\t\tmniExit = new JMenuItem(\"Exit\");\n\t\tmniSave = new JMenuItem(\"Save\");\n\t\tmniSaveAs = new JMenuItem(\"Save as\");\n\t\tmniSaveAs.setMnemonic(KeyEvent.VK_A);\n\t\tmniSave.setMnemonic(KeyEvent.VK_S);\n\t\tmniChangeBgColor = new JMenuItem(\"Change Backgroud Color\");\n\t\tmniChangeFontColor = new JMenuItem(\"Change Font Color\");\n\t\t//them menu item vao menu file\n\t\tmnuFile.add(mniOpen);\n\t\tmnuFile.addSeparator();\n\t\tmnuFile.add(mniExit);\n\t\tmnuFile.add(mniSaveAs);\n\t\tmnuFile.add(mniSave);\n\t\t//them menu item vao menu format\n\t\tmnuFormat.add(mniChangeBgColor);\n\t\tmnuFormat.addSeparator();\n\t\tmnuFormat.add(mniChangeFontColor);\n\t\t//them menu file va menu format vao menu bar\n\t\tmnbBar.add(mnuFile);\n\t\tmnbBar.add(mnuFormat);\n\t\t//thiet lap menubar thanh menu chinh cua frame\n\t\tsetJMenuBar(mnbBar);\n\t}",
"@Override\n\t\tpublic void openMenu() {\n\t\t}",
"public void componentesimplementacionIsmael() {\n\t\t// En el menu bar Ismael\n\t\tmenuIsmael = new JMenu(\"Ismael\");\n\t\tmenuBar.add(menuIsmael);\n\n\t\t// SUBMENU\n\t\tsubMenuRecientes = new JMenu(\"Recientes\");\n\t\titemSubMenuRecientes = new ArrayList<>();\n\t\trutasRecientes = new ArrayList<>();\n\t\ttry {\n\t\t\trutasRecientes = manejadorFichero.obtenerLineasDelFichero();\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\tif (!rutasRecientes.isEmpty()) {\n\t\t\tfor (int i = 0; i < rutasRecientes.size(); i++) {\n\t\t\t\tJMenuItem textoSubmenu = new JMenuItem(rutasRecientes.get(i));\n\t\t\t\titemSubMenuRecientes.add(textoSubmenu);\n\t\t\t\tsubMenuRecientes.add(textoSubmenu);\n\t\t\t}\n\t\t}\n\t\tmenuIsmael.add(subMenuRecientes);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\t// Fuente\n\t\titemFuente = new JMenuItem(\"Fuente\");\n\t\titemFuente.setEnabled(false);\n\t\titemFuente.setMnemonic(KeyEvent.VK_F);\n\t\titemFuente.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemFuente);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\titemSeleccionarTodo = new JMenuItem(\"Selec.Todo\");\n\t\titemSeleccionarTodo.setEnabled(false);\n\t\titemSeleccionarTodo.setMnemonic(KeyEvent.VK_N);\n\t\titemSeleccionarTodo.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemSeleccionarTodo);\n\n\t\titemSeleccionarTodoYCopiar = new JMenuItem(\"Selec All+Copy\");\n\t\titemSeleccionarTodoYCopiar.setEnabled(false);\n\t\titemSeleccionarTodoYCopiar.setMnemonic(KeyEvent.VK_M);\n\t\titemSeleccionarTodoYCopiar.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemSeleccionarTodoYCopiar);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\titemHora = new JMenuItem(\"Hora\");\n\t\titemHora.setEnabled(true);\n\t\titemHora.setMnemonic(KeyEvent.VK_H);\n\t\titemHora.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_H, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemHora);\n\n\t}",
"private void updateMenuItems(){\n String awayState = mStructure.getAway();\n MenuItem menuAway = menu.findItem(R.id.menu_away);\n if (KEY_AUTO_AWAY.equals(awayState) || KEY_AWAY.equals(awayState)) {\n menuAway.setTitle(R.string.away_state_home);\n } else if (KEY_HOME.equals(awayState)) {\n menuAway.setTitle(R.string.away_state_away);\n }\n }",
"@Override\n\t\t\tpublic void menuSelected(MenuItem selectedItem)\n\t\t\t{\n\n\t\t\t}",
"@Override\n\t\t\tpublic void menuSelected(MenuItem selectedItem)\n\t\t\t{\n\n\t\t\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n if (navItemIndex == 0) {\n getMenuInflater().inflate(R.menu.main, menu);\n }\n\n // when fragment is spams, load the menu created for spams\n if (navItemIndex == 3) {\n getMenuInflater().inflate(R.menu.spams, menu);\n }\n return true;\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.cartab, menu);\r\n //getMenuInflater().inflate(R.menu.menu_main, menu);\r\n return true;\r\n }",
"public Edit_Menu(MainPanel mp) {\r\n mainPanel = mp;\r\n setText(\"Засах\");\r\n// Uitem.setEnabled(false);//TODO : nemsen\r\n Ritem.setEnabled(false);//TODO : nemsen\r\n add(Uitem);\r\n add(Ritem);\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main,menu);\n super.onCreateOptionsMenu(menu);\n\n menu.add(1, SALIR, 0, R.string.menu_salir);\n return true;\n }",
"private void makePOSMenu() {\r\n\t\tJMenu POSMnu = new JMenu(\"Punto de Venta\");\r\n\t\tboolean isAccesible = false;\r\n\r\n\t\tif (StoreCore.getAccess(\"Cotizaciones\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Cotizaciones\", \r\n\t\t\t\t\timageLoader.getImage(\"quote.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 't',\r\n\t\t\t\t\t\"Ver el listado de cotizaciones\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F4, 0), Quote.class);\r\n\t\t\tPOSMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Compra\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Compras\", \r\n\t\t\t\t\timageLoader.getImage(\"purchase.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'c',\r\n\t\t\t\t\t\"Ver el listado de facturas\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F5, 0), Purchase.class);\r\n\r\n\t\t\tPOSMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Facturacion\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Facturacion\", \r\n\t\t\t\t\timageLoader.getImage(\"invoice.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'f',\r\n\t\t\t\t\t\"Ver el listado de facturas\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F6, 0), Invoice.class);\r\n\r\n\t\t\tPOSMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (isAccesible) {\r\n\t\t\tPOSMnu.setMnemonic('p');\r\n\t\t\tadd(POSMnu);\r\n\t\t}\r\n\t}",
"@Override\n\t\t\t\t\t\t\t\tpublic void onLoadMenuShow(String result) {\n\n\t\t\t\t\t\t\t\t}",
"public int getMenuId() {\n return 0;\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu){\r\n getMenuInflater().inflate(R.menu.menu, menu); //Recibe como parametro el menu donde se situan las acciones\r\n return true; //Para que la barra sea visible\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_lihat_rekam_medis_inap, menu);\n return true;\n }",
"public void onMenuNew() {\n handleMenuOpen(null);\n }",
"@Override\n\tpublic boolean onPrepareOptionsMenu(Menu menu) {\n\t\treturn super.onPrepareOptionsMenu(menu);\n\t}",
"private void initializeMenu(){\n\t\troot = new TreeField(new TreeFieldCallback() {\n\t\t\t\n\t\t\tpublic void drawTreeItem(TreeField treeField, Graphics graphics, int node,\n\t\t\t\t\tint y, int width, int indent) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tString text = treeField.getCookie(node).toString(); \n\t graphics.drawText(text, indent, y);\n\t\t\t}\n\t\t}, Field.FOCUSABLE){\n\t\t\tprotected boolean navigationClick(int status, int time) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif(!isAnimating()){\n\t\t\t\t\tMenuModel menu = (MenuModel) root.getCookie(root.getCurrentNode());\n\t\t\t\t\tif(menu.isChild()){\n\t\t\t\t\t\tonMenuSelected(menu);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\treturn super.navigationClick(status, time);\n\t\t\t}\n\t\t\t\n\t\t\tprotected boolean keyDown(int keycode, int time) {\n\t\t\t\tif(!isAnimating()){\n\t\t\t\t\tif(keycode == 655360){\n\t\t\t\t\t\tMenuModel menu = (MenuModel) root.getCookie(root.getCurrentNode());\n\t\t\t\t\t\tif(menu.isChild()){\n\t\t\t\t\t\t\tonMenuSelected(menu);\n\t\t\t\t\t\t\treturn true;\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\treturn super.keyDown(keycode, time);\n\t\t\t}\n\t\t};\n\t\troot.setDefaultExpanded(false);\n\n\t\t//home\n\t\tMenuModel home = new MenuModel(\"Home\", MenuModel.HOME, true);\n\t\thome.setId(root.addChildNode(0, home));\n\t\t\n\t\tint lastRootChildId = home.getId();\n\t\t\n\t\t//menu tree\n\t\tif(Singleton.getInstance().getMenuTree() != null){\n\t\t\tJSONArray menuTree = Singleton.getInstance().getMenuTree();\n\t\t\tif(menuTree.length() > 0){\n\t\t\t\tfor (int i = 0; i < menuTree.length(); i++) {\n\t\t\t\t\tif(!menuTree.isNull(i)){\n\t\t\t\t\t\tJSONObject node;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tnode = menuTree.getJSONObject(i);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//root menu tree (pria, wanita)\n\t\t\t\t\t\t\tboolean isChild = false;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString name = node.getString(\"name\");\n\t\t\t\t\t\t\tString url = node.getString(\"url\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tMenuModel treeNode = new MenuModel(\n\t\t\t\t\t\t\t\t\tname, url, MenuModel.JSON_TREE_NODE, isChild);\n\t\t\t\t\t\t\ttreeNode.setId(root.addSiblingNode(lastRootChildId, treeNode));\n\t\t\t\t\t\t\tlastRootChildId = treeNode.getId();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tif(!node.isNull(\"child\")){\n\t\t\t\t\t\t\t\t\tJSONArray childNodes = node.getJSONArray(\"child\");\n\t\t\t\t\t\t\t\t\tif(childNodes.length() > 0){\n\t\t\t\t\t\t\t\t\t\tfor (int j = childNodes.length() - 1; j >= 0; j--) {\n\t\t\t\t\t\t\t\t\t\t\tif(!childNodes.isNull(j)){\n\t\t\t\t\t\t\t\t\t\t\t\taddChildNode(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttreeNode.getId(), \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tchildNodes.getJSONObject(j));\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}\t\t\t\t\t\t\t\t\t\n\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\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (JSONException 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}\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\tif(Singleton.getInstance().getIsLogin()){\n\t\t\t//akun saya\n\t\t\tMenuModel myAccount = new MenuModel(\"Akun Saya\", MenuModel.MY_ACCOUNT, false);\n\t\t\tmyAccount.setId(root.addSiblingNode(lastRootChildId, myAccount));\n\t\t\t\n\t\t\tlastRootChildId = myAccount.getId();\n\t\t\t\n\t\t\t//akun saya->detail akun\n\t\t\tMenuModel profile = new MenuModel(\"Detail Akun\", MenuModel.PROFILE, true);\n\t\t\tprofile.setId(root.addChildNode(myAccount.getId(), profile));\n\t\t\t\n\t\t\t//akun saya->daftar pesanan\n\t\t\tMenuModel myOrderList = new MenuModel(\n\t\t\t\t\t\"Daftar Pesanan\", MenuModel.MY_ORDER, true);\n\t\t\tmyOrderList.setId(root.addSiblingNode(profile.getId(), myOrderList));\t\t\n\t\t\t\n\t\t\t//logout\n\t\t\tMenuModel logout = new MenuModel(\"Logout\", MenuModel.LOGOUT, true);\n\t\t\tlogout.setId(root.addSiblingNode(lastRootChildId, logout));\n\t\t\tlastRootChildId = logout.getId();\n\t\t} else{\n\t\t\t//login\n\t\t\tMenuModel login = new MenuModel(\"Login\", MenuModel.LOGIN, false);\n\t\t\tlogin.setId(root.addSiblingNode(lastRootChildId, login));\n\t\t\t\n\t\t\tlastRootChildId = login.getId();\n\t\t\t\n\t\t\t//login->login\n\t\t\tMenuModel loginMenu = new MenuModel(\"Login\", MenuModel.LOGIN_MENU, true);\n\t\t\tloginMenu.setId(root.addChildNode(login.getId(), loginMenu));\n\t\t\t\n\t\t\t//login->register\n\t\t\tMenuModel register = new MenuModel(\"Register\", MenuModel.REGISTER, true);\n\t\t\tregister.setId(root.addSiblingNode(loginMenu.getId(), register));\n\t\t}\n\t\t\n\t\tMenuUserModel menu = Singleton.getInstance().getMenu();\n\t\tif(menu != null){\n\t\t\t//sales\n\t\t\tif(menu.getMenuSalesOrder() || menu.isMenuSalesRetur()){\n\t\t\t\tMenuModel sales = new MenuModel(\"Sales\", MenuModel.SALES, false);\n\t\t\t\tsales.setId(root.addSiblingNode(lastRootChildId, sales));\n\t\t\t\tlastRootChildId = sales.getId();\n\t\t\t\t\n\t\t\t\t//sales retur\n\t\t\t\tif(menu.isMenuSalesRetur()){\n\t\t\t\t\tMenuModel salesRetur = new MenuModel(\n\t\t\t\t\t\t\t\"Sales Retur\", MenuModel.SALES_RETUR, true);\n\t\t\t\t\tsalesRetur.setId(root.addChildNode(sales.getId(), salesRetur));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//sales order\n\t\t\t\tif(menu.getMenuSalesOrder()){\n\t\t\t\t\tMenuModel salesOrder = new MenuModel(\n\t\t\t\t\t\t\t\"Sales Order\", MenuModel.SALES_ORDER, true);\n\t\t\t\t\tsalesOrder.setId(root.addChildNode(sales.getId(), salesOrder));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//cms product\n\t\t\tif(menu.getMenuCmsProduct() || menu.getMenuCmsProductGrosir()){\n\t\t\t\tMenuModel cmsProduct = new MenuModel(\n\t\t\t\t\t\t\"Produk\", MenuModel.CMS_PRODUCT, false);\n\t\t\t\tcmsProduct.setId(\n\t\t\t\t\t\troot.addSiblingNode(lastRootChildId, cmsProduct));\n\t\t\t\tlastRootChildId = cmsProduct.getId();\n\t\t\t\t\n\t\t\t\t//product retail\n\t\t\t\tif(menu.getMenuCmsProduct()){\n\t\t\t\t\tMenuModel productRetail = new MenuModel(\n\t\t\t\t\t\t\t\"Produk Retail\", MenuModel.CMS_PRODUCT_RETAIL, true);\n\t\t\t\t\tproductRetail.setId(\n\t\t\t\t\t\t\troot.addChildNode(cmsProduct.getId(), productRetail));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//product grosir\n\t\t\t\tif(menu.getMenuCmsProductGrosir()){\n\t\t\t\t\tMenuModel productGrosir = new MenuModel(\n\t\t\t\t\t\t\t\"Produk Grosir\", MenuModel.CMS_PRODUCT_GROSIR, true);\n\t\t\t\t\tproductGrosir.setId(\n\t\t\t\t\t\t\troot.addChildNode(cmsProduct.getId(), productGrosir));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\t//service\n\t\tMenuModel service = new MenuModel(\"Layanan\", MenuModel.SERVICE, false);\n\t\tservice.setId(root.addSiblingNode(lastRootChildId, service));\n\t\tlastRootChildId = service.getId();\n\t\tVector serviceList = Singleton.getInstance().getServices();\n\t\ttry {\n\t\t\tfor (int i = serviceList.size() -1; i >= 0; i--) {\n\t\t\t\tMenuFooterModel footer = (MenuFooterModel) serviceList.elementAt(i);\n\t\t\t\tMenuModel serviceMenu = new MenuModel(\n\t\t\t\t\t\tfooter.getCatTitle(), footer.getCatTautan(),\n\t\t\t\t\t\tMenuModel.SERVICE_MENU, true);\n\t\t\t\tserviceMenu.setId(root.addChildNode(service.getId(), serviceMenu));\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\n\t\t}\n\t\t\n\t\t//about\n\t\tMenuModel about = new MenuModel(\"Tentang Y2\", MenuModel.ABOUT, false);\n\t\tabout.setId(root.addSiblingNode(service.getId(), about));\n\t\tlastRootChildId = service.getId();\n\t\tVector aboutList = Singleton.getInstance().getAbouts();\n\t\ttry {\n\t\t\tfor (int i = aboutList.size() -1; i >= 0; i--) {\n\t\t\t\tMenuFooterModel footer = (MenuFooterModel) aboutList.elementAt(i);\n\t\t\t\tMenuModel aboutMenu = new MenuModel(\n\t\t\t\t\t\tfooter.getCatTitle(), footer.getCatTautan(), \n\t\t\t\t\t\tMenuModel.SERVICE_MENU, true);\n\t\t\t\taboutMenu.setId(root.addChildNode(service.getId(), aboutMenu));\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\t\n\t\tcontainer.add(root);\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\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetSupportMenuInflater().inflate(R.menu.activity_display_selected_scripture,\n \t\t\t\tmenu);\n \t\treturn true;\n \t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_spilen5, menu);\n return true;\n }",
"private void setUpMenu() {\n\t\tresideMenu = new ResideMenu(this);\n\t\tresideMenu.setBackground(R.drawable.menu_background);\n\t\tresideMenu.attachToActivity(this);\n\t\tresideMenu.setMenuListener(menuListener);\n\t\t// valid scale factor is between 0.0f and 1.0f. leftmenu'width is\n\t\t// 150dip.\n\t\tresideMenu.setScaleValue(0.6f);\n\n\t\t// create menu items;\n\t\titemGame = new ResideMenuItem(this, R.drawable.icon_game,\n\t\t\t\tgetResources().getString(R.string.strGame));\n\t\titemBook = new ResideMenuItem(this, R.drawable.icon_book,\n\t\t\t\tgetResources().getString(R.string.strBook));\n\t\titemNews = new ResideMenuItem(this, R.drawable.icon_news,\n\t\t\t\tgetResources().getString(R.string.strNews));\n\t\t// itemSettings = new ResideMenuItem(this, R.drawable.icon_setting,\n\t\t// getResources().getString(R.string.strSetting));\n\t\titemLogin = new ResideMenuItem(this, R.drawable.icon_share,\n\t\t\t\tgetResources().getString(R.string.strShare));\n\t\titemBookPDF = new ResideMenuItem(this, R.drawable.icon_bookpdf,\n\t\t\t\tgetResources().getString(R.string.strBookPDF));\n\t\titemMore = new ResideMenuItem(this, R.drawable.icon_more,\n\t\t\t\tgetResources().getString(R.string.strMore));\n\n\t\titemGame.setOnClickListener(this);\n\t\titemBook.setOnClickListener(this);\n\t\titemNews.setOnClickListener(this);\n\t\t// itemSettings.setOnClickListener(this);\n\t\titemBookPDF.setOnClickListener(this);\n\t\titemMore.setOnClickListener(this);\n\t\titemLogin.setOnClickListener(this);\n\n\t\tresideMenu.addMenuItem(itemBookPDF, ResideMenu.DIRECTION_LEFT);\n\t\tresideMenu.addMenuItem(itemBook, ResideMenu.DIRECTION_LEFT);\n\t\tresideMenu.addMenuItem(itemNews, ResideMenu.DIRECTION_LEFT);\n\t\t// resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_RIGHT);\n\n\t\tresideMenu.addMenuItem(itemGame, ResideMenu.DIRECTION_RIGHT);\n\t\tresideMenu.addMenuItem(itemLogin, ResideMenu.DIRECTION_RIGHT);\n\t\tresideMenu.addMenuItem(itemMore, ResideMenu.DIRECTION_RIGHT);\n\n\t\t// You can disable a direction by setting ->\n\t\t// resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n\t\tfindViewById(R.id.title_bar_left_menu).setOnClickListener(\n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\t\tresideMenu.openMenu(ResideMenu.DIRECTION_LEFT);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tfindViewById(R.id.title_bar_right_menu).setOnClickListener(\n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\t\tresideMenu.openMenu(ResideMenu.DIRECTION_RIGHT);\n\t\t\t\t\t}\n\t\t\t\t});\n\t}",
"@Override\r\n public void actionPerformed(ActionEvent e) {\n Menu_Produtos m2= new Menu_Produtos();\r\n \r\n }",
"public void mousePressed(MouseEvent e) {\n JMenu menu = (JMenu)menuItem;\n if (!menu.isEnabled())\n return;\n MenuSelectionManager manager = \n MenuSelectionManager.defaultManager();\n if(menu.isTopLevelMenu()) {\n if(menu.isSelected()) {\n manager.clearSelectedPath();\n } else {\n Container cnt = menu.getParent();\n if(cnt != null && cnt instanceof JMenuBar) {\n MenuElement me[] = new MenuElement[2];\n me[0]=(MenuElement)cnt;\n me[1]=menu;\n manager.setSelectedPath(me); } } }\n MenuElement selectedPath[] = manager.getSelectedPath();\n if (selectedPath.length > 0 && \n selectedPath[selectedPath.length-1] != menu.getPopupMenu()) {\n if(menu.isTopLevelMenu() || \n menu.getDelay() == 0) {\n appendPath(selectedPath, menu.getPopupMenu());\n } else {\n setupPostTimer(menu); } } }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n MenuItem menuItemSearch = menu.findItem(R.id.search);\n MenuItem menuItemCart = menu.findItem(R.id.cart);\n\n if (CURRENT_TAG.equals(TAG_SEARCH)) {\n hideMenuItem(menuItemSearch);\n showMenuItem(menuItemCart);\n return true;\n }\n\n if (CURRENT_TAG.equals(TAG_MY_CART)) {\n hideMenuItem(menuItemCart);\n showMenuItem(menuItemSearch);\n return true;\n }\n\n showMenuItem(menuItemCart);\n showMenuItem(menuItemSearch);\n\n return true;\n }",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n return super.onPrepareOptionsMenu(menu);\n }",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n return super.onPrepareOptionsMenu(menu);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.menu_principal, menu);\n \t//Fin del menu\n \treturn true;\n }",
"public static void imprimirMenuAdmin() {\r\n\tSystem.out.println(\"---------------------------menu---------------------------\");\r\n\tSystem.out.println(\"opciones: (ingrese la letra)\");\r\n\tSystem.out.println(\"A: despliega la opción taquilla\");\r\n System.out.println(\"B: despliega la opción informacion cliente\");\r\n\tSystem.out.println(\"C: Salir\");\r\n\tSystem.out.println(\"----------------------------------------------------------\");\r\n }",
"public static void menu() {\n\t\tSystem.out.println(\"Menu:\");\n\t\tSystem.out.println(\"1: Create\");\n\t\tSystem.out.println(\"2: Merge\");\n\t\tSystem.out.println(\"3: Collection\");\n\t\tSystem.out.println(\"4: Upgrades\");\n\t\tSystem.out.println(\"5: Sell\");\n\t\tSystem.out.println(\"6: Identify Crystal\");\n\t\tSystem.out.println(\"\");\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_ski_detail, menu);\n return true;\n }",
"public String getActivationMenu();",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_principal, menu);//Menu Resource, Menu\n return true;\n }",
"public startingMenu() {\r\n initComponents();\r\n }",
"public void initializeMenuItems() {\n menuItems = new LinkedHashMap<TestingOption, MenuDrawerItem>();\n menuItems.put(TestingOption.TESTING_OPTION, create(TestingOption.TESTING_OPTION, getResources().getString(R.string.testing_section).toUpperCase(), MenuDrawerItem.SECTION_TYPE));\n menuItems.put(TestingOption.ANNOTATION_OPTION, create(TestingOption.ANNOTATION_OPTION, getResources().getString(R.string.option_annotation_POI), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.MAP_VIEW_SETTINGS_OPTION, create(TestingOption.MAP_VIEW_SETTINGS_OPTION, getResources().getString(R.string.option_map_view_settings), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.MAP_CACHE_OPTION, create(TestingOption.MAP_CACHE_OPTION, getResources().getString(R.string.option_map_cache), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.LAST_RENDERED_FRAME_OPTION, create(TestingOption.LAST_RENDERED_FRAME_OPTION, getResources().getString(R.string.option_last_rendered_frame), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.ANIMATION_CUSTOM_VIEW_OPTION, create(TestingOption.ANIMATION_CUSTOM_VIEW_OPTION, getResources().getString(R.string.option_ccp_animation_custom_view), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.BOUNDING_BOX_OPTION, create(TestingOption.BOUNDING_BOX_OPTION, getResources().getString(R.string.option_bounding_box), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.INTERNALIZATION_OPTION, create(TestingOption.INTERNALIZATION_OPTION, getResources().getString(R.string.option_internalization), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.ANIMATE_OPTION, create(TestingOption.ANIMATE_OPTION, getResources().getString(R.string.option_animate), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.MAP_STYLE_OPTION, create(TestingOption.MAP_STYLE_OPTION, getResources().getString(R.string.option_map_style), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.SCALE_VIEW_OPTION, create(TestingOption.SCALE_VIEW_OPTION, getResources().getString(R.string.option_scale_view), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.CALLOUT_VIEW_OPTION, create(TestingOption.CALLOUT_VIEW_OPTION, getResources().getString(R.string.option_callout_view), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.ROUTING_OPTION, create(TestingOption.ROUTING_OPTION, getResources().getString(R.string.option_routing), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.ROUTE_WITH_POINTS, create(TestingOption.ROUTE_WITH_POINTS, getResources().getString(R.string.option_routing_with_points),MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.MAP_VERSION_OPTION, create(TestingOption.MAP_VERSION_OPTION, getResources().getString(R.string.option_map_version_information), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.OVERLAYS_OPTION, create(TestingOption.OVERLAYS_OPTION, getResources().getString(R.string.option_overlays), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.POI_TRACKER, create(TestingOption.POI_TRACKER, getResources().getString(R.string.option_poi_tracker), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.POSITION_LOGGING_OPTION, create(TestingOption.POSITION_LOGGING_OPTION, getResources().getString(R.string.option_position_logging), MenuDrawerItem.ITEM_TYPE));\n\n list = new ArrayList<MenuDrawerItem>(menuItems.values());\n drawerList.setAdapter(new MenuDrawerAdapter(DebugMapActivity.this, R.layout.element_menu_drawer_item, list));\n drawerList.setOnItemClickListener(new DrawerItemClickListener());\n\n }",
"IMenu getMainMenu();",
"public String chooseMenu() {\n String input = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"menu_id\");\n setName(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"name\"));\n setType(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"type\"));\n setMenu_id(Integer.parseInt(input));\n return \"EditMenu\";\n\n }",
"public static void f_menu(){\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n System.out.println(\"_/_/_/_/_/_/softvectorwhith/_/_/_/_/_/_/\");\n System.out.println(\"/_/_/_/version 1.0 2020-oct-29_/_/_/_/_/\");\n System.out.println(\"/_/maked by Andres Felipe Torres Lopez_/\");\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n this.menu = menu;\n publicMenuItem = menu.findItem(R.id.action_public_invites);\n privateMenuItem = menu.findItem(R.id.action_private_invites);\n if(savedDbQuery){\n publicMenuItem.setVisible(true);\n privateMenuItem.setVisible(false);\n }else{\n publicMenuItem.setVisible(false);\n privateMenuItem.setVisible(true);\n }\n publicMenuItem = menu.findItem(R.id.action_public_invites);\n privateMenuItem = menu.findItem(R.id.action_private_invites);\n return true;\n }",
"private void constructMenuItems()\n\t{\n\t\tthis.saveImageMenuItem = ComponentGenerator.generateMenuItem(\"Save Image\", this, KeyStroke.getKeyStroke(KeyEvent.VK_S, ActionEvent.CTRL_MASK));\n\t\tthis.quitMenuItem = ComponentGenerator.generateMenuItem(\"Quit\", this, KeyStroke.getKeyStroke(KeyEvent.VK_Q, ActionEvent.CTRL_MASK));\n\t\tthis.undoMenuItem = ComponentGenerator.generateMenuItem(\"Undo\", this, KeyStroke.getKeyStroke(KeyEvent.VK_Z, ActionEvent.CTRL_MASK));\n\t\tthis.redoMenuItem = ComponentGenerator.generateMenuItem(\"Redo\", this, KeyStroke.getKeyStroke(KeyEvent.VK_Y, ActionEvent.CTRL_MASK));\n\t\tthis.removeImageMenuItem = ComponentGenerator.generateMenuItem(\"Remove Image from Case\", this);\n\t\tthis.antiAliasMenuItem = ComponentGenerator.generateMenuItem(\"Apply Anti Aliasing\", this);\n\t\tthis.brightenMenuItem = ComponentGenerator.generateMenuItem(\"Brighten by 10%\", this);\n\t\tthis.darkenMenuItem = ComponentGenerator.generateMenuItem(\"Darken by 10%\", this);\n\t\tthis.grayscaleMenuItem = ComponentGenerator.generateMenuItem(\"Convert to Grayscale\", this);\n\t\tthis.resizeMenuItem = ComponentGenerator.generateMenuItem(\"Resize Image\", this);\n\t\tthis.cropMenuItem = ComponentGenerator.generateMenuItem(\"Crop Image\", this);\n\t\tthis.rotate90MenuItem = ComponentGenerator.generateMenuItem(\"Rotate Image 90\\u00b0 Right\", this);\n\t\tthis.rotate180MenuItem = ComponentGenerator.generateMenuItem(\"Rotate Image 180\\u00b0 Right\", this);\n\t\tthis.rotate270MenuItem = ComponentGenerator.generateMenuItem(\"Rotate Image 270\\u00b0 Right\", this);\n\t}",
"@Override\n \tpublic boolean onPrepareOptionsMenu(Menu menu) {\n \t\tmenu.clear();\n \t\tswitch (mViewFlipper.getDisplayedChild()) {\n \t\tcase 0:\n \t\t\tmenu.add(Menu.NONE, Menu.FIRST + 4, 4, getString(R.string.omenuitem_reglogin)).setIcon(R.drawable.ic_menu_login);\n \t\t\tmenu.add(Menu.NONE, Menu.FIRST + 5, 5, getString(R.string.omenuitem_quit)).setIcon(android.R.drawable.ic_menu_close_clear_cancel);\n \t\t\tbreak;\n \t\tcase 1:\n \t\t\tif (mBrowPage.isDooming()) {\n \t\t\t\tmenu.add(Menu.NONE, Menu.FIRST + 1, 1, R.string.label_browse).setIcon(android.R.drawable.ic_menu_zoom);\n \t\t\t} else {\n \t\t\t\tmenu.add(Menu.NONE, Menu.FIRST + 1, 1, R.string.label_zoom).setIcon(android.R.drawable.ic_menu_zoom);\n \t\t\t}\n \t\t\tmenu.add(Menu.NONE, Menu.FIRST + 2, 1, R.string.label_reset).setIcon(android.R.drawable.ic_menu_revert);\n \t\t\tmenu.add(Menu.NONE, Menu.FIRST + 3, 1, R.string.label_refresh).setIcon(R.drawable.ic_menu_refresh);\n \t\t\tbreak;\n \t\tcase 2:\n \t\t\tbreak;\n \t\t}\n \t\tmenu.add(Menu.NONE, Menu.FIRST + 6, 6, getString(R.string.omenuitem_about)).setIcon(android.R.drawable.ic_menu_help);\n \n \t\treturn super.onPrepareOptionsMenu(menu);\n \t}",
"String getMenuName();",
"private JMenuItem getAProposjMenuItem() {\r\n\t\tif (AProposjMenuItem == null) {\r\n\t\t\tAProposjMenuItem = new JMenuItem();\r\n\t\t\tAProposjMenuItem.setText(\"A Propos\");\r\n\t\t\tAProposjMenuItem.setActionCommand(\"A Propos\");\r\n\t\t\tAProposjMenuItem.setFont(new Font(\"Dialog\", Font.PLAIN, 12));\r\n\t\t\tAProposjMenuItem.setIcon(new ImageIcon(getClass().getResource(\"/interrogation.png\")));\r\n\t\t\tAProposjMenuItem.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\tif (e.getActionCommand().equals(\"A Propos\")) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tHistorique.ecrire(\"Ouverture de : \"+e);\r\n\t\t\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tnew FEN_APropos();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn AProposjMenuItem;\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \tsuper.onCreateOptionsMenu(menu);\r\n\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.title_menu, menu);\r\n \r\n\t\treturn true;\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main_3, menu);\n return true;\n }",
"public void refreshMenu() {\n\t\tthis.Menu.setSize(this.Menu.getWidth(), this.Items.size() * (this.textSize + 4) + 4);\r\n\t\tthis.Menu.Camera.setPosition(0, 0);\r\n\t\tthis.anchorX();\r\n\t\tthis.anchorY();\r\n\t\t//println(\"----------\");\r\n\t\tthis.Menu.reposition((int) menuAnchor.x, (int) menuAnchor.y);\r\n\r\n\t\tfor (uTextButton t : this.Items) {\r\n\t\t\tt.setPosition(t.getX(), (this.Items.indexOf(t) * t.getHeight()));\r\n\t\t}\r\n\r\n\t}",
"public static void readMenu(){\n\t\tSystem.out.println(\"Menu....\");\n\t\tSystem.out.println(\"=====================\");\n\t\tSystem.out.println(\"1. Book A Ticket\\t2. See Settings\\n3. Withdraw\\t4. Deposit\");\n\n\t}",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n super.onPrepareOptionsMenu(menu);\n //If this is a new item, hide the \"Delete\" menu item.\n if(mCurrentItemUri == null){\n MenuItem menuItem = menu.findItem(R.id.action_delete);\n menuItem.setVisible(true);\n }\n return true;\n }",
"public Menu getStartMenu() {\n Menu menu = new Menu(new Point(475, 0), 672-475, 320, 8, 1, new Cursor(new Point(0, 7)), \"exit\");\n Button PokedexButton = new Button(new Point(475, 0), 672-475, 40, \"Pokédex\", new Point(0, 7), \"Pokédex\");\n Button PokemonButton = new Button(new Point(475, 40), 672-475, 40, \"Pokémon\", new Point(0, 6), \"Pokémon\");\n Button BagButton = new Button(new Point(475, 80), 672-475, 40, \"Bag\", new Point(0, 5), \"Bag\");\n Button PokenavButton = new Button(new Point(475, 120), 672-475, 40, \"Pokénav\", new Point(0, 4), \"Pokénav\");\n Button PlayerButton = new Button(new Point(475, 160), 672-475, 40, trainer.getName(), new Point(0, 3), trainer.getName());\n Button SaveButton = new Button(new Point(475, 200), 672-475, 40, \"save\", new Point(0, 2), \"Save\");\n Button OptionButton = new Button(new Point(475, 240), 672-475, 40, \"add_menu_other\", new Point(0, 1), \"Options\");\n Button ExitButton = new Button(new Point(475, 280), 672-475, 40, \"exit\", new Point(0, 0), \"exit\");\n menu.addButton(PokedexButton);\n menu.addButton(PokemonButton);\n menu.addButton(BagButton);\n menu.addButton(PokenavButton);\n menu.addButton(PlayerButton);\n menu.addButton(SaveButton);\n menu.addButton(OptionButton);\n menu.addButton(ExitButton);\n menu.getButton(menu.getCursor().getPos()).Highlight();\n return menu;\n }",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n\n return true;\n }",
"public void mouseEntered(MouseEvent e) {\n JMenu menu = (JMenu)menuItem;\n if (!menu.isEnabled())\n return;\n MenuSelectionManager manager = \n MenuSelectionManager.defaultManager();\n MenuElement selectedPath[] = manager.getSelectedPath(); \n if (!menu.isTopLevelMenu()) {\n if(!(selectedPath.length > 0 && \n selectedPath[selectedPath.length-1] == \n menu.getPopupMenu())) {\n if(menu.getDelay() == 0) {\n appendPath(getPath(), menu.getPopupMenu());\n } else {\n manager.setSelectedPath(getPath());\n setupPostTimer(menu); } }\n } else {\n if(selectedPath.length > 0 &&\n selectedPath[0] == menu.getParent()) {\n MenuElement newPath[] = new MenuElement[3];\n // A top level menu's parent is by definition \n // a JMenuBar\n newPath[0] = (MenuElement)menu.getParent();\n newPath[1] = menu;\n newPath[2] = menu.getPopupMenu();\n manager.setSelectedPath(newPath); } } }",
"@Override\n public boolean onPrepareActionMode(ActionMode mode, Menu menu) {\n// if (mSelectedItem==1) {\n// MenuInflater inflater = mode.getMenuInflater();\n// inflater.inflate(R.menu.geo, menu);\n// }\n return true; // Return false if nothing is done\n }",
"public static void updateMainMenu() {\n instance.updateMenu();\n }",
"public static void architectUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the architects\");\n System.out.println(\"2 - Would you like to search for a architect's information\");\n System.out.println(\"3 - Adding a new architect's details\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_paylasim, menu);\n return true;\n }",
"public Menu createToolsMenu();",
"public void menu() {\n\t\tstate.menu();\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n getMenuInflater().inflate(R.menu.main, menu);\r\n if (userType.equalsIgnoreCase(\"TSE\")) {\r\n MenuItem item = menu.findItem(R.id.home_button);\r\n item.setVisible(false);\r\n }\r\n return true;\r\n }",
"static void listerMenu() {\n System.out.println(\n \"-------------------------------------\\n\" +\n \"Saisir une option :\\n\" +\n \"1 : Liste des hôtes\\n\" +\n \"2 : Liste des logements\\n\" +\n \"3 : Liste des voyageurs\\n\" +\n \"4 : Liste des réservations\\n\" +\n \"5 : Fermer le programme\"\n );\n switch (Menu.choix(5)) {\n case 1:\n GestionHotes.listerHotes();\n break;\n case 2:\n GestionLogements.listerLogements();\n break;\n case 3:\n GestionVoyageurs.listerVoyageurs();\n break;\n case 4:\n GestionReservations.listerReservations();\n break;\n case 5:\n System.exit(0);\n break;\n }\n }",
"private static void submenu() {\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.order_list_actions,menu);\n if(isFinalized){\n MenuItem item = menu.findItem(R.id.action_finalized);\n item.setVisible(false);\n //this.invalidateOptionsMenu();\n }\n return super.onCreateOptionsMenu(menu);\n }",
"private void CreateMenu() {\n\t\topcionesMenu = getResources().getStringArray(\r\n\t\t\t\tR.array.devoluciones_lista_options);\r\n\r\n\t\tdrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);\r\n\t\t// Buscamos nuestro menu lateral\r\n\t\tdrawerList = (ListView) findViewById(R.id.left_drawer);\r\n\r\n\t\tdrawerList.setAdapter(new ArrayAdapter<String>(getSupportActionBar()\r\n\t\t\t\t.getThemedContext(), android.R.layout.simple_list_item_1,\r\n\t\t\t\topcionesMenu));\r\n\r\n\t\t// Añadimos Funciones al menú laterak\r\n\t\tdrawerList.setOnItemClickListener(new OnItemClickListener() {\r\n\r\n\t\t\t@SuppressLint(\"NewApi\")\r\n\t\t\t@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\r\n\t\t\t\t\tint position, long id) {\r\n\r\n\t\t\t\tdrawerList.setItemChecked(position, true);\r\n\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\ttituloSeccion = opcionesMenu[position];\r\n\t\t\t\tgetSupportActionBar().setTitle(tituloSeccion);\r\n\r\n\t\t\t\t// SELECCIONAR LA POSICION DEL RECIBO SELECCIONADO ACTUALMENTE\r\n\t\t\t\tpositioncache = customArrayAdapter.getSelectedPosition();\r\n\t\t\t\t// int pos = customArrayAdapter.getSelectedPosition();\r\n\t\t\t\t// OBTENER EL RECIBO DE LA LISTA DE RECIBOS DEL ADAPTADOR\r\n\t\t\t\titem_selected = (vmDevolucion) customArrayAdapter\r\n\t\t\t\t\t\t.getItem(positioncache);\r\n\t\t\t\tif(fragmentActive== FragmentActive.LIST){\r\n\t\t\t\t\r\n\t\t\t\t\tswitch (position) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcase NUEVO_DEVOLUCION:\r\n\t\t\t\t\t\t\tintent = new Intent(ViewDevoluciones.this,\r\n\t\t\t\t\t\t\t\t\tViewDevolucionEdit.class);\r\n\t\t\t\t\t\t\tintent.putExtra(\"requestcode\", NUEVO_DEVOLUCION);\r\n\t\t\t\t\t\t\tstartActivityForResult(intent, NUEVO_DEVOLUCION);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase ABRIR_DEVOLUCION:\r\n\t\t\t\t\t\t\tabrirDevolucion();\r\n\t\t\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase BORRAR_DEVOLUCION:\r\n\t\t\t\t\t\t\tif (item_selected == null) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\tif (!item_selected.getEstado().equals(\"REGISTRADA\")) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"El registro no se puede borrar en estado \"+ item_selected.getItemEstado()+\" .\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tMessage msg = new Message();\r\n\t\t\t\t\t\t\tBundle b = new Bundle();\r\n\t\t\t\t\t\t\tb.putInt(\"id\", (int) item_selected.getId());\r\n\t\t\t\t\t\t\tmsg.setData(b);\r\n\t\t\t\t\t\t\tmsg.what = ControllerProtocol.DELETE_DATA_FROM_LOCALHOST;\r\n\t\t\t\t\t\t\tNMApp.getController().getInboxHandler().sendMessage(msg);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase ENVIAR_DEVOLUCION:\r\n\t\t\t\t\t\t\tif (item_selected == null) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tenviarDevolucion(ControllerProtocol.GETOBSERVACIONDEV);\r\n\t\t\t\t\t\t\t//BDevolucionM.beforeSend(item_selected.getId());\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase IMPRIMIR_COMPROBANTE:\r\n\t\t\t\t\t\t\tif (item_selected == null) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tdevolucion = ModelDevolucion.getDevolucionbyID(item_selected.getId());\r\n\t\t\t\t\t\t\tif (devolucion.getNumeroCentral() == 0)\r\n\t\t\t\t\t\t\t\tenviarDevolucion(ControllerProtocol.GETOBSERVACIONDEV);\r\n\t\t\t\t\t\t\telse {\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tenviarImprimirDevolucion(\r\n\t\t\t\t\t\t\t\t\t\t\"Se mandara a imprimir el comprobante de la Devolución\",\r\n\t\t\t\t\t\t\t\t\t\tdevolucion);\r\n\t\t\t\t\t\t\t}\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\t * BDevolucionM.ImprimirDevolucion(item_selected.getId(),\r\n\t\t\t\t\t\t\t * false);\r\n\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase BORRAR_ENVIADAS:\r\n\t\t\t\t\t\t\tif (item_selected == null) \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t\t\t\tMessage msg2 = new Message();\r\n\t\t\t\t\t\t\tBundle b2 = new Bundle();\r\n\t\t\t\t\t\t\tb2.putInt(\"id\", -1);\r\n\t\t\t\t\t\t\tmsg2.setData(b2);\r\n\t\t\t\t\t\t\tmsg2.what = ControllerProtocol.DELETE_DATA_FROM_LOCALHOST;\r\n\t\t\t\t\t\t\tNMApp.getController().getInboxHandler().sendMessage(msg2);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase FICHA_DEL_CLIENTE:\r\n\t\t\t\t\t\t\tif (item_selected == null) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t\t\t\tif (NMNetWork.isPhoneConnected(NMApp.getContext())\r\n\t\t\t\t\t\t\t\t\t&& NMNetWork.CheckConnection(NMApp.getController())) {\r\n\t\t\t\t\t\t\t\tfragmentActive = FragmentActive.FICHACLIENTE;\r\n\t\t\t\t\t\t\t\tShowCustomerDetails();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase CUENTAS_POR_COBRAR:\r\n\t\t\t\t\t\t\tif (item_selected == null) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (NMNetWork.isPhoneConnected(NMApp.getContext())\r\n\t\t\t\t\t\t\t\t\t&& NMNetWork.CheckConnection(NMApp.getController())) {\r\n\t\t\t\t\t\t\t\tfragmentActive = FragmentActive.CONSULTAR_CUENTA_COBRAR;\r\n\t\t\t\t\t\t\t\tLOAD_CUENTASXPAGAR();\r\n\t\t\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase CERRAR:\r\n\t\t\t\t\t\t\tfinish();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(fragmentActive == FragmentActive.CONSULTAR_CUENTA_COBRAR){\r\n\t\t\t\t\t\r\n\t\t\t\t\tswitch (position) {\r\n\t\t\t\t\tcase MOSTRAR_FACTURAS:\r\n\t\t\t\t\t\tcuentasPorCobrar.cargarFacturasCliente();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase MOSTRAR_NOTAS_DEBITO: \r\n\t\t\t\t\t\tcuentasPorCobrar.cargarNotasDebito(); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase MOSTRAR_NOTAS_CREDITO: \r\n\t\t\t\t\t\tcuentasPorCobrar.cargarNotasCredito(); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase MOSTRAR_PEDIDOS: \r\n\t\t\t\t\t\tcuentasPorCobrar.cargarPedidos();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase MOSTRAR_RECIBOS: \r\n\t\t\t\t\t\tcuentasPorCobrar.cargarRecibosColector(); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\ttituloSeccion = getTitle();\r\n\t\ttituloApp = getTitle();\r\n\r\n\t\tdrawerToggle = new ActionBarDrawerToggle(this, drawerLayout,\r\n\t\t\t\tR.drawable.ic_navigation_drawer, R.string.drawer_open,\r\n\t\t\t\tR.string.drawer_close) {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onDrawerClosed(View view) {\r\n\t\t\t\tgetSupportActionBar().setTitle(tituloSeccion);\r\n\t\t\t\tActivityCompat.invalidateOptionsMenu(ViewDevoluciones.this);\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onDrawerOpened(View drawerView) {\r\n\t\t\t\tgetSupportActionBar().setTitle(tituloApp);\r\n\t\t\t\tActivityCompat.invalidateOptionsMenu(ViewDevoluciones.this);\r\n\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// establecemos el listener para el dragable ....\r\n\t\tdrawerLayout.setDrawerListener(drawerToggle);\r\n\r\n\t\tgetSupportActionBar().setDisplayHomeAsUpEnabled(true);\r\n\t\tgetSupportActionBar().setHomeButtonEnabled(true);\r\n\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_uz, menu);\n return true;\n }",
"private void mainMenu() {\n System.out.println(\"Canteen Management System\");\n System.out.println(\"-----------------------\");\n System.out.println(\"1. Show Menu\");\n System.out.println(\"2.AcceptReject\");\n System.out.println(\"3.place orders\");\n System.out.println(\"4.show orders\");\n System.out.println(\"5. Exit\");\n mainMenuDetails();\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.magnus_presenca, menu);\n\t\treturn true;\n\t}"
]
| [
"0.72725445",
"0.70843196",
"0.6981097",
"0.6889308",
"0.6828579",
"0.66574895",
"0.6618098",
"0.66131186",
"0.6585343",
"0.6581525",
"0.65533894",
"0.65488964",
"0.6538483",
"0.65161806",
"0.6498744",
"0.64959395",
"0.6492725",
"0.6485479",
"0.64818245",
"0.64806265",
"0.6477963",
"0.6459818",
"0.6456456",
"0.64557844",
"0.64403594",
"0.64331776",
"0.6429561",
"0.6417379",
"0.6407362",
"0.6402962",
"0.6396624",
"0.6390059",
"0.63884526",
"0.637169",
"0.63710636",
"0.63524747",
"0.63452595",
"0.6342661",
"0.6334932",
"0.63312453",
"0.63251287",
"0.63251287",
"0.6320972",
"0.63204837",
"0.6312595",
"0.63105124",
"0.6305912",
"0.62918854",
"0.62886286",
"0.62876564",
"0.62769777",
"0.6271611",
"0.6267435",
"0.62673414",
"0.62657577",
"0.6260901",
"0.62604666",
"0.6260293",
"0.6258176",
"0.625619",
"0.6254959",
"0.62543315",
"0.62543315",
"0.6253345",
"0.6249164",
"0.62429494",
"0.6241168",
"0.62381715",
"0.6232986",
"0.6230624",
"0.62274456",
"0.62229365",
"0.6222787",
"0.62134576",
"0.6210279",
"0.6209244",
"0.620826",
"0.62018526",
"0.6201518",
"0.6199622",
"0.6198377",
"0.61975384",
"0.61962265",
"0.6194245",
"0.61936915",
"0.61902076",
"0.617762",
"0.6176047",
"0.6172907",
"0.6171774",
"0.6170993",
"0.61707646",
"0.6165599",
"0.61639357",
"0.6161719",
"0.61607546",
"0.6156863",
"0.6156495",
"0.61526936",
"0.61465514",
"0.61411935"
]
| 0.0 | -1 |
Metoda by mala vratit meno tohoto menu, ale kedze itemMenu moze byt len subMenu tak mu nepriradujem ziadne meno aby som donutil ukazanie tohoto menu len s doprovodom hlavneho menu. | @Override
public String getName() {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getNumOfMenuItems(){\n return numOfMenuItems;\n }",
"public int size() {\n return menuItems.size();\n }",
"@Override\n public int getItemCount() {\n if (menu != null)\n return menu.size();\n else return 0;\n }",
"@Override\n\tpublic int getCount() {\n\t\t return menuItems.size();\n\t}",
"@Test\n public void testMenu() {\n MAIN_MENU[] menusDefined = MAIN_MENU.values();\n\n // get menu items\n List<String> menuList = rootPage.menu().items();\n _logger.debug(\"Menu items:{}\", menuList);\n // check the count\n Assert.assertEquals(menuList.size(), menusDefined.length, \"Number of menus test\");\n // check the names\n for (String item : menuList) {\n Assert.assertNotNull(MAIN_MENU.fromText(item), \"Checking menu: \" + item);\n }\n // check the navigation\n for (MAIN_MENU item : menusDefined) {\n _logger.debug(\"Testing menu:[{}]\", item.getText());\n rootPage.menu().select(item.getText());\n Assert.assertEquals(item.getText(), rootPage.menu().selected());\n }\n }",
"@Test\n public void removing_item_from_menu_should_decrease_menu_size_by_1() throws itemNotFoundException {\n\n int initialMenuSize = restaurant.getMenu().size();\n restaurant.removeFromMenu(\"Vegetable lasagne\");\n assertEquals(initialMenuSize-1,restaurant.getMenu().size());\n }",
"public void mo1751a(SubMenu subMenu) {\n subMenu.clear();\n C0475c a = C0475c.m2615a(this.f2117g, this.f2118h);\n PackageManager packageManager = this.f2117g.getPackageManager();\n int a2 = a.mo2490a();\n int min = Math.min(a2, this.f2115e);\n for (int i = 0; i < min; i++) {\n ResolveInfo b = a.mo2497b(i);\n subMenu.add(0, i, i, b.loadLabel(packageManager)).setIcon(b.loadIcon(packageManager)).setOnMenuItemClickListener(this.f2116f);\n }\n if (min < a2) {\n SubMenu addSubMenu = subMenu.addSubMenu(0, min, min, this.f2117g.getString(C0238R.string.abc_activity_chooser_view_see_all));\n for (int i2 = 0; i2 < a2; i2++) {\n ResolveInfo b2 = a.mo2497b(i2);\n addSubMenu.add(0, i2, i2, b2.loadLabel(packageManager)).setIcon(b2.loadIcon(packageManager)).setOnMenuItemClickListener(this.f2116f);\n }\n }\n }",
"@Override\n\t\t\tpublic int getCount(){\n\t\t\t\treturn menus.size();\n\t\t\t}",
"private void setMenu() {\n\n if (tree.isEmpty() || !treeGrid.anySelected()) {\n mainMenu.setItems(newMenuItem, new MenuItemSeparator(), settingMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecord() == null) {\n mainMenu.setItems(renameMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecords().length > 1) {\n ListGridRecord[] selectedNode = treeGrid.getSelectedRecords();\n if (isSameExtension(selectedNode, Extension.FP)) {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem, exportMenuItem);\n } else if (isSameExtension(selectedNode, Extension.FPS)) {\n mainMenu.setItems(newFPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.BPS)) {\n mainMenu.setItems(newBPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.SCSS)) {\n mainMenu.setItems(newSCSItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n }\n } else if (tree.isFolder(treeGrid.getSelectedRecord())) {\n mainMenu.setItems(newMenuItem, deleteMenu, renameMenuItem, copyMenuItem, pasteMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem, downloadMenuItem,\n copyPathMenuItem);\n } else {\n FileTreeNode selectedNode = (FileTreeNode) treeGrid.getSelectedRecord();\n VMResource resource = selectedNode.getResource();\n if (resource instanceof VMDirectory) {\n return;\n }\n Extension extension = ((VMFile) resource).getExtension();\n if (extension == null) {\n mainMenu.setItems(openWithMenuItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n } else\n switch (extension) {\n case ARC:\n mainMenu.setItems(newBPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FM:\n mainMenu.setItems(newFMCItem, newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FMC:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case TC:\n mainMenu.setItems(newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n case FPS:\n mainMenu.setItems(newFPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, exportMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BPS:\n mainMenu.setItems(newBPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCSS:\n mainMenu.setItems(newSCSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCS:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n default:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n }\n }\n }",
"private void setItemMenu() {\n choices = new ArrayList<>();\n \n choices.add(Command.INFO);\n if (item.isUsable()) {\n choices.add(Command.USE);\n }\n if (item.isEquipped()) {\n choices.add(Command.UNEQUIP);\n } else {\n if (item.isEquipable()) {\n choices.add(Command.EQUIP);\n }\n }\n \n if (item.isActive()) {\n choices.add(Command.UNACTIVE);\n } else {\n if (item.isActivable()) {\n choices.add(Command.ACTIVE);\n }\n }\n if (item.isDropable()) {\n choices.add(Command.DROP);\n }\n if (item.isPlaceable()) {\n choices.add(Command.PLACE);\n }\n choices.add(Command.DESTROY);\n choices.add(Command.CLOSE);\n \n this.height = choices.size() * hItemBox + hGap * 2;\n }",
"public void setNumOfMenuItems(int _numOfMenuItems){\n numOfMenuItems = _numOfMenuItems;\n }",
"@Command\n\t@NotifyChange({\"lstSubMenu\",\"lstLastMenu\",\"lstMainMenu\"})\n\tpublic void fillSubMenu(@BindingParam(\"item\") MenuModel item)\n\t{\n\t\t\t\t\n\t\tfor (MenuModel obj : lstMainMenu) \n\t\t{\n\t\tobj.setSclassName(\"defaultmenuitem\");\t\n\t\t}\n\t\titem.setSclassName(\"menuitem\");\n\t\t\t\n\t\tlstSubMenu=mData.getSubMenuList(item.getMenuid(),1,companyroleid);\n\t\tlstLastMenu=new ArrayList<MenuModel>();\n\t\t//Messagebox.show(item.getTitle());\n\t\t//BindUtils.postNotifyChange(null, null, this, \"*\");\t\t\n\t}",
"@Test\n public void adding_item_to_menu_should_increase_menu_size_by_1_Failure_Scenario(){\n\n int initialMenuSize = restaurant.getMenu().size();\n restaurant.addToMenu(\"Sizzling brownie\",319);\n assertEquals(initialMenuSize-1,restaurant.getMenu().size());\n System.out.println(\"Will decrease Instead of adding\");\n }",
"public native void addSubItem(MenuItem item);",
"private void initializeMenu() {\n menu = new Menu(parent.getShell());\n MenuItem item1 = new MenuItem(menu, SWT.NONE);\n item1.setText(Resources.getMessage(\"LatticeView.9\")); //$NON-NLS-1$\n item1.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n model.getClipboard().addToClipboard(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.CLIPBOARD, selectedNode));\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n \n MenuItem item2 = new MenuItem(menu, SWT.NONE);\n item2.setText(Resources.getMessage(\"LatticeView.10\")); //$NON-NLS-1$\n item2.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n controller.actionApplySelectedTransformation();\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n }",
"public void componentesimplementacionIsmael() {\n\t\t// En el menu bar Ismael\n\t\tmenuIsmael = new JMenu(\"Ismael\");\n\t\tmenuBar.add(menuIsmael);\n\n\t\t// SUBMENU\n\t\tsubMenuRecientes = new JMenu(\"Recientes\");\n\t\titemSubMenuRecientes = new ArrayList<>();\n\t\trutasRecientes = new ArrayList<>();\n\t\ttry {\n\t\t\trutasRecientes = manejadorFichero.obtenerLineasDelFichero();\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\tif (!rutasRecientes.isEmpty()) {\n\t\t\tfor (int i = 0; i < rutasRecientes.size(); i++) {\n\t\t\t\tJMenuItem textoSubmenu = new JMenuItem(rutasRecientes.get(i));\n\t\t\t\titemSubMenuRecientes.add(textoSubmenu);\n\t\t\t\tsubMenuRecientes.add(textoSubmenu);\n\t\t\t}\n\t\t}\n\t\tmenuIsmael.add(subMenuRecientes);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\t// Fuente\n\t\titemFuente = new JMenuItem(\"Fuente\");\n\t\titemFuente.setEnabled(false);\n\t\titemFuente.setMnemonic(KeyEvent.VK_F);\n\t\titemFuente.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemFuente);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\titemSeleccionarTodo = new JMenuItem(\"Selec.Todo\");\n\t\titemSeleccionarTodo.setEnabled(false);\n\t\titemSeleccionarTodo.setMnemonic(KeyEvent.VK_N);\n\t\titemSeleccionarTodo.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemSeleccionarTodo);\n\n\t\titemSeleccionarTodoYCopiar = new JMenuItem(\"Selec All+Copy\");\n\t\titemSeleccionarTodoYCopiar.setEnabled(false);\n\t\titemSeleccionarTodoYCopiar.setMnemonic(KeyEvent.VK_M);\n\t\titemSeleccionarTodoYCopiar.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemSeleccionarTodoYCopiar);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\titemHora = new JMenuItem(\"Hora\");\n\t\titemHora.setEnabled(true);\n\t\titemHora.setMnemonic(KeyEvent.VK_H);\n\t\titemHora.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_H, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemHora);\n\n\t}",
"private void setUpMenu() {\n resideMenu = new ResideMenu(this);\n\n resideMenu.setBackground(R.drawable.menu_background);\n resideMenu.attachToActivity(this);\n resideMenu.setMenuListener(menuListener);\n resideMenu.setScaleValue(0.6f);\n\n // create menu items;\n itemHome = new ResideMenuItem(this, R.drawable.icon_profile, \"Home\");\n itemSerre = new ResideMenuItem(this, R.drawable.serre, \"GreenHouse\");\n itemControl = new ResideMenuItem(this, R.drawable.ctrl, \"Control\");\n itemTable = new ResideMenuItem(this, R.drawable.database, \"Parametre\");\n\n // itemProfile = new ResideMenuItem(this, R.drawable.user, \"Profile\");\n // itemSettings = new ResideMenuItem(this, R.drawable.stat_n, \"Statistique\");\n itemPicture = new ResideMenuItem(this, R.drawable.cam, \"Picture\");\n itemLog = new ResideMenuItem(this, R.drawable.log, \"Log file \");\n\n itemLogout = new ResideMenuItem(this, R.drawable.logout, \"Logout\");\n\n\n\n itemHome.setOnClickListener(this);\n itemSerre.setOnClickListener(this);\n itemControl.setOnClickListener(this);\n itemTable.setOnClickListener(this);\n\n// itemProfile.setOnClickListener(this);\n // itemSettings.setOnClickListener(this);\n itemLogout.setOnClickListener(this);\n itemPicture.setOnClickListener(this);\n itemLog.setOnClickListener(this);\n\n\n resideMenu.addMenuItem(itemHome, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemSerre, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemControl, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemTable, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemLog, ResideMenu.DIRECTION_LEFT);\n\n\n // resideMenu.addMenuItem(itemProfile, ResideMenu.DIRECTION_RIGHT);\n // resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_RIGHT);\n resideMenu.addMenuItem(itemPicture, ResideMenu.DIRECTION_RIGHT);\n\n resideMenu.addMenuItem(itemLogout, ResideMenu.DIRECTION_RIGHT);\n\n // You can disable a direction by setting ->\n // resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n findViewById(R.id.title_bar_left_menu).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n resideMenu.openMenu(ResideMenu.DIRECTION_LEFT);\n }\n });\n findViewById(R.id.title_bar_right_menu).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n resideMenu.openMenu(ResideMenu.DIRECTION_RIGHT);\n }\n });\n }",
"@Test(priority = 4)\n public void serviceLeftDropdownMenuTest() {\n driver.findElement(By.cssSelector(\"li[class='menu-title']\")).click();\n List<WebElement> elements = driver.findElements(By.cssSelector(\"li[index='3'] ul.sub li\"));\n assertEquals(elements.size(), 9);\n }",
"@Test\n public void removing_item_from_menu_should_decrease_menu_size_by_1() throws itemNotFoundException_Failure_Scenario {\n\n int initialMenuSize = restaurant.getMenu().size();\n restaurant.removeFromMenu(\"Vegetable lasagne\");\n assertEquals(initialMenuSize+1,restaurant.getMenu().size());\n System.out.println(\"Will Add instead of removal\");\n }",
"void addSubMenu(String key, String message, Menu<T> subMenu);",
"private void updateMenu() {\n if(customMenu || !menuDirty) {\n return;\n }\n \n // otherwise, reset up the menu.\n menuDirty = false;\n menu.removeAll();\n Icon emptyIcon = null; \n for(Action action : actions) {\n if(action.getValue(Action.SMALL_ICON) != null) {\n emptyIcon = new EmptyIcon(16, 16);\n break;\n }\n }\n \n selectedComponent = null;\n selectedLabel = null;\n \n for (Action action : actions) {\n \n // We create the label ourselves (instead of using JMenuItem),\n // because JMenuItem adds lots of bulky insets.\n\n ActionLabel menuItem = new ActionLabel(action);\n JComponent panel = wrapItemForSelection(menuItem);\n \n if (action != selectedAction) {\n panel.setOpaque(false);\n menuItem.setForeground(UIManager.getColor(\"MenuItem.foreground\"));\n } else {\n selectedComponent = panel;\n selectedLabel = menuItem;\n selectedComponent.setOpaque(true);\n selectedLabel.setForeground(UIManager.getColor(\"MenuItem.selectionForeground\"));\n }\n \n if(menuItem.getIcon() == null) {\n menuItem.setIcon(emptyIcon);\n }\n attachListeners(menuItem);\n decorateMenuComponent(menuItem);\n menuItem.setBorder(BorderFactory.createEmptyBorder(0, 6, 2, 6));\n\n menu.add(panel);\n }\n \n if (getText() == null) {\n menu.add(Box.createHorizontalStrut(getWidth()-4));\n } \n \n for(MenuCreationListener listener : menuCreationListeners) {\n listener.menuCreated(this, menu);\n }\n }",
"private void createMenu(){\n\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n JMenu Opcje = new JMenu(\"Opcje\");\n mbar.add(Opcje);\n JMenuItem Ustawienia = new JMenuItem(\"Ustawienia\");\n /** Obsluga zdarzen wcisniecia przycisku ustawien w menu */\n Ustawienia.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if(Justawienia==null)\n Justawienia =new JUstawienia();\n Justawienia.setVisible(true);\n if (controller.timer!=null)\n controller.timer.stop();\n }\n });\n Opcje.add(Ustawienia);\n Opcje.addSeparator();\n JMenuItem Info = new JMenuItem(\"Info\");\n /** Obsluga zdarzen wcisniecia przycisku info w menu */\n Info.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n controller.WyswietlInfo();\n }\n });\n Opcje.add(Info);\n }",
"@Override\n\tpublic void setUpMenu() {\n\t\t\n\t}",
"private void setUpMenu() {\n\t\tresideMenu = new ResideMenu(this);\n\t\tresideMenu.setBackground(R.drawable.menu_background);\n\t\tresideMenu.attachToActivity(this);\n\t\tresideMenu.setMenuListener(menuListener);\n\t\t// valid scale factor is between 0.0f and 1.0f. leftmenu'width is\n\t\t// 150dip.\n\t\tresideMenu.setScaleValue(0.6f);\n\n\t\t// create menu items;\n\t\titemGame = new ResideMenuItem(this, R.drawable.icon_game,\n\t\t\t\tgetResources().getString(R.string.strGame));\n\t\titemBook = new ResideMenuItem(this, R.drawable.icon_book,\n\t\t\t\tgetResources().getString(R.string.strBook));\n\t\titemNews = new ResideMenuItem(this, R.drawable.icon_news,\n\t\t\t\tgetResources().getString(R.string.strNews));\n\t\t// itemSettings = new ResideMenuItem(this, R.drawable.icon_setting,\n\t\t// getResources().getString(R.string.strSetting));\n\t\titemLogin = new ResideMenuItem(this, R.drawable.icon_share,\n\t\t\t\tgetResources().getString(R.string.strShare));\n\t\titemBookPDF = new ResideMenuItem(this, R.drawable.icon_bookpdf,\n\t\t\t\tgetResources().getString(R.string.strBookPDF));\n\t\titemMore = new ResideMenuItem(this, R.drawable.icon_more,\n\t\t\t\tgetResources().getString(R.string.strMore));\n\n\t\titemGame.setOnClickListener(this);\n\t\titemBook.setOnClickListener(this);\n\t\titemNews.setOnClickListener(this);\n\t\t// itemSettings.setOnClickListener(this);\n\t\titemBookPDF.setOnClickListener(this);\n\t\titemMore.setOnClickListener(this);\n\t\titemLogin.setOnClickListener(this);\n\n\t\tresideMenu.addMenuItem(itemBookPDF, ResideMenu.DIRECTION_LEFT);\n\t\tresideMenu.addMenuItem(itemBook, ResideMenu.DIRECTION_LEFT);\n\t\tresideMenu.addMenuItem(itemNews, ResideMenu.DIRECTION_LEFT);\n\t\t// resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_RIGHT);\n\n\t\tresideMenu.addMenuItem(itemGame, ResideMenu.DIRECTION_RIGHT);\n\t\tresideMenu.addMenuItem(itemLogin, ResideMenu.DIRECTION_RIGHT);\n\t\tresideMenu.addMenuItem(itemMore, ResideMenu.DIRECTION_RIGHT);\n\n\t\t// You can disable a direction by setting ->\n\t\t// resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n\t\tfindViewById(R.id.title_bar_left_menu).setOnClickListener(\n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\t\tresideMenu.openMenu(ResideMenu.DIRECTION_LEFT);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tfindViewById(R.id.title_bar_right_menu).setOnClickListener(\n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\t\tresideMenu.openMenu(ResideMenu.DIRECTION_RIGHT);\n\t\t\t\t\t}\n\t\t\t\t});\n\t}",
"public void initMenu(){\n\t}",
"public void addSubMenus() {\n configMenu.remove(colorMI);\r\n configMenu.remove(sizeMI);\r\n\r\n // set color and size as JMenu\r\n colorMenu = new JMenu(\"Color\");\r\n sizeMenu = new JMenu(\"Size\");\r\n\r\n // set new JMenuItem\r\n redColor = new JMenuItem(\"Red\");\r\n greenColor = new JMenuItem(\"Green\");\r\n blueColor = new JMenuItem(\"Blue\");\r\n sixteenSize = new JMenuItem(\"16\");\r\n twentySize = new JMenuItem(\"20\");\r\n twentyfourSize = new JMenuItem(\"24\");\r\n\r\n // add menu item to menu\r\n colorMenu.add(redColor);\r\n colorMenu.add(greenColor);\r\n colorMenu.add(blueColor);\r\n sizeMenu.add(sixteenSize);\r\n sizeMenu.add(twentySize);\r\n sizeMenu.add(twentyfourSize);\r\n\r\n // add menu\r\n configMenu.add(colorMenu);\r\n configMenu.add(sizeMenu);\r\n }",
"@Override\n public int getRowCount() {\n if (menuItems.size() > 0) {\n return menuItems.size() + 2;\n } else {\n return menuItems.size();\n }\n }",
"@Override\n public void onChange(MenuItem item) {\n List<Long> longList = getItemIds(item, new ArrayList<>());\n Long[] arr = longList.toArray(new Long[longList.size()]);\n int totalItems = getItemSize2(arr, realm);\n if (totalItems > 0) {\n counterTV.setVisibility(View.VISIBLE);\n counterTV.setText(totalItems + \"\");\n } else {\n counterTV.setVisibility(View.GONE);\n }\n menuItem.removeChangeListener(this);\n changeListenerHashSet.remove(this);\n }",
"@Test\n public void testMenuFactoryRemove() {\n Menu menuController = menuFactory.getMenu();\n menuController.addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n menuController.removeMenuItem(1);\n assertEquals(0, menuController.getMenu().size());\n }",
"@Test\n public void testMenuFactoryCreate() {\n Menu menuController = menuFactory.getMenu();\n menuController.addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n assertEquals(1, menuController.getMenu().size());\n }",
"@Override\r\n\tpublic void createMenu(Menu menu) {\n\r\n\t}",
"@Test\n public void testMenuFactoryGetMenuItem() {\n Menu menuController = menuFactory.getMenu();\n menuController.addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n assertEquals(MENU_NAME, menuController.getMenuItem(1).getName());\n assertEquals(MENU_DESCRIPTION, menuController.getMenuItem(1).getDescription());\n assertEquals(MENU_PRICE, menuController.getMenuItem(1).getPrice());\n }",
"public void initializeMenuItems() {\n menuItems = new LinkedHashMap<TestingOption, MenuDrawerItem>();\n menuItems.put(TestingOption.TESTING_OPTION, create(TestingOption.TESTING_OPTION, getResources().getString(R.string.testing_section).toUpperCase(), MenuDrawerItem.SECTION_TYPE));\n menuItems.put(TestingOption.ANNOTATION_OPTION, create(TestingOption.ANNOTATION_OPTION, getResources().getString(R.string.option_annotation_POI), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.MAP_VIEW_SETTINGS_OPTION, create(TestingOption.MAP_VIEW_SETTINGS_OPTION, getResources().getString(R.string.option_map_view_settings), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.MAP_CACHE_OPTION, create(TestingOption.MAP_CACHE_OPTION, getResources().getString(R.string.option_map_cache), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.LAST_RENDERED_FRAME_OPTION, create(TestingOption.LAST_RENDERED_FRAME_OPTION, getResources().getString(R.string.option_last_rendered_frame), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.ANIMATION_CUSTOM_VIEW_OPTION, create(TestingOption.ANIMATION_CUSTOM_VIEW_OPTION, getResources().getString(R.string.option_ccp_animation_custom_view), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.BOUNDING_BOX_OPTION, create(TestingOption.BOUNDING_BOX_OPTION, getResources().getString(R.string.option_bounding_box), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.INTERNALIZATION_OPTION, create(TestingOption.INTERNALIZATION_OPTION, getResources().getString(R.string.option_internalization), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.ANIMATE_OPTION, create(TestingOption.ANIMATE_OPTION, getResources().getString(R.string.option_animate), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.MAP_STYLE_OPTION, create(TestingOption.MAP_STYLE_OPTION, getResources().getString(R.string.option_map_style), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.SCALE_VIEW_OPTION, create(TestingOption.SCALE_VIEW_OPTION, getResources().getString(R.string.option_scale_view), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.CALLOUT_VIEW_OPTION, create(TestingOption.CALLOUT_VIEW_OPTION, getResources().getString(R.string.option_callout_view), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.ROUTING_OPTION, create(TestingOption.ROUTING_OPTION, getResources().getString(R.string.option_routing), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.ROUTE_WITH_POINTS, create(TestingOption.ROUTE_WITH_POINTS, getResources().getString(R.string.option_routing_with_points),MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.MAP_VERSION_OPTION, create(TestingOption.MAP_VERSION_OPTION, getResources().getString(R.string.option_map_version_information), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.OVERLAYS_OPTION, create(TestingOption.OVERLAYS_OPTION, getResources().getString(R.string.option_overlays), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.POI_TRACKER, create(TestingOption.POI_TRACKER, getResources().getString(R.string.option_poi_tracker), MenuDrawerItem.ITEM_TYPE));\n menuItems.put(TestingOption.POSITION_LOGGING_OPTION, create(TestingOption.POSITION_LOGGING_OPTION, getResources().getString(R.string.option_position_logging), MenuDrawerItem.ITEM_TYPE));\n\n list = new ArrayList<MenuDrawerItem>(menuItems.values());\n drawerList.setAdapter(new MenuDrawerAdapter(DebugMapActivity.this, R.layout.element_menu_drawer_item, list));\n drawerList.setOnItemClickListener(new DrawerItemClickListener());\n\n }",
"private static void submenu() {\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }",
"protected abstract void addMenuOptions();",
"public boolean updateMenu() {\n selectedMotifNames=panel.getSelectedMotifNames();\n if (selectedMotifNames==null) return false;\n for (JMenuItem item:limitedToOne) {\n item.setEnabled(selectedMotifNames.length==1);\n }\n selectMotifsFromMenu.removeAll();\n selectOnlyMotifsFromMenu.removeAll(); \n for (String collectionName:engine.getNamesForAllDataItemsOfType(MotifCollection.class)) {\n JMenuItem subitem=new JMenuItem(collectionName);\n subitem.addActionListener(selectFromCollectionListener);\n selectMotifsFromMenu.add(subitem);\n JMenuItem subitem2=new JMenuItem(collectionName);\n subitem2.addActionListener(clearAndselectFromCollectionListener);\n selectOnlyMotifsFromMenu.add(subitem2);\n } \n for (String partitionName:engine.getNamesForAllDataItemsOfType(MotifPartition.class)) {\n Data data=engine.getDataItem(partitionName);\n if (data instanceof MotifPartition) {\n JMenu selectMotifsFromMenuCluster=new JMenu(data.getName()); \n JMenu selectOnlyMotifsFromMenuCluster=new JMenu(data.getName()); \n for (String cluster:((MotifPartition)data).getClusterNames()) { \n JMenuItem subitem=new JMenuItem(cluster);\n subitem.setActionCommand(partitionName+\".\"+cluster);\n subitem.addActionListener(selectFromCollectionListener);\n selectMotifsFromMenuCluster.add(subitem);\n JMenuItem subitem2=new JMenuItem(cluster);\n subitem2.setActionCommand(partitionName+\".\"+cluster);\n subitem2.addActionListener(clearAndselectFromCollectionListener);\n selectOnlyMotifsFromMenuCluster.add(subitem2);\n }\n selectMotifsFromMenu.add(selectMotifsFromMenuCluster);\n selectOnlyMotifsFromMenu.add(selectOnlyMotifsFromMenuCluster);\n }\n } \n selectMotifsFromMenu.setEnabled(selectMotifsFromMenu.getMenuComponentCount()>0);\n selectOnlyMotifsFromMenu.setEnabled(selectOnlyMotifsFromMenu.getMenuComponentCount()>0);\n dbmenu.updateMenu((selectedMotifNames.length==1)?selectedMotifNames[0]:null,true);\n if (selectedMotifNames.length==1) {\n displayMotif.setText(DISPLAY_MOTIF+\" \"+selectedMotifNames[0]);\n displayMotif.setVisible(true);\n compareMotifToOthers.setText(\"Compare \"+selectedMotifNames[0]+\" To Other Motifs\");\n compareMotifToOthers.setVisible(true);\n saveMotifLogo.setVisible(true);\n dbmenu.setVisible(true);\n } else { \n displayMotif.setVisible(false);\n compareMotifToOthers.setVisible(true);\n saveMotifLogo.setVisible(true);\n dbmenu.setVisible(false);\n }\n return true;\n }",
"public void refreshMenu() {\n\t\tthis.Menu.setSize(this.Menu.getWidth(), this.Items.size() * (this.textSize + 4) + 4);\r\n\t\tthis.Menu.Camera.setPosition(0, 0);\r\n\t\tthis.anchorX();\r\n\t\tthis.anchorY();\r\n\t\t//println(\"----------\");\r\n\t\tthis.Menu.reposition((int) menuAnchor.x, (int) menuAnchor.y);\r\n\r\n\t\tfor (uTextButton t : this.Items) {\r\n\t\t\tt.setPosition(t.getX(), (this.Items.indexOf(t) * t.getHeight()));\r\n\t\t}\r\n\r\n\t}",
"@Test\n\tpublic void addMenu_2Test() throws Exception {\n\t\tif (Configuration.shufflerepeat &&\n\t\t\t\tConfiguration.featureamp&&\n\t\t\t\tConfiguration.playengine&&\n\t\t\t\tConfiguration.gui&&\n\t\t\t\tConfiguration.skins&&\n\t\t\t\tConfiguration.light &&\n\t\t\t\t!Configuration.loadfolder &&\n\t\t\t\t!Configuration.choosefile &&\n\t\t\t\t!Configuration.saveandloadplaylist) {\t\n\t\t\tstart();\n\t\t\tgui.addMenu();\n\t\t\tJMenu menu = (JMenu) MemberModifier.field(Application.class, \"menu\").get(gui);\n\t\t\tassertNotNull(menu);\n\t\t\t\n\t\t}\n\t}",
"public Integer getLength(Menu row){\r\n \treturn row.getIdmenu().length();\r\n }",
"public void list_of_menu_items() {\n\t\tdriver.findElement(open_menu_link).click();\n\t}",
"public static void updateMainMenu() {\n instance.updateMenu();\n }",
"private void addMenuReporte(){\n \n Menu menuR = new Menu(\"Reportes\");\n MenuItem menuItem1 = new MenuItem(\"Reporte de meses que no se registro compras de revistas\");\n MenuItem menuItem2 = new MenuItem(\"Reporte por rango trimestre mostrar promedio de revistas recibidas\");\n MenuItem menuItem3 = new MenuItem(\"Reporte de continuidad, mas meses (Mas Numeros) , soportar duplicidad de datos.\");\n MenuItem menuItem4 = new MenuItem(\"Reporte ordenado por numero de cada revista que se recibio en el anio\");\n MenuItem menuItem5 = new MenuItem(\"Revistas disponibles por mes\"); \n MenuItem menuItem6 = new MenuItem(\"Reportes revistas ordenado\"); \n \n menuR.getItems().add(menuItem5);\n menuR.getItems().add(menuItem1);\n menuR.getItems().add(menuItem2);\n menuR.getItems().add(menuItem3);\n menuR.getItems().add(menuItem4);\n \n menuItem5.setOnAction(new EventHandler<ActionEvent>() { \n @Override\n public void handle(ActionEvent event) {\n gridPane.getChildren().clear();\n reporteTotal_5() ;\n }\n });\n \n menuItem1.setOnAction(new EventHandler<ActionEvent>() { \n @Override\n public void handle(ActionEvent event) {\n gridPane.getChildren().clear();\n reporteTotal_1();\n }\n });\n \n menuItem2.setOnAction(new EventHandler<ActionEvent>() { \n @Override\n public void handle(ActionEvent event) {\n gridPane.getChildren().clear();\n reporteTotal_2() ;\n }\n });\n menuItem3.setOnAction(new EventHandler<ActionEvent>() { \n @Override\n public void handle(ActionEvent event) {\n gridPane.getChildren().clear();\n reporteTotal_3() ;\n }\n });\n \n menuItem4.setOnAction(new EventHandler<ActionEvent>() { \n @Override\n public void handle(ActionEvent event) {\n gridPane.getChildren().clear();\n reporteTotal_4() ;\n }\n });\n \n menuBar.getMenus().add(menuR);\n }",
"protected void fillMenu(MenuBar menuBar) {\n\t\tMenu fileMenu = new Menu(\"Файл\");\n\t\n\t\tMenuItem loginMenuItem = new MenuItem(\"Сменить пользователя\");\n\t\tloginMenuItem.setOnAction(actionEvent -> main.logout());\n\t\n\t\tMenuItem exitMenuItem = new MenuItem(\"Выход (выключить планшет)\");\n\t\texitMenuItem.setOnAction(actionEvent -> main.requestShutdown());\n\t\texitMenuItem.setAccelerator(KeyCombination.keyCombination(\"Alt+F4\"));\n\t\n\t\n\t\tfileMenu.getItems().addAll( loginMenuItem,\n\t\t\t\tnew SeparatorMenuItem(), exitMenuItem);\n\t\n\t\n\t\n\t\tMenu navMenu = new Menu(\"Навигация\");\n\t\n\t\tMenuItem navHomeMap = new MenuItem(\"На общую карту\");\n\t\t//navHomeMap.setOnAction(actionEvent -> setMapData(bigMapData));\n\t\tnavHomeMap.setOnAction(actionEvent -> setMapData(main.ml.getRootMap()));\n\t\n\t\tMenu navMaps = new Menu(\"Карты\");\n\t\t//navMaps.setOnAction(actionEvent -> setMapData(bigMapData));\n\t\tmain.ml.fillMapsMenu( navMaps, this );\n\t\n\t\tMenuItem navOverview = new MenuItem(\"Обзор\");\n\t\tnavOverview.setOnAction(actionEvent -> setOverviewScale());\n\t\n\t\tnavMenu.getItems().addAll( navHomeMap, navMaps, new SeparatorMenuItem(), navOverview );\n\t\n\t\t\n\t\t\n\t\tMenu dataMenu = new Menu(\"Данные\");\n\t\n\t\tServerUnitType.forEach(t -> {\n\t\t\tMenuItem dataItem = new MenuItem(t.getDisplayName());\n\t\t\tdataItem.setOnAction(actionEvent -> new EntityListWindow(t, main.rc, main.sc));\n\t\n\t\t\tdataMenu.getItems().add(dataItem);\t\t\t\n\t\t});\n\t\t\n\t\t//dataMenu.Menu debugMenu = new Menu(\"Debug\");\n\t\t//MenuItem d1 = new MenuItem(\"На общую карту\");\n\t\t//d1.setOnAction(actionEvent -> setMapData(main.ml.getRootMap()));\n\t\n\t\t\n\t\t/*\n\t Menu webMenu = new Menu(\"Web\");\n\t CheckMenuItem htmlMenuItem = new CheckMenuItem(\"HTML\");\n\t htmlMenuItem.setSelected(true);\n\t webMenu.getItems().add(htmlMenuItem);\n\t\n\t CheckMenuItem cssMenuItem = new CheckMenuItem(\"CSS\");\n\t cssMenuItem.setSelected(true);\n\t webMenu.getItems().add(cssMenuItem);\n\t\n\t Menu sqlMenu = new Menu(\"SQL\");\n\t ToggleGroup tGroup = new ToggleGroup();\n\t RadioMenuItem mysqlItem = new RadioMenuItem(\"MySQL\");\n\t mysqlItem.setToggleGroup(tGroup);\n\t\n\t RadioMenuItem oracleItem = new RadioMenuItem(\"Oracle\");\n\t oracleItem.setToggleGroup(tGroup);\n\t oracleItem.setSelected(true);\n\t\n\t sqlMenu.getItems().addAll(mysqlItem, oracleItem,\n\t new SeparatorMenuItem());\n\t\n\t Menu tutorialManeu = new Menu(\"Tutorial\");\n\t tutorialManeu.getItems().addAll(\n\t new CheckMenuItem(\"Java\"),\n\t new CheckMenuItem(\"JavaFX\"),\n\t new CheckMenuItem(\"Swing\"));\n\t\n\t sqlMenu.getItems().add(tutorialManeu);\n\t\t */\n\t\n\t\tMenu aboutMenu = new Menu(\"О системе\");\n\t\n\t\tMenuItem version = new MenuItem(\"Версия\");\n\t\tversion.setOnAction(actionEvent -> showAbout());\n\t\n\t\tMenuItem aboutDz = new MenuItem(\"Digital Zone\");\n\t\taboutDz.setOnAction(actionEvent -> main.getHostServices().showDocument(Defs.HOME_URL));\n\t\n\t\tMenuItem aboutVita = new MenuItem(\"VitaSoft\");\n\t\taboutVita.setOnAction(actionEvent -> main.getHostServices().showDocument(\"vtsft.ru\"));\n\t\n\t\taboutMenu.getItems().addAll( version, new SeparatorMenuItem(), aboutDz, aboutVita );\n\t\n\t\t// --------------- Menu bar\n\t\n\t\t//menuBar.getMenus().addAll(fileMenu, webMenu, sqlMenu);\n\t\tmenuBar.getMenus().addAll(fileMenu, navMenu, dataMenu, aboutMenu );\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_sub_sel_activity2, menu);\r\n tvMenu = new TextView(this);\r\n // tv.setText(getString(R.string.matchmacking)+\" \");\r\n // tvMenu.setTextColor(getResources().getColor(Color.WHITE));\r\n // tv.setOnClickListener(this);\r\n tvMenu.setTextColor((Color.parseColor(\"#ffffff\")));\r\n tvMenu.setPadding(5, 0, 5, 0);\r\n tvMenu.setTypeface(null, Typeface.BOLD);\r\n tvMenu.setTextSize(15);\r\n menu.add(0, 1, 1, \"selected\").setActionView(tvMenu).setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);\r\n\r\n tvMenu.setText(\"Selected\" + \"\\n \" + String.valueOf(count));\r\n return true;\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.home_page, menu);\n final MenuItem menuItem = menu.findItem(R.id.message);\n View actionView = menuItem.getActionView();\n textCartItemCount = (TextView) actionView.findViewById(R.id.cart_badge);\n setupBadge();\n\n actionView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n onOptionsItemSelected(menuItem);\n\n }\n });\n return true;\n }",
"@Override\n public boolean isSubMenuDisplayed(final String subMenu) {\n\n DriverConfig.setLogString(\"SubMenu \" + subMenu, true);\n boolean isdisplayed = false;\n final List<WebElement> subMenus = DriverConfig.getDriver().findElements(\n By.xpath(\"//*[@id='submenu']/a\"));\n isdisplayed = checkMenu(subMenu, isdisplayed, subMenus);\n\n return isdisplayed;\n }",
"@Override\n public void addMenu(Items cartItemToBeAdded) {\n Items menuItem = cartItemToBeAdded.getItemOriginalReference();\n menuItem.setItemQuantity(menuItem.getItemQuantity() + 1);\n mCartAdapter.addToCart(cartItemToBeAdded);\n updateCartMenu();\n }",
"public int getMenuId() {\n return 0;\n }",
"public abstract int getMenu();",
"public void getMenuItems(){ \n\t\tParseUser user = ParseUser.getCurrentUser();\n\t\tmenu = user.getParseObject(\"menu\");\n\n\t\tParseQuery<ParseObject> query = ParseQuery.getQuery(\"Item\");\n\t\tquery.whereEqualTo(\"menu\", menu);\n\n\t\tquery.findInBackground(new FindCallback<ParseObject>() {\n\t\t\tpublic void done(List<ParseObject> menuItems, ParseException e) {\n\t\t\t\tif (e == null) {\n\t\t\t\t\tlistMenuItems(menuItems);\n\t\t\t\t} else {\n\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"public final void onMMMenuItemSelected(MenuItem menuItem, int i) {\n int i2;\n int i3;\n Throwable e;\n int i4 = 0;\n AppMethodBeat.i(7652);\n j.this.utJ = false;\n com.tencent.mm.plugin.webview.ui.tools.jsapi.d dVar;\n if (j.g(menuItem)) {\n b bVar = (b) menuItem.getMenuInfo();\n if (bVar != null) {\n dVar = j.this.cZv().uhz;\n ab.i(\"MicroMsg.JsApiHandler\", \"onCustomMenuClick\");\n HashMap hashMap = new HashMap();\n hashMap.put(\"key\", bVar.key);\n hashMap.put(\"title\", bVar.title);\n dVar.uFo.evaluateJavascript(\"javascript:WeixinJSBridge._handleMessageFromWeixin(\" + i.a.b(\"menu:custom\", hashMap, dVar.uFv, dVar.uFw) + \")\", null);\n }\n AppMethodBeat.o(7652);\n return;\n }\n String stringExtra;\n String stringExtra2;\n String stringExtra3;\n e cYc;\n e cYc2;\n j jVar;\n j jVar2;\n j jVar3;\n com.tencent.mm.plugin.webview.ui.tools.jsapi.d dVar2;\n Intent intent;\n Bundle JL;\n Bundle bundle;\n switch (menuItem.getItemId()) {\n case 1:\n stringExtra = j.this.cZv().getIntent().getStringExtra(\"KPublisherId\");\n stringExtra2 = j.this.cZv().getIntent().getStringExtra(\"KAppId\");\n stringExtra3 = j.this.cZv().getIntent().getStringExtra(\"srcUsername\");\n cYc = j.this.cZv().ulI.cYc();\n cYc.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(1), Integer.valueOf(1), stringExtra, stringExtra2, stringExtra3};\n cYc.b(j.this.cZv().icy);\n j.this.cZv().uvr = j.this.cZv().icz.cZT().dmm();\n j.this.cZv().clH();\n AppMethodBeat.o(7652);\n return;\n case 2:\n stringExtra = j.this.cZv().getIntent().getStringExtra(\"KPublisherId\");\n stringExtra2 = j.this.cZv().getIntent().getStringExtra(\"KAppId\");\n stringExtra3 = j.this.cZv().getIntent().getStringExtra(\"srcUsername\");\n cYc = j.this.cZv().ulI.cYc();\n cYc.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(2), Integer.valueOf(1), stringExtra, stringExtra2, stringExtra3};\n cYc.b(j.this.cZv().icy);\n j.this.cZv().uvr = j.this.cZv().icz.cZT().dmm();\n if (j.this.utG.containsKey(j.this.cZv().pzf.getUrl())) {\n i4 = ((Integer) j.this.utG.get(j.this.cZv().pzf.getUrl())).intValue();\n }\n j.a(j.this, i4);\n AppMethodBeat.o(7652);\n return;\n case 3:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(3), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n h.pYm.a(157, 6, 1, false);\n j.this.cZv().uvr = j.this.cZv().icz.cZT().dmm();\n j.this.cZO();\n AppMethodBeat.o(7652);\n return;\n case 5:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(4), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n stringExtra = (String) j.this.cZv().uwb.get(j.this.cZv().pzf.getUrl());\n if (stringExtra == null) {\n stringExtra = j.this.cZv().getIntent().getStringExtra(\"srcUsername\");\n }\n jVar = j.this;\n stringExtra3 = \"Contact_Scene\";\n if (jVar.cZv().uhz != null) {\n Bundle bundle2 = new Bundle();\n bundle2.putInt(stringExtra3, 43);\n dVar = jVar.cZv().uhz;\n try {\n dVar.icy.a(21, bundle2, dVar.uqj);\n } catch (Exception e2) {\n ab.printErrStackTrace(\"MicroMsg.JsApiHandler\", e2, \"\", new Object[0]);\n ab.w(\"MicroMsg.JsApiHandler\", \"updateJsapiArgsBundleKV, ex = \".concat(String.valueOf(e2)));\n }\n }\n j.this.cZv().afK(stringExtra);\n AppMethodBeat.o(7652);\n return;\n case 6:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(5), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n jVar2 = j.this;\n if (jVar2.cZv().pzf == null) {\n ab.e(\"MicroMsg.WebViewMenuHelper\", \"copyLink fail, viewWV is null\");\n AppMethodBeat.o(7652);\n return;\n }\n CharSequence url = jVar2.cZv().pzf.getUrl();\n if (url == null || url.length() == 0) {\n ab.e(\"MicroMsg.WebViewMenuHelper\", \"copyLink fail, url is null\");\n AppMethodBeat.o(7652);\n return;\n }\n CharSequence aek;\n try {\n aek = jVar2.cZv().icy.aek(url);\n } catch (Exception e3) {\n ab.e(\"MicroMsg.WebViewMenuHelper\", \"copy link failed\");\n aek = url;\n }\n ClipboardManager clipboardManager = (ClipboardManager) jVar2.cZv().getApplication().getSystemService(\"clipboard\");\n if (clipboardManager != null) {\n try {\n clipboardManager.setText(aek);\n Toast.makeText(jVar2.cZv(), jVar2.cZv().getString(R.string.g1w), 0).show();\n AppMethodBeat.o(7652);\n return;\n } catch (Exception e4) {\n ab.printErrStackTrace(\"MicroMsg.WebViewMenuHelper\", e4, \"clip.setText error\", new Object[0]);\n AppMethodBeat.o(7652);\n return;\n }\n }\n ab.e(\"MicroMsg.WebViewMenuHelper\", \"clipboard manager is null\");\n AppMethodBeat.o(7652);\n return;\n case 7:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(13), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n WebViewUI cZv = j.this.cZv();\n com.tencent.mm.plugin.webview.stub.d dVar3 = cZv.icy;\n if (!cZv.isFinishing()) {\n stringExtra = cZv.dae();\n if (bo.isNullOrNil(stringExtra)) {\n ab.e(\"MicroMsg.BrowserChooserHelper\", \"open in browser fail, url is null\");\n AppMethodBeat.o(7652);\n return;\n }\n if (dVar3 != null) {\n try {\n stringExtra = dVar3.aek(stringExtra);\n } catch (Exception e5) {\n ab.e(\"MicroMsg.BrowserChooserHelper\", \"showAndOpenInBrowser, getShareUrl, exception = %s\", e5);\n }\n }\n if (!(stringExtra.startsWith(\"http://\") || stringExtra.startsWith(\"https://\"))) {\n stringExtra = \"http://\".concat(String.valueOf(stringExtra));\n }\n Intent intent2 = new Intent(\"android.intent.action.VIEW\", Uri.parse(stringExtra));\n try {\n if (bo.gT(cZv) || g.dnY()) {\n cZv.startActivity(intent2);\n AppMethodBeat.o(7652);\n return;\n }\n cZv.startActivityForResult(com.tencent.mm.plugin.webview.modeltools.a.a(cZv, intent2, stringExtra), 2);\n AppMethodBeat.o(7652);\n return;\n } catch (Exception e42) {\n ab.e(\"MicroMsg.BrowserChooserHelper\", \"open in browser failed : %s\", e42.getMessage());\n }\n }\n AppMethodBeat.o(7652);\n return;\n case 8:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(15), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n jVar3 = j.this;\n jVar3.cZv().uhz.bJ(\"sendEmail\", true);\n dVar2 = jVar3.cZv().uhz;\n if (dVar2.ready) {\n dVar2.uFo.evaluateJavascript(\"javascript:WeixinJSBridge._handleMessageFromWeixin(\" + i.a.b(\"menu:share:email\", new HashMap(), dVar2.uFv, dVar2.uFw) + \")\", null);\n AppMethodBeat.o(7652);\n return;\n }\n ab.e(\"MicroMsg.JsApiHandler\", \"onSendMail fail, not ready\");\n AppMethodBeat.o(7652);\n return;\n case 9:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(7), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n j jVar4 = j.this;\n com.tencent.mm.ui.base.h.a(jVar4.cZv(), jVar4.cZv().getString(R.string.p5), null, null, jVar4.cZv().getString(R.string.p4), new com.tencent.mm.ui.base.h.d() {\n public final void bV(int i, int i2) {\n AppMethodBeat.i(7648);\n switch (i2) {\n case -1:\n Bundle bundle = new Bundle();\n bundle.putLong(\"fav_local_id\", j.this.cZv().getIntent().getLongExtra(\"fav_local_id\", -1));\n try {\n if (j.this.cZv().icy.aa(bundle)) {\n ab.i(\"MicroMsg.WebViewMenuHelper\", \"del fav web url ok, finish webview ui\");\n j.this.cZv().ulI.q(\"mm_del_fav\", Boolean.TRUE);\n j.this.cZv().finish();\n AppMethodBeat.o(7648);\n return;\n }\n ab.w(\"MicroMsg.WebViewMenuHelper\", \"try to del web url fail\");\n AppMethodBeat.o(7648);\n return;\n } catch (Exception e) {\n ab.printErrStackTrace(\"MicroMsg.WebViewMenuHelper\", e, \"\", new Object[0]);\n ab.e(\"MicroMsg.WebViewMenuHelper\", \"try to del web url crash\");\n AppMethodBeat.o(7648);\n return;\n }\n default:\n ab.i(\"MicroMsg.WebViewMenuHelper\", \"do del cancel\");\n AppMethodBeat.o(7648);\n return;\n }\n }\n });\n AppMethodBeat.o(7652);\n return;\n case 10:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(11), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n j.this.afG(null);\n AppMethodBeat.o(7652);\n return;\n case 11:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(8), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n if (j.this.cZv().uvb.getVisibility() == 8) {\n j.this.cZv().uvb.startAnimation(AnimationUtils.loadAnimation(j.this.cZv(), R.anim.b9));\n j.this.cZv().uvb.setVisibility(0);\n AppMethodBeat.o(7652);\n return;\n }\n Animation loadAnimation = AnimationUtils.loadAnimation(j.this.cZv(), R.anim.b_);\n loadAnimation.setAnimationListener(new AnimationListener() {\n public final void onAnimationStart(Animation animation) {\n }\n\n public final void onAnimationRepeat(Animation animation) {\n }\n\n public final void onAnimationEnd(Animation animation) {\n AppMethodBeat.i(7651);\n j.this.cZv().uvb.setVisibility(8);\n AppMethodBeat.o(7651);\n }\n });\n j.this.cZv().uvb.startAnimation(loadAnimation);\n j.this.cZv().uvb.setVisibility(8);\n AppMethodBeat.o(7652);\n return;\n case 12:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(6), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n intent = new Intent();\n intent.putExtra(\"key_fav_scene\", 2);\n intent.putExtra(\"key_fav_item_id\", j.this.cZv().getIntent().getLongExtra(\"fav_local_id\", -1));\n com.tencent.mm.plugin.fav.a.b.b(j.this.cZv(), \".ui.FavTagEditUI\", intent);\n j.this.cZv().ulI.aeG(\"mm_edit_fav_count\");\n AppMethodBeat.o(7652);\n return;\n case 14:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(9), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n if (j.this.cZv().uvZ) {\n j.a(j.this, j.this.utE);\n AppMethodBeat.o(7652);\n return;\n }\n j.a(j.this, j.this.cZv().pzf.getUrl(), j.this.cZv().pzf.getSettings().getUserAgentString(), j.this.width, j.this.height);\n AppMethodBeat.o(7652);\n return;\n case 15:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(19), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n j.a(j.this, menuItem);\n AppMethodBeat.o(7652);\n return;\n case 16:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(21), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n j.a(j.this, menuItem);\n AppMethodBeat.o(7652);\n return;\n case 17:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(20), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n j.a(j.this, menuItem);\n AppMethodBeat.o(7652);\n return;\n case 18:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(22), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n j.a(j.this, menuItem);\n AppMethodBeat.o(7652);\n return;\n case 19:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(23), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n j.a(j.this, menuItem);\n AppMethodBeat.o(7652);\n return;\n case 20:\n j.this.cZv().uvr = j.this.cZv().icz.cZT().dmm();\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(17), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n jVar3 = j.this;\n jVar3.cZv().uhz.bJ(\"shareQQ\", true);\n dVar2 = jVar3.cZv().uhz;\n if (dVar2.ready) {\n JL = dVar2.JL(1);\n if (JL == null || !JL.getBoolean(\"WebViewShare_reslut\", false)) {\n dVar2.uFo.evaluateJavascript(\"javascript:WeixinJSBridge._handleMessageFromWeixin(\" + i.a.b(\"menu:share:qq\", new HashMap(), dVar2.uFv, dVar2.uFw) + \")\", null);\n AppMethodBeat.o(7652);\n return;\n }\n dVar2.h(JL, \"shareQQ\");\n AppMethodBeat.o(7652);\n return;\n }\n ab.e(\"MicroMsg.JsApiHandler\", \"onShareQQ fail, not ready\");\n AppMethodBeat.o(7652);\n return;\n case 21:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(18), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n jVar3 = j.this;\n jVar3.cZv().uhz.bJ(\"shareWeiboApp\", true);\n dVar2 = jVar3.cZv().uhz;\n if (dVar2.ready) {\n dVar2.uFo.evaluateJavascript(\"javascript:WeixinJSBridge._handleMessageFromWeixin(\" + i.a.b(\"menu:share:weiboApp\", new HashMap(), dVar2.uFv, dVar2.uFw) + \")\", null);\n AppMethodBeat.o(7652);\n return;\n }\n ab.e(\"MicroMsg.JsApiHandler\", \"onShareWeiboApp fail, not ready\");\n AppMethodBeat.o(7652);\n return;\n case 22:\n j.this.cZv().uvr = j.this.cZv().icz.cZT().dmm();\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(24), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n jVar3 = j.this;\n jVar3.cZv().uhz.bJ(\"shareQZone\", true);\n dVar2 = jVar3.cZv().uhz;\n if (dVar2.ready) {\n JL = dVar2.JL(1);\n if (JL == null || !JL.getBoolean(\"WebViewShare_reslut\", false)) {\n dVar2.uFo.evaluateJavascript(\"javascript:WeixinJSBridge._handleMessageFromWeixin(\" + i.a.b(\"menu:share:QZone\", new HashMap(), dVar2.uFv, dVar2.uFw) + \")\", null);\n AppMethodBeat.o(7652);\n return;\n }\n dVar2.h(JL, \"shareQZone\");\n AppMethodBeat.o(7652);\n return;\n }\n ab.e(\"MicroMsg.JsApiHandler\", \"onShareQzone fail, not ready\");\n AppMethodBeat.o(7652);\n return;\n case 23:\n intent = new Intent();\n stringExtra2 = j.this.cZv().getIntent().getStringExtra(\"sns_local_id\");\n if (stringExtra2 != null) {\n intent.putExtra(\"sns_send_data_ui_activity\", true);\n intent.putExtra(\"sns_local_id\", stringExtra2);\n } else {\n intent.putExtra(\"Retr_Msg_Id\", Long.valueOf(j.this.cZv().getIntent().getLongExtra(\"msg_id\", Long.MIN_VALUE)));\n }\n com.tencent.mm.bp.d.f(j.this.cZv(), \".ui.chatting.ChattingSendDataToDeviceUI\", intent);\n AppMethodBeat.o(7652);\n return;\n case 24:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(16), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n jVar = j.this;\n try {\n bundle = new Bundle();\n bundle.putString(\"enterprise_action\", \"enterprise_connectors\");\n ArrayList stringArrayList = jVar.cZv().icy.g(71, bundle).getStringArrayList(\"enterprise_connectors\");\n if (stringArrayList == null || stringArrayList.size() <= 0) {\n AppMethodBeat.o(7652);\n return;\n } else if (stringArrayList.size() == 1) {\n jVar.afF((String) stringArrayList.get(0));\n AppMethodBeat.o(7652);\n return;\n } else {\n jVar.ec(stringArrayList);\n com.tencent.mm.ui.tools.j jVar5 = new com.tencent.mm.ui.tools.j(jVar.cZv());\n jVar5.a(jVar.cZv().pzf, jVar.cZv(), null);\n jVar5.zFT = new a() {\n public final void a(ImageView imageView, MenuItem menuItem) {\n AppMethodBeat.i(7657);\n if (j.g(menuItem)) {\n imageView.setVisibility(8);\n AppMethodBeat.o(7657);\n return;\n }\n String str = menuItem.getTitle();\n if (j.this.utC.get(str) == null || ((Bitmap) j.this.utC.get(str)).isRecycled()) {\n ab.w(\"MicroMsg.WebViewMenuHelper\", \"on attach icon, load from cache fail\");\n try {\n String aff = j.this.cZv().icy.aff(str);\n if (!bo.isNullOrNil(aff)) {\n Bitmap afx = g.afx(aff);\n if (!(afx == null || afx.isRecycled())) {\n imageView.setImageBitmap(afx);\n j.this.utC.put(str, afx);\n }\n }\n AppMethodBeat.o(7657);\n return;\n } catch (Exception e) {\n ab.w(\"MicroMsg.WebViewMenuHelper\", \"getheadimg, ex = \" + e.getMessage());\n AppMethodBeat.o(7657);\n return;\n }\n }\n imageView.setImageBitmap((Bitmap) j.this.utC.get(str));\n AppMethodBeat.o(7657);\n }\n };\n jVar5.zFU = new n.b() {\n public final void a(TextView textView, MenuItem menuItem) {\n AppMethodBeat.i(7643);\n String str = menuItem.getTitle();\n if (textView != null) {\n CharSequence charSequence = (String) j.this.utD.get(str);\n if (bo.isNullOrNil(charSequence)) {\n textView.setText(str);\n AppMethodBeat.o(7643);\n return;\n }\n textView.setText(com.tencent.mm.pluginsdk.ui.e.j.b(j.this.cZv(), charSequence, textView.getTextSize()));\n }\n AppMethodBeat.o(7643);\n }\n };\n jVar5.b(jVar.cZv().pzf, new AnonymousClass3(stringArrayList), new n.d() {\n public final void onMMMenuItemSelected(MenuItem menuItem, int i) {\n AppMethodBeat.i(7645);\n j.this.afF(menuItem.getTitle().toString());\n AppMethodBeat.o(7645);\n }\n });\n jVar5.cuu();\n AppMethodBeat.o(7652);\n return;\n }\n } catch (Exception e422) {\n ab.w(\"MicroMsg.WebViewMenuHelper\", \"builder add, ex = \" + e422.getMessage());\n AppMethodBeat.o(7652);\n return;\n }\n case 25:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(26), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n jVar3 = j.this;\n jVar3.cZv().uhz.bJ(\"sendAppMessage\", true);\n dVar2 = jVar3.cZv().uhz;\n if (dVar2.ready) {\n dVar2.uFo.evaluateJavascript(\"javascript:WeixinJSBridge._handleMessageFromWeixin(\" + i.a.b(\"menu:share:appmessage\", new HashMap(), dVar2.uFv, dVar2.uFw) + \")\", null);\n try {\n dVar2.icy.L(\"scene\", \"wework\", dVar2.uqj);\n AppMethodBeat.o(7652);\n return;\n } catch (Exception e4222) {\n ab.w(\"MicroMsg.JsApiHandler\", \"jsapiBundlePutString, ex = \" + e4222.getMessage());\n AppMethodBeat.o(7652);\n return;\n }\n }\n ab.e(\"MicroMsg.JsApiHandler\", \"onShareWeWork fail, not ready\");\n AppMethodBeat.o(7652);\n return;\n case 26:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(27), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n jVar2 = j.this;\n stringExtra = null;\n try {\n stringExtra = jVar2.cZv().icy.aek(jVar2.cZv().pzf.getUrl());\n } catch (Exception e22) {\n ab.e(\"MicroMsg.WebViewMenuHelper\", \"getShareUrl failed : %s\", e22.getMessage());\n }\n if (bo.isNullOrNil(stringExtra)) {\n stringExtra = jVar2.cZv().cOG;\n }\n try {\n stringExtra = \"weread://mp?url=\" + q.encode(stringExtra, ProtocolPackage.ServerEncoding);\n } catch (Exception e222) {\n ab.e(\"MicroMsg.WebViewMenuHelper\", \"encode url failed ; %s\", e222.getMessage());\n }\n ab.i(\"MicroMsg.WebViewMenuHelper\", \"now url = %s\", stringExtra);\n Intent intent3 = new Intent(\"android.intent.action.VIEW\", Uri.parse(stringExtra));\n intent3.addFlags(268435456);\n if (bo.k(jVar2.cZv(), intent3)) {\n jVar2.cZv().startActivity(intent3);\n AppMethodBeat.o(7652);\n return;\n }\n ab.e(\"MicroMsg.WebViewMenuHelper\", \"not availble app match this intent\");\n AppMethodBeat.o(7652);\n return;\n case 27:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(32), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n if (!j.this.cZv().cWG()) {\n j.this.cZv().finish();\n AppMethodBeat.o(7652);\n return;\n }\n break;\n case com.tencent.view.d.MIC_BASE_CHANNELSHARPEN /*28*/:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(10), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n j.this.cZv().aYe();\n AppMethodBeat.o(7652);\n return;\n case 29:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(31), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n j.this.cZR();\n AppMethodBeat.o(7652);\n return;\n case 31:\n h.pYm.a(480, 1, 1, false);\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(28), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n if (!j.this.cZv().uvj.isShown()) {\n j.this.cZv().uvj.reset();\n j.this.cZv().uvj.dcX();\n j.this.cZv().uvj.show();\n AppMethodBeat.o(7652);\n return;\n }\n break;\n case 33:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(14), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n jVar3 = j.this;\n jVar3.cZv().uhz.bJ(\"sendAppMessage\", true);\n dVar2 = jVar3.cZv().uhz;\n if (dVar2.ready) {\n dVar2.uFo.evaluateJavascript(\"javascript:WeixinJSBridge._handleMessageFromWeixin(\" + i.a.b(\"menu:share:appmessage\", new HashMap(), dVar2.uFv, dVar2.uFw) + \")\", null);\n try {\n dVar2.icy.L(\"scene\", \"facebook\", dVar2.uqj);\n AppMethodBeat.o(7652);\n return;\n } catch (Exception e42222) {\n ab.w(\"MicroMsg.JsApiHandler\", \"jsapiBundlePutString, ex = \" + e42222.getMessage());\n AppMethodBeat.o(7652);\n return;\n }\n }\n ab.e(\"MicroMsg.JsApiHandler\", \"onShareFaceBook fail, not ready\");\n AppMethodBeat.o(7652);\n return;\n case 34:\n jVar3 = j.this;\n ab.i(\"MicroMsg.WebViewMenuHelper\", \"JumpToReadArticle\");\n if (jVar3.cZv().uhz != null) {\n dVar2 = jVar3.cZv().uhz;\n if (dVar2.ready) {\n ab.i(\"MicroMsg.JsApiHandler\", \"onArticleReadBtnClicked\");\n al.d(new AnonymousClass19(i.a.b(\"onArticleReadingBtnClicked\", new HashMap(), dVar2.uFv, dVar2.uFw)));\n } else {\n ab.e(\"MicroMsg.JsApiHandler\", \"onArticleReadBtnClicked fail, not ready\");\n AppMethodBeat.o(7652);\n return;\n }\n }\n AppMethodBeat.o(7652);\n return;\n case 35:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(33), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n j.this.cZv().uie.nT(false);\n AppMethodBeat.o(7652);\n return;\n case 36:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(34), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n j.this.cZv().uie.nT(true);\n AppMethodBeat.o(7652);\n return;\n case com.tencent.mm.plugin.appbrand.jsapi.e.g.CTRL_INDEX /*37*/:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(35), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n j.a(j.this);\n AppMethodBeat.o(7652);\n return;\n case 38:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(36), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n j.b(j.this, 1);\n AppMethodBeat.o(7652);\n return;\n case 39:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(37), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n j.b(j.this, 0);\n AppMethodBeat.o(7652);\n return;\n default:\n cYc2 = j.this.cZv().ulI.cYc();\n cYc2.une = new Object[]{j.this.cZv().cOG, Integer.valueOf(16), Integer.valueOf(1)};\n cYc2.b(j.this.cZv().icy);\n stringExtra3 = menuItem.getTitle();\n if (!bo.isNullOrNil(stringExtra3)) {\n try {\n bundle = new Bundle();\n bundle.putString(\"data\", stringExtra3);\n bundle = j.this.cZv().icy.g(50, bundle);\n if (bundle != null) {\n i2 = bundle.getInt(\"key_biz_type\") == 2 ? 1 : 0;\n try {\n if (bundle.getInt(\"key_biz_type\") == 3) {\n i3 = 1;\n } else {\n i3 = 0;\n }\n } catch (RemoteException e6) {\n e = e6;\n }\n } else {\n i3 = 0;\n }\n } catch (RemoteException e7) {\n e = e7;\n i2 = 0;\n ab.printErrStackTrace(\"MicroMsg.WebViewMenuHelper\", e, \"\", new Object[0]);\n i3 = i2;\n if (i3 != 0) {\n }\n }\n if (i3 != 0) {\n jVar3 = j.this;\n jVar3.cZv().uhz.bJ(\"sendAppMessage\", false);\n dVar2 = jVar3.cZv().uhz;\n if (dVar2.ready) {\n HashMap hashMap2 = new HashMap();\n hashMap2.put(\"scene\", \"connector\");\n dVar2.uFo.evaluateJavascript(\"javascript:WeixinJSBridge._handleMessageFromWeixin(\" + i.a.b(\"menu:share:appmessage\", hashMap2, dVar2.uFv, dVar2.uFw) + \")\", null);\n try {\n dVar2.icy.L(\"connector_local_send\", stringExtra3, dVar2.uqj);\n dVar2.icy.L(\"scene\", \"connector\", dVar2.uqj);\n AppMethodBeat.o(7652);\n return;\n } catch (Exception e422222) {\n ab.w(\"MicroMsg.JsApiHandler\", \"jsapiBundlePutString, ex = \" + e422222.getMessage());\n break;\n }\n }\n ab.e(\"MicroMsg.JsApiHandler\", \"onSendToConnector fail, not ready\");\n AppMethodBeat.o(7652);\n return;\n }\n j.this.afF(stringExtra3);\n AppMethodBeat.o(7652);\n return;\n }\n break;\n }\n AppMethodBeat.o(7652);\n }",
"private void addMenu(){\n //Where the GUI is created:\n \n Menu menu = new Menu(\"Menu\");\n MenuItem menuItem1 = new MenuItem(\"Lista de Libros\");\n MenuItem menuItem2 = new MenuItem(\"Nuevo\");\n\n menu.getItems().add(menuItem1);\n menu.getItems().add(menuItem2);\n \n menuItem1.setOnAction(new EventHandler<ActionEvent>() { \n @Override\n public void handle(ActionEvent event) {\n gridPane.getChildren().clear();\n cargarListaGeneradores( 2, biblioteca.getBiblioteca());\n }\n });\n \n menuItem2.setOnAction(new EventHandler<ActionEvent>() { \n @Override\n public void handle(ActionEvent event) {\n gridPane.getChildren().clear();\n addUIControls() ;\n }\n });\n \n menuBar.getMenus().add(menu);\n }",
"public synchronized void clkSubmenu(String subMenu) {\n\t\ttry {\n\t\t\tWebActionUtil.waitForElement(clkSubMenu(subMenu), \"Submenu\", 30);\n\t\t\tWebActionUtil.clickOnWebElement(clkSubMenu(subMenu), \"submenu\", \"Unable to click sub menu\");\n\t\t}\n\t\t catch (Exception e) \n\t\t{\n\t\t\t WebActionUtil.error(e.getMessage());\n\t\t\tWebActionUtil.error(\"Unable to click sub Menu\");\n\t\t\tAssert.fail(\"Unable to click sub Menu\");\n\t\t}\n\t}",
"private void callSubMenu() {\n new SubMenu().display();\n }",
"public void InitializeMenu(){\n\t\tmnbBar = new JMenuBar();\n\t\tmnuFile = new JMenu(\"File\");\n\t\tmnuFormat = new JMenu(\"Format\");\n\t\tmniOpen = new JMenuItem(\"Open\");\n\t\tmniExit = new JMenuItem(\"Exit\");\n\t\tmniSave = new JMenuItem(\"Save\");\n\t\tmniSaveAs = new JMenuItem(\"Save as\");\n\t\tmniSaveAs.setMnemonic(KeyEvent.VK_A);\n\t\tmniSave.setMnemonic(KeyEvent.VK_S);\n\t\tmniChangeBgColor = new JMenuItem(\"Change Backgroud Color\");\n\t\tmniChangeFontColor = new JMenuItem(\"Change Font Color\");\n\t\t//them menu item vao menu file\n\t\tmnuFile.add(mniOpen);\n\t\tmnuFile.addSeparator();\n\t\tmnuFile.add(mniExit);\n\t\tmnuFile.add(mniSaveAs);\n\t\tmnuFile.add(mniSave);\n\t\t//them menu item vao menu format\n\t\tmnuFormat.add(mniChangeBgColor);\n\t\tmnuFormat.addSeparator();\n\t\tmnuFormat.add(mniChangeFontColor);\n\t\t//them menu file va menu format vao menu bar\n\t\tmnbBar.add(mnuFile);\n\t\tmnbBar.add(mnuFormat);\n\t\t//thiet lap menubar thanh menu chinh cua frame\n\t\tsetJMenuBar(mnbBar);\n\t}",
"private void initializeMenu(){\n\t\troot = new TreeField(new TreeFieldCallback() {\n\t\t\t\n\t\t\tpublic void drawTreeItem(TreeField treeField, Graphics graphics, int node,\n\t\t\t\t\tint y, int width, int indent) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tString text = treeField.getCookie(node).toString(); \n\t graphics.drawText(text, indent, y);\n\t\t\t}\n\t\t}, Field.FOCUSABLE){\n\t\t\tprotected boolean navigationClick(int status, int time) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif(!isAnimating()){\n\t\t\t\t\tMenuModel menu = (MenuModel) root.getCookie(root.getCurrentNode());\n\t\t\t\t\tif(menu.isChild()){\n\t\t\t\t\t\tonMenuSelected(menu);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\treturn super.navigationClick(status, time);\n\t\t\t}\n\t\t\t\n\t\t\tprotected boolean keyDown(int keycode, int time) {\n\t\t\t\tif(!isAnimating()){\n\t\t\t\t\tif(keycode == 655360){\n\t\t\t\t\t\tMenuModel menu = (MenuModel) root.getCookie(root.getCurrentNode());\n\t\t\t\t\t\tif(menu.isChild()){\n\t\t\t\t\t\t\tonMenuSelected(menu);\n\t\t\t\t\t\t\treturn true;\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\treturn super.keyDown(keycode, time);\n\t\t\t}\n\t\t};\n\t\troot.setDefaultExpanded(false);\n\n\t\t//home\n\t\tMenuModel home = new MenuModel(\"Home\", MenuModel.HOME, true);\n\t\thome.setId(root.addChildNode(0, home));\n\t\t\n\t\tint lastRootChildId = home.getId();\n\t\t\n\t\t//menu tree\n\t\tif(Singleton.getInstance().getMenuTree() != null){\n\t\t\tJSONArray menuTree = Singleton.getInstance().getMenuTree();\n\t\t\tif(menuTree.length() > 0){\n\t\t\t\tfor (int i = 0; i < menuTree.length(); i++) {\n\t\t\t\t\tif(!menuTree.isNull(i)){\n\t\t\t\t\t\tJSONObject node;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tnode = menuTree.getJSONObject(i);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//root menu tree (pria, wanita)\n\t\t\t\t\t\t\tboolean isChild = false;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString name = node.getString(\"name\");\n\t\t\t\t\t\t\tString url = node.getString(\"url\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tMenuModel treeNode = new MenuModel(\n\t\t\t\t\t\t\t\t\tname, url, MenuModel.JSON_TREE_NODE, isChild);\n\t\t\t\t\t\t\ttreeNode.setId(root.addSiblingNode(lastRootChildId, treeNode));\n\t\t\t\t\t\t\tlastRootChildId = treeNode.getId();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tif(!node.isNull(\"child\")){\n\t\t\t\t\t\t\t\t\tJSONArray childNodes = node.getJSONArray(\"child\");\n\t\t\t\t\t\t\t\t\tif(childNodes.length() > 0){\n\t\t\t\t\t\t\t\t\t\tfor (int j = childNodes.length() - 1; j >= 0; j--) {\n\t\t\t\t\t\t\t\t\t\t\tif(!childNodes.isNull(j)){\n\t\t\t\t\t\t\t\t\t\t\t\taddChildNode(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttreeNode.getId(), \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tchildNodes.getJSONObject(j));\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}\t\t\t\t\t\t\t\t\t\n\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\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (JSONException 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}\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\tif(Singleton.getInstance().getIsLogin()){\n\t\t\t//akun saya\n\t\t\tMenuModel myAccount = new MenuModel(\"Akun Saya\", MenuModel.MY_ACCOUNT, false);\n\t\t\tmyAccount.setId(root.addSiblingNode(lastRootChildId, myAccount));\n\t\t\t\n\t\t\tlastRootChildId = myAccount.getId();\n\t\t\t\n\t\t\t//akun saya->detail akun\n\t\t\tMenuModel profile = new MenuModel(\"Detail Akun\", MenuModel.PROFILE, true);\n\t\t\tprofile.setId(root.addChildNode(myAccount.getId(), profile));\n\t\t\t\n\t\t\t//akun saya->daftar pesanan\n\t\t\tMenuModel myOrderList = new MenuModel(\n\t\t\t\t\t\"Daftar Pesanan\", MenuModel.MY_ORDER, true);\n\t\t\tmyOrderList.setId(root.addSiblingNode(profile.getId(), myOrderList));\t\t\n\t\t\t\n\t\t\t//logout\n\t\t\tMenuModel logout = new MenuModel(\"Logout\", MenuModel.LOGOUT, true);\n\t\t\tlogout.setId(root.addSiblingNode(lastRootChildId, logout));\n\t\t\tlastRootChildId = logout.getId();\n\t\t} else{\n\t\t\t//login\n\t\t\tMenuModel login = new MenuModel(\"Login\", MenuModel.LOGIN, false);\n\t\t\tlogin.setId(root.addSiblingNode(lastRootChildId, login));\n\t\t\t\n\t\t\tlastRootChildId = login.getId();\n\t\t\t\n\t\t\t//login->login\n\t\t\tMenuModel loginMenu = new MenuModel(\"Login\", MenuModel.LOGIN_MENU, true);\n\t\t\tloginMenu.setId(root.addChildNode(login.getId(), loginMenu));\n\t\t\t\n\t\t\t//login->register\n\t\t\tMenuModel register = new MenuModel(\"Register\", MenuModel.REGISTER, true);\n\t\t\tregister.setId(root.addSiblingNode(loginMenu.getId(), register));\n\t\t}\n\t\t\n\t\tMenuUserModel menu = Singleton.getInstance().getMenu();\n\t\tif(menu != null){\n\t\t\t//sales\n\t\t\tif(menu.getMenuSalesOrder() || menu.isMenuSalesRetur()){\n\t\t\t\tMenuModel sales = new MenuModel(\"Sales\", MenuModel.SALES, false);\n\t\t\t\tsales.setId(root.addSiblingNode(lastRootChildId, sales));\n\t\t\t\tlastRootChildId = sales.getId();\n\t\t\t\t\n\t\t\t\t//sales retur\n\t\t\t\tif(menu.isMenuSalesRetur()){\n\t\t\t\t\tMenuModel salesRetur = new MenuModel(\n\t\t\t\t\t\t\t\"Sales Retur\", MenuModel.SALES_RETUR, true);\n\t\t\t\t\tsalesRetur.setId(root.addChildNode(sales.getId(), salesRetur));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//sales order\n\t\t\t\tif(menu.getMenuSalesOrder()){\n\t\t\t\t\tMenuModel salesOrder = new MenuModel(\n\t\t\t\t\t\t\t\"Sales Order\", MenuModel.SALES_ORDER, true);\n\t\t\t\t\tsalesOrder.setId(root.addChildNode(sales.getId(), salesOrder));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//cms product\n\t\t\tif(menu.getMenuCmsProduct() || menu.getMenuCmsProductGrosir()){\n\t\t\t\tMenuModel cmsProduct = new MenuModel(\n\t\t\t\t\t\t\"Produk\", MenuModel.CMS_PRODUCT, false);\n\t\t\t\tcmsProduct.setId(\n\t\t\t\t\t\troot.addSiblingNode(lastRootChildId, cmsProduct));\n\t\t\t\tlastRootChildId = cmsProduct.getId();\n\t\t\t\t\n\t\t\t\t//product retail\n\t\t\t\tif(menu.getMenuCmsProduct()){\n\t\t\t\t\tMenuModel productRetail = new MenuModel(\n\t\t\t\t\t\t\t\"Produk Retail\", MenuModel.CMS_PRODUCT_RETAIL, true);\n\t\t\t\t\tproductRetail.setId(\n\t\t\t\t\t\t\troot.addChildNode(cmsProduct.getId(), productRetail));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//product grosir\n\t\t\t\tif(menu.getMenuCmsProductGrosir()){\n\t\t\t\t\tMenuModel productGrosir = new MenuModel(\n\t\t\t\t\t\t\t\"Produk Grosir\", MenuModel.CMS_PRODUCT_GROSIR, true);\n\t\t\t\t\tproductGrosir.setId(\n\t\t\t\t\t\t\troot.addChildNode(cmsProduct.getId(), productGrosir));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\t//service\n\t\tMenuModel service = new MenuModel(\"Layanan\", MenuModel.SERVICE, false);\n\t\tservice.setId(root.addSiblingNode(lastRootChildId, service));\n\t\tlastRootChildId = service.getId();\n\t\tVector serviceList = Singleton.getInstance().getServices();\n\t\ttry {\n\t\t\tfor (int i = serviceList.size() -1; i >= 0; i--) {\n\t\t\t\tMenuFooterModel footer = (MenuFooterModel) serviceList.elementAt(i);\n\t\t\t\tMenuModel serviceMenu = new MenuModel(\n\t\t\t\t\t\tfooter.getCatTitle(), footer.getCatTautan(),\n\t\t\t\t\t\tMenuModel.SERVICE_MENU, true);\n\t\t\t\tserviceMenu.setId(root.addChildNode(service.getId(), serviceMenu));\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\n\t\t}\n\t\t\n\t\t//about\n\t\tMenuModel about = new MenuModel(\"Tentang Y2\", MenuModel.ABOUT, false);\n\t\tabout.setId(root.addSiblingNode(service.getId(), about));\n\t\tlastRootChildId = service.getId();\n\t\tVector aboutList = Singleton.getInstance().getAbouts();\n\t\ttry {\n\t\t\tfor (int i = aboutList.size() -1; i >= 0; i--) {\n\t\t\t\tMenuFooterModel footer = (MenuFooterModel) aboutList.elementAt(i);\n\t\t\t\tMenuModel aboutMenu = new MenuModel(\n\t\t\t\t\t\tfooter.getCatTitle(), footer.getCatTautan(), \n\t\t\t\t\t\tMenuModel.SERVICE_MENU, true);\n\t\t\t\taboutMenu.setId(root.addChildNode(service.getId(), aboutMenu));\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\t\n\t\tcontainer.add(root);\n\t}",
"public ItemMenu() {\n super(null, null);\n }",
"private void updateMenuItems()\r\n\t {\r\n\t\t setListAdapter(new ArrayAdapter<String>(this,\r\n\t\t android.R.layout.simple_list_item_1, home_menu));\r\n\t\t \t \r\n\t }",
"public boolean onPrepareOptionsMenu(Menu menu) {\n try {\n super.onPrepareOptionsMenu (menu);\n int maxLength = 11;\n int numOfItemsToRemove = maxLength - GlobalVariables.namesCity.length;\n while (numOfItemsToRemove > 0) {\n menu.getItem (maxLength - 1).setVisible (false);\n numOfItemsToRemove--;\n maxLength--;\n }\n } catch (Exception e) {\n Log.e (e.toString (), \"On Prepare Method Exception\");\n }\n return true;\n }",
"public void viewMenu() {\n\t\ttry {\n\t\t\tFileInputStream fis = new FileInputStream(\"menuData\");\n\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\n\n\t\t\tmm.clear();\n\n\t\t\tmm = (ArrayList<AlacarteMenu>) ois.readObject();\n\n\t\t\tString leftAlignFormat = \"| %-10s | %-37s | %-5s | %-12s | %n\";\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\tSystem.out.format(\"| Menu ID | Description | Price | Type |%n\");\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\t\n\t\t\t\n\t\t\tCollections.sort(mm); \n\t\t\tfor (AlacarteMenu item : mm) {\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t\n\t\t\t\tSystem.out.format(leftAlignFormat, item.getMenuName(), item.getMenuDesc(), item.getMenuPrice(),\n\t\t\t\t\t\titem.getMenuType());\n\t\t\t}\n\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\tois.close();\n\t\t\tfis.close();\n\t\t} catch (IOException e) {\n\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\tSystem.out.format(\"| Menu ID | Description | Price | Type |%n\");\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\t//System.out.println(\"No menu items found!\");\n\t\t\treturn;\n\t\t} catch (ClassNotFoundException c) {\n\t\t\tc.printStackTrace();\n\t\t\treturn;\n\t\t}\n\t}",
"@Override\n public List<WebElement> getSubMenu() {\n\n final List<WebElement> subMenus = DriverConfig.getDriver().findElements(\n By.xpath(\"//*[@id='submenu']/a\"));\n if (subMenus != null) {\n for (final WebElement webElement : subMenus) {\n DriverConfig.setLogString(\"SubMenu :\" + webElement.getText(), true);\n }\n }\n return subMenus;\n }",
"public void populateMenuFields(){\n\t\t\t\n\t\t\tif (restaurant.getMenu().getItems().size()!=0)\n\t\t\t{\n\t\t\t\tfor(int i=0;i<restaurant.getMenu().getItems().size();i++)\n\t\t\t\t{\n\t\t\t\t\tlistOfItemNames.add(restaurant.getMenu().getItemAt(i).getItemName());\n\t\t\t\t\tlistOfDescription.add(restaurant.getMenu().getItemAt(i).getItemDescription());\n\t\t\t\t\tlistOfPrice.add(restaurant.getMenu().getItemAt(i).getItemPrice()+\"\");\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"@Override\n\tpublic Integer alterMenuInfo(Menu menu) {\n\t\treturn this.menuDao.alterMenuInfo(menu);\n\t}",
"private JMenu brugerMenuSetup() {\n JMenu brugerMenu = generalMenuSetup(\"Bruger\");\n JMenuItem logUdItem = new JMenuItem(\"Log ud\");\n brugerMenu.add(logUdItem);\n logUdItem.addActionListener(\n e -> System.exit(0)\n );\n JMenuItem minListeItem = new JMenuItem(\"Min liste\");\n brugerMenu.add(minListeItem);\n\n return brugerMenu;\n }",
"public void buildMenu() {\n\t\tthis.Menu = new uPanel(this.layer, 0, 0, (int) (this.getWidth() * 2), (int) (this.getHeight() * 3)) {\r\n\t\t\t@Override\r\n\t\t\tpublic boolean handleEvent(uEvent event) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick() {\r\n\t\t\t\tsuper.onClick();\r\n\t\t\t\tthis.space.sortLayer(this.layer);\r\n\t\t\t\tthis.castEvent(\"MENUPANEL_CLICK\");\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.screen.addPrehide(this.Menu);\r\n\r\n\t\tthis.Node.addChild(this.Menu.getNode());\r\n\r\n\t}",
"private void setUpMenu() {\n resideMenu = new ResideMenu(this);\n resideMenu.setBackground(R.drawable.menu_background);\n resideMenu.attachToActivity(this);\n\n //resideMenu.setMenuListener(menuListener);\n //scaling activity slide ke menu\n resideMenu.setScaleValue(0.7f);\n\n itemHome = new ResideMenuItem(this, R.drawable.ic_home, \"Home\");\n itemProfile = new ResideMenuItem(this, R.drawable.ic_profile, \"Profile\");\n //itemCalendar = new ResideMenuItem(this, R.drawable.ic_calendar, \"Calendar\");\n itemSchedule = new ResideMenuItem(this, R.drawable.ic_schedule, \"Schedule\");\n //itemExams = new ResideMenuItem(this, R.drawable.ic_exams, \"Exams\");\n //itemSettings = new ResideMenuItem(this, R.drawable.ic_setting, \"Settings\");\n //itemChat = new ResideMenuItem(this, R.drawable.ic_chat, \"Chat\");\n //itemTask = new ResideMenuItem(this, R.drawable.ic_task, \"Task\");\n\n\n resideMenu.addMenuItem(itemHome, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemProfile, ResideMenu.DIRECTION_LEFT);\n // resideMenu.addMenuItem(itemCalendar, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemSchedule, ResideMenu.DIRECTION_LEFT);\n //resideMenu.addMenuItem(itemExams, ResideMenu.DIRECTION_LEFT);\n //resideMenu.addMenuItem(itemTask, ResideMenu.DIRECTION_LEFT);\n //resideMenu.addMenuItem(itemChat, ResideMenu.DIRECTION_LEFT);\n //resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_LEFT);\n\n // matikan slide ke kanan\n resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n itemHome.setOnClickListener(this);\n itemSchedule.setOnClickListener(this);\n itemProfile.setOnClickListener(this);\n //itemSettings.setOnClickListener(this);\n\n\n }",
"private void buildGameMenu() {\r\n gameMenu = new JMenu( Msgs.str( \"Game\" ) );\r\n\r\n tinyFieldItem = new JMenuItem( Msgs.str( \"field.xs\" ) + FIELD_SIZE_XS + Msgs.str( \"sqr_side\" ) );\r\n ks = KeyStroke.getKeyStroke( KeyEvent.VK_T, Event.ALT_MASK );\r\n tinyFieldItem.setAccelerator( ks );\r\n tinyFieldItem.setMnemonic( 'T' );\r\n tinyFieldItem.addActionListener( listener );\r\n\r\n smallFieldItem = new JMenuItem( Msgs.str( \"field.sm\" ) + FIELD_SIZE_SM + Msgs.str( \"sqr_side\" ) );\r\n ks = KeyStroke.getKeyStroke( KeyEvent.VK_S, Event.ALT_MASK );\r\n smallFieldItem.setAccelerator( ks );\r\n smallFieldItem.setMnemonic( 'S' );\r\n smallFieldItem.addActionListener( listener );\r\n\r\n medFieldItem = new JMenuItem( Msgs.str( \"field.md\" ) + FIELD_SIZE_MD + Msgs.str( \"sqr_side\" ) );\r\n ks = KeyStroke.getKeyStroke( KeyEvent.VK_M, Event.ALT_MASK );\r\n medFieldItem.setAccelerator( ks );\r\n medFieldItem.setMnemonic( 'M' );\r\n medFieldItem.addActionListener( listener );\r\n\r\n largeFieldItem = new JMenuItem( Msgs.str( \"field.lg\" ) + FIELD_SIZE_LG + Msgs.str( \"sqr_side\" ) );\r\n ks = KeyStroke.getKeyStroke( KeyEvent.VK_L, Event.ALT_MASK );\r\n largeFieldItem.setAccelerator( ks );\r\n largeFieldItem.setMnemonic( 'L' );\r\n largeFieldItem.addActionListener( listener );\r\n\r\n hugeFieldItem = new JMenuItem( Msgs.str( \"field.xl\" ) + FIELD_SIZE_XL + Msgs.str( \"sqr_side\" ) );\r\n ks = KeyStroke.getKeyStroke( KeyEvent.VK_H, Event.ALT_MASK );\r\n hugeFieldItem.setAccelerator( ks );\r\n hugeFieldItem.setMnemonic( 'H' );\r\n hugeFieldItem.addActionListener( listener );\r\n\r\n exitGameItem = new JMenuItem( Msgs.str( \"Exit\" ) );\r\n ks = KeyStroke.getKeyStroke( KeyEvent.VK_X, Event.ALT_MASK );\r\n exitGameItem.setAccelerator( ks );\r\n exitGameItem.setMnemonic( 'X' );\r\n exitGameItem.addActionListener( listener );\r\n\r\n gameMenu.add( tinyFieldItem );\r\n gameMenu.add( smallFieldItem );\r\n gameMenu.add( medFieldItem );\r\n gameMenu.add( largeFieldItem );\r\n gameMenu.add( hugeFieldItem );\r\n gameMenu.addSeparator();\r\n gameMenu.add( exitGameItem );\r\n }",
"public Menu getMenu() { return this.menu; }",
"private void buildMenu() {\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n\n JMenu fileMenu = new JMenu(\"File\");\n fileMenu.addMenuListener(this);\n\n JMenuItem openItem = new JMenuItem(\"Open\");\n openItem.setEnabled(false);\n JMenuItem newItem = new JMenuItem(\"New\");\n newItem.setEnabled(false);\n saveItem = new JMenuItem(\"Save\");\n saveItem.setEnabled(false);\n saveAsItem = new JMenuItem(\"Save As\");\n saveAsItem.setEnabled(false);\n reloadCalItem = new JMenuItem(RELOAD_CAL);\n exitItem = new JMenuItem(EXIT);\n\n mbar.add(makeMenu(fileMenu, new Object[]{newItem, openItem, null,\n reloadCalItem, null,\n saveItem, saveAsItem, null, exitItem}, this));\n\n JMenu viewMenu = new JMenu(\"View\");\n mbar.add(viewMenu);\n JMenuItem columnItem = new JMenuItem(COLUMNS);\n columnItem.addActionListener(this);\n JMenuItem logItem = new JMenuItem(LOG);\n logItem.addActionListener(this);\n JMenu satMenu = new JMenu(\"Satellite Image\");\n JMenuItem irItem = new JMenuItem(INFRA_RED);\n irItem.addActionListener(this);\n JMenuItem wvItem = new JMenuItem(WATER_VAPOUR);\n wvItem.addActionListener(this);\n satMenu.add(irItem);\n satMenu.add(wvItem);\n viewMenu.add(columnItem);\n viewMenu.add(logItem);\n viewMenu.add(satMenu);\n\n observability = new JCheckBoxMenuItem(\"Observability\", true);\n observability.setToolTipText(\"Check that the source is observable.\");\n remaining = new JCheckBoxMenuItem(\"Remaining\", true);\n remaining.setToolTipText(\n \"Check that the MSB has repeats remaining to be observed.\");\n allocation = new JCheckBoxMenuItem(\"Allocation\", true);\n allocation.setToolTipText(\n \"Check that the project still has sufficient time allocated.\");\n\n String ZOA = System.getProperty(\"ZOA\", \"true\");\n boolean tickZOA = true;\n if (\"false\".equalsIgnoreCase(ZOA)) {\n tickZOA = false;\n }\n\n zoneOfAvoidance = new JCheckBoxMenuItem(\"Zone of Avoidance\", tickZOA);\n localQuerytool.setZoneOfAvoidanceConstraint(!tickZOA);\n\n disableAll = new JCheckBoxMenuItem(\"Disable All\", false);\n JMenuItem cutItem = new JMenuItem(\"Cut\",\n new ImageIcon(ClassLoader.getSystemResource(\"cut.gif\")));\n cutItem.setEnabled(false);\n JMenuItem copyItem = new JMenuItem(\"Copy\",\n new ImageIcon(ClassLoader.getSystemResource(\"copy.gif\")));\n copyItem.setEnabled(false);\n JMenuItem pasteItem = new JMenuItem(\"Paste\",\n new ImageIcon(ClassLoader.getSystemResource(\"paste.gif\")));\n pasteItem.setEnabled(false);\n\n mbar.add(makeMenu(\"Edit\",\n new Object[]{\n cutItem,\n copyItem,\n pasteItem,\n null,\n makeMenu(\"Constraints\", new Object[]{observability,\n remaining, allocation, zoneOfAvoidance, null,\n disableAll}, this)}, this));\n\n mbar.add(SampClient.getInstance().buildMenu(this, sorter, table));\n\n JMenu helpMenu = new JMenu(\"Help\");\n helpMenu.setMnemonic('H');\n\n mbar.add(makeMenu(helpMenu, new Object[]{new JMenuItem(INDEX, 'I'),\n new JMenuItem(ABOUT, 'A')}, this));\n\n menuBuilt = true;\n }",
"public void createItemListPopupMenu() {\n\n\t\tremoveAll();\n\t\tadd(addMenuItem);\n\t\tadd(editMenuItem);\n\t\tadd(deleteMenuItem);\n\t\tadd(moveUpMenuItem);\n\t\tadd(moveDownMenuItem);\n\t\taddSeparator();\n\t\tadd(midiLearnMenuItem);\n\t\tadd(midiUnlearnMenuItem);\n\t\taddSeparator();\n\t\tadd(sendMidiMenuItem);\n\t}",
"public static void afficherMenu() {\r\n System.out.println(\"\\n## Menu de l'application ##\\n\" +\r\n \" Actions Membres :\\n\"+\r\n \" [ 1] : Inscription d'un Membre\\n\" +\r\n \" [ 2] : Désinscription d'un Membre\\n\" +\r\n \" ( 3) : Afficher liste des Membres\\n\" +\r\n \" [ 4] : Payer Cotisation\\n\" +\r\n \" Actions vote Arbres d'un Membre :\\n\" +\r\n \" ( 5) : Voter pour un Arbre\\n\" +\r\n \" ( 6) : Afficher liste des votes\\n\" +\r\n \" ( 7) : Retirer un vote\\n\" +\r\n \" ( 8) : Supprimer les votes d'un Membre.\\n\" +\r\n \" ( 9) : Remplacer un vote\\n\" +\r\n \" Actions Arbres :\\n\" +\r\n \" (10) : Afficher la liste des Arbres\\n\" +\r\n // ...\r\n \" Actions Administration :\\n\" +\r\n \" (11) : Nommer nouveau Président\\n\" +\r\n // ...\r\n \"\\n ( 0) : Quitter l'application\\n\" +\r\n \" - Veuillez saisir une action. -\");\r\n }",
"@Test\n\tpublic void addMenuTest() throws Exception {\n\t\tif (Configuration.shufflerepeat &&\n\t\tConfiguration.featureamp&&\n\t\tConfiguration.playengine&&\n\t\tConfiguration.choosefile&&\n\t\tConfiguration.gui&&\n\t\tConfiguration.skins&&\n\t\tConfiguration.light\n\t\t) {\t\n\t\t\tstart();\n\t\t\tgui.addMenu();\n\t\t\tJMenu menu = (JMenu) MemberModifier.field(Application.class, \"menu\").get(gui);\n\t\t\tassertNotNull(menu);\n\n\t\t}\n\t}",
"public void initializeMenuItems() {\n\t\tuserMenuButton = new MenuButton();\n\t\tmenu1 = new MenuItem(bundle.getString(\"mVmenu1\")); //\n\t\tmenu2 = new MenuItem(bundle.getString(\"mVmenu2\")); //\n\t}",
"protected void addMenuItems(JPopupMenu menu, ActionListener listener) {\r\n JMenuItem menuItem;\r\n menuItem = new JMenuItem(\"Store cluster\", GUIFactory.getIcon(\"new16.gif\"));\r\n menuItem.setActionCommand(STORE_CLUSTER_CMD);\r\n menuItem.addActionListener(listener);\r\n menu.add(menuItem);\r\n \r\n menu.addSeparator();\r\n \r\n menuItem = new JMenuItem(\"Launch new session\", GUIFactory.getIcon(\"launch_new_mav.gif\"));\r\n menuItem.setActionCommand(LAUNCH_NEW_SESSION_CMD);\r\n menuItem.addActionListener(listener);\r\n menu.add(menuItem); \r\n \r\n menu.addSeparator();\r\n \r\n menuItem = new JMenuItem(\"Delete public cluster\", GUIFactory.getIcon(\"delete16.gif\"));\r\n menuItem.setActionCommand(SET_DEF_COLOR_CMD);\r\n menuItem.addActionListener(listener);\r\n menu.add(menuItem);\r\n \r\n menu.addSeparator();\r\n \r\n menuItem = new JMenuItem(\"Save cluster...\", GUIFactory.getIcon(\"save16.gif\"));\r\n menuItem.setActionCommand(SAVE_CLUSTER_CMD);\r\n menuItem.addActionListener(listener);\r\n menu.add(menuItem);\r\n \r\n menuItem = new JMenuItem(\"Save all clusters...\", GUIFactory.getIcon(\"save16.gif\"));\r\n menuItem.setActionCommand(SAVE_ALL_CLUSTERS_CMD);\r\n menuItem.addActionListener(listener);\r\n menu.add(menuItem);\r\n \r\n menu.addSeparator();\r\n \r\n setOverallMaxMenuItem = new JMenuItem(\"Set Y to overall max...\", GUIFactory.getIcon(\"Y_range_expand.gif\"));\r\n setOverallMaxMenuItem.setActionCommand(SET_Y_TO_EXPERIMENT_MAX_CMD);\r\n setOverallMaxMenuItem.addActionListener(listener);\r\n setOverallMaxMenuItem.setEnabled(false);\r\n menu.add(setOverallMaxMenuItem);\r\n \r\n setClusterMaxMenuItem = new JMenuItem(\"Set Y to cluster max...\", GUIFactory.getIcon(\"Y_range_expand.gif\"));\r\n setClusterMaxMenuItem.setActionCommand(SET_Y_TO_CLUSTER_MAX_CMD);\r\n setClusterMaxMenuItem.addActionListener(listener);\r\n menu.add(setClusterMaxMenuItem);\r\n\r\n menuItem = new JMenuItem(\"Toggle reference line...\");\r\n menuItem.setActionCommand(TOGGLE_REF_LINE_CMD);\r\n menuItem.addActionListener(listener);\r\n menu.add(menuItem);\r\n \r\n menu.addSeparator();\r\n \r\n menuItem = new JMenuItem(\"Broadcast Matrix to Gaggle\", GUIFactory.getIcon(\"gaggle_icon_16.gif\"));\r\n menuItem.setActionCommand(BROADCAST_MATRIX_GAGGLE_CMD);\r\n menuItem.addActionListener(listener);\r\n menu.add(menuItem);\r\n \r\n menuItem = new JMenuItem(\"Broadcast Gene List to Gaggle\", GUIFactory.getIcon(\"gaggle_icon_16.gif\"));\r\n menuItem.setActionCommand(BROADCAST_NAMELIST_GAGGLE_CMD);\r\n menuItem.addActionListener(listener);\r\n menu.add(menuItem);\r\n \r\n menuItem = new JMenuItem(\"Broadcast Matrix to Genome Browser\", GUIFactory.getIcon(\"gaggle_icon_16.gif\"));\r\n menuItem.setActionCommand(BROADCAST_MATRIX_GENOME_BROWSER_CMD);\r\n menuItem.addActionListener(listener);\r\n menu.add(menuItem);\r\n \r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_more, menu);\n return true;\n }",
"public String getParentMenu();",
"Menu setMenuSectionsFromInfo(RestaurantFullInfo fullInfoOverride);",
"@Test\n public void testSetMenuFactoryAddSetMenuItem() {\n SetMenu setMenuController = setMenuFactory.getSetMenu();\n Menu menuController = menuFactory.getMenu();\n menuController.addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n ArrayList<MenuItem> menuItems = new ArrayList<>();\n menuItems.add(menuController.getMenuItem(1));\n setMenuController.addSetItem(\"Test Set\", 5.0, 1, menuItems);\n assertEquals(1, setMenuController.getSetMenu().size());\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n if (navItemIndex == 0) {\n getMenuInflater().inflate(R.menu.main, menu);\n }\n// else if (navItemIndex == 1 ){\n// getMenuInflater().inflate(R.menu.search, menu);\n// }\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu _menu) \n\t{\t\n\t\t// Hardcoded menu\n\t\t/*\n\t\t_menu.add(0, SECOND_ACTIVITY_MENU_ITEM, Menu.NONE, R.string.menuitem_second_activity);\n\t\t\n\t\tSubMenu submenu = _menu.addSubMenu(0, SUBMENU_ITEM, Menu.NONE, R.string.submenu_title);\n\t\tsubmenu.add(0, 0, Menu.NONE, R.string.submenu_item1);\n\t\tsubmenu.add(0, 0, Menu.NONE, R.string.submenu_item2);\n\t\tsubmenu.add(0, 0, Menu.NONE, R.string.submenu_item3);\n\t\tsubmenu.add(0, 0, Menu.NONE, R.string.submenu_item4);\n\t\t*/\n\t\t\n\t\t// Menu in XML file\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.menu_mainactivity, _menu);\n\t\t\n\t\treturn true;\n\t}",
"public void VerifyMainMenuItems() {\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Dashboard);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Initiatives);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_LiveMediaPlans);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_MediaPlans);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Audiences);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Offers);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_CreativeAssets);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Reports);\n\t}",
"@Test\n public void testSetMenuFactoryGetSetMenuItem() {\n SetMenu setMenuController = setMenuFactory.getSetMenu();\n Menu menuController = menuFactory.getMenu();\n menuController.addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n ArrayList<MenuItem> menuItems = new ArrayList<>();\n menuItems.add(menuController.getMenuItem(1));\n setMenuController.addSetItem(\"Test Set\", 5.0, 1, menuItems);\n assertEquals(1, setMenuController.getSetMenu().size());\n // for every menu item in set menu item, check that it is correct\n for (SetItem setMenuItem : setMenuController.getSetMenu()) {\n assertEquals(1, setMenuItem.getSetItems().size());\n assertEquals(MENU_NAME, setMenuItem.getSetItems().get(0).getName());\n assertEquals(MENU_DESCRIPTION, setMenuItem.getSetItems().get(0).getDescription());\n assertEquals(MENU_PRICE, setMenuItem.getSetItems().get(0).getPrice());\n }\n // check set price is correct\n assertEquals(5.0, setMenuController.getSetMenu().get(0).getPrice());\n // check set name is correct\n assertEquals(\"Test Set\", setMenuController.getSetMenu().get(0).getName());\n }",
"private void codigoInicial() {\r\n itemPanels = new itemPanel[5];\r\n itemPanels[0] = new itemPanel(null, null, false);\r\n itemPanels[1] = new itemPanel(null, null, false);\r\n itemPanels[2] = new itemPanel(null, null, false);\r\n itemPanels[3] = new itemPanel(null, null, false);\r\n itemPanels[4] = new itemPanel(null, null, false);\r\n\r\n setSize(1082, 662);\r\n jpaneMenu.setBackground(AtributosGUI.color_principal);\r\n setLocationRelativeTo(null);\r\n\r\n\r\n java.awt.Color color_primario = AtributosGUI.color_principal;\r\n\r\n jpanePerfil.setBackground(color_primario);\r\n jpaneHorario.setBackground(color_primario);\r\n jpaneCursos.setBackground(color_primario);\r\n jpaneTramites.setBackground(color_primario);\r\n jpaneSalud.setBackground(color_primario);\r\n jpaneMenuItems.setBackground(color_primario);\r\n\r\n jlblCursos.setFont(AtributosGUI.item_label_font);\r\n jlblHorario.setFont(AtributosGUI.item_label_font);\r\n jlblPerfil.setFont(AtributosGUI.item_label_font);\r\n jlblSalud.setFont(AtributosGUI.item_label_font);\r\n jlblTramites.setFont(AtributosGUI.item_label_font);\r\n\r\n jlblCursos.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n jlblHorario.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n jlblPerfil.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n jlblSalud.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n jlblTramites.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n\r\n jpaneActiveCursos.setBackground(AtributosGUI.item_Off_panel_active);\r\n jpaneActiveHorario.setBackground(AtributosGUI.item_Off_panel_active);\r\n jpaneActivePerfil.setBackground(AtributosGUI.item_Off_panel_active);\r\n jpaneActiveSalud.setBackground(AtributosGUI.item_Off_panel_active);\r\n jpaneActiveTramites.setBackground(AtributosGUI.item_Off_panel_active);\r\n\r\n \r\n\r\n }",
"@Override\n public void create(SwipeMenu menu) {\n SwipeMenuItem item1 = new SwipeMenuItem(\n getApplicationContext());\n item1.setBackground(new ColorDrawable(Color.DKGRAY));\n // set width of an option (px)\n item1.setWidth(200);\n item1.setTitle(\"Action 1\");\n item1.setTitleSize(18);\n item1.setTitleColor(Color.WHITE);\n menu.addMenuItem(item1);\n\n SwipeMenuItem item2 = new SwipeMenuItem(\n getApplicationContext());\n // set item background\n item2.setBackground(new ColorDrawable(Color.RED));\n item2.setWidth(200);\n item2.setTitle(\"Action 2\");\n item2.setTitleSize(18);\n item2.setTitleColor(Color.WHITE);\n menu.addMenuItem(item2);\n }",
"protected void getViewMenuItems(List items, boolean forMenuBar) {\n super.getViewMenuItems(items, forMenuBar);\n items.add(GuiUtils.MENU_SEPARATOR);\n List paramItems = new ArrayList();\n paramItems.add(GuiUtils.makeCheckboxMenuItem(\"Show Parameter Table\",\n this, \"showTable\", null));\n paramItems.add(doMakeChangeParameterMenuItem());\n List choices = getDataChoices();\n for (int i = 0; i < choices.size(); i++) {\n paramItems.addAll(getParameterMenuItems(i));\n }\n\n items.add(GuiUtils.makeMenu(\"Parameters\", paramItems));\n\n JMenu chartMenu = new JMenu(\"Chart\");\n chartMenu.add(\n GuiUtils.makeCheckboxMenuItem(\n \"Show Thumbnail in Legend\", getChart(), \"showThumb\", null));\n List chartMenuItems = new ArrayList();\n getChart().addViewMenuItems(chartMenuItems);\n GuiUtils.makeMenu(chartMenu, chartMenuItems);\n items.add(chartMenu);\n items.add(doMakeProbeMenu(new JMenu(\"Probe\")));\n\n }",
"IMenu getMainMenu();",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n if (navItemIndex == 0) {\n getMenuInflater().inflate(R.menu.add_channel, menu);\n }\n return true;\n }",
"private static String getMenu() { // method name changes Get_menu to getMenu()\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\r\n\t\tsb.append(\"\\nLibrary Main Menu\\n\\n\")\r\n\t\t .append(\" M : add member\\n\")\r\n\t\t .append(\" LM : list members\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" B : add book\\n\")\r\n\t\t .append(\" LB : list books\\n\")\r\n\t\t .append(\" FB : fix books\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" L : take out a loan\\n\")\r\n\t\t .append(\" R : return a loan\\n\")\r\n\t\t .append(\" LL : list loans\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" P : pay fine\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\" T : increment date\\n\")\r\n\t\t .append(\" Q : quit\\n\")\r\n\t\t .append(\"\\n\")\r\n\t\t .append(\"Choice : \");\r\n\t\t \r\n\t\treturn sb.toString();\r\n\t}",
"public void cargarOpcionesSubMenu() {\n\t\t\n\t\tif(esSubMenu()) {\n\t\t\tOpcionSubMenu subMenu = (OpcionSubMenu) getElementoMenuActual();\n\t\t\tsetElementosMenu(subMenu.getHijos());\n\t\t}\n\t}",
"private void createMenuChildScene() {\n\t\tmenuChildScene = new MenuScene(camera);\n\t\tmenuChildScene.setPosition(0, 0);\n\n\t\tfinal IMenuItem profile02MenuItem = new ScaleMenuItemDecorator(\n\t\t\t\tnew SpriteMenuItem(MENU_PROFILE02,\n\t\t\t\t\t\tresourcesManager.btProfile02TR, vbom), 1f, .8f);\n\t\tfinal IMenuItem profile24MenuItem = new ScaleMenuItemDecorator(\n\t\t\t\tnew SpriteMenuItem(MENU_PROFILE24,\n\t\t\t\t\t\tresourcesManager.btProfile24TR, vbom), 1f, .8f);\n\t\tfinal IMenuItem profile4MenuItem = new ScaleMenuItemDecorator(\n\t\t\t\tnew SpriteMenuItem(MENU_PROFILE4,\n\t\t\t\t\t\tresourcesManager.btProfile4TR, vbom), 1f, .8f);\n\n\t\tmenuChildScene.addMenuItem(profile02MenuItem);\n\t\tmenuChildScene.addMenuItem(profile24MenuItem);\n\t\tmenuChildScene.addMenuItem(profile4MenuItem);\n\n\t\tmenuChildScene.buildAnimations();\n\t\tmenuChildScene.setBackgroundEnabled(false);\n\n\t\tprofile02MenuItem.setPosition(150, 280);\n\t\tprofile24MenuItem.setPosition(400, 280);\n\t\tprofile4MenuItem.setPosition(650, 280);\n\n\t\tmenuChildScene.setOnMenuItemClickListener(this);\n\t\t\n\t\t//-- change language button -----------------------------------------------------------------------------\n\t\t\n\t\tchangLang = new TiledSprite(400,60, resourcesManager.btLangTR, vbom){\n\t\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\tswitch(pSceneTouchEvent.getAction()){\n\t\t\tcase TouchEvent.ACTION_DOWN:\n\t\t\t\tbreak;\n\t\t\tcase TouchEvent.ACTION_UP:\n\t\t\t\tplaySelectSound();\n\t\t\t\tif(localLanguage==0){\n\t\t\t\t\tchangeLanguage(\"UK\");\n\t\t\t\t\tthis.setCurrentTileIndex(1);\n\t\t\t\t\tlocalLanguage=1;\n\t\t\t\t}else if (localLanguage==1) {\n\t\t\t\t\tchangeLanguage(\"FR\");\n\t\t\t\t\tthis.setCurrentTileIndex(0);\n\t\t\t\t\tlocalLanguage=0;\n\t\t\t\t}\n\t\t\t\tupdateTexts();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\t\n\t\tif(localLanguage==0){\t\t\t\n\t\t\tchangLang.setCurrentTileIndex(0);\n\t\t}else{\t\t\n\t\t\tchangLang.setCurrentTileIndex(1);\n\t\t}\n\t\t\n\t\tthis.attachChild(changLang);\n\t\tthis.registerTouchArea(changLang);\n\t\t//-----------------------------------------------------------------------------------------------------\n\n\n\t\tsetChildScene(menuChildScene);\n\t}",
"private JMenuBar createMenuBar()\r\n {\r\n UIManager.put(\"Menu.selectionBackground\", new Color(0xDA,0xDD,0xED));\r\n UIManager.put(\"MenuItem.selectionForeground\", Color.LIGHT_GRAY);\r\n JMenuBar menuBar = new JMenuBar();\r\n JMenu menu = new JMenu(\"Fil\");\r\n UIManager.put(\"MenuItem.selectionBackground\", menu.getBackground());\r\n menuItemSave = new JMenuItem(\"Lagre\");\r\n UIManager.put(\"MenuItem.selectionBackground\", menuItemSave.getBackground());\r\n menuItemSave.setForeground(Color.LIGHT_GRAY);\r\n menuItemSave.setBorder(BorderFactory.createEmptyBorder());\r\n menuItemSave.setAccelerator(KeyStroke.getKeyStroke('S', Event.CTRL_MASK));\r\n menuItemSave.addActionListener(listener);\r\n menu.add(menuItemSave);\r\n menuItemPrint = new JMenuItem(\"Skriv ut\");\r\n menuItemPrint.setForeground(Color.LIGHT_GRAY);\r\n menuItemPrint.setBorder(BorderFactory.createEmptyBorder());\r\n menuItemPrint.setAccelerator(KeyStroke.getKeyStroke('P', Event.CTRL_MASK));\r\n menuItemPrint.addActionListener(listener);\r\n menu.add(menuItemPrint);\r\n menu.addSeparator();\r\n menuItemLogout = new JMenuItem(\"Logg av\");\r\n menuItemLogout.setForeground(Color.LIGHT_GRAY);\r\n menuItemLogout.setBorder(BorderFactory.createEmptyBorder());\r\n menuItemLogout.addActionListener(listener);\r\n menuItemLogout.setAccelerator(KeyStroke.getKeyStroke('L', Event.CTRL_MASK));\r\n menu.add(menuItemLogout);\r\n UIManager.put(\"MenuItem.selectionBackground\", new Color(0xDA,0xDD,0xED));\r\n UIManager.put(\"MenuItem.selectionForeground\", Color.BLACK);\r\n menuItemClose = new JMenuItem(\"Avslutt\");\r\n menuItemClose.setAccelerator(KeyStroke.getKeyStroke('A', Event.CTRL_MASK));\r\n menuItemClose.addActionListener(listener);\r\n menuBar.add(menu);\r\n menu.add(menuItemClose);\r\n JMenu menu2 = new JMenu(\"Om\");\r\n menuItemAbout = new JMenuItem(\"Om\");\r\n menuItemAbout.setAccelerator(KeyStroke.getKeyStroke('O', Event.CTRL_MASK));\r\n menuItemAbout.addActionListener(listener);\r\n menuItemAbout.setBorder(BorderFactory.createEmptyBorder());\r\n menu2.add(menuItemAbout);\r\n menuBar.add(menu2);\r\n \r\n return menuBar;\r\n }",
"public ItemMenu(JDealsController sysCtrl) {\n super(\"Item Menu\", sysCtrl);\n\n this.addItem(\"Add general good\", new Callable() {\n @Override\n public Object call() throws Exception {\n return addItem(ProductTypes.GOODS);\n }\n });\n this.addItem(\"Restourant Event\", new Callable() {\n @Override\n public Object call() throws Exception {\n return addItem(ProductTypes.RESTOURANT);\n }\n });\n this.addItem(\"Travel Event\", new Callable() {\n @Override\n public Object call() throws Exception {\n return addItem(ProductTypes.TRAVEL);\n }\n });\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n SubMenu sub = menu.addSubMenu(\"Option\");\n sub.setIcon(R.drawable.menu);\n sub.add(0, 1, 0, \"Preschool\").setIcon(R.drawable.preschool);\n sub.add(0, 2, 0, \"Primary\").setIcon(R.drawable.primary);\n sub.add(0, 3, 0, \"Secondary\").setIcon(R.drawable.secondary);\n sub.add(0, 4, 0, \"Young Adults\").setIcon(R.drawable.young_adults);\n sub.add(0, 5, 0, \"Supplementary\").setIcon(R.drawable.supplementary);\n sub.add(0, 6, 0, \"Exams\").setIcon(R.drawable.exams);\n sub.add(0, 7, 0, \"Digital\").setIcon(R.drawable.digital);\n sub.add(0, 8, 0, \"Readers\").setIcon(R.drawable.readers);\n sub.getItem().setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);\n return true;\n }",
"public void updateMenu() {\n updateMenuGroupError = true;\n if (menu.updateMenu()) {\n deleteMenuError = false;\n createMenuError = false;\n updateMenuError = true;\n } else {\n setName(menu.name);\n updateMenuError = false;\n }\n }",
"@Override\n protected void getSubMenu(final AsyncCallback<ExtendedMenuItem[]> callback) {\n GWT.runAsync(new RunAsyncCallback() {\n\t\t@Override\n\t\tpublic void onFailure(Throwable reason) {\n\t callback.onFailure(reason);\n\t\t}\n\t\t@Override\n\t\tpublic void onSuccess() {\n\t\t callback.onSuccess(new ExtendedMenuItem[] {\n\t\t\tnew ExtendedMenuItem(Icons.editorIcons.Blank(), \"Itemization\", new SystemPasteCommand(\"\\\\begin{itemize}\\n \\\\item \\n\\\\end{itemize}\")),\n\t\t\tnew ExtendedMenuItem(Icons.editorIcons.Blank(), \"Enumeration\", new SystemPasteCommand(\"\\\\begin{enumerate}\\n \\\\item \\n\\\\end{enumerate}\")),\n\t\t\tnew ExtendedMenuItem(Icons.editorIcons.Blank(), \"Description\", new SystemPasteCommand(\"\\\\begin{description}\\n \\\\item[] \\n\\\\end{description}\")),\n\t\t\tnull,\n\t\t\tnew ExtendedMenuItem(Icons.editorIcons.Blank(), \"Enumeration Entry\", new SystemPasteCommand(\"\\\\item \")),\n\t\t\tnew ExtendedMenuItem(Icons.editorIcons.Blank(), \"Description Entry\", new SystemPasteCommand(\"\\\\item[] \")),\n\t\t });\n\t\t}\n });\n }",
"@Override\n\tprotected void setMenu() {\n\t\t\n\t\tfinal ButtonGroup actionButtonGroup = new ButtonGroup();\n\t\tfor (String s : ((TreeSite) object).actions) {\n\t\t\tJRadioButton button = new JRadioButton(s);\n\t\t\tbutton.setActionCommand(s);\n\t\t\tactionButtonGroup.add(button);\n\t\t\tmenu.add(button);\n\t\t}\n\t\t\n\t\tJPanel headingPanel = new JPanel();\n\t\theadingPanel.setLayout(new BoxLayout(headingPanel, BoxLayout.LINE_AXIS));\n\t\theadingPanel.add(new JLabel(\"Heading: \"));\n\t\tfinal JTextField headingField = new JTextField();\n\t\theadingField.setText(Float.toString(INITIAL_FLOAT_VALUE));\n\t\theadingField.setColumns(10);\n\t\theadingPanel.add(headingField);\n\t\tmenu.add(headingPanel);\n\t\t\n\t\tJPanel lengthPanel = new JPanel();\n\t\tlengthPanel.setLayout(new BoxLayout(lengthPanel, BoxLayout.LINE_AXIS));\n\t\tlengthPanel.add(new JLabel(\"Length: \"));\n\t\tfinal JTextField lengthField = new JTextField();\n\t\tlengthField.setText(Integer.toString(INITIAL_INTEGER_VALUE));\n\t\tlengthField.setColumns(10);\n\t\tlengthPanel.add(lengthField);\n\t\tmenu.add(lengthPanel);\n\t\t\n\t\tJPanel counterPanel = new JPanel();\n\t\tcounterPanel.setLayout(new BoxLayout(counterPanel, BoxLayout.LINE_AXIS));\n\t\tcounterPanel.add(new JLabel(\"Counter: \"));\n\t\tfinal JTextField counterField = new JTextField();\n\t\tcounterField.setText(Integer.toString(INITIAL_INTEGER_VALUE));\n\t\tcounterField.setColumns(10);\n\t\tcounterPanel.add(counterField);\n\t\tmenu.add(counterPanel);\n\t\t\n\t\tJPanel targetPanel = new JPanel();\n\t\ttargetPanel.setLayout(new BoxLayout(targetPanel, BoxLayout.LINE_AXIS));\n\t\ttargetPanel.add(new JLabel(\"Target position: \"));\n\t\ttargetFieldX = new JTextField();\n\t\ttargetFieldX.setEditable(false);\n\t\ttargetFieldX.setText(\"\");\n\t\ttargetFieldX.setColumns(4);\n\t\ttargetFieldY = new JTextField();\n\t\ttargetFieldY.setEditable(false);\n\t\ttargetFieldY.setText(\"\");\n\t\ttargetFieldY.setColumns(4);\n\t\ttargetPanel.add(targetFieldX);\n\t\ttargetPanel.add(new JLabel(\", \"));\n\t\ttargetPanel.add(targetFieldY);\n\t\tmenu.add(targetPanel);\n\t\tmenu.add(new SetTargetPositionButton(editor).button);\n\t\t\n\t\tJButton removeTargetButton = new JButton(\"Remove Target\");\n\t\tremoveTargetButton.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttargetFieldX.setText(\"\");\n\t\t\t\ttargetFieldY.setText(\"\");\n\t\t\t\teditor.targetIcon.setVisible(false);\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tmenu.add(removeTargetButton);\n\t\t\n\t\tfinal CyclicButtonGroup cyclicButtons = new CyclicButtonGroup();\n\t\t\n\t\tJRadioButton nonCyclicButton = new JRadioButton(\"Set to non-cyclic\");\n\t\tnonCyclicButton.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttry {\n\t\t\t\t\tcyclicButtons.beginningOfCycle.data.cycleStart = false;\n\t\t\t\t\tcyclicButtons.beginningOfCycle = null;\n\t\t\t\t} catch (NullPointerException 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\tcyclicButtons.add(nonCyclicButton);\n\t\t\n\t\tfinal JButton addActionButton = new JButton(\"Add Action\");\n\t\t\n\t\tmenu.add(addActionButton);\n\t\tmenu.add(nonCyclicButton);\n\t\t\n\t\taddActionButton.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif (actionButtonGroup.getSelection() == null) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please select an action type\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tFloat headingValue = null;\n\t\t\t\tInteger lengthValue = null;\n\t\t\t\tInteger counterValue = null;\n\t\t\t\tInteger targetValueX = null;\n\t\t\t\tInteger targetValueY = null;\n\t\t\t\tboolean noTarget = false;\n\t\t\t\ttry {\n\t\t\t\t\ttargetValueX = Integer.parseInt(targetFieldX.getText());\n\t\t\t\t\ttargetValueY = Integer.parseInt(targetFieldY.getText());\n\t\t\t\t} catch (NumberFormatException nfe) {\n\t\t\t\t\tnoTarget = true;\n\t\t\t\t}\n\t\t\t\tif (headingField.getText() == null || !isValidHeading(headingField.getText())) {\n\t\t\t\t\tif (noTarget) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please enter a heading value greater than or equal to 0 and less than 360\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\theadingValue = Float.parseFloat(headingField.getText());\n\t\t\t\t}\n\t\t\t\tif (lengthField.getText() == null || !isValidLength(lengthField.getText())) {\n\t\t\t\t\tif (noTarget) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please enter an integer length value greater than 0\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tlengthValue = Integer.parseInt(lengthField.getText());\n\t\t\t\t}\n\t\t\t\tif (counterField.getText() == null || !isValidCounter(counterField.getText(), Integer.parseInt(lengthField.getText()))) {\n\t\t\t\t\tif (noTarget) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please enter an integer counter value greater than 0 and less than the length value\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tcounterValue = Integer.parseInt(counterField.getText());\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\tActionMetadata data = new ActionMetadata(actionButtonGroup.getSelection().getActionCommand(),\n\t\t\t\t\t\theadingValue, lengthValue, counterValue, false, targetValueX, targetValueY);\n\t\t\t\t((TreeSite) object).actionQueue.add(data);\n\t\t\t\tcreateActionPanel(cyclicButtons, data);\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tfor (ActionMetadata metadata : ((TreeSite) object).actionQueue) {\n\t\t\tcreateActionPanel(cyclicButtons, metadata);\n\t\t}\n\t\t\n\t}",
"private int checkItemQuantity() {\n\n int desiredQuantity = initialQuantity;\n MenusItem tempItem = null;\n tempItem = ItemCart.getInstance().checkItem(menusItem);\n\n if(tempItem != null){\n desiredQuantity = tempItem.getDesiredQuantity();\n }\n\n\n return desiredQuantity;\n }",
"private static int menu() {\n\t\tint opcion;\n\t\topcion = Leer.pedirEntero(\"1:Crear 4 Almacenes y 15 muebeles\" + \"\\n2: Mostrar los muebles\"\n\t\t\t\t+ \"\\n3: Mostrar los almacenes\" + \"\\n4: Mostrar muebles y su almacen\" + \"\\n0: Finalizar\");\n\t\treturn opcion;\n\t}",
"private void makeUtilitiesMenu() {\r\n\t\tJMenu utilitiesMnu = new JMenu(\"Utilidades\");\r\n\t\tboolean isAccesible = false;\r\n\r\n\t\tif (StoreCore.getAccess(\"Reportes\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Reportes\",\r\n\t\t\t\t\timageLoader.getImage(\"reports.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'r',\r\n\t\t\t\t\t\"Ver los reportes del sistema\", null,\r\n\t\t\t\t\tReports.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"ConsultarPrecios\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Consultar Precios\",\r\n\t\t\t\t\timageLoader.getImage(\"money.gif\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'p',\r\n\t\t\t\t\t\"Consultar los precios de los productos\", null,\r\n\t\t\t\t\tPriceRead.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Calculadora\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Calculadora Impuesto\",\r\n\t\t\t\t\timageLoader.getImage(\"pc.gif\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'c',\r\n\t\t\t\t\t\"Calculadora de impuesto\", null, Calculator.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tutilitiesMnu.addSeparator();\r\n\t\tif (StoreCore.getAccess(\"Categorias\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Categorias Inventario\",\r\n\t\t\t\t\timageLoader.getImage(\"group.gif\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'i',\r\n\t\t\t\t\t\"Manejar las categorias del inventario\", null, Groups.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Impuestos\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Impuestos\");\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 't',\r\n\t\t\t\t\t\"Manejar el listado de impuestos\", null, Tax.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Ciudades\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Ciudades\");\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'u',\r\n\t\t\t\t\t\"Manejar el listado de ciudades\", null, City.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (isAccesible) {\r\n\t\t\tutilitiesMnu.setMnemonic('u');\r\n\t\t\tadd(utilitiesMnu);\r\n\t\t}\r\n\t}",
"@Override\n public boolean onPrepareOptionsMenu (Menu menu) {\n \n return super.onPrepareOptionsMenu (menu);\n \n }",
"public boolean esSubMenu() {\n\t\tOpcionMenu elemento = getElementoMenuActual();\n\t\tboolean esSubMenu = elemento!=null && elemento instanceof OpcionSubMenu;\n\t\treturn esSubMenu;\n\t}"
]
| [
"0.6662838",
"0.6445243",
"0.6445148",
"0.6440628",
"0.63963246",
"0.6341367",
"0.63279116",
"0.63269645",
"0.6268309",
"0.62579757",
"0.62475145",
"0.6119511",
"0.605217",
"0.6031963",
"0.60212326",
"0.6016425",
"0.6016152",
"0.6001083",
"0.59637624",
"0.5955377",
"0.5939676",
"0.59357834",
"0.5924831",
"0.5921122",
"0.59171414",
"0.58922344",
"0.58638924",
"0.5860537",
"0.58576137",
"0.5828204",
"0.5826562",
"0.5825966",
"0.58144873",
"0.58134055",
"0.57960415",
"0.57794404",
"0.57580465",
"0.5730778",
"0.5722957",
"0.5722377",
"0.5718219",
"0.571045",
"0.57015306",
"0.56943744",
"0.5689836",
"0.56882197",
"0.5684584",
"0.56689996",
"0.56428605",
"0.56388634",
"0.5636912",
"0.56343216",
"0.5626696",
"0.56263417",
"0.5615855",
"0.5606844",
"0.56047994",
"0.5595485",
"0.5592744",
"0.5587947",
"0.5584585",
"0.55751014",
"0.5569641",
"0.5563891",
"0.5557072",
"0.55533123",
"0.55477357",
"0.5543174",
"0.5536859",
"0.5532029",
"0.5528853",
"0.55281025",
"0.5527742",
"0.5515908",
"0.55149287",
"0.55090857",
"0.550572",
"0.55041754",
"0.54846305",
"0.5483954",
"0.54830325",
"0.54811555",
"0.5477627",
"0.5476401",
"0.5474381",
"0.5473306",
"0.5472624",
"0.54701996",
"0.54678357",
"0.54550046",
"0.5452196",
"0.5447362",
"0.54437315",
"0.5442858",
"0.5440877",
"0.54394335",
"0.54374295",
"0.54324853",
"0.543028",
"0.54301023",
"0.541863"
]
| 0.0 | -1 |
Metoda ktora nastavi do listu choices vsetky moznosti co sa da s danym predmetom robit. (ked je mozne predmet pouzit tak bude USABLE, atd...) | private void setItemMenu() {
choices = new ArrayList<>();
choices.add(Command.INFO);
if (item.isUsable()) {
choices.add(Command.USE);
}
if (item.isEquipped()) {
choices.add(Command.UNEQUIP);
} else {
if (item.isEquipable()) {
choices.add(Command.EQUIP);
}
}
if (item.isActive()) {
choices.add(Command.UNACTIVE);
} else {
if (item.isActivable()) {
choices.add(Command.ACTIVE);
}
}
if (item.isDropable()) {
choices.add(Command.DROP);
}
if (item.isPlaceable()) {
choices.add(Command.PLACE);
}
choices.add(Command.DESTROY);
choices.add(Command.CLOSE);
this.height = choices.size() * hItemBox + hGap * 2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic ArrayList<String> getChoices() {\n\t\t// TODO Auto-generated method stub\n\t\treturn this.choices;\n\t}",
"public void setChoices(ArrayList<String> choice){\n\t\tthis.choices = choice;\n\t}",
"public String[] getChoices()\n\t{\n\t\treturn choices;\n\t}",
"public String getChoices() {\r\n\t\tString choice = \"\";\r\n\t\tfor(int i = 0; i < 4; i++) {\r\n\t\t\tchoice += i + 1 + \") \" + choices[i].getChoice() + \"\\n\";\r\n\t\t}\r\n\t\treturn choice;\r\n\t}",
"public List<Choice> getChoiceList() {\n CriteriaBuilder cb = em.getCriteriaBuilder();\n CriteriaQuery<Choice> cq = cb.createQuery(Choice.class);\n cq.select(cq.from(Choice.class));\n return em.createQuery(cq).getResultList(); \n }",
"@Override\n public void valueChanged(javax.swing.event.ListSelectionEvent e)\n {\n this.choice = e.getFirstIndex();\n }",
"public ArrayList<Choice> getChoices() {\n return mChoices;\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 }",
"void setChoices ( ArrayList<String> choices )\r\n\t{\r\n\t\tfor ( int i = 0 ; i < 4 ; i++ )\r\n\t\t{\r\n\t\t\tthis.choices.set(i, choices.get(i));\r\n\t\t}\r\n\t}",
"public List<ChoiceItemDTO> getChoices() {\r\n\t\treturn choices;\r\n\t}",
"public void setChoices(List<ChoiceItemDTO> choices) {\r\n\t\tthis.choices = choices;\r\n\t}",
"private ComboBox<String> languageChoices(EventHandler<ActionEvent> splashScreenComboBoxEvent) {\n\t\tComboBox<String> comboBox = new ComboBox<String>();\n\t\tList<String> languages = loadLanguages();\n\t\tcomboBox.setPrefWidth(200);\n\t\tcomboBox.getItems().addAll(languages);\n\t\tcomboBox.setOnAction(splashScreenComboBoxEvent);\n\t\tcomboBox.setId(\"languageBox\");\n\t\t\n\t\tcomboBox.valueProperty().addListener(e -> {\n\t\t\tif(comboBox.getValue() == \"\") {\n\t\t\t\tcontinueButton.setDisable(true);\n\t\t\t} else {\n\t\t\t\tcontinueButton.setDisable(false);\n\t\t\t}\n\t\t});\n\t\treturn comboBox;\n\t}",
"public void llenarComboSeccion() {\t\t\n\t\tString respuesta = negocio.llenarComboSeccion(\"\");\n\t\tSystem.out.println(respuesta);\t\t\n\t}",
"private void comboMultivalores(HTMLSelectElement combo, String tabla, String defecto, boolean dejarBlanco) {\n/* 393 */ SisMultiValoresDAO ob = new SisMultiValoresDAO();\n/* 394 */ Collection<SisMultiValoresDTO> arr = ob.cargarTabla(tabla);\n/* 395 */ ob.close();\n/* 396 */ if (dejarBlanco) {\n/* 397 */ HTMLOptionElement op = (HTMLOptionElement)this.pagHTML.createElement(\"option\");\n/* 398 */ op.setValue(\"\");\n/* 399 */ op.appendChild(this.pagHTML.createTextNode(\"\"));\n/* 400 */ combo.appendChild(op);\n/* */ } \n/* 402 */ Iterator<SisMultiValoresDTO> iterator = arr.iterator();\n/* 403 */ while (iterator.hasNext()) {\n/* 404 */ SisMultiValoresDTO reg = (SisMultiValoresDTO)iterator.next();\n/* 405 */ HTMLOptionElement op = (HTMLOptionElement)this.pagHTML.createElement(\"option\");\n/* 406 */ op.setValue(\"\" + reg.getCodigo());\n/* 407 */ op.appendChild(this.pagHTML.createTextNode(reg.getDescripcion()));\n/* 408 */ if (defecto.equals(reg.getCodigo())) {\n/* 409 */ Attr escogida = this.pagHTML.createAttribute(\"selected\");\n/* 410 */ escogida.setValue(\"on\");\n/* 411 */ op.setAttributeNode(escogida);\n/* */ } \n/* 413 */ combo.appendChild(op);\n/* */ } \n/* 415 */ arr.clear();\n/* */ }",
"@Override\n\tabstract protected List<String> getOptionsList();",
"public JLabel getChoicesLbl() {\r\n\t\treturn choicesLbl;\r\n\t}",
"private void llenarCombo(HTMLSelectElement combo, String tabla, String codigo, String descripcion, String condicion, String defecto, boolean dejarBlanco) {\n/* 436 */ if (dejarBlanco) {\n/* 437 */ HTMLOptionElement op = (HTMLOptionElement)this.pagHTML.createElement(\"option\");\n/* 438 */ op.setValue(\"\");\n/* 439 */ op.appendChild(this.pagHTML.createTextNode(\"\"));\n/* 440 */ combo.appendChild(op);\n/* */ } \n/* 442 */ TGeneralDAO rsTGen = new TGeneralDAO();\n/* 443 */ Collection<TGeneralDTO> arr = rsTGen.cargarTabla(tabla, codigo, descripcion, condicion);\n/* 444 */ rsTGen.close();\n/* 445 */ Iterator<TGeneralDTO> iterator = arr.iterator();\n/* 446 */ while (iterator.hasNext()) {\n/* 447 */ TGeneralDTO regGeneral = (TGeneralDTO)iterator.next();\n/* 448 */ HTMLOptionElement op = (HTMLOptionElement)this.pagHTML.createElement(\"option\");\n/* 449 */ op.setValue(\"\" + regGeneral.getCodigoS());\n/* 450 */ op.appendChild(this.pagHTML.createTextNode(regGeneral.getDescripcion()));\n/* 451 */ if (defecto != null && defecto.equals(regGeneral.getCodigoS())) {\n/* 452 */ Attr escogida = this.pagHTML.createAttribute(\"selected\");\n/* 453 */ escogida.setValue(\"on\");\n/* 454 */ op.setAttributeNode(escogida);\n/* */ } \n/* 456 */ combo.appendChild(op);\n/* */ } \n/* */ }",
"public void customizeToConfirmation(View view) {\n int i = 0;\n boolean choose = false;\n while (i < numLiquors) {\n switch (i) {\n // if starts with 'choose' then automatically grab item at position 1 which holds\n // the default liquor brand in all liquor arrays\n case 0:\n if (liquor1.getSelectedItem().toString().startsWith(\"Choose\")) {\n choose = true;\n liquorReturnList.add(liquor1.getItemAtPosition(1).toString());\n } else {\n liquorReturnList.add(liquor1.getSelectedItem().toString());\n }\n break;\n case 1:\n if (liquor2.getSelectedItem().toString().startsWith(\"Choose\")) {\n choose = true;\n liquorReturnList.add(liquor2.getItemAtPosition(1).toString());\n } else {\n liquorReturnList.add(liquor2.getSelectedItem().toString());\n }\n break;\n case 2:\n if (liquor3.getSelectedItem().toString().startsWith(\"Choose\")) {\n choose = true;\n liquorReturnList.add(liquor3.getItemAtPosition(1).toString());\n } else {\n liquorReturnList.add(liquor3.getSelectedItem().toString());\n }\n break;\n case 3:\n if (liquor4.getSelectedItem().toString().startsWith(\"Choose\")) {\n choose = true;\n liquorReturnList.add(liquor4.getItemAtPosition(1).toString());\n } else {\n liquorReturnList.add(liquor4.getSelectedItem().toString());\n }\n break;\n case 4:\n if (liquor5.getSelectedItem().toString().startsWith(\"Choose\")) {\n choose = true;\n liquorReturnList.add(liquor5.getItemAtPosition(1).toString());\n } else {\n liquorReturnList.add(liquor5.getSelectedItem().toString());\n }\n break;\n default:\n }\n i++;\n }\n\n if (choose) {\n Toast.makeText(this, \"You've failed to specify the liquor brand for one or more \" +\n \"liquors in your drink. The defaults will be applied.\", Toast.LENGTH_SHORT).show();\n }\n\n // send user back to confirmation activity with the appropriate drink order and liquor\n // return list\n Intent intent = new Intent(this, ConfirmationActivity.class);\n intent.putExtra(\"drinkOrder\", drinkOrder);\n intent.putExtra(\"drinkRecipe\", recipe);\n intent.putStringArrayListExtra(\"liquorReturnList\", liquorReturnList);\n startActivity(intent);\n }",
"private void pulsarItemMayus(){\n if (mayus) {\n mayus = false;\n texto_frases = texto_frases.toLowerCase();\n }\n else {\n mayus = true;\n texto_frases = texto_frases.toUpperCase();\n }\n fillList(false);\n }",
"public List getList () {\nif (list == null) {//GEN-END:|13-getter|0|13-preInit\n // write pre-init user code here\nlist = new List (\"list\", Choice.IMPLICIT);//GEN-BEGIN:|13-getter|1|13-postInit\nlist.append (\"S\\u00F6k text\", null);\nlist.append (\"Tidigare s\\u00F6kningar\", null);\nlist.addCommand (getExitCommand ());\nlist.setCommandListener (this);\nlist.setSelectedFlags (new boolean[] { false, false });//GEN-END:|13-getter|1|13-postInit\n // write post-init user code here\n}//GEN-BEGIN:|13-getter|2|\nreturn list;\n}",
"private void loadToChoice() {\n\t\tfor(Genre genre : genreList) {\n\t\t\tuploadPanel.getGenreChoice().add(genre.getName());\n\t\t}\n\t}",
"@Override\n\tpublic void makeFeatChoices(PlayerCharacter pc) {\n\n\t}",
"private void llenarCombo() {\n cobOrdenar.removeAllItems();\n cobOrdenar.addItem(\"Fecha\");\n cobOrdenar.addItem(\"Nro Likes\");\n cobOrdenar.setSelectedIndex(-1); \n }",
"private void tampil_kereta() {\n kereta_combo.addItem (\"Argo Parahyangan\");\n kereta_combo.addItem (\"Argo Jati\");\n kereta_combo.addItem (\"Bangun Karta\");\n kereta_combo.addItem (\"Bima\");\n kereta_combo.addItem (\"Kahuripan\");\n kereta_combo.addItem (\"Lodaya\"); \n kereta_combo.addItem (\"Sembari\");\n kereta_combo.addItem (\"Turangga\");\n \n }",
"public void remplireListeOptions(){\r\n bddOptions.add(\"id\");\r\n bddOptions.add(\"EnvoieMail\");\r\n bddOptions.add(\"MailPeriode\");\r\n bddOptions.add(\"PeriodeJour\");\r\n bddOptions.add(\"PeriodeHeure\");\r\n bddOptions.add(\"PeriodeLun\");\r\n bddOptions.add(\"PeriodeMar\");\r\n bddOptions.add(\"PeriodeMerc\");\r\n bddOptions.add(\"PeriodeJeu\");\r\n bddOptions.add(\"PeriodeVen\");\r\n bddOptions.add(\"PeriodeSam\");\r\n bddOptions.add(\"PeriodeDim\");\r\n }",
"public List<SelectItem> getListaMes()\r\n/* 163: */ {\r\n/* 164:209 */ ArrayList<SelectItem> lista = new ArrayList();\r\n/* 165:210 */ for (Mes mes : Mes.values()) {\r\n/* 166:211 */ lista.add(new SelectItem(mes, mes.getNombre()));\r\n/* 167: */ }\r\n/* 168:213 */ return lista;\r\n/* 169: */ }",
"@Override\n\tpublic void addChoice(String choice) {\n\t}",
"public void setSingleChoices() {\r\n Random randomGenerator = new Random();\r\n int singleAnswer = randomGenerator.nextInt(4);\r\n studentAnswer.add(singleAnswer); }",
"public void carregaEstadoSelecionado(String nome) throws SQLException{\n String sql = \"SELECT * FROM tb_estados\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n ResultSet rs = preparador.executeQuery();\n //passando valores do banco para o objeto result; \n try{ \n while(rs.next()){ \n \n String list = rs.getString(\"uf\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbUfEditar.addItem(list);\n \n \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n cbUfEditar.setSelectedItem(nome);\n \n \n \n }",
"public void set_random_choice()\r\n\t{\r\n\t\tfor (int i=0 ; i<size ; i++)\r\n\t\t{\r\n\t\t\tnumbers.add(get_not_selected_random_digit());\r\n\t\t}\r\n\t}",
"public void choicesText() {\n\t\tmcqChoicesText1 = answerChoice.get(0).getText().trim();\n\t\tmcqChoicesText2 = answerChoice.get(1).getText().trim();\n\t\tmcqChoicesText3 = answerChoice.get(2).getText().trim();\n\t\tmcqChoicesText4 = answerChoice.get(3).getText().trim();\n\t\tmcqChoicesText5 = answerChoice.get(4).getText().trim();\n\t\tmcqChoicesText6 = answerChoice.get(5).getText().trim();\n\t}",
"@Override\n protected CharSequence getDefaultChoice(final String _selectedValue)\n {\n return \"\";\n }",
"void hienThi() {\n LoaiVT.Open();\n ArrayList<LoaiVT> DSSP = LoaiVT.DSLOAIVT;\n VatTu PX = VatTu.getPX();\n \n try {\n txtMaVT.setText(PX.getMaVT());\n txtTenVT.setText(PX.getTenVT());\n txtDonVi.setText(PX.getDVT());\n DefaultComboBoxModel cb = new DefaultComboBoxModel();\n for(LoaiVT SP: DSSP){ \n cb.addElement(SP.getMaLoai());\n if(SP.getMaLoai().equals(PX.getMaLoai())){\n cb.setSelectedItem(SP.getMaLoai());\n }\n }\n cbMaloai.setModel(cb);\n } catch (Exception ex) {\n txtMaVT.setText(\"\");\n txtTenVT.setText(\"\");\n txtDonVi.setText(\"\");\n DefaultComboBoxModel cb = new DefaultComboBoxModel();\n cb.setSelectedItem(\"\");\n cbMaloai.setModel(cb);\n }\n \n \n }",
"<E> Argument choices(Collection<E> values);",
"public void listar() {\r\n Collections.sort(coleccion);\r\n for (int i = 0; i < coleccion.size(); i++) {\r\n String resumen = (coleccion.get(i).toString());\r\n JOptionPane.showMessageDialog(null, resumen);\r\n }\r\n }",
"public void escolherequipa ()\n {\n if (idec != -1 && idev !=-1 && idec != idev)\n {\n ArrayList<String> equipaanotar = new ArrayList<String>();\n equipaanotar.add(nomeequipas.get(idec));\n equipaanotar.add(nomeequipas.get(idev));\n ddes.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_spinner_dropdown_item, equipaanotar));\n }\n }",
"public static void listMenuOptions(){\n\n System.out.println(\"Please choose an option:\");\n System.out.println(\"(1) Add a task.\");\n System.out.println(\"(2) Remove a task.\");\n System.out.println(\"(3) Update a task.\");\n System.out.println(\"(4) List all tasks.\");\n System.out.println(\"(0) Exit\");\n }",
"public List< T > getSelectedValuesChoices() {\r\n return selectedValuesChoices;\r\n }",
"public Menu(String[] choices)\n {\n\t\n\tthis.choices = choices;\n }",
"public static String choicelabel() {\n\t\treturn null;\n\t}",
"public List < SelectItem > getListSearchFieldLocale() {\r\n SearchFieldEnum[] enums = SearchFieldEnum.values();\r\n\r\n List < SelectItem > selectItems = new ArrayList < SelectItem >();\r\n\r\n for (SearchFieldEnum searchFieldEnum : enums) {\r\n selectItems\r\n .add(new SelectItem(searchFieldEnum.getLabel(), this.getString(searchFieldEnum.getLabel())));\r\n }\r\n\r\n return selectItems;\r\n }",
"public void setTFChoices() {\r\n Random randomGenerator = new Random();\r\n int trueFalseAnswer = randomGenerator.nextInt(2);\r\n studentAnswer.add(trueFalseAnswer);\r\n }",
"List<String> getSelectedItems();",
"public void llenarComboGrado() {\t\n\t\tString respuesta = negocio.llenarComboGrado(\"\");\n\t\tSystem.out.println(respuesta);\t\n\t}",
"private void cargaLista() {\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Aclaracion\", \"Aclaracion\"));\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Revision\", \"Revision\"));\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Revocatoria\", \"Revocatoria\"));\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Subsidiaria\", \"Subsidiaria\"));\n \n }",
"public void listarIgrejaComboBox() {\n\n IgrejasDAO dao = new IgrejasDAO();\n List<Igrejas> lista = dao.listarIgrejas();\n cbIgrejas.removeAllItems();\n\n for (Igrejas c : lista) {\n cbIgrejas.addItem(c);\n }\n }",
"private void initProbOrDeterList(){\n this.probDeterSelection.addItem(DETERMINISTIC);\n this.probDeterSelection.addItem(PROBABILISTIC);\n }",
"private List<AbilitySub> chooseMultipleOptionsAi(List<AbilitySub> choices, final Player ai, int min) {\r\n AbilitySub goodChoice = null;\r\n List<AbilitySub> chosenList = Lists.newArrayList();\r\n AiController aic = ((PlayerControllerAi) ai.getController()).getAi();\r\n for (AbilitySub sub : choices) {\r\n sub.setActivatingPlayer(ai);\r\n // Assign generic good choice to fill up choices if necessary \r\n if (\"Good\".equals(sub.getParam(\"AILogic\")) && aic.doTrigger(sub, false)) {\r\n goodChoice = sub;\r\n } else {\r\n // Standard canPlayAi()\r\n if (AiPlayDecision.WillPlay == aic.canPlaySa(sub)) {\r\n chosenList.add(sub);\r\n if (chosenList.size() == min) {\r\n break; // enough choices\r\n }\r\n }\r\n }\r\n }\r\n // Add generic good choice if one more choice is needed\r\n if (chosenList.size() == min - 1 && goodChoice != null) {\r\n chosenList.add(0, goodChoice); // hack to make Dromoka's Command fight targets work\r\n }\r\n if (chosenList.size() != min) {\r\n chosenList.clear();\r\n }\r\n return chosenList;\r\n }",
"public ChoiceQuestion() {\n m_choices = new ArrayList<>();\n }",
"@Override\r\n\t\tpublic void valueChanged(ListSelectionEvent e) {\r\n\t\t\t\r\n\t\t}",
"public void getChoice()\n {\n }",
"private void classes() {\n List<String> list = new ArrayList<>();\n list.add(\"Mont.\");\n list.add(\"Nur\");\n list.add(\"KG 1\");\n list.add(\"KG 2\");\n list.add(\"Class 1\");\n list.add(\"Class 2\");\n list.add(\"Class 3\");\n list.add(\"Class 4\");\n list.add(\"Class 5\");\n list.add(\"Class 6\");\n list.add(\"Class 7\");\n list.add(\"Class 8\");\n list.add(\"Class 9\");\n list.add(\"Class 10\");\n\n\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<>(this,\n android.R.layout.simple_spinner_item, list);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n cls.setAdapter(dataAdapter);\n }",
"public Human (){\r\n\t\tArrayList <Choice> list = new ArrayList <Choice> ();\r\n\t\tlist.add(Choice.ROCK);\r\n\t\tlist.add(Choice.PAPER);\r\n\t\tlist.add(Choice.SCISSORS);\r\n\t\tthis.lst=list;\r\n\t}",
"public void carregaCidadeSelecionada(String nome) throws SQLException{\n String sql = \"SELECT nome FROM tb_cidades where uf='\"+cbUfEditar.getSelectedItem()+\"'\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n ResultSet rs = preparador.executeQuery();\n //passando valores do banco para o objeto result; \n \n try{ \n while(rs.next()){ \n \n String list = rs.getString(\"nome\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbCidadeEditar.addItem(list);\n \n \n \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n cbCidadeEditar.setSelectedItem(nome);\n \n \n \n \n }",
"public static int choicedialog() {\r\n List<String> choices = new ArrayList<>();\r\n choices.add(\"1a\");\r\n choices.add(\"1b\");\r\n choices.add(\"2\");\r\n choices.add(\"2u\");\r\n choices.add(\"3\");\r\n choices.add(\"3u\");\r\n choices.add(\"4\");\r\n choices.add(\"5\");\r\n\r\n ChoiceDialog<String> dialog = new ChoiceDialog<>(\"SET ZONE HERE\", choices);\r\n dialog.setTitle(\"Zone Selector\");\r\n dialog.setHeaderText(null);\r\n dialog.setContentText(\"Select Zone:\");\r\n \r\n Optional<String> result = dialog.showAndWait();\r\n if (result.isPresent()){\r\n if(result.get() == \"1a\") return 1;\r\n else if (result.get() == \"1b\") return 2;\r\n else if (result.get() == \"2\") return 3;\r\n else if (result.get() == \"2u\") return 4;\r\n else if (result.get() == \"3\") return 5;\r\n else if (result.get() == \"3u\") return 6;\r\n else if (result.get() == \"4\") return 7;\r\n else if (result.get() == \"5\") return 8;\r\n else return 0;\r\n } else return 0;\r\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 choicePersonage() {\n\t\tSystem.out.println(\"souhaitez-vous créer un guerrier ou un magicien ?\");\n\t\tchoice = sc.nextLine().toLowerCase();\t\t\t\n\t\tSystem.out.println(\"Vous avez saisi : \" + choice);\n\t\tif(!(choice.equals(MAGICIEN) || choice.equals(GUERRIER))) {\n\t\t\tchoicePersonage();\n\t\t}\n\t\tsaisieInfoPersonage(choice);\n\t}",
"public java.lang.String getChoice_type() {\n return choice_type;\n }",
"public void actualizarchoicecliente(Choice choice) throws SQLException{\n Connection conexion = null;\n \n try{\n conexion = GestionSQL.openConnection();\n if(conexion.getAutoCommit()){\n conexion.setAutoCommit(false);\n }\n \n //Mediante un for agregamos los ids obtenidos al choice.\n //En ultimo lugar agregamos el \"0\" como cliente no registrado\n ClientesHabitualesDatos clientedatos = new ClientesHabitualesDatos(conexion);\n List<ClienteHabitual> listaclientes = clientedatos.select();\n for(int i = 0; i<listaclientes.size();i++){\n int auxiliar = listaclientes.get(i).getIdCliente();\n String segundoauxiliar = Integer.toString(auxiliar);\n choice.add(segundoauxiliar);\n }\n choice.add(\"0\");\n \n }catch(SQLException e){\n //Por si llegase a ocurrir algun error en nuestro select a los ids\n System.out.println(\"Error en ChoiceCliente: \"+e);\n try{\n conexion.rollback();\n }catch(SQLException ex){\n System.out.println(\"Error en rollback: \"+ex);\n }\n }\n }",
"public String getChoice() {\r\n\t\ttype(ConfigurationItemType.CHOICE);\r\n\t\treturn stringValue;\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 }",
"private void setSelectList(char c) {\n\t\t_expectedOutputList.setSelectedItem(c);\n\n\t\tEnumeration<AbstractButton> e = _expectedOutputGroup.getElements();\n\t\twhile (e.hasMoreElements()) {\n\t\t\tAbstractButton btn = e.nextElement();\n\t\t\tif (c == btn.getText().charAt(0)) {\n\t\t\t\tbtn.setSelected(true);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\t}",
"public void setComboBoxValues() {\n String sql = \"select iName from item where iActive=? order by iName asc\";\n \n cbo_iniName.removeAllItems();\n try {\n pst = conn.prepareStatement(sql);\n pst.setString(1,\"Yes\");\n rs = pst.executeQuery();\n \n while (rs.next()) {\n cbo_iniName.addItem(rs.getString(1));\n }\n \n }catch(Exception e) {\n JOptionPane.showMessageDialog(null,\"Item list cannot be loaded\");\n }finally {\n try{\n rs.close();\n pst.close();\n \n }catch(Exception e) {}\n }\n }",
"public Option[] SetBreedDropDownData(){\n List<BreedDTO> instDTOList = this.getgermplasm$SementalSessionBean().getGermplasmFacadeRemote().getAllBreeds();\n ArrayList<Option> allOptions = new ArrayList<Option>();\n Option[] allOptionsInArray;\n Option option;\n //Crear opcion titulo\n option = new Option(null,\" -- \"+BundleHelper.getDefaultBundleValue(\"drop_down_default\",getMyLocale())+\" --\");\n allOptions.add(option);\n //Crear todas las opciones del drop down\n for(BreedDTO instDTO : instDTOList){\n option = new Option(instDTO.getBreedId(), instDTO.getName().trim());\n allOptions.add(option);\n }\n //Sets the elements in the SingleSelectedOptionList Object\n allOptionsInArray = new Option[allOptions.size()];\n return allOptions.toArray(allOptionsInArray);\n }",
"@Model\n public Collection<String> choices2Act() {\n return applicationFeatureRepository.packageNamesContainingClasses(ApplicationMemberType.PROPERTY);\n }",
"public Set<Choice> returnChoiceList(Question question) {\n return question.getChoiceList();\n }",
"private ArrayAdapter<String> adapterForSpinner(List<String> list)\n {\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, list)\n {\n @Override\n public boolean isEnabled(int position) {\n return position != 0;\n }\n\n @Override\n public View getDropDownView(int position, View convertView, ViewGroup parent) {\n View view = super.getDropDownView(position, convertView, parent);\n TextView tv = (TextView) view;\n if(position == 0){\n // Set the hint text color gray\n tv.setTextColor(Color.GRAY);\n }\n else {\n tv.setTextColor(Color.BLACK);\n }\n return view;\n }\n };\n\n // Drop down layout style - list view with radio button\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n return dataAdapter;\n }",
"public void initChoice() {\n\t\t\t\t\n\t\tChoiceDialog<String> dialog = new ChoiceDialog<>(DB_MYSQL);\n\t\tdialog.setTitle(\"Base de datos\");\n\t\tdialog.setContentText(\"Seleccione una base de datos con la que trabajar\");\n\t\tdialog.getItems().addAll(DB_MYSQL, DB_SQL, DB_ACCESS);\n\t\n\t\tOptional<String> dbType = dialog.showAndWait();\n\t\t\n\t\tif( dbType.isPresent() ) {\t\n\t\t\t// Ajustamos nuestro modelo\n\t\t\tsetBd(dbType.get());\n\t\t\t\n\t\t} else {\n\t\t\tPlatform.exit(); // Entonces hemos acabado\n\t\t}\n\t}",
"private String getOptionStrings(int choice) {\n //these are the common ones, maybe the only ones\n switch (choice) {\n case 0: return \"\";\n case 1: return \"Shoot Laser gun.\";\n case 2: return \"Shoot Missile gun.\";\n case 3: return \"Wait a turn\";\n\n case 4: return \"Shoot at Pilot, Gun L, or Gun M?\";\n case 5: return \"Shoot at Shield, or Engine?\";\n case 6: return \"Shoot at random?\";\n\n case 7: return \"Shoot at Pilot?\";\n case 8: return \"Shoot at Gun L?\";\n case 9: return \"Shoot at Gun M?\";\n\n case 10: return \"Shoot at Shield?\";\n case 11: return \"Shoot at Engine?\";\n case 12: return \"Shoot at Random?\";\n\n case 100: return \"Enter any number to continue\";\n }\n //if value given is not found above\n return \"Error\";\n }",
"@Override\n public java.lang.Object getSystemMenuChoicesForClass() throws G2AccessException {\n java.lang.Object retnValue = getStaticAttributeValue (SystemAttributeSymbols.SYSTEM_MENU_CHOICES_);\n return (java.lang.Object)retnValue;\n }",
"@Test\n\tpublic void testLecturaSelect(){\n\t\tassertEquals(esquemaEsperado.getExpresionesSelect().toString(), esquemaReal.getExpresionesSelect().toString());\n\t}",
"public List<SelectItem> getListaTipoReporte()\r\n/* 259: */ {\r\n/* 260:286 */ List<SelectItem> lista = new ArrayList();\r\n/* 261:287 */ for (TIPO_REPORTE tipo : TIPO_REPORTE.values()) {\r\n/* 262:288 */ lista.add(new SelectItem(tipo, tipo.getNombre()));\r\n/* 263: */ }\r\n/* 264:290 */ return lista;\r\n/* 265: */ }",
"@Override\n\tpublic List selectList() {\n\t\t\n\t\t\n\t\t\n\t\treturn null;\n\t}",
"private void fillChoicebox(String item, ChoiceBox cBox) {\n List<Component> test = cRegister.searchRegisterByName(item);\n ObservableList<String> temp = FXCollections.observableArrayList();\n temp.add(\"Ikke valgt\");\n for (Component i : test) {\n temp.add(i.getNavn());\n }\n\n cBox.setItems(temp);\n cBox.setValue(\"Ikke valgt\");\n }",
"public String setBoxOptionString(){\n\t\tString result;\n\t\t\n\t\tif(optionsList.size() == 1){\n\t\t\tresult = optionsList.get(0);\n\t\t\toptionsList.remove(result);\n\t\t} \n\t\telse {\n\t\t\tint option = (int) (Math.random() * optionsList.size());\n\t\t\tresult = optionsList.get(option);\n\t\t\toptionsList.remove(result);\n\t\t}\n\t\treturn result;\n\t}",
"@SuppressWarnings(\"rawtypes\")\r\n\tpublic static boolean isLegalResult(HtmlField f, List<Enum> choices) {\r\n\t\ttry {\r\n\t\t\tfor (Enum c : choices) {\r\n\t\t\t\tif (c.ordinal() == Integer.parseInt(f.getValue()))\r\n\t\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Override\n public Enumeration<Option> listOptions() {\n\n Vector<Option> result = new Vector<Option>();\n\n result.addElement(new Option(\"\\tThe method used to determine best split:\\n\"\n + \"\\t1. Gini; 2. MaxBEPP; 3. SSBEPP\", \"M\", 1, \"-M [1|2|3]\"));\n\n result.addElement(new Option(\n \"\\tThe constant used in the tozero() hueristic\", \"K\", 1,\n \"-K [kBEPPConstant]\"));\n\n result.addElement(new Option(\n \"\\tScales the value of K to the size of the bags\", \"L\", 0, \"-L\"));\n\n result.addElement(new Option(\n \"\\tUse unbiased estimate rather than BEPP, i.e. UEPP.\", \"U\", 0, \"-U\"));\n\n result\n .addElement(new Option(\n \"\\tUses the instances present for the bag counts at each node when splitting,\\n\"\n + \"\\tweighted according to 1 - Ba ^ n, where n is the number of instances\\n\"\n + \"\\tpresent which belong to the bag, and Ba is another parameter (default 0.5)\",\n \"B\", 0, \"-B\"));\n\n result\n .addElement(new Option(\n \"\\tMultiplier for count influence of a bag based on the number of its instances\",\n \"Ba\", 1, \"-Ba [multiplier]\"));\n\n result\n .addElement(new Option(\n \"\\tThe number of randomly selected attributes to split\\n\\t-1: All attributes\\n\\t-2: square root of the total number of attributes\",\n \"A\", 1, \"-A [number of attributes]\"));\n\n result\n .addElement(new Option(\n \"\\tThe number of top scoring attribute splits to randomly pick from\\n\\t-1: All splits (completely random selection)\\n\\t-2: square root of the number of splits\",\n \"An\", 1, \"-An [number of splits]\"));\n\n result.addAll(Collections.list(super.listOptions()));\n\n return result.elements();\n }",
"static void listerMenu() {\n System.out.println(\n \"-------------------------------------\\n\" +\n \"Saisir une option :\\n\" +\n \"1 : Liste des hôtes\\n\" +\n \"2 : Liste des logements\\n\" +\n \"3 : Liste des voyageurs\\n\" +\n \"4 : Liste des réservations\\n\" +\n \"5 : Fermer le programme\"\n );\n switch (Menu.choix(5)) {\n case 1:\n GestionHotes.listerHotes();\n break;\n case 2:\n GestionLogements.listerLogements();\n break;\n case 3:\n GestionVoyageurs.listerVoyageurs();\n break;\n case 4:\n GestionReservations.listerReservations();\n break;\n case 5:\n System.exit(0);\n break;\n }\n }",
"public void carrega_estado() throws SQLException{\n String sql = \"SELECT * FROM tb_estados\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n ResultSet rs = preparador.executeQuery();\n //passando valores do banco para o objeto result; \n try{ \n while(rs.next()){ \n \n String list = rs.getString(\"uf\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbUF.addItem(list); \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n \n \n Conexao.desConectar();\n }",
"private void chooseAddItemsToJcb() {\n if (animalFamilyType.contains(\"Terr\")) {\n addItemJcb(terAnimals);\n } else if (animalFamilyType.contains(\"Air\")) {\n addItemJcb(airAnimals);\n } else if (animalFamilyType.contains(\"Water\")) {\n addItemJcb(waterAnimals);\n }\n }",
"private void carregaComboUfs() {\n\t\tlistaDeMunicipios.add(new Municipio(\"GO\", \"Inhumas\"));\n\t\tlistaDeMunicipios.add(new Municipio(\"GO\", \"Goianira\"));\n\t\tlistaDeMunicipios.add(new Municipio(\"GO\", \"Goiânia\"));\n\t\tlistaDeMunicipios.add(new Municipio(\"SP\", \"Campinas\"));\n\t\tlistaDeMunicipios.add(new Municipio(\"SP\", \"São José dos Campos\"));\n\t\t\n\t\t\n\t\tfor (Municipio municipio : listaDeMunicipios) {\n\t\t\tif(!listaDeUfs.contains(municipio.getUf())) {\n\t\t\t\tlistaDeUfs.add(municipio.getUf());\n\t\t\t}\n\t\t}\n\t\t\n\t\tcmbUfs.addItem(\"--\");\n\t\tfor (String uf : listaDeUfs) {\n\t\t\tcmbUfs.addItem(uf);\n\t\t}\n\t}",
"private void combo() {\n cargaCombo(combo_habitacion, \"SELECT hh.descripcion\\n\" +\n \"FROM huespedes h\\n\" +\n \"LEFT JOIN estadia_huespedes eh ON eh.huespedes_id = h.id\\n\" +\n \"LEFT JOIN estadia_habitaciones ehh ON eh.id_estadia = ehh.id_estadia\\n\" +\n \"LEFT JOIN estadia e ON e.id = ehh.id_estadia \\n\" +\n \"LEFT JOIN habitaciones hh ON hh.id = ehh.id_habitacion\\n\" +\n \"WHERE eh.huespedes_id = \"+idd+\" AND e.estado ='A'\\n\" +\n \"ORDER BY descripcion\\n\" +\n \"\",\"hh.descripcion\");\n cargaCombo(combo_empleado, \"SELECT CONCAT(p.nombre, ' ',p.apellido) FROM persona p\\n\" +\n \"RIGHT JOIN empleado e ON e.persona_id = p.id\", \"empleado\");\n cargaCombo(combo_producto, \"SELECT producto FROM productos order by producto\", \"producto\");\n }",
"@Override\n\tpublic void valueChanged(ListSelectionEvent arg0) {\n\t\t\n\t}",
"public void getoptions() {\n if (mydatepicker.getValue() != null) {\n ObservableList<String> options1 = FXCollections.observableArrayList(\n \"09:00\",\n \"09:30\",\n \"10:00\",\n \"10:30\",\n \"11:00\",\n \"11:30\",\n \"12:00\",\n \"12:30\",\n \"13:00\",\n \"13:30\",\n \"14:00\",\n \"14:30\"\n );\n ObservableList<String> options2 = FXCollections.observableArrayList(\n \"09:00\",\n \"09:30\",\n \"10:00\",\n \"10:30\",\n \"11:00\"\n );\n ObservableList<String> options3 = FXCollections.observableArrayList(\"NOT open on Sunday\");\n\n int a = mydatepicker.getValue().getDayOfWeek().getValue();\n if (a == 7) {\n time_input.setItems(options3);\n } else if (a == 6) {\n time_input.setItems(options2);\n } else {\n time_input.setItems(options1);\n }\n }\n }",
"@Override\n public void onNothingSelected(AdapterView<?> parent) {\n choice=0;\n }",
"public void setChoice(String value) {\r\n\t\ttype(ConfigurationItemType.CHOICE);\r\n\t\tthis.stringValue = value;\r\n\t}",
"public Choice getChoice() {\n return choice;\n }",
"@Override\n\tprotected CharSequence getDefaultChoice(String selectedValue)\n\t{\n\t\treturn \"\";\n\t}",
"public void printList(List<Coord> choices){\n\n int counter = 1;\n System.out.println(\"Default actions:\");\n for (Coord c : choices) {\n System.out.print(counter+\") \");\n System.out.print(c.toString()+\"\\t\");\n counter++;\n if((counter-1)%5 == 0){\n System.out.print(\"\\n\");\n }\n }\n if((counter-1)%5 != 0){\n System.out.print(\"\\n\");\n }\n }",
"public void testListEnum() {\n \t\tList<RadioBand> enumValueList = Arrays.asList(RadioBand.values());\n\n\t\tList<RadioBand> enumTestList = new ArrayList<RadioBand>();\n\t\tenumTestList.add(RadioBand.AM);\n\t\tenumTestList.add(RadioBand.FM);\n\t\tenumTestList.add(RadioBand.XM);\n\n\t\tassertTrue(\"Enum value list does not match enum class list\", \n\t\t\t\tenumValueList.containsAll(enumTestList) && enumTestList.containsAll(enumValueList));\n\t}",
"public PSDisplayChoices getDisplayChoices()\n {\n return m_choices;\n }",
"public void llenadoDeCombos() {\n PerfilDAO asignaciondao = new PerfilDAO();\n List<Perfil> asignacion = asignaciondao.listar();\n cbox_perfiles.addItem(\"\");\n for (int i = 0; i < asignacion.size(); i++) {\n cbox_perfiles.addItem(Integer.toString(asignacion.get(i).getPk_id_perfil()));\n }\n \n }",
"public Enumeration listOptions(){\n\n Vector newVector = new Vector(2);\n\n newVector.addElement(new Option(\n\t\t\t\t \"\\tNumber of attempts of generalisation.\\n\",\n\t\t\t\t \"G\", \n\t\t\t\t 1, \n\t\t\t\t \"-G <value>\"));\n newVector.addElement(new Option(\n\t\t\t\t \"\\tNumber of folder for computing the mutual information.\\n\",\n\t\t\t\t \"I\", \n\t\t\t\t 1, \n\t\t\t\t \"-I <value>\"));\n\n return newVector.elements();\n }",
"private void setEventTypeList() {\n EventTypeAdapter listAdapter = new EventTypeAdapter(this, R.layout.spinner_item, getResources().getStringArray(R.array.event_type_list));\n listAdapter.setDropDownViewResource(R.layout.spinner_list_item);\n listEventType.setAdapter(listAdapter);\n listEventType.setSelection(listAdapter.getCount());\n listEventType.setOnItemSelectedListener(this);\n }",
"@Test\r\n public void testCarregaTreballador() {\r\n System.out.println(\"carregaTreballador\");\r\n DescargaTreballador descarrega= new DescargaTreballador();\r\n Choice choice = new Choice();\r\n ArrayList<Treballador> treb=(ArrayList<Treballador>) descarrega.obtenirTreballadorsDelServer() ;\r\n CarregaChoice.carregaTreballador(choice, treb);\r\n \r\n \r\n }",
"private void add(){\r\n ArrayAdapter<String> adp3 = new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line, list);\r\n adp3.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\r\n txtAuto3.setThreshold(1);\r\n txtAuto3.setAdapter(adp3);\r\n }",
"public List< T > getSelectedValuesChoicesObject() {\r\n return this.selectedValuesChoices;\r\n }",
"@Override\n\tpublic Powerup choosePowerup(List<Powerup> selectable) {\n\t\tJSONObject message = new JSONObject();\n\t\tmessage.put(\"function\", \"select\");\n\t\tmessage.put(\"type\", \"powerup\");\n\t\tJSONArray jArray = new JSONArray();\n\t\tselectable.forEach(s->jArray.add(s.toJSON()));\n\t\tmessage.put(\"list\", jArray);\n\t\tthis.sendInstruction(message);\n\n\t\tString selected = this.getResponse();\n\n\t\tif (selected == null || selectable.isEmpty()) return null;\n\t\tList<Powerup> matching = selectable.stream().filter(p->p.toJSON().toString().equals(selected))\n\t\t\t\t.collect(Collectors.toList());\n\t\treturn matching.isEmpty() ? null : matching.get(0);\n\t}",
"public pansiyon() {\n initComponents();\n for (int i =1900; i <2025; i++) {\n \n cmbkayıtyılı.addItem(Integer.toString(i));\n \n }\n for (int i =1900; i <2025; i++) {\n \n cmbayrılısyılı.addItem(Integer.toString(i));\n \n }\n }",
"public void carregaCidadeModificada() throws SQLException{\n String sql = \"SELECT nome FROM tb_cidades where uf='\"+cbUfEditar.getSelectedItem()+\"'\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n \n ResultSet rs = preparador.executeQuery();\n cbCidadeEditar.removeAllItems();\n //passando valores do banco para o objeto result; \n try{ \n \n while(rs.next()){ \n \n String list = rs.getString(\"nome\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbCidadeEditar.addItem(list); \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n \n }",
"@Override\n public void valueChanged(ListSelectionEvent arg0) {\n\n }"
]
| [
"0.6703643",
"0.6591998",
"0.65895456",
"0.6228014",
"0.6191665",
"0.61741066",
"0.61054575",
"0.60915864",
"0.60722226",
"0.6012334",
"0.592489",
"0.58429193",
"0.582186",
"0.5783634",
"0.5780823",
"0.575728",
"0.5755173",
"0.5751684",
"0.5743126",
"0.57330954",
"0.5718289",
"0.5715464",
"0.5711436",
"0.56736374",
"0.5666127",
"0.5648105",
"0.56267774",
"0.56086737",
"0.5583344",
"0.5582777",
"0.5578691",
"0.55739194",
"0.55611545",
"0.5555749",
"0.5538404",
"0.55373204",
"0.55327535",
"0.5494932",
"0.5487014",
"0.54788506",
"0.547584",
"0.54705715",
"0.5467948",
"0.5467402",
"0.54671144",
"0.54660237",
"0.5460643",
"0.54454637",
"0.544183",
"0.5441676",
"0.54374397",
"0.5431245",
"0.54305655",
"0.54304427",
"0.54288346",
"0.5422847",
"0.5408684",
"0.54074347",
"0.54018503",
"0.5393583",
"0.538905",
"0.53863674",
"0.53836584",
"0.5375734",
"0.53718066",
"0.5369111",
"0.5368246",
"0.5364161",
"0.5360328",
"0.5354224",
"0.53534937",
"0.5350665",
"0.53440106",
"0.53371763",
"0.5326602",
"0.5324958",
"0.5316847",
"0.5316389",
"0.5309083",
"0.5302186",
"0.5302096",
"0.5298227",
"0.5295982",
"0.5286288",
"0.5285027",
"0.5278555",
"0.5274477",
"0.52737373",
"0.5271676",
"0.5271481",
"0.5260469",
"0.525949",
"0.52593464",
"0.52585584",
"0.5256134",
"0.5249019",
"0.52459514",
"0.5238987",
"0.52343464",
"0.5234228",
"0.5228585"
]
| 0.0 | -1 |
Metoda ktora nastavuje obrazok toDraw, ktore byva spolocne pre vsetky menu. Preto zaciname volanim super.setGraphics. Po navrate vykreslime nazvy prikazov co mozme s predmetom robit. | @Override
protected final void setGraphics() {
super.setGraphics();
Graphics g = toDraw.getGraphics();
g.setColor(Color.BLACK);
for (int i = 0; i < choices.size(); i++) {
g.drawString(choices.get(i).getValue(), wGap, (i + 1) * hItemBox);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void paintMenu(Graphics g) {\n if (visible) {\n g.drawImage(toDraw, xPos, yPos, null); \n \n if (selection >= 0) {\n g.setColor(Colors.getColor(Colors.selectedColor));\n g.fillRoundRect(xPos + wGap, selection * hItemBox + yPos + hGap, getWidth() - wGap, hItemBox, wGap, hGap);\n }\n \n if (!activated) {\n g.setColor(Colors.getColor(Colors.selectedColor));\n g.fillRoundRect(xPos, yPos, getWidth(), getHeight(), wGap, hGap);\n }\n }\n }",
"private void renderMenu() {\n StdDraw.setCanvasSize(START_WIDTH * TILE_SIZE, START_HEIGHT * TILE_SIZE);\n Font font = new Font(\"Monaco\", Font.BOLD, 20);\n StdDraw.setFont(font);\n StdDraw.setXscale(0, START_WIDTH );\n StdDraw.setYscale(0, START_HEIGHT );\n StdDraw.clear(Color.BLACK);\n StdDraw.setPenColor(Color.WHITE);\n StdDraw.enableDoubleBuffering();\n StdDraw.text(START_WIDTH / 2, START_HEIGHT * 2 / 3, \"CS61B The Game\");\n StdDraw.text(START_WIDTH / 2, START_HEIGHT / 2 + 2, \"New Game (N)\");\n StdDraw.text(START_WIDTH / 2, START_HEIGHT / 2, \"Load Game (L)\");\n StdDraw.text(START_WIDTH / 2, START_HEIGHT / 2 - 2 , \"Quit (Q)\");\n StdDraw.show();\n }",
"public void drawSaveMenu() {\n implementation.devDrawSaveMenu();\n }",
"void drawMenu(IMenu menuToBeRendered);",
"public void drawLoadMenu(){\n implementation.devDrawLoadMenu();\n }",
"public void draw() {\n\t //FrameRate should only 5 when there is no activity. Otherwise, 60\n if (!EventQueue.getInstance().isTiccing() && System.currentTimeMillis() - lastActive >= 300) {\n noLoop();\n setFrameRate(5);\n println(\"no draw activity\");\n } else{\n \t setFrameRate(60);\n }\n background(255);\n //Process menu data at the beginning\n // Menu menuSing = Menu.getInstance();\n // if ((boolean) menuSing.getControllerValue(\"Button0\")) {\n // KeyMap.getInstance().run('q');\n // }\n\n pushMatrix();\n //Enable scrolling\n translate(0, verticalScroll);\n StringManager.getInstance().draw();\n\n popMatrix();\n\n //if (frameCount % 10 == 0)System.out.println(frameRate);\n\n //Draw menu after\n Menu.getInstance().draw();\n }",
"@Override\n public void paintComponent(final Graphics theGraphics) {\n super.paintComponent(theGraphics);\n final Graphics2D g2d = (Graphics2D) theGraphics; \n g2d.setPaint(PowerPaintMenus.getDrawColor());\n g2d.setStroke(new BasicStroke(PowerPaintMenus.getThickness()));\n if (!myFinishedDrawings.isEmpty()) {\n for (final Drawings drawing : myFinishedDrawings) {\n g2d.setColor(drawing.getColor());\n g2d.setStroke(drawing.getStroke());\n if (PowerPaintMenus.isFilled()) {\n g2d.fill(drawing.getShape());\n } else {\n g2d.draw(drawing.getShape()); \n }\n }\n }\n if (myHasShape) {\n g2d.draw(myCurrentShape);\n }\n }",
"private void draw() {\n this.player.getMap().DrawBackground(this.cameraSystem);\n\n //Dibujamos al jugador\n player.draw();\n\n for (Character character : this.characters) {\n if (character.getMap() == this.player.getMap()) {\n character.draw();\n }\n }\n\n //Dibujamos la parte \"superior\"\n this.player.getMap().DrawForeground();\n\n //Sistema de notificaciones\n this.notificationsSystem.draw();\n\n this.player.getInventorySystem().draw();\n\n //Hacemos que la cámara se actualice\n cameraSystem.draw();\n }",
"@Override\n\tpublic void draw(Graphics g) {\n\t\tsuper.draw(g);\n\t\tif(!satillite){\n\t\t\tdrawTrace(g);\n\t\t}\n\t\t\n \t\tmove();\n\t}",
"public void drawOn(Graphics g);",
"@Override\n\tpublic void draw(Graphics g) {\n\t\tif (isVisible()) {\n\t\t\tsuper.draw(g);\n\t\t\tg.drawImage(colonyPicture, getX() + margin, getY() + 3*margin/2,null);\n\t\t\tdrawColonyName(g);\n\t\t\tbuildShipButton.draw(g);\n\t\t\tbuildingsButton.draw(g);\n\t\t} else if (recruitMenu.isVisible()) {\n\t\t\trecruitMenu.draw(g);\n\t\t} else if (buildingMenu.isVisible()) {\n\t\t\tbuildingMenu.draw(g);\n\t\t}\n\t}",
"public void draw() {\n background(0); // Color de Fondo - Negro\n // Se mencionan cada una de las funciones a utilizar en la class.\n a.movbolitas1(); // a.funcion es para las funciones principales.\n a.bolita2();\n a.movbolitas();\n a.bolita1();\n a.triangulo();\n a.triangulo1();\n c.movbolitas(); // c.funcion y m.funci\\u00f3n es para las mismas\n // funciones anteriores que se repetir\\u00e1n\n c.bolita1();\n c.movbolitas();\n c.bolita2();\n m.movbolitas();\n m.bolita1();\n m.movbolitas1();\n m.bolita2();\n a.circulos();\n}",
"@Override\r\n\tprotected void onDraw(LRenderSystem rs) {\n\r\n\t}",
"public void draw(SpriteBatch batch) {\n// If there is no image (word button)\n if (texture == null) {\n\n// If any menu cursor...\n for (MenuCursor cursor : Main.cursors) {\n\n// Is over the button, change the colour to the \"selected\" version\n if (isCursorOver(cursor)) {\n layout.setText(Main.menuFont, string, selectedColor, 0, Align.center, false);\n break;\n\n// Is not over the button, change the colour to the \"unselected\" version\n } else {\n layout.setText(Main.menuFont, string, unselectedColor, 0, Align.center, false);\n }\n }\n\n// Draw the text\n Main.menuFont.draw(batch, layout, pos.x, pos.y);\n\n// If there is an image\n } else {\n\n// If there is no cursors\n if (Main.cursors.size() == 0) {\n\n// If previously selected draw regular texture\n if (prevSelect) {\n batch.draw(texture, buttonRect.x, buttonRect.y);\n\n// Otherwise, draw the selected texture\n } else {\n batch.draw(selectTexture, buttonRect.x, buttonRect.y);\n }\n\n// If there is a cursor\n } else {\n\n// Cycle through all cursors\n for (MenuCursor cursor : Main.cursors) {\n\n// If the cursor is over the button, draw the selected texture\n if (isCursorOver(cursor)) {\n batch.draw(selectTexture, buttonRect.x, buttonRect.y);\n prevSelect = false;\n break;\n\n// Otherwise, draw the regular texture, previously selected is now true\n } else {\n batch.draw(texture, buttonRect.x, buttonRect.y);\n prevSelect = true;\n }\n }\n }\n }\n }",
"@Override\r\n\tprotected void onDraw() {\n\t\t\r\n\t}",
"@Override\n\tpublic void draw(Graphics canvas) {}",
"@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}",
"public void draw() {\n\t\tsuper.repaint();\n\t}",
"@Override\n\tpublic void draw() {\n\n\t}",
"@Override\n\tpublic void draw() {\n\n\t}",
"@Override\n\tpublic void draw(Graphics g) {\n\t\t\n\t}",
"@Override\n\tpublic void draw(Graphics g) {\n\t\t\n\t}",
"public void render(Graphics g) {\r\n\t\tif(Game.gameState == Game.STATE.GameOver) {\r\n\t\t\tif(gameOverCount != 5) {\r\n\t\t\t\tg.drawImage(gameOverMenu.get(gameOverCount), 0, 0, null);\r\n\t\t\t\tgameOverSpeed++;\r\n\t\t\t\tif(gameOverSpeed % 5 == 0) {\r\n\t\t\t\t\tgameOverCount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tg.drawImage(gameOverMenu.get(4), 0, 0, null);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(Game.gameState == Game.STATE.Battle) {\r\n\t\t\tif(Battle.itemSelected) {\r\n\t\t\t\tif(itemSelect == false) {\r\n\t\t\t\t\t//System.out.println(\"FFF\");\r\n\t\t\t\t\tif(backToRegFromItem == true) {\r\n\t\t\t\t\t\tg.drawImage(itemMenu.get(1), 0, 0, null);\r\n\t\t\t\t\t\tGame.itemPouch.render(g);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tg.drawImage(itemMenu.get(0), 0, 0, null);\r\n\t\t\t\t\t\tGame.itemPouch.render(g);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(overItem == true) {\r\n\t\t\t\t\t\tFont fo = new Font(\"Cooper Black\", 1, 40);\r\n\t\t\t\t\t\tg.setColor(new Color(106, 215, 48));\r\n\t\t\t\t\t\tg.setFont(fo);\r\n\t\t\t\t\t\tg.drawImage(itemCover, Game.camX+482, Game.camY + overItemY, null);\r\n\t\t\t\t\t\tg.drawImage(text, Game.camX + 120, Game.camY + 625, null);\r\n\t\t\t\t\t\tif(curItemOver != null) {\r\n\t\t\t\t\t\t\tcurItemOverLst = curItemOver.itemDescript();\r\n\t\t\t\t\t\t\tint ySpot = 0;\r\n\t\t\t\t\t\t\tfor(int i = 0; i < curItemOverLst.size(); i++) {\r\n\t\t\t\t\t\t\t\tg.drawString(curItemOverLst.get(i), Game.camX + 390, Game.camY + 750 + ySpot);\r\n\t\t\t\t\t\t\t\tySpot += 25;\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\telse {\r\n\t\t\t\t\t//System.out.println(\"we mad eit\");\r\n\t\t\t\t\tg.drawImage(itemMenu.get(0), 0, 0, null);\r\n\t\t\t\t\tGame.itemPouch.render(g);\r\n\t\t\t\t\tFont fo = new Font(\"Cooper Black\", 1, 40);\r\n\t\t\t\t\tg.setColor(new Color(106, 215, 48));\r\n\t\t\t\t\tg.setFont(fo);\r\n\t\t\t\t\tg.drawImage(itemCover, Game.camX+482, Game.camY + overItemY, null);\r\n\t\t\t\t\tg.drawImage(text, Game.camX + 120, Game.camY + 625, null);\r\n\t\t\t\t\tif(curItemOver != null) {\r\n\t\t\t\t\t\tcurItemOverLst = curItemOver.itemDescript();\r\n\t\t\t\t\t\tint ySpot = 0;\r\n\t\t\t\t\t\tfor(int i = 0; i < curItemOverLst.size(); i++) {\r\n\t\t\t\t\t\t\tg.drawString(curItemOverLst.get(i), Game.camX + 390, Game.camY + 750 + ySpot);\r\n\t\t\t\t\t\t\tySpot += 25;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(overYes) g.drawImage(useItem.get(1), 0, 0, null);\r\n\t\t\t\t\telse if(overNo) g.drawImage(useItem.get(2), 0, 0, null);\r\n\t\t\t\t\telse g.drawImage(useItem.get(0), 0, 0, null);\r\n\t\t\t\t\t//System.out.println(\"wtf!\");\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\telse if(Battle.allySelected) {\r\n\t\t\t\tif(goBackFromAlly == true) {\r\n\t\t\t\t\tg.drawImage(allyMenu.get(1), Game.camX, Game.camY, null);\r\n\t\t\t\t\tGame.allies.render(g);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tg.drawImage(allyMenu.get(0), Game.camX, Game.camY, null);\r\n\t\t\t\t\tGame.allies.render(g);\r\n\t\t\t\t}\r\n\t\t\t\tif(overAnAlly) {\r\n\t\t\t\t\tg.drawImage(allyCover, Game.camX + xValForDrawingAlly, Game.camY + 300, null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(Game.gameState == Game.STATE.PostBattle) {\r\n\t\t\tif(ExperienceBar.levelUp != true && Battle.expToBeAdded == 0) {\r\n\t\t\t\tif(overNext) {\r\n\t\t\t\t\tg.drawImage(expMenuBattle.get(1), Game.camX, Game.camY, null);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tg.drawImage(expMenuBattle.get(0), Game.camX, Game.camY, null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(Battle.expToBeAdded == 0){\r\n\t\t\t\tg.drawImage(expMenuBattle.get(2), Game.camX, Game.camY, null);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tg.drawImage(expMenuBattle.get(2), Game.camX, Game.camY, null);\r\n\t\t\t}\r\n\t\t\tif(!ExperienceBar.levelUp) {\r\n\t\t\t\tFont fo = new Font(\"Cooper Black\", 1, 40);\r\n\t\t\t\tg.setColor(new Color(106, 215, 48));\r\n\t\t\t\tg.setFont(fo);\r\n\t\t\t\tGame.expBarTracker.render(g);\r\n\t\t\t\t\r\n\t\t\t\tg.drawImage(healthIcon.get(0), Game.camX + 142, Game.camY + 429, null);\r\n\t\t\t\tg.drawImage(allyIcon.get(0), Game.camX + 142, Game.camY + 499, null);\r\n\t\t\t\tg.drawImage(pummelIcon.get(0), Game.camX + 142, Game.camY + 569, null);\r\n\t\t\t\tg.drawImage(laserIcon.get(0), Game.camX + 142, Game.camY + 639, null);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tg.setFont(new Font(\"Cooper Black\",1,40));\r\n\t\t\t\tg.setColor(new Color(106, 190, 48));\r\n\t\t\t\t\r\n\t\t\t\tg.drawString(\"Upgrade Available!\", Game.camX + 420, Game.camY + 370);\r\n\t\t\t\tg.drawString(\"Select an area to upgrade by selecting an icon:\", Game.camX + 140, Game.camY + 410);\r\n\t\t\t\t\r\n\t\t\t\tFont fo = new Font(\"Cooper Black\", 1, 40);\r\n\t\t\t\tg.setColor(new Color(106, 215, 48));\r\n\t\t\t\tg.setFont(fo);\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\tif(overHealth) {\r\n\t\t\t\t\tg.drawImage(healthIcon.get(1), Game.camX + 142, Game.camY + 429, null);\r\n\t\t\t\t\tg.drawImage(text, Game.camX + 108, Game.camY + 687, null);\r\n\t\t\t\t\tdrawCenteredString(g, \"Health\", new Rectangle(Game.camX+13, Game.camY+780, Game.WIDTH, 50), fo);\r\n\t\t\t\t\tdrawCenteredString(g, \"Current Level: \" + ExperienceBar.healthLevel + \" (\" + HUD.maxHealth + \" Max Health)\", new Rectangle(Game.camX+8, Game.camY+830, Game.WIDTH, 50), fo);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tg.drawImage(healthIcon.get(0), Game.camX + 142, Game.camY + 429, null);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(overAlly) {\r\n\t\t\t\t\tg.drawImage(allyIcon.get(1), Game.camX + 142, Game.camY + 499, null);\r\n\t\t\t\t\tg.drawImage(text, Game.camX + 108, Game.camY + 687, null);\r\n\t\t\t\t\tg.setColor(Color.pink);\r\n\t\t\t\t\t//g.drawString(\"The effectiveness of Povy's allies. Current level: \" + ExperienceBar.allyLevel, Game.camX + 350, Game.camY + 830);\r\n\t\t\t\t\tdrawCenteredString(g, \"Allies\", new Rectangle(Game.camX+8, Game.camY + 780, Game.WIDTH, 50), fo);\r\n\t\t\t\t\tdrawCenteredString(g, \"Current Level: \" + ExperienceBar.allyLevel, new Rectangle(Game.camX+8, Game.camY+830, Game.WIDTH, 50), fo);\r\n\t\t\t\t}\r\n\t\t\t\telse g.drawImage(allyIcon.get(0), Game.camX + 142, Game.camY + 499, null);\r\n\t\t\t\t\r\n\t\t\t\tif(overPummel) {\r\n\t\t\t\t\tg.drawImage(pummelIcon.get(1), Game.camX + 142, Game.camY + 569, null);\r\n\t\t\t\t\tg.drawImage(text, Game.camX + 108, Game.camY + 687, null);\r\n\t\t\t\t\tg.setColor(Color.orange);\r\n\t\t\t\t\t//g.drawString(\"The strength of Povy's pummel attack. Current level: \" + ExperienceBar.pummelLevel, Game.camX + 350, Game.camY + 830);\r\n\t\t\t\t\t//drawCenteredString(g, \"THE STRENGTH OF POVY'S PUMMEL ATTACK. CURRENT LEVEL: \" + ExperienceBar.pummelLevel, new Rectangle(Game.camX+15, Game.camY + 780, Game.WIDTH, 50), fo);\r\n\t\t\t\t\tdrawCenteredString(g, \"Pummel\", new Rectangle(Game.camX+8, Game.camY + 780, Game.WIDTH, 50), fo);\r\n\t\t\t\t\tdrawCenteredString(g, \"Current Level: \" + ExperienceBar.pummelLevel, new Rectangle(Game.camX+8, Game.camY+830, Game.WIDTH, 50), fo);\r\n\t\t\t\t}\r\n\t\t\t\telse g.drawImage(pummelIcon.get(0), Game.camX + 142, Game.camY + 569, null);\r\n\t\t\t\t\r\n\t\t\t\tif(overLaser) {\r\n\t\t\t\t\tg.drawImage(laserIcon.get(1), Game.camX + 142, Game.camY + 639, null);\r\n\t\t\t\t\tg.drawImage(text, Game.camX + 108, Game.camY + 687, null);\r\n\t\t\t\t\tg.setColor(new Color(240, 20, 20));\r\n\t\t\t\t\t//g.drawString(\"The power of Povy's Laser Blaster. Current level: \" + ExperienceBar.laserLevel, Game.camX + 350, Game.camY + 830);\r\n\t\t\t\t\t//drawCenteredString(g, \"THE POWER OF POVY'S LASER BLASTER. CURRENT LEVEL: \" + ExperienceBar.laserLevel, new Rectangle(Game.camX, Game.camY + 780, Game.WIDTH, 50), fo);\r\n\t\t\t\t\tdrawCenteredString(g, \"Laser Blaster\", new Rectangle(Game.camX+8, Game.camY + 780, Game.WIDTH, 50), fo);\r\n\t\t\t\t\tdrawCenteredString(g, \"Current Level: \" + ExperienceBar.laserLevel, new Rectangle(Game.camX+8, Game.camY+830, Game.WIDTH, 50), fo);\r\n\t\t\t\t}\r\n\t\t\t\telse g.drawImage(laserIcon.get(0), Game.camX + 142, Game.camY + 639, null);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn;\r\n\t\t}\r\n\t\telse if(Game.gameState == Game.STATE.Paused) {\r\n\t\t\tif(pauseState == PauseState.Regular) {\r\n\t\t\t\tif(none == true) {\r\n\t\t\t\t\tg.drawImage(pauseMenu.get(0), Game.camX, Game.camY, null);\r\n\t\t\t\t}\r\n\t\t\t\telse if(option1 == true) {\r\n\t\t\t\t\tg.drawImage(pauseMenu.get(1), Game.camX, Game.camY, null);\r\n\t\t\t\t}\r\n\t\t\t\telse if(option2 == true) {\r\n\t\t\t\t\tg.drawImage(pauseMenu.get(2), Game.camX, Game.camY, null);\r\n\t\t\t\t}\r\n\t\t\t\telse if(option3 == true){\r\n\t\t\t\t\tg.drawImage(pauseMenu.get(3), Game.camX, Game.camY, null);\r\n\t\t\t\t}\r\n\t\t\t\telse if(option4 == true){\r\n\t\t\t\t\tg.drawImage(pauseMenu.get(5), Game.camX, Game.camY, null);\r\n\t\t\t\t}\r\n\t\t\t\telse if(option5 == true){\r\n\t\t\t\t\tg.drawImage(pauseMenu.get(4), Game.camX, Game.camY, null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(pauseState == PauseState.ItemScreen) {\r\n\t\t\t\tif(backToRegFromItem == true) {\r\n\t\t\t\t\tg.drawImage(itemMenu.get(1), Game.camX, Game.camY, null);\r\n\t\t\t\t\tGame.itemPouch.render(g);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tg.drawImage(itemMenu.get(0), Game.camX, Game.camY, null);\r\n\t\t\t\t\tGame.itemPouch.render(g);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(overItem == true) {\r\n\t\t\t\t\tFont fo = new Font(\"verdana\", 1, 22);\r\n\t\t\t\t\tg.setColor(new Color(106, 215, 48));\r\n\t\t\t\t\tg.setFont(fo);\r\n\t\t\t\t\tg.drawImage(itemCover, Game.camX+164, Game.camY + overItemY, null);\r\n\t\t\t\t\tg.drawImage(itemText, Game.camX + 480, Game.camY + 346, null); //Game.camY + overItemY - 100\r\n\t\t\t\t\tif(curItemOver != null) {\r\n\t\t\t\t\t\tcurItemOverLst = curItemOver.itemDescript();\r\n\t\t\t\t\t\tint ySpot = 0;\r\n\t\t\t\t\t\tif(curItemOverLst.size() == 1) {\r\n\t\t\t\t\t\t\tdrawCenteredString(g, curItemOverLst.get(0), new Rectangle(Game.camX+480, Game.camY +406, 790, 150), fo);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\tfor(int i = 0; i < curItemOverLst.size(); i++) {\r\n\t\t\t\t\t\t\t\tdrawCenteredString(g, curItemOverLst.get(i), new Rectangle(Game.camX+480, Game.camY + 370 + ySpot, 790, 150), fo);\r\n\t\t\t\t\t\t\t\t//g.drawString(curItemOverLst.get(i), Game.camX + 390, Game.camY + 750 + ySpot);\r\n\t\t\t\t\t\t\t\tySpot += 35;\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}\r\n\t\t\tif(pauseState == PauseState.ItemUse) {\r\n\t\t\t\tg.drawImage(itemMenu.get(0), Game.camX, Game.camY, null);\r\n\t\t\t\tGame.itemPouch.render(g);\t\t\r\n\t\t\t\tif(curItemOver != null) {\r\n\t\t\t\t\tFont fo = new Font(\"verdana\", 1, 22);\r\n\t\t\t\t\tg.setColor(new Color(106, 215, 48));\r\n\t\t\t\t\tg.setFont(fo);\r\n\t\t\t\t\tg.drawImage(itemCover, Game.camX+164, Game.camY + overItemY, null);\r\n\t\t\t\t\tg.drawImage(itemText, Game.camX + 480, Game.camY + 346, null); //Game.camY + overItemY - 100\r\n\t\t\t\t\tif(curItemOver != null) {\r\n\t\t\t\t\t\tcurItemOverLst = curItemOver.itemDescript();\r\n\t\t\t\t\t\tint ySpot = 0;\r\n\t\t\t\t\t\tif(curItemOverLst.size() == 1) {\r\n\t\t\t\t\t\t\tdrawCenteredString(g, curItemOverLst.get(0), new Rectangle(Game.camX+480, Game.camY +406, 790, 150), fo);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\tfor(int i = 0; i < curItemOverLst.size(); i++) {\r\n\t\t\t\t\t\t\t\tdrawCenteredString(g, curItemOverLst.get(i), new Rectangle(Game.camX+480, Game.camY + 370 + ySpot, 790, 150), fo);\r\n\t\t\t\t\t\t\t\t//g.drawString(curItemOverLst.get(i), Game.camX + 390, Game.camY + 750 + ySpot);\r\n\t\t\t\t\t\t\t\tySpot += 35;\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\tif(overYes) g.drawImage(useItem.get(1), Game.camX, Game.camY, null);\r\n\t\t\t\telse if(overNo) g.drawImage(useItem.get(2), Game.camX, Game.camY, null);\r\n\t\t\t\telse g.drawImage(useItem.get(0), Game.camX, Game.camY, null);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif(pauseState == PauseState.ProgressScreen) {\r\n\t\t\t\tFont fo = new Font(\"Cooper Black\", 1, 40);\r\n\t\t\t\tg.setColor(new Color(106, 215, 48));\r\n\t\t\t\tg.setFont(fo);\r\n\t\t\t\tif(goBackFromProg) g.drawImage(expMenuPause.get(1), Game.camX, Game.camY, null);\r\n\t\t\t\telse g.drawImage(expMenuPause.get(0), Game.camX, Game.camY, null);\r\n\t\t\t\tGame.expBarTracker.render(g);\r\n\t\t\t\tif(overHealth) {\r\n\t\t\t\t\tg.drawImage(healthIcon.get(1), Game.camX + 142, Game.camY + 429, null);\r\n\t\t\t\t\tg.drawImage(text, Game.camX + 108, Game.camY + 687, null);\r\n\t\t\t\t\tdrawCenteredString(g, \"Health\", new Rectangle(Game.camX+13, Game.camY+780, Game.WIDTH, 50), fo);\r\n\t\t\t\t\tdrawCenteredString(g, \"Current Level: \" + ExperienceBar.healthLevel + \" (\" + HUD.maxHealth + \" Max Health)\", new Rectangle(Game.camX+8, Game.camY+830, Game.WIDTH, 50), fo);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tg.drawImage(healthIcon.get(0), Game.camX + 142, Game.camY + 429, null);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(overAlly) {\r\n\t\t\t\t\tg.drawImage(allyIcon.get(1), Game.camX + 142, Game.camY + 499, null);\r\n\t\t\t\t\tg.drawImage(text, Game.camX + 108, Game.camY + 687, null);\r\n\t\t\t\t\tg.setColor(Color.pink);\r\n\t\t\t\t\t//g.drawString(\"The effectiveness of Povy's allies. Current level: \" + ExperienceBar.allyLevel, Game.camX + 350, Game.camY + 830);\r\n\t\t\t\t\tdrawCenteredString(g, \"Allies\", new Rectangle(Game.camX+8, Game.camY + 780, Game.WIDTH, 50), fo);\r\n\t\t\t\t\tdrawCenteredString(g, \"Current Level: \" + ExperienceBar.allyLevel, new Rectangle(Game.camX+8, Game.camY+830, Game.WIDTH, 50), fo);\r\n\t\t\t\t}\r\n\t\t\t\telse g.drawImage(allyIcon.get(0), Game.camX + 142, Game.camY + 499, null);\r\n\t\t\t\t\r\n\t\t\t\tif(overPummel) {\r\n\t\t\t\t\tg.drawImage(pummelIcon.get(1), Game.camX + 142, Game.camY + 569, null);\r\n\t\t\t\t\tg.drawImage(text, Game.camX + 108, Game.camY + 687, null);\r\n\t\t\t\t\tg.setColor(Color.orange);\r\n\t\t\t\t\t//g.drawString(\"The strength of Povy's pummel attack. Current level: \" + ExperienceBar.pummelLevel, Game.camX + 350, Game.camY + 830);\r\n\t\t\t\t\t//drawCenteredString(g, \"THE STRENGTH OF POVY'S PUMMEL ATTACK. CURRENT LEVEL: \" + ExperienceBar.pummelLevel, new Rectangle(Game.camX+15, Game.camY + 780, Game.WIDTH, 50), fo);\r\n\t\t\t\t\tdrawCenteredString(g, \"Pummel\", new Rectangle(Game.camX+8, Game.camY + 780, Game.WIDTH, 50), fo);\r\n\t\t\t\t\tdrawCenteredString(g, \"Current Level: \" + ExperienceBar.pummelLevel, new Rectangle(Game.camX+8, Game.camY+830, Game.WIDTH, 50), fo);\r\n\t\t\t\t}\r\n\t\t\t\telse g.drawImage(pummelIcon.get(0), Game.camX + 142, Game.camY + 569, null);\r\n\t\t\t\t\r\n\t\t\t\tif(overLaser) {\r\n\t\t\t\t\tg.drawImage(laserIcon.get(1), Game.camX + 142, Game.camY + 639, null);\r\n\t\t\t\t\tg.drawImage(text, Game.camX + 108, Game.camY + 687, null);\r\n\t\t\t\t\tg.setColor(new Color(240, 20, 20));\r\n\t\t\t\t\t//g.drawString(\"The power of Povy's Laser Blaster. Current level: \" + ExperienceBar.laserLevel, Game.camX + 350, Game.camY + 830);\r\n\t\t\t\t\t//drawCenteredString(g, \"THE POWER OF POVY'S LASER BLASTER. CURRENT LEVEL: \" + ExperienceBar.laserLevel, new Rectangle(Game.camX, Game.camY + 780, Game.WIDTH, 50), fo);\r\n\t\t\t\t\tdrawCenteredString(g, \"Laser Blaster\", new Rectangle(Game.camX+8, Game.camY + 780, Game.WIDTH, 50), fo);\r\n\t\t\t\t\tdrawCenteredString(g, \"Current Level: \" + ExperienceBar.laserLevel, new Rectangle(Game.camX+8, Game.camY+830, Game.WIDTH, 50), fo);\r\n\t\t\t\t}\r\n\t\t\t\telse g.drawImage(laserIcon.get(0), Game.camX + 142, Game.camY + 639, null);\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\tif(pauseState == PauseState.AllyScreen) {\r\n\t\t\t\tif(goBackFromAlly == true) {\r\n\t\t\t\t\tg.drawImage(allyMenu.get(1), Game.camX, Game.camY, null);\r\n\t\t\t\t\tGame.allies.render(g);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tg.drawImage(allyMenu.get(0), Game.camX, Game.camY, null);\r\n\t\t\t\t\tGame.allies.render(g);\r\n\t\t\t\t}\r\n\t\t\t\tif(overAnAlly) {\r\n\t\t\t\t\tg.drawImage(allyCover, Game.camX + xValForDrawingAlly, Game.camY + 300, null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(pauseState == PauseState.AttireScreen) {\r\n\t\t\t\tif(goBackFromAttire == true) {\r\n\t\t\t\t\tg.drawImage(attireMenu.get(1), Game.camX, Game.camY, null);\r\n\t\t\t\t\tGame.costumePouch.render(g);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tg.drawImage(attireMenu.get(0), Game.camX, Game.camY, null);\r\n\t\t\t\t\tGame.costumePouch.render(g);\r\n\t\t\t\t}\r\n\t\t\t\tif(overAnOutfit) {\r\n\t\t\t\t\tg.drawImage(allyCover, Game.camX + xValForDrawingAttire, Game.camY + 300, null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void draw(){\n\t\tif(selected){\n\t\t\timg.draw(xpos,ypos,scale,Color.blue);\n\t\t}else{\n\t\t\timg.draw(xpos, ypos, scale);\n\t\t}\n\t}",
"@Override\n public void disegna(Graphics g){\n \n //Disegna solo se l'oggetto è attivo\n if(attivo){\n \n //Scelgo il font\n g.setFont(new Font(\"German\", Font.BOLD, 50));\n //Disegno una cornice con triplo rettangolo\n g.setColor(Color.white);\n g.drawRect(this.punto.x - 10, this.punto.y - 44, larghezza_countdown, altezza_countdown);\n g.setColor(Color.black);\n g.drawRect(this.punto.x - 11, this.punto.y - 45, larghezza_countdown+2, altezza_countdown+2);\n g.setColor(Color.white);\n g.drawRect(this.punto.x - 12, this.punto.y - 46, larghezza_countdown+4, altezza_countdown+4);\n \n //Setto il testo nel formato \"timer\"\n setTesto();\n \n //Disegno il testo\n g.drawString(this.testo, this.punto.x, this.punto.y);\n \n //Scelgo il font\n g.setFont(new Font(\"German\", Font.BOLD, 50));\n //Disegno una cornice con triplo rettangolo\n g.setColor(Color.white);\n g.drawRect(this.punto.x - 10 + 450, this.punto.y - 44, larghezza_countdown + 98, altezza_countdown);\n g.setColor(Color.black);\n g.drawRect(this.punto.x - 11 + 450, this.punto.y - 45, larghezza_countdown+2 + 98, altezza_countdown+2);\n g.setColor(Color.white);\n g.drawRect(this.punto.x - 12 + 450, this.punto.y - 46, larghezza_countdown+4 + 98, altezza_countdown+4);\n \n //Disegno il testo\n g.drawString(this.livello, this.punto.x + 450, this.punto.y);\n \n }\n \n }",
"@Override\r\n\tpublic void render(Graphics g) {\r\n\t\tg.setFont(menuFont);\r\n\t\tg.setColor(Color.WHITE);\r\n\t\t\r\n\t\tg.drawString(\"START GAME\",(game.getWidht()-164)/2,(game.getHeight()-56)/2);\t\t\r\n\t\tg.drawString(\"HIGH SCORES\",(game.getWidht()-174)/2,(game.getHeight()+18)/2);\r\n\t\tg.drawString(\"EXIT\",(game.getWidht()-58)/2,(game.getHeight()+94)/2);\r\n\t}",
"@Override\n\tpublic void draw() {\n\t\t\n\t}",
"@Override\n\tpublic void draw() {\n\t\t\n\t}",
"@Override\n public void draw()\n {\n }",
"public void draw(Graphics g) {\r\n\t\t\r\n\t}",
"public void paint(Graphics g) {\n\n // Draw background\n g.drawImage(ResourceLoader.getInstance().getSprite(\"road.png\"), 0, 0, mooseGame);\n\n g.setColor(new Color(0, 0, 0, 150));\n g.fillRect(MooseGame.WIDTH / 6, 50, 2 * MooseGame.WIDTH / 3, 100);\n\n // Draw store title\n Font storeTitle = new Font(\"Impact\", Font.PLAIN, 75);\n FontMetrics metrics = g.getFontMetrics(storeTitle);\n g.setFont(storeTitle);\n g.setColor(Color.WHITE);\n g.drawString(\"Store\", (MooseGame.WIDTH - metrics.stringWidth(\"Store\")) / 2, 125);\n\n\n Font coinFont = new Font(\"Impact\", Font.PLAIN, 30);\n metrics = g.getFontMetrics(coinFont);\n g.setFont(coinFont);\n g.setColor(new Color(255, 215, 0));\n\n String coinText = \"Coins: \" + PlayerInventory.getCurrency();\n g.drawString(coinText, 5 * MooseGame.WIDTH / 6 - metrics.stringWidth(coinText) - 10, 135);\n\n\n Font menuFont = new Font(\"Impact\", Font.PLAIN, 40);\n metrics = g.getFontMetrics(menuFont);\n g.setFont(menuFont);\n g.setColor(Color.white);\n\n if (menuState == 0) { // Main Store\n\n g.setColor(new Color(0, 0, 0, 150));\n g.fillRect(MooseGame.WIDTH / 6, MooseGame.WIDTH / 4, 2 * MooseGame.WIDTH / 3, MooseGame.WIDTH / 2);\n\n String[] text = new String[]{\n \"Powerups\", \"Vehicles\", \"Buy Coin Packs\", \"Back to Main Menu\"};\n\n for (int i = 0; i < text.length; i++) {\n g.setColor(menuSelection == i ? Color.GREEN : Color.WHITE);\n String drawString = (menuSelection == i ? \" - \" : \"\") + text[i] + (menuSelection == i ? \" - \" : \"\");\n g.drawString(drawString, (MooseGame.WIDTH / 6) + ((2 * MooseGame.WIDTH / 3) - metrics.stringWidth(drawString)) / 2, 250 + (75 * i));\n\n }\n\n } else if (menuState == 1) { // Power Ups\n\n g.setColor(new Color(0, 0, 0, 150));\n\n g.fillRect(MooseGame.WIDTH / 6, 160, 2 * MooseGame.WIDTH / 3, 375);\n\n g.setColor(Color.white);\n\n String[] sprites = new String[]{\"foglights.png\", \"invincible.png\", \"slowmotion.png\"};\n String[] names = new String[]{\"Fog Lights\", \"Invincibility\", \"Slow Motion\"};\n Integer[] options = new Integer[]{FOG_LIGHTS_COST, INVINCIBILITY_COST, SLOW_MOTION_COST};\n\n for (int i = 0; i < sprites.length; i++) {\n g.drawImage(ResourceLoader.getInstance().getSprite(sprites[i]), MooseGame.WIDTH / 6 + 10, 175 + i * 75, mooseGame);\n g.drawString(\"[\" + options[i] + \"] \" + names[i], (MooseGame.WIDTH / 4) + 20, 215 + i * 75);\n g.setColor(menuSelection == i ? Color.GREEN : Color.WHITE);\n g.drawString(\"Buy\", 550, 215 + (75 * i));\n g.setColor(Color.white);\n }\n\n Font warningFont = new Font(\"Calivri\", Font.BOLD, 16);\n metrics = g.getFontMetrics(warningFont);\n g.setFont(warningFont);\n g.setColor(Color.red);\n\n String warningText = \"Note: Power-ups are lost on game over!\";\n g.drawString(warningText, (MooseGame.WIDTH - metrics.stringWidth(warningText)) / 2, 400);\n\n metrics = g.getFontMetrics(menuFont);\n g.setFont(menuFont);\n g.setColor(menuSelection == 3 ? Color.GREEN : Color.WHITE);\n\n String backText = \"Back to Store\";\n g.drawString(backText, (MooseGame.WIDTH - metrics.stringWidth(backText)) / 2, 500);\n\n } else if (menuState == 2) { // Vehicles\n\n String[] sprites = new String[]{\"player_bluecar.png\", \"player_truck.png\", \"player_atv.png\"};\n Integer[] prices = new Integer[]{0, TRUCK_COST, ATV_COST};\n\n\n PlayerInventory.Vehicles equipped = PlayerInventory.getEquippedVehicle();\n Boolean[] equippedStates = new Boolean[]{equipped == CAR, equipped == TRUCK, equipped == ATV};\n\n Boolean[] ownedStates = new Boolean[]{true, PlayerInventory.isTruckOwned(), PlayerInventory.isAtvOwned()};\n\n\n g.setColor(new Color(0, 0, 0, 150));\n g.fillRect(MooseGame.WIDTH / 6, 175, 2 * MooseGame.WIDTH / 3, 500);\n\n for (int i = 0; i < sprites.length; i++) {\n g.drawImage(ResourceLoader.getInstance().getSprite(sprites[i]), (MooseGame.WIDTH / 3), 180 + 150 * i, mooseGame);\n g.setColor(menuSelection == i ? Color.GREEN : Color.white);\n String drawString = \"\";\n\n if (!ownedStates[i]) {\n drawString = \"Buy (\" + prices[i] + \")\";\n } else if (equippedStates[i]) {\n drawString = \"Equipped\";\n } else {\n drawString = \"Equip\";\n }\n\n g.drawString(drawString, 400, 255 + 150 * i);\n }\n\n\n g.setColor(menuSelection == 3 ? Color.GREEN : Color.WHITE);\n\n\n String backString = \"Back to Store\";\n g.drawString(backString, (MooseGame.WIDTH - metrics.stringWidth(backString)) / 2, 650);\n\n } else if (menuState == 3) { // Buy coins\n\n g.setColor(new Color(0, 0, 0, 150));\n g.fillRect(MooseGame.WIDTH / 6, 200, 2 * MooseGame.WIDTH / 3, 375);\n\n String[] coinPacksText = new String[]{\n SMALL_COIN_PACK_VALUE + \" for $\" + SMALL_COIN_PACK_COST,\n MEDIUM_COIN_PACK_VALUE + \" for $\" + MEDIUM_COIN_PACK_COST,\n LARGE_COIN_PACK_VALUE + \" for $\" + LARGE_COIN_PACK_COST,\n SUPER_COIN_PACK_VALUE + \" for $\" + SUPER_COIN_PACK_COST};\n\n for (int i = 0; i < coinPacksText.length; i++) {\n g.setColor(menuSelection == i ? Color.GREEN : Color.WHITE);\n g.drawString(coinPacksText[i], (MooseGame.WIDTH - metrics.stringWidth(coinPacksText[i])) / 2, 250 + (75 * i));\n }\n\n g.setColor(menuSelection == 4 ? Color.GREEN : Color.WHITE);\n\n String backText = \"Back to Store\";\n g.drawString(backText, (MooseGame.WIDTH - metrics.stringWidth(backText)) / 2, 550);\n }\n\n }",
"public void draw(){\n super.repaint();\n }",
"@Override\r\n public void draw() {\n }",
"protected void paintComponent(Graphics g) {\r\n\t\tsuper.paintComponent(g);\r\n\r\n\t\t\r\n\t\tInsets ins = this.getInsets();\r\n\t\tint varX = ins.left+5;\r\n\t\tint varY = ins.top+5;\r\n\r\n\t\tif ( pozicijaIgraca.equals(\"gore\")){\t\t\t\r\n\t\t\tfor(Card karta : karte){\r\n\t\t\t\tkarta.moveTo(varX, varY);\r\n\t\t\t\tkarta.draw(g, this);\r\n\t\t\t\tvarX = varX + karta.getWidth()+5;\r\n\t\t\t}\r\n\t\t\tg.setColor(Color.RED);\r\n\t\t\tg.drawString(imeIgraca, varX - 120, varY + 100);\r\n\t\t} else {\r\n\t\t\tfor(Card karta : karte){\r\n\t\t\t\tkarta.moveTo(varX, varY);\r\n\t\t\t\tkarta.draw(g, this);\r\n\t\t\t\tvarX = varX + karta.getWidth()/2;\r\n\t\t\t\tvarY = varY + karta.getHeight()/10;\r\n\t\t\t}\r\n\t\t\tg.setColor(Color.RED);\r\n\t\t\tg.drawString(imeIgraca, varX - 100 , varY + 90);\r\n\t\t}\r\n\t\t\r\n\r\n\t}",
"@Override\r\n\tpublic void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\r\n\t\t\tthis.draw(g);\r\n\t\t\r\n\t\r\n\t}",
"private void paintMenu(){ \n\t\t\n\t\t//Idee: Vllt. lieber Menü auf unsichtbar setzen und immer wieder anzeigen, wenn benötigt? Vllt. auch praktisch für Pause...Aber was mit entsprechenden Labels?\n\t\tif(spiel_status == 3){ //Spiel noch gar nicht gestartet\n\t\t\tframe3 = new JFrame(\"Spiel starten?\");\n\t\t\tframe3.setLocation(650,300);\n\t\t\tframe3.setSize(100, 100);\n\t\t\tJButton b1 = new JButton(\"Einzelspieler\");\n\t\t\tb1.setMnemonic(KeyEvent.VK_ENTER);//Shortcut Enter\n\t\t\tJButton b2 = new JButton(\"Beenden\");\n\t\t\tb2.setMnemonic(KeyEvent.VK_ESCAPE);//Shortcut Escape\n\t\t\tJButton b3 = new JButton(\"Mehrspieler\");\n\t\t\tJButton b4 = new JButton(\"Einstellungen\");\n\t\t\tJButton b5 = new JButton(\"Handbuch\");\n\t\t\t\n\t\t\t//Neues Layout. 4 Zeilen, 1 Spalte. \n\t\t\tframe3.setLayout(new GridLayout(5,1));\n\t\t\tframe3.add(b1);\n\t\t\tframe3.add(b3);\n\t\t\tframe3.add(b4);\n\t\t\tframe3.add(b5);\n\t\t\tframe3.add(b2);\n\n\t\t\tframe3.pack();\n\t\t\tframe3.setVisible(true);\n\t\t\t\n\t\t\t\n\t\t\tb1.addActionListener(new ActionListener(){\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0){\n\t\t\t\t\tsingleplayer = true;\n\t\t\t\t\tdoInitializations(frame3);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\t\n\t\t\tb2.addActionListener(new ActionListener(){\n\t\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t});\n\t\t\t\n\t\t\tb3.addActionListener(new ActionListener(){\n\t\t\t\tpublic void actionPerformed(ActionEvent arg1){\n\t\t\t\t\tmultiplayer = true;\n\t\t\t\t\tpaintNetworkMenu();\n\t\t\t\t}\n\t\t\t});\t\t\t\n\t\t\t\n\t\t\tb4.addActionListener(new ActionListener(){\n\t\t\t\tpublic void actionPerformed(ActionEvent arg1){\n\t\t\t\t\tpaintSettingMenu();\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tb5.addActionListener(new ActionListener(){\n\t\t\t\tpublic void actionPerformed(ActionEvent arg1){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tRuntime.getRuntime().exec(\"rundll32 url.dll,FileProtocolHandler \"+ \"resources\\\\handbuch\\\\Handbuch.pdf\");\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\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\tif(spiel_status == 1|| spiel_status == 0){ //Wenn Spiel gewonnen oder verloren\n//\t\t\tif (!multiplayer){\n\t\t\t\tframe2 = new JFrame(\"Neues Einzelspielerspiel?\");\n\t\t\t\tframe2.setLocation(500,300);\n\t\t\t\tframe2.setSize(100, 100);\n\t\t\t\tJLabel label;\n\t\t\t\tif(spiel_status == 1){\n\t\t\t\t\tlabel = new JLabel(\"Bravo, du hast gewonnen! Neues Einzelspielerspiel?\");\n\t\t\t\t}else{\n\t\t\t\t\tif(player.getLifes() == 0){\n\t\t\t\t\t\tlabel = new JLabel(\"Schade, du hast verloren! Neues Einzelspielerspiel?\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tlabel = new JLabel(\"Du hast gewonnen! Neues Einzelspielerspiel?\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tframe2.add(BorderLayout.NORTH, label);\n\t\t\t\tJButton b1 = new JButton(\"Neues Einzelspielerspiel\");\n\t\t\t\tb1.setMnemonic(KeyEvent.VK_ENTER);//Shortcut Enter\n\t\t\t\tb1.addActionListener(new ActionListener(){\n\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0){ //bzgl. Starten\n\t\t\t\t\t\tsoundlib.stopLoopingSound();\n\t\t\t\t\t\tdoInitializations(frame2);\n\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tJButton b2 = new JButton(\"Zurück zum Hauptmenü\");\n\t\t\t\tb2.setMnemonic(KeyEvent.VK_ESCAPE);//Shortcut Escape\n\t\t\t\tb2.addActionListener(new ActionListener(){\n\t\t\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n\t\t\t\t\t\tsoundlib.stopLoopingSound();\n\t\t\t\t\t\tspiel_status=3;\n\t\t\t\t\t\tpaintMenu();\n\t\t\t\t\t\tframe2.setVisible(false);\n\t\t\t\t\t\t\n\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});\n\t\t\t\tframe2.add(BorderLayout.CENTER, b1);\n\t\t\t\tframe2.add(BorderLayout.SOUTH, b2);\n\t\t\t\tframe2.pack();\n\t\t\t\tframe2.setVisible(true);\n\t\t\t\tspiel_status = 0;\n\t\t\t}\n//\t\t}else{\n//\t\t\tframe2 = new JFrame(\"Ende\");\n//\t\t\tframe2.setLocation(500,300);\n//\t\t\tframe2.setSize(100, 100);\n//\t\t\tJLabel label;\n//\t\t\tif(player.getLifes() == 0){\n//\t\t\t\tlabel = new JLabel(\"Du Lusche hast verloren!\");\n//\t\t\t}else{\n//\t\t\t\tlabel = new JLabel(\"Boom-Headshot! Du hast gewonnen!\");\n//\t\t\t}\n//\t\t\t\n//\t\t\tframe2.add(BorderLayout.NORTH, label);\n//\t\t\t\n//\t\t\tJButton b2 = new JButton(\"Zurück zum Hauptmenü\");\n//\t\t\tb2.setMnemonic(KeyEvent.VK_ESCAPE);//Shortcut Escape\n//\t\t\tb2.addActionListener(new ActionListener(){\n//\t\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n//\t\t\t\t\tif(sound_running){\n//\t\t\t\t\t\tsoundlib.stopLoopingSound();\n//\t\t\t\t\t}\n//\t\t\t\t\tspiel_status=3;\n//\t\t\t\t\tpaintMenu();\n//\t\t\t\t\tframe2.setVisible(false);\n//\t\t\t\t\tframe2.dispose();\n//\t\t\t\t\t\n//\t\t\t\n//\t\t\t\t\t\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t});\n//\t\t\tframe2.add(BorderLayout.CENTER, b2);\n//\t\t\tframe2.pack();\n//\t\t\tframe2.setVisible(true);\n//\t\t\tspiel_status = 0;\n//\t\t}\n\t\tspiel_status = 0; // Daraus folgt, dass wenn man das Spiel per ESC-taste verlässt, man verliert.\n\t\t\n\t}",
"@Override\n\tpublic void draw() {\n\t}",
"@Override\n\tpublic void paint(Graphics arg0) {\n\t\t\n\t\tsuper.paint(arg0);\n\t\t\n\t\tresp = \"Al Sistema Operativo \"+choice.getSelectedItem()+\" le corresponde \"\n\t\t\t\t+lista.getSelectedItem();\n\t\t\n\t\targ0.setFont(font);\n\t\targ0.drawString(resp, 100, 300);\n\t}",
"@Override\n public void draw() {\n }",
"public void draw(float dt, Graphics g) {\n\t\t// Graphics.gl.glTranslatef(-.25f * Values.RESOLUTIONS[Values.X], -.25f\n\t\t// * Values.RESOLUTIONS[Values.Y], 1);\n\t\t// super.drawNew(g);\n\t\tg.setColor(1);\n\t\tsynchronized (this) {\n\t\t\tdrawBottom(dt, g);\n\t\t\tdrawTop(dt, g, sprites);\n\t\t}\n\t\t// if (Math.random() < .01f) {\n\t\t// color[3] = 0;\n\t\t// }\n\t\t// if (color[3] <= .5f) {\n\t\t// color[3]+=.08f;\n\t\t// g.fadeOldSchoolColorWhite(1, .9f, 0, .3f - color[3]);\n\t\t// } else {\n\t\t// g.fadeOldSchoolColor(color[0], color[1], color[2], color[3]);\n\t\t// }\n\t\tsuper.checkMenu();\n\t\tsuper.draw(dt, g);\n\t}",
"@Override\r\n\tprotected void draw(PGraphics pg) {\r\n\t\tif(font == null) {\r\n\t\t\tfont = rootContainer.getPApplet().createFont(\"Arial\", ((int)this.height * 0.8F));\r\n\t\t}\r\n\t\tpg.stroke(0);\r\n\t\tpg.strokeWeight(3);\r\n\t\tpg.noFill();\r\n\t\tif(activated == false) {\r\n\t\t}else {\r\n\t\t\tpg.line(x, y, x+height, y+height);\r\n\t\t\tpg.line(x+height, y, x, y+height);\r\n\t\t}\r\n\t\tpg.rect(x, y, height, height);\r\n\t\tpg.textAlign(PApplet.LEFT, PApplet.CENTER);\r\n\t\tpg.textFont(font);\r\n\t\tpg.fill(this.textColor.red, textColor.green, textColor.blue, textColor.alpha);\r\n\t\tpg.text(this.text, x+height+(height/2), y-3, width-height, height);\r\n\t}",
"@Override\n\tpublic void draw(Graphics2D g) {\n\n\t\t\n\t\tg.setColor(new Color(36, 36, 36));\n\t\tg.fillRect(0, 0, Driver.screenWidth, Driver.screenHeight);\n\n\t\tg.setColor(new Color(87, 87, 87));\n\t\tSceneManager.sm.currSector.drawBasicGrid(g, 1000000, (int) (100 * (1 / Math.sqrt((Camera.scale)))), 2);\n\n\t\tif (target != null) {\n\t\t\tg.setPaint(new Color(255, 0, 0, 200));\n\t\t\tg.setStroke(new BasicStroke((int) (3 * Camera.scale)));\n\t\t\tCamera.toScreen(target.cm).drawCircle(g, (int) (150 * Camera.scale));\n\t\t}\n\n\t\tSceneManager.sm.currSector.draw(g);\n\n\t\tg.setColor(Color.BLACK);\n\n\t\tg.drawImage(ui, 0, 0, 1920, 1010, null);\n\n\t\t// draw player scrap amt\n\t\tg.setFont(Misc.arialBig);\n\t\tg.setColor(Color.white);\n\t\tg.drawString(\"\" + Driver.playerScrap, 1733, 72);\n\n\t\t// draw speed\n\t\tg.setColor(new Color(0, 119, 166));\n\t\tg.fillRect(1872, (int) (113 + 564 - 564\n\t\t\t\t* ((p.vel.getMagnitude() * 20) / (int) ((p.transForces[0] * 2462.0 / p.mass / Sector.sectorDrag)))), 33,\n\t\t\t\t(int) (564 * ((p.vel.getMagnitude() * 20)\n\t\t\t\t\t\t/ (int) ((p.transForces[0] * 2462.0 / p.mass / Sector.sectorDrag)))));\n\t\tg.setFont(Misc.font);\n\t\tg.setColor(Color.LIGHT_GRAY);\n\t\tg.drawString((int) (p.vel.getMagnitude() * 20) + \" mph\", 1760, 564 - (int) (564\n\t\t\t\t* ((p.vel.getMagnitude() * 20) / (int) ((p.transForces[0] * 2462.0 / p.mass / Sector.sectorDrag))))\n\t\t\t\t+ 120);\n\n\t\t// show selected ship\n\t\tif (selected != null && !selected.destroyed) {\n\t\t\tg.setColor(Color.LIGHT_GRAY);\n\t\t\tCamera.toScreen(selected.cm).drawCircle(g, (int) (150 * Camera.scale));\n\t\t}\n\n\t\tfor (Ship s : SceneManager.sm.currSector.ships) {\n\t\t\tfor (Part p : s.parts) {\n\t\t\t\tif (p.health < p.baseHealth && Camera.scale > .5) {\n\t\t\t\t\tg.rotate(s.rotation, Camera.toXScreen(s.cm.x), Camera.toYScreen(s.cm.y));\n\t\t\t\t\tdrawPartHealth(g, p,\n\t\t\t\t\t\t\tCamera.toScreen(new Point(s.pos.x + p.pos.x * Part.SQUARE_WIDTH,\n\t\t\t\t\t\t\t\t\ts.pos.y + p.pos.y * Part.SQUARE_WIDTH)),\n\t\t\t\t\t\t\t(int) (40 * Camera.scale), (int) (15 * Camera.scale), p.health, p.baseHealth);\n\t\t\t\t\tg.rotate(-s.rotation, Camera.toXScreen(s.cm.x), Camera.toYScreen(s.cm.y));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (partTarget != null) {\n\t\t\tg.rotate(target.rotation, Camera.toXScreen(target.cm.x), Camera.toYScreen(target.cm.y));\n\t\t\tg.setColor(Color.red);\n\t\t\toutlinePart(g,\n\t\t\t\t\tCamera.toScreen(new Point(target.pos.x + partTarget.pos.x * Part.SQUARE_WIDTH,\n\t\t\t\t\t\t\ttarget.pos.y + partTarget.pos.y * Part.SQUARE_WIDTH)),\n\t\t\t\t\t(int) (partTarget.width * Part.SQUARE_WIDTH * Camera.scale),\n\t\t\t\t\t(int) (partTarget.height * Part.SQUARE_WIDTH * Camera.scale));\n\t\t\tg.rotate(-target.rotation, Camera.toXScreen(target.cm.x), Camera.toYScreen(target.cm.y));\n\t\t}\n\n\t\t// shipYard.draw(g);\n\t\t// starMap.draw(g);\n\n\t\tif (target != null) {\n\t\t\tPoint avg = Camera.toScreen(target.cm.avg(p.cm));\n\t\t\tPoint mapAvg = target.cm.avg(p.cm);\n\t\t\teyeLoc.setXY(mapAvg.x, mapAvg.y);\n\t\t\tg.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, eyeFocused ? .1f : .3f));\n\t\t\tg.drawImage(eye, (int)(avg.x - eye.getWidth() * Camera.scale / 2), (int)(avg.y - eye.getHeight() * Camera.scale / 2),\n\t\t\t\t\t(int)(eye.getWidth() * Camera.scale), (int)(eye.getHeight() * Camera.scale), null);\n\t\t\tg.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1.0f));\n\t\t\t\n\t\t}\n\n\t\tminimap.mc.focus(Camera.toMap(Driver.screenWidth / 2, Driver.screenHeight / 2));\n\t\tminimap.draw(g, SceneManager.sm.currSector.ships);\n\n\t\tif (!running) {\n\t\t\tg.setPaint(new Color(0, 0, 0, 128));\n\t\t\tg.fillRect(0, 0, Driver.screenWidth, Driver.screenHeight);\n\t\t\tg.setColor(Color.white);\n\t\t\tg.setFont(Misc.arialSmall);\n\t\t\tg.drawString(\"Paused - [p] to resume\", 900, 50);\n\t\t\tg.setColor(Color.cyan);\n\t\t\tg.drawString(\n\t\t\t\t\t\"Protect your reactor, destroy enemies to collect scrap, build up your ship, and make your way to the end of the galaxy!\",\n\t\t\t\t\tDriver.screenWidth / 2 - 920, Driver.screenHeight / 2 - 400);\n\t\t\tg.setColor(Color.WHITE);\n\t\t\tg.drawString(\"CONTROL BASICS:\", Driver.screenWidth / 2 - 940, Driver.screenHeight / 2 - 350);\n\t\t\t\n\t\t\tg.drawString(\"MOVEMENT: Rotation = Q and E, Translation = WASD\", Driver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 300);\n\t\t\tg.drawString(\"COMBAT: Right Click on enemy = set as a target: lasers will shoot target when in range\",\n\t\t\t\t\tDriver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 250);\n\t\t\tg.drawString(\"CAMERA: Middle Mouse Click on ship = set the camera to that ship\",\n\t\t\t\t\tDriver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 200);\n\t\t\tg.drawString(\"Scroll Wheel = zoom\", Driver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 150);\n\t\t\tg.drawString(\"Arrow Keys = pan\", Driver.screenWidth / 2 - 600, Driver.screenHeight / 2 - 100);\n\t\t\t\n\t\t\tg.drawString(\"GAMEPLAY + STRATEGY:\", Driver.screenWidth / 2 - 930, Driver.screenHeight / 2 - 0);\n\t\t\tg.setColor(new Color(217, 52, 52));\n\t\t\tg.drawString(\"If you just started, your ship is weak! Upgrade it before entering combat!\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -50);\n\t\t\tg.setColor(Color.white);\n\t\t\tg.drawString(\"Cannot jump to the next sector if current sector is not clear\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -100);\n\t\t\tg.drawString(\"Enemies will attack you when in range & can't edit ship if in enemy range\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -150);\n\t\t\t\n\t\t\t\n\t\t\t//advanced\n\t\t\tg.drawString(\"ADVANCED:\", Driver.screenWidth / 2 - 930, Driver.screenHeight / 2 - -200);\n\t\t\tg.drawImage(eye, Driver.screenWidth / 2 - 340, Driver.screenHeight / 2 + 225, eye.getWidth()/4, eye.getHeight()/4, null);\n\t\t\tg.drawString(\"Middle Click the icon: set the camera to focus on the center of battle\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -250);\n\t\t\tg.drawString(\"Spacebar = recenter camera on player\", Driver.screenWidth / 2 - 600,\n\t\t\t\t\tDriver.screenHeight / 2 - -300);\n\t\t}\n\n\t}",
"protected void onDraw(Canvas canv) {\n\t\t\n\t\tPath p = new Path();\n\t\tPaint canvPaint = new Paint();\n\t\tfloat textX1 = 0, textY1 = 0, textX2 = 0, textY2 = 0, textX3 = 0, textY3 = 0;\n\n\t\t// Draw triangle in canvas according to position \n\t\t// (all three buttons of the menu will be on the same RelativeLayout)\n\t\t\n\t\tint k = 150;\n\t\t\n\t\tpx[0] = 0;\n\t\tpx[1] = canv.getWidth()/4;\n\t\tpx[2] = canv.getWidth()/2;\n\t\tpx[3] = (float) ((0.75)*canv.getWidth());\n\t\tpx[4] = canv.getWidth();\n\t\t\n\t\tpy[0] = canv.getHeight()/4 - k;\n\t\tpy[1] = canv.getHeight()/2 - k/2;\n\t\tpy[2] = (float) ((0.75)*canv.getHeight());\n\t\t\n\t\tif (sideSelection == 1) {\n\t\t\n\t\t\tp.moveTo(px[2], py[2]);\n\t\t\tp.lineTo(px[2] + 2*(px[4]-px[2]), py[2]);\n\t\t\tp.lineTo(px[4], py[2] + py[2]-py[0]);\n\t\t\tp.lineTo(px[2], py[2]);\n\t\t\n\t\t} else if (sideSelection == 2) {\n\t\t\t\n\t\t\tp.moveTo(px[2], py[2]);\n\t\t\tp.lineTo(-px[2], py[2]);\n\t\t\tp.lineTo(px[0], py[2] + py[2]-py[0]);\n\t\t\tp.lineTo(px[2], py[2]);\n\t\t\t\n\t\t} else if (sideSelection == 3) {\n\t\t\t\n\t\t\tp.moveTo(px[0], py[0]);\n\t\t\tp.lineTo(-px[2], -py[2]);\n\t\t\tp.lineTo(px[2], -py[2]);\n\t\t\tp.lineTo(px[0], py[0]);\n\t\t\t\n\t\t\tp.moveTo(px[4], py[0]);\n\t\t\tp.lineTo(px[2], -py[2]);\n\t\t\tp.lineTo(px[4]+px[2], -py[2]);\n\t\t\tp.lineTo(px[4], py[0]);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tif (selection == 1) {\n\t\t\t\n\t\t\tp.moveTo(px[0], py[0]);\n\t\t\tp.lineTo(px[1], py[0]);\n\t\t\tp.lineTo((px[0]+px[1])/2, (py[0]+py[1])/2);\n\t\t\tp.lineTo(px[0], py[0]);\n\t\t\t\n\t\t\tp.moveTo(px[1], py[0]);\n\t\t\tp.lineTo(px[2], py[0]);\n\t\t\tp.lineTo((px[1]+px[2])/2, (py[0]+py[1])/2);\n\t\t\tp.lineTo(px[1], py[0]);\n\t\t\t\n\t\t\tp.moveTo((px[0]+px[1])/2, (py[0]+py[1])/2);\n\t\t\tp.lineTo((px[1]+px[2])/2, (py[0]+py[1])/2);\n\t\t\tp.lineTo(px[1], py[1]);\n\t\t\t\n\t\t} else {\n\t\t\tp.moveTo(px[0], py[0]);\n\t\t\tp.lineTo(px[2], py[0]);\n\t\t\tp.lineTo(px[1], py[1]);\n\t\t\tp.lineTo(px[0], py[0]);\n\t\t\ttextX1 = canv.getWidth()/4;\n\t\t\ttextY1 = (float) ((0.3)*(py[1]-py[0]) + py[0]);\n\t\t}\n\t\t\n\t\tcanvPaint.setColor(0xFF421C52);\n\t\tcanv.drawPath(p, canvPaint);\n\t\t\n\t\tif (selection == 2) {\n\t\t\t\n\t\t\tp.moveTo(px[2], py[0]);\n\t\t\tp.lineTo(px[3], py[0]);\n\t\t\tp.lineTo((px[2]+px[3])/2, (py[0]+py[1])/2);\n\t\t\tp.lineTo(px[2], py[0]);\n\t\t\t\n\t\t\tp.moveTo(px[3], py[0]);\n\t\t\tp.lineTo(px[4], py[0]);\n\t\t\tp.lineTo((px[3]+px[4])/2, (py[0]+py[1])/2);\n\t\t\tp.lineTo(px[3], py[0]);\n\t\t\t\n\t\t\tp.moveTo((px[2]+px[3])/2, (py[0]+py[1])/2);\n\t\t\tp.lineTo((px[3]+px[4])/2, (py[0]+py[1])/2);\n\t\t\tp.lineTo(px[3], py[1]);\n\t\t\t\n\t\t} else {\n\t\t\tp.moveTo(px[2], py[0]);\n\t\t\tp.lineTo(px[4], py[0]);\n\t\t\tp.lineTo(px[3], py[1]);\n\t\t\tp.lineTo(px[2], py[0]);\n\t\t\ttextX2 = (float) ((0.75)*canv.getWidth());\n\t\t\ttextY2 = (float) ((0.3)*(py[1]-py[0]) + py[0]);\n\t\t}\n\t\t\n\t\tcanvPaint.setColor(0xFF421C52);\n\t\tcanv.drawPath(p, canvPaint);\n\t\t\n\t\tif (selection == 3) {\n\t\t\t\n\t\t\tp.moveTo(px[1], py[1]);\n\t\t\tp.lineTo(px[2], py[1]);\n\t\t\tp.lineTo((px[1]+px[2])/2, (py[1]+py[2])/2);\n\t\t\tp.lineTo(px[1], py[1]);\n\t\t\t\n\t\t\tp.moveTo(px[2], py[1]);\n\t\t\tp.lineTo(px[3], py[1]);\n\t\t\tp.lineTo((px[2]+px[3])/2, (py[1]+py[2])/2);\n\t\t\tp.lineTo(px[2], py[1]);\n\t\t\t\n\t\t\tp.moveTo((px[1]+px[2])/2, (py[1]+py[2])/2);\n\t\t\tp.lineTo((px[2]+px[3])/2, (py[1]+py[2])/2);\n\t\t\tp.lineTo(px[2], py[2]);\n\t\t\tp.lineTo((px[1]+px[2])/2, (py[1]+py[2])/2);\n\t\t\t\n\t\t} else {\n\t\t\tp.moveTo(px[1], py[1]);\n\t\t\tp.lineTo(px[3], py[1]);\n\t\t\tp.lineTo(px[2], py[2]);\n\t\t\tp.lineTo(px[1], py[1]);\n\t\t\ttextX3 = canv.getWidth()/2;\n\t\t\ttextY3 = (float) ((0.3)*(py[2]-py[1]) + py[1]);\n\t\t}\n\n\t\tcanvPaint.setColor(0xFF421C52);\n\t\tcanv.drawPath(p, canvPaint);\n\t\t\n\t\tcanvPaint.setColor(Color.WHITE);\n\t\tcanvPaint.setTextSize(30);\n\t\tcanvPaint.setTextAlign(Paint.Align.CENTER);\n\t\t\n\t\tif (selection == 1) {\n\t\t\tcanv.drawText(b2, textX2, textY2, canvPaint);\n\t\t\tcanv.drawText(b3, textX3, textY3, canvPaint);\n\t\t} else if (selection == 2) {\n\t\t\tcanv.drawText(b1, textX1, textY1, canvPaint);\t\t\t\n\t\t\tcanv.drawText(b3, textX3, textY3, canvPaint);\n\t\t} else if (selection == 3) {\n\t\t\tcanv.drawText(b1, textX1, textY1, canvPaint);\n\t\t\tcanv.drawText(b2, textX2, textY2, canvPaint);\n\t\t} else {\n\t\t\tcanv.drawText(b1, textX1, textY1, canvPaint);\n\t\t\tcanv.drawText(b2, textX2, textY2, canvPaint);\n\t\t\tcanv.drawText(b3, textX3, textY3, canvPaint);\n\t\t}\n\n\t}",
"public void drawAllGraphics(){\r\n\t\t \r\n\t}",
"private synchronized void paint() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\tBufferStrategy bs;\n\t\tbs = this.getBufferStrategy();\n\t\t\n\t\tGraphics2D g = (Graphics2D) bs.getDrawGraphics();\n\t\tg.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t\t\n\t\tg.setColor(Color.BLACK);\n\t\tg.fillRect(0, 0, this.getWidth(), this.getHeight());\n\t\t\n\t\tif(this.reiniciar == true){\n\t\t\tString ca = \"\" + cuentaAtras;\n\t\t\tg.setColor(Color.WHITE); \n\t\t\tg.setFont(new Font (\"Consolas\", Font.BOLD, 80));\n\t g.drawString(\"Puntuación: \" + puntuacion, 100, 200);\n\t \n\t g.setColor(Color.WHITE); \n\t\t\tg.setFont(new Font (\"Consolas\", Font.BOLD, 300));\n\t g.drawString(ca, 400, 500);\n\t \n\t g.setColor(Color.WHITE); \n\t\t\tg.setFont(new Font (\"Consolas\", Font.BOLD, 40));\n\t\t\tg.drawString(\"Pulsa enter para volver a jugar\", 150, 600);\n\t\t}\n\t\t\n\t\telse if(this.reiniciar == false){\n\t\t\tfor(int i=0;i<numDisparos;i++){ \n\t\t\t\t disparos[i].paint(g);\n\t\t\t}\n\t\t\tfor(int i=0;i<numAsteroides;i++){\n\t\t\t\t asteroides[i].paint(g);\n\t\t\t}\n\t\t\t\n\t\t\tif(this.isNaveCreada()==true && nave!=null){\n\t\t\t\tnave.paint(g);\n\t\t\t}\n\t\t\t\n\t\t\tif(enemigo.isVivo()==true){\n\t\t\t\tenemigo.paint(g);\n\t\t\t\t\n\t\t\t\tfor(int i=0;i<numDisparosE;i++){ \n\t\t\t\t\t disparosE[i].paint(g);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tg.setColor(Color.WHITE); \n\t\t\tg.drawString(\"Puntuacion \" + puntuacion,20,20); \n\t\t\t\n\t\t\tg.setColor(Color.WHITE); \n\t\t\tg.drawString(\"Vida \" + this.getVidas(),20,40);\n\t\t}\n\t\t\n\t\tg.dispose();\n\t\tbs.show();\n\t}",
"public void draw(Graphics g){\n\t}",
"@Override\n\tpublic void draw(Graphics2D g2d) {\n\t\t\n\t}",
"public void toutDessiner(Graphics g);",
"public void paint() {\r\n\t\tBufferStrategy bf = base.frame.getBufferStrategy();\r\n\t\ttry {\r\n\t\t\tg = bf.getDrawGraphics();\r\n\t\t\tg.clearRect(0, 0, 1024, 768);\r\n\t\t\tg.setFont(normal);\r\n\t\t\tif (gameState == 1) {\r\n\t\t\t\tg.drawImage(playButton, playButtonXM, playButtonYM, playButtonWidthM, playButtonHeightM, this);\t\t\t\t\r\n\t\t\t}else if (gameState == 3){\r\n\t\t\t\tint weaponPosX = ((arrow2X-arrowX) /2) + arrowX - 20;\r\n\t\t\t\tint weaponPosY = arrowY - 15;\r\n\t\t\t\tg.drawImage(Arrow, arrowX, arrowY, arrowWidth, arrowHeight, this);\r\n\t\t\t\tg.drawImage(Arrow, arrow2X, arrowY, -arrowWidth, arrowHeight, this);\r\n\t\t\t\tg.drawImage(Arrow, arrowX, arrowY2ndRow, arrowWidth, arrowHeight, this);\r\n\t\t\t\tg.drawImage(Arrow, arrow2X, arrowY2ndRow, -arrowWidth, arrowHeight, this);\r\n\t\t\t\tg.drawImage(Arrow, arrowX, arrowY3rdRow, arrowWidth, arrowHeight, this);\r\n\t\t\t\tg.drawImage(Arrow, arrow2X, arrowY3rdRow, -arrowWidth, arrowHeight, this);\r\n\t\t\t\tg.drawImage(Arrow, arrowX, arrowY4thRow, arrowWidth, arrowHeight, this);\r\n\t\t\t\tg.drawImage(Arrow, arrow2X, arrowY4thRow, -arrowWidth, arrowHeight, this);\r\n\t\t\t\tg.drawImage(playButton, playButtonX, playButtonY, playButtonWidth, playButtonHeight, this);\r\n\r\n\t\t\t\t//text boxes above choices\r\n\t\t\t\tg.setColor(Color.black);\r\n\t\t\t\tg.drawString(\"Weapon\", weaponPosX, weaponPosY);\r\n\t\t\t\tg.drawString(\"Difficulty\", weaponPosX, (arrowY2ndRow - 15));\r\n\t\t\t\tg.drawString(\"Number of AI\", weaponPosX - 12, (arrowY3rdRow - 15));\r\n\t\t\t\tg.drawString(\"Number of players\", weaponPosX - 20, (arrowY4thRow - 15));\r\n\r\n\t\t\t\tif (getDifficulty() == 1){\r\n\t\t\t\t\tg.drawImage(Easy, difficultyXPos, arrowY2ndRow, difficultyWidth , arrowHeight, this);\r\n\t\t\t\t}else if (getDifficulty() == 2) {\r\n\t\t\t\t\tg.drawImage(Normal, difficultyXPos, arrowY2ndRow, difficultyWidth, arrowHeight, this);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tg.drawImage(Hard, difficultyXPos, arrowY2ndRow, difficultyWidth, arrowHeight, this);\r\n\t\t\t\t}\r\n\t\t\t\tif (getAttackStyle() == 2) {\r\n\t\t\t\t\tg.drawImage(Arrowr, weaponPosX -85, weaponPosY + 15, (arrow2X - arrowX) - 280, arrowHeight, this);\r\n\t\t\t\t}else {\r\n\t\t\t\t\t//due to the sword using all of the x positions the width is slightly different\r\n\t\t\t\t\tg.drawImage(SwordL, weaponPosX -85, weaponPosY + 15, (arrow2X - arrowX) - 300, arrowHeight, this);\r\n\t\t\t\t}\r\n\t\t\t\tint AIXPos = weaponPosX;\r\n\t\t\t\tif (AINum >= 10 && AINum<100) {\r\n\t\t\t\t\tAIXPos -=25;\r\n\t\t\t\t} else if (AINum >= 100 && AINum < 1000) {\r\n\t\t\t\t\t//the reason why this grows by 40 instead of an additional 20 is because we are not storing the variable\r\n\t\t\t\t\t//of current position anywhere so we just add another 20 onto the decrease\r\n\t\t\t\t\tAIXPos-=50;\r\n\t\t\t\t} else if (AINum >= 1000) {\r\n\t\t\t\t\tAIXPos-=75;\r\n\t\t\t\t}\r\n\t\t\t\tg.setFont(numbers);\r\n\t\t\t\tString currentNum = Integer.toString(AINum);\r\n\t\t\t\tString currentPlayerString = Integer.toString(currentPlayer);\r\n\t\t\t\tg.drawString(currentNum, AIXPos, arrowY3rdRow + 72);\r\n\t\t\t\tg.drawString(currentPlayerString, weaponPosX, arrowY4thRow + 72);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif ((!escape) && (!dead) &&(!allAIDead)) {\r\n\t\t\t\t\tg.drawImage(picture, 0, 0, base.frame.getWidth(), base.frame.getHeight(), this);\r\n\t\t\t\t\tfor (int i = 0; i < playerObject.length; i++) {\r\n\t\t\t\t\t\tint playerX = (int) playerObject[i].getX();\r\n\t\t\t\t\t\tint playerY = (int) playerObject[i].getY();\r\n\t\t\t\t\t\tg.setColor(Color.darkGray);\r\n\t\t\t\t\t\t// health bar\r\n\t\t\t\t\t\tg.fillRect(playerX, playerY - 30, 100, healthY);\r\n\t\t\t\t\t\tg.setColor(Color.red);\r\n\t\t\t\t\t\tg.fillOval(playerX, playerY, 20, 20);\r\n\t\t\t\t\t\tg.fillRect(playerX, playerY - 30, (int) (playerObject[i].getHealth()/2) , healthY);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//AI\r\n\t\t\t\t\tfor (int i = 0; i < AIObject.length; i++) {\r\n\t\t\t\t\t\tif (!AIObject[i].isDead()) {\r\n\t\t\t\t\t\t\tint AIRoundedX = (int) AIObject[i].getAIX();\r\n\t\t\t\t\t\t\tint AIRoundedY = (int) AIObject[i].getAIY();\r\n\t\t\t\t\t\t\tif (AIObject[i].getColor() == null) {\r\n\t\t\t\t\t\t\t\tint red = generator.nextInt(256);\r\n\t\t\t\t\t\t\t\tint green = generator.nextInt(256);\r\n\t\t\t\t\t\t\t\tint blue = generator.nextInt(256);\r\n\t\t\t\t\t\t\t\tColor newColor = new Color(red,green,blue);\r\n\t\t\t\t\t\t\t\tg.setColor(newColor);\r\n\t\t\t\t\t\t\t\tAIObject[i].setColor(newColor);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tg.setColor(AIObject[i].getColor());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tg.fillOval(AIRoundedX, AIRoundedY, 20, 20);\r\n\t\t\t\t\t\t\tAIDeadCount = 0;\r\n\t\t\t\t\t\t\tg.setColor(Color.darkGray);\r\n\t\t\t\t\t\t\tg.fillRect(AIRoundedX, AIRoundedY - 40, AI_ORIG_HEALTH/AI_HEALTH_WIDTH_SCALE, healthY);\r\n\t\t\t\t\t\t\tg.setColor(AIObject[i].getColor());\r\n\t\t\t\t\t\t\tg.fillRect(AIRoundedX, AIRoundedY - 40, (int) AIObject[i].getAIHealth()/AI_HEALTH_WIDTH_SCALE, healthY);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tAIDeadCount++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// early access banner\r\n\t\t\t\t\tg.drawImage(earlyAccess, 0, 24, this);\r\n\r\n\t\t\t\t\tif (attackStyle == 2) {\r\n\t\t\t\t\t\tif (drawArrow == true) {\r\n\t\t\t\t\t\t\tinFlight = true;\r\n\t\t\t\t\t\t\tshouldPlaySound = true;\r\n\t\t\t\t\t\t\tif ((fireLeft) && (currentlyDrawingArrow != 2)) {\r\n\t\t\t\t\t\t\t\tgoingLeft = true;\r\n\t\t\t\t\t\t\t\tgoingRight = false;\r\n\t\t\t\t\t\t\t\tcurrentlyDrawingArrow = 1;\r\n\t\t\t\t\t\t\t\tg.drawImage(Arrowl, Math.round(aX), Math.round(aY), this);\r\n\r\n\t\t\t\t\t\t\t} else if ((fireRight) && (currentlyDrawingArrow != 1)) {\r\n\t\t\t\t\t\t\t\tgoingRight = true;\r\n\t\t\t\t\t\t\t\tgoingLeft = false;\r\n\t\t\t\t\t\t\t\tcurrentlyDrawingArrow = 2;\r\n\t\t\t\t\t\t\t\tg.drawImage(Arrowr, Math.round(aX), Math.round(aY), this);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ((aX >= 1024) || (!drawArrow) || (aX <= 0)) {\r\n\t\t\t\t\t\t\tinFlight = false;\r\n\t\t\t\t\t\t\taX = playerObject[0].getX();\r\n\t\t\t\t\t\t\taY = playerObject[0].getY();\r\n\t\t\t\t\t\t\tcurrentlyDrawingArrow = 0;\r\n\t\t\t\t\t\t\tdrawArrow = false;\r\n\t\t\t\t\t\t\tshouldPlaySound = false;\r\n\t\t\t\t\t\t\tnotPlayingSound = false;\r\n\t\t\t\t\t\t\talreadyShot = false;\r\n\t\t\t\t\t\t\tif (wasReleased) {\r\n\t\t\t\t\t\t\t\tlClick = 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}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tint roundedX = Math.round(playerObject[0].getX());\r\n\t\t\t\t\t\tint roundedY = Math.round(playerObject[0].getY());\r\n\t\t\t\t\t\tif (drawSword) {\r\n\t\t\t\t\t\t\tswordCount++;\r\n\t\t\t\t\t\t\tif (mouseLeft) {\r\n\t\t\t\t\t\t\t\tif (swordCount < 5) {\r\n\t\t\t\t\t\t\t\t\tg.drawImage(SwordHorizontalL, roundedX - 2, roundedY - 45, this);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if (swordCount > 5 && swordCount <=15) {\r\n\t\t\t\t\t\t\t\t\tg.drawImage(Sword45L, roundedX - 45, roundedY - 30, this);\r\n\t\t\t\t\t\t\t\t}else if (swordCount >15 && swordCount<30) {\r\n\t\t\t\t\t\t\t\t\tg.drawImage(SwordL, roundedX - 63, roundedY, this);\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if (swordCount >30 || !drawSword){\r\n\t\t\t\t\t\t\t\t\tg.drawImage(SwordHorizontalL, roundedX - 2, roundedY - 45, this);\r\n\t\t\t\t\t\t\t\t\tswordCount = 0;\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\t\tif (swordCount < 5) {\r\n\t\t\t\t\t\t\t\t\t//image flip g.drawImage(SwordHorizontalL, Math.round(x) - 2, Math.round(y) - 45, -SwordHorizontalL.getWidth(this),SwordHorizontalL.getHeight(this),this);\r\n\t\t\t\t\t\t\t\t\tg.drawImage(SwordHorizontalL, roundedX + 20, roundedY - 45,\r\n\t\t\t\t\t\t\t\t\t\t\t-swordHorizontalLWidth,swordHorizontalLWidth,this);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if (swordCount > 5 && swordCount <=15) {\r\n\t\t\t\t\t\t\t\t\tg.drawImage(Sword45L, roundedX + 80, roundedY - 30,\r\n\t\t\t\t\t\t\t\t\t\t\t-sword45LWidth, sword45LHeight, this);\r\n\t\t\t\t\t\t\t\t}else if (swordCount >15 && swordCount<30) {\r\n\t\t\t\t\t\t\t\t\tg.drawImage(SwordL, roundedX +90, roundedY, -swordLWidth, swordLHeight, this);\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if (swordCount >30 || !drawSword){\r\n\t\t\t\t\t\t\t\t\tg.drawImage(SwordHorizontalL, roundedX + 20, roundedY - 45,\r\n\t\t\t\t\t\t\t\t\t\t\t-swordHorizontalLWidth, swordHorizontalLHeight, this);\r\n\t\t\t\t\t\t\t\t\tswordCount = 0;\t\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} else if (shield) {\r\n\t\t\t\t\t\t\tif (mouseLeft) {\r\n\t\t\t\t\t\t\t\tg.drawImage(shieldImage, roundedX - 5, roundedY - 5, shieldWidth, scaledShieldHeight, this);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tg.drawImage(shieldImage, roundedX + 5, roundedY - 5, shieldWidth, scaledShieldHeight, this);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tif(mouseLeft) {\r\n\t\t\t\t\t\t\t\tg.drawImage(SwordHorizontalL, roundedX - 2, roundedY - 45, this);\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tg.drawImage(SwordHorizontalL, roundedX + 20, roundedY - 45,\r\n\t\t\t\t\t\t\t\t\t\t-SwordHorizontalL.getWidth(this), SwordHorizontalL.getHeight(this), this);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tswordCount = 0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (wasReleased) {\r\n\t\t\t\t\t\t\tlClick = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}else if (escape) {\r\n\t\t\t\t\tg.setColor(Color.white);\r\n\t\t\t\t\tg.drawRect(0, 0, 1024, 768);\r\n\t\t\t\t\tg.setColor(Color.black);\r\n\t\t\t\t\tg.drawString(\"PAUSED\", 512, 389);\r\n\t\t\t\t}\r\n\t\t\t\telse if (dead) {\r\n\t\t\t\t\tg.setColor(Color.black);\r\n\t\t\t\t\tg.drawRect(0, 0, 1024, 768);\r\n\t\t\t\t\tg.drawString(\"Dead\", 512, 389);\r\n\t\t\t\t} else if(allAIDead) {\r\n\t\t\t\t\tg.setColor(Color.black);\r\n\t\t\t\t\tg.drawRect(0, 0, 1024, 768);\r\n\t\t\t\t\tg.drawString(\"You win\", 512, 389);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tg.dispose();\r\n\t\t}\r\n\t\t// Shows the contents of the backbuffer on the screen.\r\n\t\tbf.show();\r\n\t}",
"private void render()\n {\n //Applicazione di un buffer \"davanti\" alla tela grafica. Prima di disegnare \n //sulla tela grafica il programma disegnerà i nostri oggetti grafici sul buffer \n //che, in seguito, andrà a disegnare i nostri oggetti grafici sulla tela\n bufferStrategico = display.getTelaGrafica().getBufferStrategy();\n \n //Se il buffer è vuoto (== null) vengono creati 3 buffer \"strategici\"\n if(bufferStrategico == null)\n {\n display.getTelaGrafica().createBufferStrategy(3);\n return;\n }\n \n //Viene definito l'oggetto \"disegnatore\" di tipo Graphic che disegnerà i\n //nostri oggetti grafici sui nostri buffer. Può disegnare qualsiasi forma\n //geometrica\n disegnatore = bufferStrategico.getDrawGraphics();\n \n //La riga seguente pulisce lo schermo\n disegnatore.clearRect(0, 0, larghezza, altezza);\n \n //Comando per cambiare colore dell'oggetto \"disegnatore\". Qualsiasi cosa\n //disengata dal disegnatore dopo questo comando avrà questo colore.\n \n /*disegnatore.setColor(Color.orange);*/\n \n //Viene disegnato un rettangolo ripieno. Le prime due cifre indicano la posizione \n //da cui il nostro disegnatore dovrà iniziare a disegnare il rettangolo\n //mentre le altre due cifre indicano le dimensioni del rettangolo\n \n /*disegnatore.fillRect(10, 50, 50, 70);*/\n \n //Viene disegnato un rettangolo vuoto. I parametri hanno gli stessi valori\n //del comando \"fillRect()\"\n \n /*disegnatore.setColor(Color.blue);\n disegnatore.drawRect(0,0,10,10);*/\n \n //I comandi seguenti disegnano un cerchio seguendo la stessa logica dei\n //rettangoli, di colore verde\n \n /*disegnatore.setColor(Color.green);\n disegnatore.fillOval(50, 10, 50, 50);*/\n \n /*Utilizziamo il disegnatore per caricare un'immagine. Il primo parametro\n del comando è l'immagine stessa, il secondo e il terzo parametro sono \n le coordinate dell'immagine (x,y) mentre l'ultimo parametro è l'osservatore\n dell'immagine (utilizzo ignoto, verrà impostato a \"null\" in quanto non\n viene usato)*/\n //disegnatore.drawImage(testImmagine,10,10,null);\n \n /*Comando che disegna uno dei nostri sprite attraverso la classe \"FoglioSprite\".*/\n //disegnatore.drawImage(foglio.taglio(32, 0, 32, 32), 10, 10,null);\n \n /*Viene disegnato un albero dalla classe \"Risorse\" attraverso il disegnatore.*/\n //disegnatore.drawImage(Risorse.omino, x, y,null);\n \n /*Se lo stato di gioco esiste eseguiamo la sua renderizzazione.*/\n if(Stato.getStato() != null)\n {\n \t Stato.getStato().renderizzazione(disegnatore);\n }\n \n //Viene mostrato il rettangolo\n bufferStrategico.show();\n disegnatore.dispose();\n }",
"private void draw() {\n gsm.draw(g);\n }",
"@Override\n\tpublic void draw(Graphics2D g) {\n\t\t\n\t}",
"public static void mainMenu() {\n\t\tStdDraw.setCanvasSize(600, 600);\n\t\tStdDraw.setScale(0, 1000);\n\t\tStdDraw.setPenColor(StdDraw.RED);\n\t\tStdDraw.filledRectangle(500, 500, 1000, 1000);\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\tFont font = new Font(\"Sans Serif\", 20, 20);\n\t\tStdDraw.setFont(font);\n\t\tStdDraw.text(500, 850, \"Six Men Morris Game\");\n\t\tStdDraw.text(500, 750, \"Game Created By: \");\n\t\tStdDraw.text(500, 700, \"Phillip Pavlich, Prakhar Jalan, Dinesh Balakrishnan\");\n\t\tStdDraw.filledRectangle(500, 500, 205, 75);\n\t\tStdDraw.filledRectangle(500, 300, 205, 75);\n\t\tStdDraw.filledRectangle(500, 100, 205, 75);\n\t\t\n\t\tStdDraw.setFont();\n\t\tStdDraw.setPenColor(StdDraw.ORANGE);\n\t\tStdDraw.setPenRadius(0.05);\n\n\t\tStdDraw.filledRectangle(500, 500, 200, 70);\n\t\tStdDraw.filledRectangle(500, 300, 200, 70);\n\t\tStdDraw.filledRectangle(500, 100, 200, 70);\n\n\t\tStdDraw.setPenColor(StdDraw.BLACK);\n\t\tStdDraw.text(500, 500, \"Start New Game\");\n\t\tStdDraw.text(500, 300, \"Continue Game\");\n\t\tStdDraw.text(500, 100, \"Load Saved Game\");\n\t}",
"@Override\n\tpublic void draw() {\n\t\tbg.draw();\n\t\tfor(Test2 t : test)\n\t\t\tt.draw();\n\t\tfor(Test2 t : test2)\n\t\t\tt.draw();\n\t\t\n\t\tfor(Test2 t : test3)\n\t\t\tt.draw();\n\t\tobj.draw();\n\t\tEffect().drawEffect(1);\n\t}",
"private void changeMenu()\n {\n if (_menuMode)\n {\n menuLayout.getChildAt(0).setVisibility(View.VISIBLE);\n menuLayout.getChildAt(1).setVisibility(View.VISIBLE);\n menuLayout.getChildAt(2).setVisibility(View.GONE);\n menuLayout.getChildAt(3).setVisibility(View.GONE);\n menuLayout.getChildAt(4).setVisibility(View.VISIBLE);\n _switchMode.setText(\"Watch Mode\");\n\n }\n else\n {\n menuLayout.getChildAt(0).setVisibility(View.GONE);\n menuLayout.getChildAt(1).setVisibility(View.VISIBLE);\n _switchMode.setText(\"Paint Mode\");\n menuLayout.getChildAt(2).setVisibility(View.VISIBLE);\n menuLayout.getChildAt(3).setVisibility(View.VISIBLE);\n menuLayout.getChildAt(4).setVisibility(View.GONE);\n _timeBar.setProgress((int) (_paintArea.getPercent() * 100f));\n }\n _paintArea.setPaintMode(_menuMode);\n _menuMode = !_menuMode;\n }",
"@Override\n protected void onDraw(Canvas canvas){\n super.onDraw(canvas);\n canvas.drawPath(path_draw, paint_brush);\n }",
"public void draw(Graphics g){\n if (isEmpty()) {\n g.setColor(new Color(255, 204, 204));\n g.fillRect(getXGraphic(), getYGraphic(), 120, 120);\n g.setColor(Color.BLACK);\n if (getIndication()){\n g.setColor(new Color(0, 0, 0, 100));\n g.fillRect(getXGraphic(), getYGraphic(),120,120);\n }\n if (getTargetable()){\n g.setColor(new Color(0, 0, 255));\n g.drawRect(getXGraphic(), getYGraphic(),120,120);\n }\n\n g.drawRect(getXGraphic(), getYGraphic(), 120, 120);\n } else {\n enemy.draw(getXGraphic(), getYGraphic() ,g, getIndication());\n\n //Draw blue square around if it is a targetable space\n if (getTargetable()){\n g.setColor(new Color(0, 0, 255));\n g.drawRect(getXGraphic(), getYGraphic(),120,120);\n }\n }\n }",
"void reDraw();",
"public void limpiarPuntos(Graphics g, int s){\n Color repaint = new Color(102, 102, 102);\n g.setColor(repaint);\n g.fillRect(0, 35, 550, 560);\n limpiarTabla();\n // btnSegmentos.setEnabled(false);\n if (s==1)DibujarPlano(jpPlano.getGraphics(), 1);\n else if (s==2) DibujarPlano(jpPlano.getGraphics(), 2);\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}",
"public void draw(Graphics g) {\n\t\t\r\n\t}",
"public void draw() {\n }",
"public void draw() {\n \n // TODO\n }",
"private void draw(){\n if (ourHolder.getSurface().isValid()) {\n\n if (openMainMenu) {\n mainMenu();\n } else if (openGameOverMenu) {\n gameOverMenu();\n } else if (openUpgradesMenu) {\n upgradeMenu();\n } else if (openPauseMenu) {\n pauseMenu();\n } else {\n // Lock the canvas ready to draw\n gameCanvas = ourHolder.lockCanvas();\n\n // Draw the background\n gameCanvas.drawBitmap(btBgLeft, leftSideRect.left, leftSideRect.top, null);\n gameCanvas.drawBitmap(btBgMiddle, middleSideRect.left, middleSideRect.top, null);\n gameCanvas.drawBitmap(btBgRight, rightSideRect.left, rightSideRect.top, null);\n\n // HUD Rectangle\n String padding = \" | \";\n paint.setTextSize(30);\n paint.setColor(Color.argb(125, 0, 0, 0));\n gameCanvas.drawRect(hudRect, paint);\n paint.setColor(Color.argb(255, 255, 255, 255));\n gameCanvas.drawText(\"Bonus: \" + multiplier + padding + \"Score: \" + totalScore + padding + \"Shields: \" + shields + padding + \"Cash: £\" + cash, hudRect.left + (hudRect.right/25), hudRect.bottom - (hudRect.height()/3), paint);\n\n // Draw the invaders bullets if active\n for(int i = 0; i < invadersBullets.length; i++){\n paint.setColor(Color.argb(255, 228, 53, 37));\n if(invadersBullets[i].getStatus()) {\n gameCanvas.drawRect(invadersBullets[i].getRect(), paint);\n }\n }\n\n // Draw the players bullet if active\n if(bullet.getStatus()){\n paint.setColor(Color.argb(255, 30, 127, 224));\n gameCanvas.drawRect(bullet.getRect(), paint);\n }\n\n // Draw the player spaceship\n paint.setColor(Color.argb(255, 255, 255, 255));\n gameCanvas.drawBitmap(defender.getBitmap(), defender.getX(), screenY - defender.getHeight(), paint);\n\n // Draw the invaders\n for(int i = 0; i < numInvaders; i++){\n if(invaders[i].getVisibility()) {\n if(uhOrOh) {\n gameCanvas.drawBitmap(invaders[i].getBitmap(), invaders[i].getX(), invaders[i].getY(), paint);\n }else{\n gameCanvas.drawBitmap(invaders[i].getBitmap2(), invaders[i].getX(), invaders[i].getY(), paint);\n }\n }\n }\n\n // Pause button\n paint.setColor(Color.argb(125, 0, 0, 0));\n gameCanvas.drawRect(pauseRect, paint);\n paint.setTextSize((float) (screenX*0.0138));\n paint.setColor(Color.argb(255, 255, 255, 255));\n gameCanvas.drawText(\"PAUSE GAME\", pauseRect.left + (pauseRect.width()/10), pauseRect.bottom - (pauseRect.height()/3), paint);\n\n // Animations\n renderAnimations();\n\n // Draw everything to the screen\n ourHolder.unlockCanvasAndPost(gameCanvas);\n }\n\n }\n }",
"public void draw(){\n }",
"@Override\n\tpublic void draw(Graphics graphics) {\n\t\tgraphics.setColor(Color.black);\t\t\t\t\t\t\t\t\t//Farbe schwarz\n\t\tgraphics.drawRect(point.getX(),point.getY() , width, height);\t//malt ein leeren Rechteck\n\t}",
"public void draw(Graphics g) {\n\t\t\n\t}",
"public void paint(Graphics g){\n\t\tsuper.paint(g);\n\t\t\n\t\t//Mapa\n\t\tthis.mapa.paint(g);\n\t\t\n\t\t//Avatar\n\t\tthis.av.paint(g);\n\t\n\t\t//painel de Score\n\t\tthis.sp.paint(g);\n\t\tthis.sp.ScoreText(g);\n\n\t\t//lixo\n\t\tfor(int i=0;i<10;i++){\n\t\t\tthis.lixo[i].paint(g);;\n\t\t}\n\t\t\n\t\t//A partir de 15 segundos o lixo especial ir� aparecer\n\t\tif(TimerGameplay.tempo <= 15){\n \t\tthis.lixoEspecial.paint(g);\n \t}\n\t}",
"void draw(Graphics g, int xoff, int yoff) {\n this.draw(g, xoff, yoff, 0, 0, this.getWidth(), this.getHeight());\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.drawing, menu);\n return true;\n }",
"@Override\n public void paint(Graphics g){\n GraficasEstatus cantidad=new GraficasEstatus();\n super.paint(g);\n if(bandera==true){\n \n int nuevoingreso=cantidad.nuevoIngreso();\n int noreparado=cantidad.noReparado();\n int enrevision=cantidad.enRevision();\n int reparado=cantidad.reparado();\n int entregado=cantidad.entregado();\n int otro=cantidad.otro();\n \n int valormayor=mayorValor(nuevoingreso, noreparado, enrevision, reparado, entregado, otro);\n \n int ningreso=nuevoingreso*400/valormayor;\n int nreparados=noreparado*400/valormayor;\n int erevision=enrevision*400/valormayor;\n int reparados=reparado*400/valormayor;\n int entregados=entregado*400/valormayor;\n int otros=otro*400/valormayor;\n \n g.setColor(new Color(255,170,0));\n g.fillRect(100, 100, ningreso, 40);\n g.drawString(\"Nuevo ingreso\", 10, 118);\n g.drawString(\"Cantida \"+nuevoingreso, 10, 133);\n \n g.setColor(new Color(255,0,0));\n g.fillRect(100, 150, nreparados, 40);\n g.drawString(\"No reparados\", 10, 168);\n g.drawString(\"Cantida \"+noreparado, 10, 180);\n \n g.setColor(new Color(0,0,255));\n g.fillRect(100, 200, erevision, 40);\n g.drawString(\"En revision\", 10, 218);\n g.drawString(\"Cantida \"+enrevision, 10, 233);\n \n g.setColor(new Color(0,150,255));\n g.fillRect(100, 250, reparados, 40);\n g.drawString(\"Reparados\", 10, 268);\n g.drawString(\"Cantida \"+reparado, 10, 280);\n \n g.setColor(new Color(0,130,0));\n g.fillRect(100, 300, entregados, 40);\n g.drawString(\"Entregados\", 10, 318);\n g.drawString(\"Cantida \"+entregado, 10, 333);\n \n g.setColor(new Color(150,100,100));\n g.fillRect(100, 350, otros, 40);\n g.drawString(\"Otro\", 10, 368);\n g.drawString(\"Cantida \"+otro, 10, 380);\n \n }\n }",
"public static void Draw(Canvas canvas, Sprite graphics, vect2 pos, int size)\n {\n vect2 p = new vect2(pos);\n p = Camera.instance.Transform(p);\n\n drawables[graphics.ID()].setBounds((int)p.x - size / 2, (int)p.y - size / 2, (int)p.x + size / 2, (int)p.y + size / 2);\n drawables[graphics.ID()].draw(canvas);\n }",
"public void draw(Graphics g){\r\n\r\n /*\r\n we want to create 2D graphics for better performance\r\n g.create() will create a new reference so that we don't use the old one and create problems\r\n */\r\n\r\n Graphics2D graphics2D = (Graphics2D)g.create();\r\n\r\n //this makes graphics more smooth\r\n graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\r\n\r\n //this rotates the obstacle to that angle and it rotates around a position around its own\r\n graphics2D.rotate(Math.toRadians(angle),getXPosition(),getYPosition());\r\n\r\n //set the color and draw the object frame into the screen\r\n graphics2D.setColor(getFrame().getColor());\r\n graphics2D.fill(getFrame().getModel());\r\n\r\n //set the color and draw the object into the screen\r\n graphics2D.setColor(getColor());\r\n graphics2D.fill(getModel());\r\n\r\n //in order to not use too much memory, and because we don't need it any more, we will dispose the graphics object\r\n graphics2D.dispose();\r\n\r\n }",
"@Override\n public void draw() {\n /** preparacion de la ventana **/\n background(255);\n lights();\n directionalLight(40, 90, 100, 1, 40, 40);\n\n translate(origin.x,origin.y);\n scale(zoom);\n\n\n /** entrada del usuario **/\n userInput();\n /** ejes X Y Z **/\n drawAxes();\n /** aplicar ik **/\n writePos();\n\n /** escala de los objetos**/\n scale(-1.2f);\n\n /** esfera que muestra la posicion en coord X Y Z\n *\n * X -> coord[0]\n * Y -> coord[1]\n * Z -> coord[2]\n *\n * **/\n pushMatrix();\n noStroke();\n fill(250, 100, 1);\n translate(-coord_cartesian[1] ,-coord_cartesian[2] -11,-coord_cartesian[0] );\n sphere(2);\n popMatrix();\n\n\n /**\n * Dibuja el brazo\n */\n pushMatrix();\n arm.drawArm();\n popMatrix();\n }",
"public void restoreGraphics() {\n\n if ( g2 instanceof AimxcelGraphics2D ) {\n AimxcelGraphics2D aimxcelGraphics2D = (AimxcelGraphics2D) g2;\n aimxcelGraphics2D.popState();\n }\n else {\n if ( g2.getRenderingHints() != renderingHints ) {\n g2.setRenderingHints( renderingHints );\n }\n if ( g2.getPaint() != paint ) {\n g2.setPaint( paint );\n }\n if ( g2.getColor() != color ) {\n g2.setColor( color );\n }\n if ( g2.getStroke() != stroke ) {\n g2.setStroke( stroke );\n }\n if ( g2.getComposite() != composite ) {\n g2.setComposite( composite );\n }\n if ( g2.getTransform() != transform ) {\n g2.setTransform( transform );\n }\n if ( g2.getFont() != font ) {\n g2.setFont( font );\n }\n if ( g2.getClip() != clip ) {\n g2.setClip( clip );\n }\n if ( g2.getBackground() != background ) {\n g2.setBackground( background );\n }\n }\n }",
"@Override\n public void paintComponent(Graphics g) {\n //Switch para seleccionar tipo de cuadro a pintar\n switch (tipo) {\n case JUGADOR:\n g.drawImage(jugador,x,y,null);\n break;\n case OBSTACULO:\n g.drawImage(obstaculo,x,y,null);\n break;\n case OBSTACULO2:\n switch (indiceObstaculo2) {\n case 0:\n g.drawImage(obstaculo20,x,y,null);\n break;\n case 1:\n g.drawImage(obstaculo21,x,y,null);\n break;\n case 2:\n g.drawImage(obstaculo22,x,y,null);\n break;\n case 3:\n g.drawImage(obstaculo23,x,y,null);\n break;\n case 4:\n g.drawImage(obstaculo24,x,y,null);\n break;\n case 5:\n g.drawImage(obstaculo25,x,y,null);\n break;\n }\n break;\n case RECOMPENSA:\n g.drawImage(recompensa,x,y,null);\n break;\n case ADVERSARIO:\n g.drawImage(adversario,x,y,null);\n break;\n case CASA:\n g.drawImage(casa,x,y,null);\n break;\n }\n }",
"public void paint(Graphics g) {\t\t\t// Erzeugt und platziert alle Grafiken\n super.paint(g);\n //long zeit = System.currentTimeMillis();\n \n Graphics2D g2d = (Graphics2D)g;\n \n g2d.drawImage(background, 0, 0, this); \t// Hintergrundbild\n \n // Monster\n for(int a=0; a<Enemy.enemyList.size(); a++) { // Setzt ein Icon für jeden erstellten Gegner\n\t\t\tg2d.drawImage(Enemy.getImg(a), Enemy.getX(a), Enemy.getY(a), this);\n\t\t\t//System.out.println(\"Enemy: \" + Enemy.getX(a));\n\t\t}\n\n \n\t\t\n\t\t\n\t\t// DisplayList\n\t\tfor(int a=0; a<DisplayManager.displayList.size(); a++) {\n \tg2d.drawImage(DisplayManager.displayList.get(a).img, DisplayManager.displayList.get(a).x, DisplayManager.displayList.get(a).y, this);\n }\n\t\t\n\n\t\tDisplayManager.draw(g2d);\n \n\t\t\n\t\t\n\t\t// You Died Menu\n\t\tif(Player.showYouDiedImage) {\n\t\t\tg2d.drawImage(layer, 0, 0, this);\n\t\t\tg2d.drawImage(youDiedMenu, 200, 100, this);\n\t\t}\n\t\t\n Toolkit.getDefaultToolkit().sync();\n g.dispose();\n }",
"public void paintComponent (Graphics g){\r\n\t\tsuper.paintComponent(g);\r\n\t\t//MAIN MENU SCREEN (RULES)\r\n\t\tif (screen == 0) {\r\n\t\t\tg.clearRect (0, 0, this.getWidth (), this.getHeight ());\r\n\t\t\tg.setColor((Color.BLACK));\r\n\t\t\tg.fillRect(0, 0, this.getWidth(), this.getHeight());\r\n\t\t\tg.drawImage(rulesImage, 185, 10, this);\r\n\t\t\tg.setFont (ARIAL_BOLD);\r\n\t\t\tg.setColor(Color.WHITE);\r\n\t\t\tg.drawString(\"A game of memory skill!\",150,245);\r\n\t\t\tg.setFont (ARIAL_TEXT);\r\n\t\t\tg.setColor(Color.WHITE);\r\n\t\t\tg.drawString(\"The game will show you a colour pattern.\", 160, 270);\r\n\t\t\tg.drawString(\"Remember which colours were lit up. Once the \", 140, 300); \r\n\t\t\tg.drawString(\"pattern is finished, repeat it to pass to the next level.\", 130, 330);\r\n\t\t\tg.setFont (ARIAL_BOLD);\r\n\t\t\tg.setColor(Color.WHITE);\r\n\t\t\tg.drawString(\"PLAY\", 250, 390);\t\r\n\t\t}\r\n\t\t//ORIGINAL COLOURS\r\n\t\telse if (screen == 1){\r\n\t\t\t//Draws Game Titles (Text)\r\n\t\t\tg.drawImage (logoImage, 5, 30, this);\r\n\t\t\tg.setFont (ARIAL_BOLD);\r\n//\t\t\tg.setColor(Color.WHITE);\r\n//\t\t\tString scoreTitle = \"Score: \" + score;\r\n//\t\t\tString highestTitle = \"Highest: \" + highest;\r\n//\t\t\tg.drawString(scoreTitle, 420, 50);\r\n//\t\t\tg.drawString(highestTitle, 420, 80);\r\n\t\t\tg.setColor(Color.WHITE);\r\n\t\t\tg.drawString(\"Press to Start\", 12, 100);\r\n\t\t\t\r\n\t\t\t//Draws Colours \r\n\t\t\tg.setColor(REDFADE);\r\n\t\t\tg.fillArc(160, 100, 300, 300, 0, 90);\r\n\t\t\tg.setColor(GREENFADE);\r\n\t\t\tg.fillArc(150, 100, 300, 300, 90, 90);\r\n\t\t\tg.setColor(YELLOWFADE);\r\n\t\t\tg.fillArc(150, 110, 300, 300, 180, 90);\r\n\t\t\tg.setColor(BLUEFADE);\r\n\t\t\tg.fillArc(160, 110, 300, 300, 270, 90);\r\n\t\t}\r\n\t\t//MONOCHROMATIC COLOURS\r\n\t\telse if (screen == 2){\r\n\t\t\t//Draws Game Titles (Text)\r\n\t\t\tg.drawImage (logoImage, 5, 30, this);\r\n\t\t\tg.setFont (ARIAL_BOLD);\r\n//\t\t\tg.setColor(Color.WHITE);\r\n//\t\t\tString scoreTitle = \"Score: \" + score;\r\n//\t\t\tString highestTitle = \"Highest: \" + highest;\r\n//\t\t\tg.drawString(scoreTitle, 420, 50);\r\n//\t\t\tg.drawString(highestTitle, 420, 80);\r\n\t\t\tg.setColor(Color.WHITE);\r\n\t\t\tg.drawString(\"Press to Start\", 12, 100);\r\n\t\t\t\r\n\t\t\t//Draws Colours\r\n\t\t\tg.setColor(PURPLE_1);\r\n\t\t\tg.fillArc(160, 100, 300, 300, 0, 90);\r\n\t\t\tg.setColor(PURPLE_2);\r\n\t\t\tg.fillArc(150, 100, 300, 300, 90, 90);\r\n\t\t\tg.setColor(PURPLE_3);\r\n\t\t\tg.fillArc(150, 110, 300, 300, 180, 90);\r\n\t\t\tg.setColor(PURPLE_4);\r\n\t\t\tg.fillArc(160, 110, 300, 300, 270, 90);\r\n\t\t}\r\n\t\t//TROPICAL COLOURS\r\n\t\telse if (screen == 3){\r\n\t\t\t//Draws Game Titles (Text)\r\n\t\t\tg.drawImage (logoImage, 5, 30, this);\r\n\t\t\tg.setFont (ARIAL_BOLD);\r\n//\t\t\tg.setColor(Color.WHITE);\r\n//\t\t\tString scoreTitle = \"Score: \" + score;\r\n//\t\t\tString highestTitle = \"Highest: \" + highest;\r\n//\t\t\tg.drawString(scoreTitle, 420, 50);\r\n//\t\t\tg.drawString(highestTitle, 420, 80);\r\n\t\t\tg.setColor(Color.WHITE);\r\n\t\t\tg.drawString(\"Press to Start\", 12, 100);\r\n\t\t\t\r\n\t\t\t//Draws Colours\r\n\t\t\tg.setColor(PINK_TROP);\r\n\t\t\tg.fillArc(160, 100, 300, 300, 0, 90);\r\n\t\t\tg.setColor(GREEN_TROP);\r\n\t\t\tg.fillArc(150, 100, 300, 300, 90, 90);\r\n\t\t\tg.setColor(ORANGE_TROP);\r\n\t\t\tg.fillArc(150, 110, 300, 300, 180, 90);\r\n\t\t\tg.setColor(BLUE_TROP);\r\n\t\t\tg.fillArc(160, 110, 300, 300, 270, 90);\r\n\t\t}\r\n\t\t//GAME OVER\r\n\t\telse if (screen == 4){\r\n\t\t\tg.drawImage (gameoverImage, 40, 50, this);\r\n\t\t\tg.setFont(ARIAL_BOLD);\r\n\t\t\tg.setColor(Color.YELLOW);\r\n\t\t\tg.drawString(\"BETTER LUCK NEXT TIME\", 135, 270);\r\n\t\t\tString scoreTitle = \"Your Score: \" + score;\r\n\t\t\tString highestTitle = \"Highest Score: \" + highest;\r\n\t\t\tg.drawString(scoreTitle, 200, 300);\r\n\t\t\tg.drawString(highestTitle, 180, 330);\r\n\t\t\tg.setColor(Color.WHITE);\r\n\t\t\tg.drawString(\"PLAY\", 250, 390);\r\n\t\t}\r\n\t\t//YOU WIN\r\n\t\telse if (screen == 5){\r\n\t\t\tg.drawImage (winnerImage, 0, 0, this);\r\n\t\t\tg.setFont(ARIAL_BOLD);\r\n\t\t\tg.setColor(Color.WHITE);\r\n\t\t\tString scoreTitle = \"Your Score: \" + score;\r\n\t\t\tString highestTitle = \"Highest Score: \" + highest;\r\n\t\t\tg.drawString(scoreTitle, 205, 330);\r\n\t\t\tg.drawString(highestTitle, 185, 360);\r\n\t\t\tg.drawString(\"PLAY\", 250, 390);\r\n\t\t}\r\n\r\n\t}",
"public void pintaFondo(Graphics g) throws Exception{\r\n\t\tif (Menu.jugador.equals(\"undertale\") || Menu.jugador.equals(\"Undertale\")) {\r\n\t\t\t// Pinta el fondo de pantalla\r\n\t\t\tImageIcon imagen = new ImageIcon(new ImageIcon(getClass().getResource(\"/flappyBird/fondo-und.png\")).getImage());\r\n\t\t\tg.drawImage(imagen.getImage(), 0,0,WIDTH,HEIGHT - 20, null);\r\n\r\n\t\t\t// Pinta pajaro\r\n\t\t\tImageIcon p = new ImageIcon(new ImageIcon(getClass().getResource(\"/flappyBird/undertale.png\")).getImage());\r\n\t\t\tg.drawImage(p.getImage(), bird.x, bird.y, bird.width, bird.height, null);\r\n\t\t\t\r\n\t\t\t// Pinta el suelo\r\n\t\t\tg.setColor(Color.BLACK);\r\n\t\t\tg.fillRect(0, HEIGHT - 120, WIDTH, 140);\r\n\r\n\t\t} else if (Menu.jugador.equals(\"cide\") || Menu.jugador.equals(\"Cide\") || Menu.jugador.equals(\"CIDE\")) {\r\n\t\t\t// Pinta el fondo de pantalla\r\n\t\t\tImageIcon imagen = new ImageIcon(new ImageIcon(getClass().getResource(\"/flappyBird/CIDE.jpg\")).getImage());\r\n\t\t\tg.drawImage(imagen.getImage(), 0,0,WIDTH,HEIGHT - 20, null);\r\n\r\n\t\t\t// Pinta pajaro\r\n\t\t\tImageIcon p = new ImageIcon(new ImageIcon(getClass().getResource(\"/flappyBird/super.png\")).getImage());\r\n\t\t\tg.drawImage(p.getImage(), bird.x, bird.y, bird.width, bird.height, null);\t\r\n\t\t\r\n\t\t\t// Pinta el suelo\r\n\t\t\tg.setColor(Color.GREEN.darker());\r\n\t\t\tg.fillRect(0, HEIGHT - 120, WIDTH, 140);\r\n\r\n\t\t} \r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\telse {\r\n\t\t\t// Pinta el fondo de pantalla\r\n\t\t\tImageIcon imagen = new ImageIcon(new ImageIcon(getClass().getResource(\"/flappyBird/fondo.jpg\")).getImage());\r\n\t\t\tg.drawImage(imagen.getImage(), 0,0,WIDTH,HEIGHT - 20, null);\r\n\r\n\t\t\t// Pinta pajaro\r\n\t\t\tImageIcon p = new ImageIcon(new ImageIcon(getClass().getResource(\"/flappyBird/pajaroFly.gif\")).getImage());\r\n\t\t\tg.drawImage(p.getImage(), bird.x, bird.y, bird.width, bird.height, null);\t\r\n\t\t}\r\n\t}",
"@Override\r\n\t\tpublic void paint(Graphics g) {\n\t\t\tsuper.paint(g);\r\n\t\t}",
"public void draw(Canvas canvas){\n\t\tcanvas.drawColor(Color.BLACK);\n\t\tresultSprite.draw(canvas);\n\t\tnewRound.draw(canvas);\n\t\tbackMenu.draw(canvas);\n\t}",
"public void draw(Graphics graphics);",
"@Override\n public void disableDraw() {\n drawingTools.disableDraw();\n }",
"@Override\r\n\tpublic void draw(Canvas canvas)\r\n\t{\n\t\tsuper.draw(canvas);\r\n\t\tcanvas.drawBitmap(Backgroud,null,new Rect(0, 0, Backgroud.getWidth(), Backgroud.getHeight()),null);\r\n\t\tlabyrinthe.DessinInterface(canvas);\r\n\t\tdepartBalle.draw(canvas);\r\n\r\n\t}",
"public void draw() {\n \n }",
"@Override\n public void draw(Canvas canvas) {\n canvas.drawRGB(40,40,40);\n selectedLevel.draw(canvas);\n }",
"public void draw() {\n\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlp.drawType = 2;\n\t\t\t}",
"@Override public void draw(){\n // this take care of applying all styles (colors/stroke)\n super.draw();\n // draw our shape\n pg.ellipseMode(PGraphics.CORNER); // TODO: make configurable\n pg.ellipse(0,0,getSize().x,getSize().y);\n }",
"@Override\n\tpublic void setPaint() {\n\t\tisPaint = true;\n\t}",
"@Override\n public void paint(Graphics g1){\n\n try{\n super.paint(g1);\n\n drawSymbols_Rel( g1 );\n drawSymbols_Att( g1 );\n /**\n //==== only for test ====\n this.setComplexRelationsCoordinates(20, 28, 33, 38);\n this.setComplexRelationsCoordinates_extraEnds(400, 404);\n */\n\n drawComplexRelationship(g1);\n drawPath(g1);\n \n \n \n }catch(Exception ex){\n }\n }",
"@Override\n\tpublic void paint(Graphics g) {\n\t\tsuper.paint(g);\n\t\t\n\t\tsetBackground(Color.white); // Imposto il colore di sfondo\n\t\tsetForeground(Color.black); // Imposto il colore dell'etichetta\n\t}",
"@Override\n public void paintComponent(Graphics g) \n {\n super.paintComponent(g);\n doDrawing(g);\n }",
"@Override\n\tpublic void draw1() {\n\n\t}",
"protected abstract void draw();",
"public void paint(Graphics g) {\n super.paint(g);\n\n //Aumento lo spessore del bordo di gioco\n g.setColor(Color.red);\n for(short i=0; i<=5;i++)\n g.drawRect(100,100,LARGHEZZA+i,ALTEZZA+i);\n\n if (in_gioco){\n g.drawImage(bersaglio, bersaglio_x, bersaglio_y, this);\n\n for (int i = 0; i < punti; i++) {\n if (i == 0)\n g.drawImage(testa, x[i], y[i], this);\n else g.drawImage(corpo_serpente, x[i], y[i], this);\n }\n }\n else game_over();\n\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.lesson4_draw, menu);\n return true;\n }",
"public void draw(Graphics g);",
"public void draw(Graphics g);"
]
| [
"0.67486465",
"0.6723262",
"0.66893584",
"0.6687181",
"0.64284754",
"0.6409165",
"0.6357419",
"0.635121",
"0.63384914",
"0.63376784",
"0.63296723",
"0.62888765",
"0.62636954",
"0.6257181",
"0.62412137",
"0.6231947",
"0.6184065",
"0.6184065",
"0.617778",
"0.6168129",
"0.6168129",
"0.6158594",
"0.6158594",
"0.61464715",
"0.6140147",
"0.6137375",
"0.6136979",
"0.6131019",
"0.6131019",
"0.61298364",
"0.6124396",
"0.61149126",
"0.6110671",
"0.6110122",
"0.6108371",
"0.60930383",
"0.60809207",
"0.6066229",
"0.6062274",
"0.60603195",
"0.60560566",
"0.6038161",
"0.6035504",
"0.60311365",
"0.6028991",
"0.6027541",
"0.60261613",
"0.6013806",
"0.60116315",
"0.600862",
"0.6008356",
"0.60023427",
"0.59976745",
"0.5996885",
"0.5986414",
"0.5985333",
"0.5982783",
"0.5982369",
"0.59806204",
"0.5978223",
"0.5973531",
"0.5973215",
"0.59644926",
"0.5962087",
"0.59564984",
"0.5951049",
"0.59479207",
"0.5945882",
"0.5935453",
"0.5929973",
"0.59251165",
"0.5923274",
"0.59083",
"0.5906161",
"0.5904238",
"0.59030116",
"0.5896804",
"0.58923954",
"0.58851093",
"0.58829963",
"0.58734655",
"0.58730876",
"0.5862126",
"0.58594716",
"0.5858481",
"0.5857717",
"0.5853633",
"0.58534825",
"0.58511215",
"0.5849577",
"0.5846368",
"0.58447254",
"0.5831882",
"0.5828344",
"0.58235383",
"0.5821747",
"0.5818492",
"0.58175886",
"0.58086467",
"0.58086467"
]
| 0.62921524 | 11 |
Metoda ktora vykresli menu ulozene v obrazku toDraw ked je menu viditelne. Ked mame oznaceny nejaky predmet z tohoto menu tak ho prekreslime oznacenou farbou. | @Override
public void paintMenu(Graphics g) {
if (visible) {
g.drawImage(toDraw, xPos, yPos, null);
if (selection >= 0) {
g.setColor(Colors.getColor(Colors.selectedColor));
g.fillRoundRect(xPos + wGap, selection * hItemBox + yPos + hGap, getWidth() - wGap, hItemBox, wGap, hGap);
}
if (!activated) {
g.setColor(Colors.getColor(Colors.selectedColor));
g.fillRoundRect(xPos, yPos, getWidth(), getHeight(), wGap, hGap);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void volvreAlMenu() {\r\n\t\t// Muestra el menu y no permiye que se cambie el tamaņo\r\n\t\tMenu.frame.setVisible(true);\r\n\t\tMenu.frame.setResizable(false);\r\n\t\t// Oculta la ventana del flappyBird\r\n\t\tjframe.setVisible(false);\r\n\t}",
"private void createMenu(){\n\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n JMenu Opcje = new JMenu(\"Opcje\");\n mbar.add(Opcje);\n JMenuItem Ustawienia = new JMenuItem(\"Ustawienia\");\n /** Obsluga zdarzen wcisniecia przycisku ustawien w menu */\n Ustawienia.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if(Justawienia==null)\n Justawienia =new JUstawienia();\n Justawienia.setVisible(true);\n if (controller.timer!=null)\n controller.timer.stop();\n }\n });\n Opcje.add(Ustawienia);\n Opcje.addSeparator();\n JMenuItem Info = new JMenuItem(\"Info\");\n /** Obsluga zdarzen wcisniecia przycisku info w menu */\n Info.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n controller.WyswietlInfo();\n }\n });\n Opcje.add(Info);\n }",
"private void setMenu() {\n\n if (tree.isEmpty() || !treeGrid.anySelected()) {\n mainMenu.setItems(newMenuItem, new MenuItemSeparator(), settingMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecord() == null) {\n mainMenu.setItems(renameMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecords().length > 1) {\n ListGridRecord[] selectedNode = treeGrid.getSelectedRecords();\n if (isSameExtension(selectedNode, Extension.FP)) {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem, exportMenuItem);\n } else if (isSameExtension(selectedNode, Extension.FPS)) {\n mainMenu.setItems(newFPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.BPS)) {\n mainMenu.setItems(newBPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.SCSS)) {\n mainMenu.setItems(newSCSItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n }\n } else if (tree.isFolder(treeGrid.getSelectedRecord())) {\n mainMenu.setItems(newMenuItem, deleteMenu, renameMenuItem, copyMenuItem, pasteMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem, downloadMenuItem,\n copyPathMenuItem);\n } else {\n FileTreeNode selectedNode = (FileTreeNode) treeGrid.getSelectedRecord();\n VMResource resource = selectedNode.getResource();\n if (resource instanceof VMDirectory) {\n return;\n }\n Extension extension = ((VMFile) resource).getExtension();\n if (extension == null) {\n mainMenu.setItems(openWithMenuItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n } else\n switch (extension) {\n case ARC:\n mainMenu.setItems(newBPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FM:\n mainMenu.setItems(newFMCItem, newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FMC:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case TC:\n mainMenu.setItems(newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n case FPS:\n mainMenu.setItems(newFPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, exportMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BPS:\n mainMenu.setItems(newBPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCSS:\n mainMenu.setItems(newSCSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCS:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n default:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n }\n }\n }",
"private void changeMenu()\n {\n if (_menuMode)\n {\n menuLayout.getChildAt(0).setVisibility(View.VISIBLE);\n menuLayout.getChildAt(1).setVisibility(View.VISIBLE);\n menuLayout.getChildAt(2).setVisibility(View.GONE);\n menuLayout.getChildAt(3).setVisibility(View.GONE);\n menuLayout.getChildAt(4).setVisibility(View.VISIBLE);\n _switchMode.setText(\"Watch Mode\");\n\n }\n else\n {\n menuLayout.getChildAt(0).setVisibility(View.GONE);\n menuLayout.getChildAt(1).setVisibility(View.VISIBLE);\n _switchMode.setText(\"Paint Mode\");\n menuLayout.getChildAt(2).setVisibility(View.VISIBLE);\n menuLayout.getChildAt(3).setVisibility(View.VISIBLE);\n menuLayout.getChildAt(4).setVisibility(View.GONE);\n _timeBar.setProgress((int) (_paintArea.getPercent() * 100f));\n }\n _paintArea.setPaintMode(_menuMode);\n _menuMode = !_menuMode;\n }",
"private void voltarMenu() {\n\t\tmenu = new TelaMenu();\r\n\t\tmenu.setVisible(true);\r\n\t\tthis.dispose();\r\n\t}",
"public void initMenu(){\n\t}",
"private void setUpMenu() {\n resideMenu = new ResideMenu(this);\n\n resideMenu.setBackground(R.drawable.menu_background);\n resideMenu.attachToActivity(this);\n resideMenu.setMenuListener(menuListener);\n resideMenu.setScaleValue(0.6f);\n\n // create menu items;\n itemHome = new ResideMenuItem(this, R.drawable.icon_profile, \"Home\");\n itemSerre = new ResideMenuItem(this, R.drawable.serre, \"GreenHouse\");\n itemControl = new ResideMenuItem(this, R.drawable.ctrl, \"Control\");\n itemTable = new ResideMenuItem(this, R.drawable.database, \"Parametre\");\n\n // itemProfile = new ResideMenuItem(this, R.drawable.user, \"Profile\");\n // itemSettings = new ResideMenuItem(this, R.drawable.stat_n, \"Statistique\");\n itemPicture = new ResideMenuItem(this, R.drawable.cam, \"Picture\");\n itemLog = new ResideMenuItem(this, R.drawable.log, \"Log file \");\n\n itemLogout = new ResideMenuItem(this, R.drawable.logout, \"Logout\");\n\n\n\n itemHome.setOnClickListener(this);\n itemSerre.setOnClickListener(this);\n itemControl.setOnClickListener(this);\n itemTable.setOnClickListener(this);\n\n// itemProfile.setOnClickListener(this);\n // itemSettings.setOnClickListener(this);\n itemLogout.setOnClickListener(this);\n itemPicture.setOnClickListener(this);\n itemLog.setOnClickListener(this);\n\n\n resideMenu.addMenuItem(itemHome, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemSerre, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemControl, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemTable, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemLog, ResideMenu.DIRECTION_LEFT);\n\n\n // resideMenu.addMenuItem(itemProfile, ResideMenu.DIRECTION_RIGHT);\n // resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_RIGHT);\n resideMenu.addMenuItem(itemPicture, ResideMenu.DIRECTION_RIGHT);\n\n resideMenu.addMenuItem(itemLogout, ResideMenu.DIRECTION_RIGHT);\n\n // You can disable a direction by setting ->\n // resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n findViewById(R.id.title_bar_left_menu).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n resideMenu.openMenu(ResideMenu.DIRECTION_LEFT);\n }\n });\n findViewById(R.id.title_bar_right_menu).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n resideMenu.openMenu(ResideMenu.DIRECTION_RIGHT);\n }\n });\n }",
"void drawMenu(IMenu menuToBeRendered);",
"private void setUpMenu() {\n\t\tresideMenu = new ResideMenu(this);\n\t\tresideMenu.setBackground(R.drawable.menu_background);\n\t\tresideMenu.attachToActivity(this);\n\t\tresideMenu.setMenuListener(menuListener);\n\t\t// valid scale factor is between 0.0f and 1.0f. leftmenu'width is\n\t\t// 150dip.\n\t\tresideMenu.setScaleValue(0.6f);\n\n\t\t// create menu items;\n\t\titemGame = new ResideMenuItem(this, R.drawable.icon_game,\n\t\t\t\tgetResources().getString(R.string.strGame));\n\t\titemBook = new ResideMenuItem(this, R.drawable.icon_book,\n\t\t\t\tgetResources().getString(R.string.strBook));\n\t\titemNews = new ResideMenuItem(this, R.drawable.icon_news,\n\t\t\t\tgetResources().getString(R.string.strNews));\n\t\t// itemSettings = new ResideMenuItem(this, R.drawable.icon_setting,\n\t\t// getResources().getString(R.string.strSetting));\n\t\titemLogin = new ResideMenuItem(this, R.drawable.icon_share,\n\t\t\t\tgetResources().getString(R.string.strShare));\n\t\titemBookPDF = new ResideMenuItem(this, R.drawable.icon_bookpdf,\n\t\t\t\tgetResources().getString(R.string.strBookPDF));\n\t\titemMore = new ResideMenuItem(this, R.drawable.icon_more,\n\t\t\t\tgetResources().getString(R.string.strMore));\n\n\t\titemGame.setOnClickListener(this);\n\t\titemBook.setOnClickListener(this);\n\t\titemNews.setOnClickListener(this);\n\t\t// itemSettings.setOnClickListener(this);\n\t\titemBookPDF.setOnClickListener(this);\n\t\titemMore.setOnClickListener(this);\n\t\titemLogin.setOnClickListener(this);\n\n\t\tresideMenu.addMenuItem(itemBookPDF, ResideMenu.DIRECTION_LEFT);\n\t\tresideMenu.addMenuItem(itemBook, ResideMenu.DIRECTION_LEFT);\n\t\tresideMenu.addMenuItem(itemNews, ResideMenu.DIRECTION_LEFT);\n\t\t// resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_RIGHT);\n\n\t\tresideMenu.addMenuItem(itemGame, ResideMenu.DIRECTION_RIGHT);\n\t\tresideMenu.addMenuItem(itemLogin, ResideMenu.DIRECTION_RIGHT);\n\t\tresideMenu.addMenuItem(itemMore, ResideMenu.DIRECTION_RIGHT);\n\n\t\t// You can disable a direction by setting ->\n\t\t// resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n\t\tfindViewById(R.id.title_bar_left_menu).setOnClickListener(\n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\t\tresideMenu.openMenu(ResideMenu.DIRECTION_LEFT);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tfindViewById(R.id.title_bar_right_menu).setOnClickListener(\n\t\t\t\tnew View.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\t\tresideMenu.openMenu(ResideMenu.DIRECTION_RIGHT);\n\t\t\t\t\t}\n\t\t\t\t});\n\t}",
"public void refreshMenu() {\n\t\tthis.Menu.setSize(this.Menu.getWidth(), this.Items.size() * (this.textSize + 4) + 4);\r\n\t\tthis.Menu.Camera.setPosition(0, 0);\r\n\t\tthis.anchorX();\r\n\t\tthis.anchorY();\r\n\t\t//println(\"----------\");\r\n\t\tthis.Menu.reposition((int) menuAnchor.x, (int) menuAnchor.y);\r\n\r\n\t\tfor (uTextButton t : this.Items) {\r\n\t\t\tt.setPosition(t.getX(), (this.Items.indexOf(t) * t.getHeight()));\r\n\t\t}\r\n\r\n\t}",
"static void mostrarMenu(){\n \t\t\n\t\tout.println();\n\t\tout.println(\"1. Crear lavadora.\");\n\t\tout.println(\"2. Mostrar lavadoras.\");\n\t\tout.println(\"3. Seleccionar lavadora.\");\n\t\tout.println(\"4. Cargar agua.\");\n\t\tout.println(\"5. Cargar ropa.\");\n\t\tout.println(\"6. Cargar detergente.\");\n\t\tout.println(\"7. Especificar tiempo.\");\n\t\tout.println(\"8. Drenar.\");\n\t\tout.println(\"9. Mostrar estado de la lavadora.\");\n\t\tout.println(\"10. Mostrar estado de la ropa.\");\n\t\tout.println(\"11. Pausar o Reanudar lavadora\");\n\t\tout.println(\"12. Probar sistema.\");\n\t\tout.println(\"13. Reiniciar sistema.\");\n\t\tout.println(\"22. Salir\");\n\t\tout.println((SELECTNOW != -1) ? \"!/*!/* Lv seleccionada: \" + SELECTNOW + \" !/*!/*\": \"\");\n\t\tout.println();\n\t}",
"private void renderMenu() {\n StdDraw.setCanvasSize(START_WIDTH * TILE_SIZE, START_HEIGHT * TILE_SIZE);\n Font font = new Font(\"Monaco\", Font.BOLD, 20);\n StdDraw.setFont(font);\n StdDraw.setXscale(0, START_WIDTH );\n StdDraw.setYscale(0, START_HEIGHT );\n StdDraw.clear(Color.BLACK);\n StdDraw.setPenColor(Color.WHITE);\n StdDraw.enableDoubleBuffering();\n StdDraw.text(START_WIDTH / 2, START_HEIGHT * 2 / 3, \"CS61B The Game\");\n StdDraw.text(START_WIDTH / 2, START_HEIGHT / 2 + 2, \"New Game (N)\");\n StdDraw.text(START_WIDTH / 2, START_HEIGHT / 2, \"Load Game (L)\");\n StdDraw.text(START_WIDTH / 2, START_HEIGHT / 2 - 2 , \"Quit (Q)\");\n StdDraw.show();\n }",
"public void buildMenu() {\n\t\tthis.Menu = new uPanel(this.layer, 0, 0, (int) (this.getWidth() * 2), (int) (this.getHeight() * 3)) {\r\n\t\t\t@Override\r\n\t\t\tpublic boolean handleEvent(uEvent event) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick() {\r\n\t\t\t\tsuper.onClick();\r\n\t\t\t\tthis.space.sortLayer(this.layer);\r\n\t\t\t\tthis.castEvent(\"MENUPANEL_CLICK\");\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.screen.addPrehide(this.Menu);\r\n\r\n\t\tthis.Node.addChild(this.Menu.getNode());\r\n\r\n\t}",
"private void initializeMenu() {\n menu = new Menu(parent.getShell());\n MenuItem item1 = new MenuItem(menu, SWT.NONE);\n item1.setText(Resources.getMessage(\"LatticeView.9\")); //$NON-NLS-1$\n item1.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n model.getClipboard().addToClipboard(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.CLIPBOARD, selectedNode));\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n \n MenuItem item2 = new MenuItem(menu, SWT.NONE);\n item2.setText(Resources.getMessage(\"LatticeView.10\")); //$NON-NLS-1$\n item2.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n controller.actionApplySelectedTransformation();\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n }",
"private void CreateMenu() {\n\t\topcionesMenu = getResources().getStringArray(\r\n\t\t\t\tR.array.devoluciones_lista_options);\r\n\r\n\t\tdrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);\r\n\t\t// Buscamos nuestro menu lateral\r\n\t\tdrawerList = (ListView) findViewById(R.id.left_drawer);\r\n\r\n\t\tdrawerList.setAdapter(new ArrayAdapter<String>(getSupportActionBar()\r\n\t\t\t\t.getThemedContext(), android.R.layout.simple_list_item_1,\r\n\t\t\t\topcionesMenu));\r\n\r\n\t\t// Añadimos Funciones al menú laterak\r\n\t\tdrawerList.setOnItemClickListener(new OnItemClickListener() {\r\n\r\n\t\t\t@SuppressLint(\"NewApi\")\r\n\t\t\t@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\r\n\t\t\t\t\tint position, long id) {\r\n\r\n\t\t\t\tdrawerList.setItemChecked(position, true);\r\n\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\ttituloSeccion = opcionesMenu[position];\r\n\t\t\t\tgetSupportActionBar().setTitle(tituloSeccion);\r\n\r\n\t\t\t\t// SELECCIONAR LA POSICION DEL RECIBO SELECCIONADO ACTUALMENTE\r\n\t\t\t\tpositioncache = customArrayAdapter.getSelectedPosition();\r\n\t\t\t\t// int pos = customArrayAdapter.getSelectedPosition();\r\n\t\t\t\t// OBTENER EL RECIBO DE LA LISTA DE RECIBOS DEL ADAPTADOR\r\n\t\t\t\titem_selected = (vmDevolucion) customArrayAdapter\r\n\t\t\t\t\t\t.getItem(positioncache);\r\n\t\t\t\tif(fragmentActive== FragmentActive.LIST){\r\n\t\t\t\t\r\n\t\t\t\t\tswitch (position) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcase NUEVO_DEVOLUCION:\r\n\t\t\t\t\t\t\tintent = new Intent(ViewDevoluciones.this,\r\n\t\t\t\t\t\t\t\t\tViewDevolucionEdit.class);\r\n\t\t\t\t\t\t\tintent.putExtra(\"requestcode\", NUEVO_DEVOLUCION);\r\n\t\t\t\t\t\t\tstartActivityForResult(intent, NUEVO_DEVOLUCION);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase ABRIR_DEVOLUCION:\r\n\t\t\t\t\t\t\tabrirDevolucion();\r\n\t\t\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase BORRAR_DEVOLUCION:\r\n\t\t\t\t\t\t\tif (item_selected == null) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\tif (!item_selected.getEstado().equals(\"REGISTRADA\")) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"El registro no se puede borrar en estado \"+ item_selected.getItemEstado()+\" .\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tMessage msg = new Message();\r\n\t\t\t\t\t\t\tBundle b = new Bundle();\r\n\t\t\t\t\t\t\tb.putInt(\"id\", (int) item_selected.getId());\r\n\t\t\t\t\t\t\tmsg.setData(b);\r\n\t\t\t\t\t\t\tmsg.what = ControllerProtocol.DELETE_DATA_FROM_LOCALHOST;\r\n\t\t\t\t\t\t\tNMApp.getController().getInboxHandler().sendMessage(msg);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase ENVIAR_DEVOLUCION:\r\n\t\t\t\t\t\t\tif (item_selected == null) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tenviarDevolucion(ControllerProtocol.GETOBSERVACIONDEV);\r\n\t\t\t\t\t\t\t//BDevolucionM.beforeSend(item_selected.getId());\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase IMPRIMIR_COMPROBANTE:\r\n\t\t\t\t\t\t\tif (item_selected == null) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tdevolucion = ModelDevolucion.getDevolucionbyID(item_selected.getId());\r\n\t\t\t\t\t\t\tif (devolucion.getNumeroCentral() == 0)\r\n\t\t\t\t\t\t\t\tenviarDevolucion(ControllerProtocol.GETOBSERVACIONDEV);\r\n\t\t\t\t\t\t\telse {\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tenviarImprimirDevolucion(\r\n\t\t\t\t\t\t\t\t\t\t\"Se mandara a imprimir el comprobante de la Devolución\",\r\n\t\t\t\t\t\t\t\t\t\tdevolucion);\r\n\t\t\t\t\t\t\t}\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\t * BDevolucionM.ImprimirDevolucion(item_selected.getId(),\r\n\t\t\t\t\t\t\t * false);\r\n\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase BORRAR_ENVIADAS:\r\n\t\t\t\t\t\t\tif (item_selected == null) \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t\t\t\tMessage msg2 = new Message();\r\n\t\t\t\t\t\t\tBundle b2 = new Bundle();\r\n\t\t\t\t\t\t\tb2.putInt(\"id\", -1);\r\n\t\t\t\t\t\t\tmsg2.setData(b2);\r\n\t\t\t\t\t\t\tmsg2.what = ControllerProtocol.DELETE_DATA_FROM_LOCALHOST;\r\n\t\t\t\t\t\t\tNMApp.getController().getInboxHandler().sendMessage(msg2);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase FICHA_DEL_CLIENTE:\r\n\t\t\t\t\t\t\tif (item_selected == null) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t\t\t\tif (NMNetWork.isPhoneConnected(NMApp.getContext())\r\n\t\t\t\t\t\t\t\t\t&& NMNetWork.CheckConnection(NMApp.getController())) {\r\n\t\t\t\t\t\t\t\tfragmentActive = FragmentActive.FICHACLIENTE;\r\n\t\t\t\t\t\t\t\tShowCustomerDetails();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase CUENTAS_POR_COBRAR:\r\n\t\t\t\t\t\t\tif (item_selected == null) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (NMNetWork.isPhoneConnected(NMApp.getContext())\r\n\t\t\t\t\t\t\t\t\t&& NMNetWork.CheckConnection(NMApp.getController())) {\r\n\t\t\t\t\t\t\t\tfragmentActive = FragmentActive.CONSULTAR_CUENTA_COBRAR;\r\n\t\t\t\t\t\t\t\tLOAD_CUENTASXPAGAR();\r\n\t\t\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase CERRAR:\r\n\t\t\t\t\t\t\tfinish();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(fragmentActive == FragmentActive.CONSULTAR_CUENTA_COBRAR){\r\n\t\t\t\t\t\r\n\t\t\t\t\tswitch (position) {\r\n\t\t\t\t\tcase MOSTRAR_FACTURAS:\r\n\t\t\t\t\t\tcuentasPorCobrar.cargarFacturasCliente();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase MOSTRAR_NOTAS_DEBITO: \r\n\t\t\t\t\t\tcuentasPorCobrar.cargarNotasDebito(); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase MOSTRAR_NOTAS_CREDITO: \r\n\t\t\t\t\t\tcuentasPorCobrar.cargarNotasCredito(); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase MOSTRAR_PEDIDOS: \r\n\t\t\t\t\t\tcuentasPorCobrar.cargarPedidos();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase MOSTRAR_RECIBOS: \r\n\t\t\t\t\t\tcuentasPorCobrar.cargarRecibosColector(); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\ttituloSeccion = getTitle();\r\n\t\ttituloApp = getTitle();\r\n\r\n\t\tdrawerToggle = new ActionBarDrawerToggle(this, drawerLayout,\r\n\t\t\t\tR.drawable.ic_navigation_drawer, R.string.drawer_open,\r\n\t\t\t\tR.string.drawer_close) {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onDrawerClosed(View view) {\r\n\t\t\t\tgetSupportActionBar().setTitle(tituloSeccion);\r\n\t\t\t\tActivityCompat.invalidateOptionsMenu(ViewDevoluciones.this);\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onDrawerOpened(View drawerView) {\r\n\t\t\t\tgetSupportActionBar().setTitle(tituloApp);\r\n\t\t\t\tActivityCompat.invalidateOptionsMenu(ViewDevoluciones.this);\r\n\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// establecemos el listener para el dragable ....\r\n\t\tdrawerLayout.setDrawerListener(drawerToggle);\r\n\r\n\t\tgetSupportActionBar().setDisplayHomeAsUpEnabled(true);\r\n\t\tgetSupportActionBar().setHomeButtonEnabled(true);\r\n\r\n\t}",
"public void componentesimplementacionIsmael() {\n\t\t// En el menu bar Ismael\n\t\tmenuIsmael = new JMenu(\"Ismael\");\n\t\tmenuBar.add(menuIsmael);\n\n\t\t// SUBMENU\n\t\tsubMenuRecientes = new JMenu(\"Recientes\");\n\t\titemSubMenuRecientes = new ArrayList<>();\n\t\trutasRecientes = new ArrayList<>();\n\t\ttry {\n\t\t\trutasRecientes = manejadorFichero.obtenerLineasDelFichero();\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\tif (!rutasRecientes.isEmpty()) {\n\t\t\tfor (int i = 0; i < rutasRecientes.size(); i++) {\n\t\t\t\tJMenuItem textoSubmenu = new JMenuItem(rutasRecientes.get(i));\n\t\t\t\titemSubMenuRecientes.add(textoSubmenu);\n\t\t\t\tsubMenuRecientes.add(textoSubmenu);\n\t\t\t}\n\t\t}\n\t\tmenuIsmael.add(subMenuRecientes);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\t// Fuente\n\t\titemFuente = new JMenuItem(\"Fuente\");\n\t\titemFuente.setEnabled(false);\n\t\titemFuente.setMnemonic(KeyEvent.VK_F);\n\t\titemFuente.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemFuente);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\titemSeleccionarTodo = new JMenuItem(\"Selec.Todo\");\n\t\titemSeleccionarTodo.setEnabled(false);\n\t\titemSeleccionarTodo.setMnemonic(KeyEvent.VK_N);\n\t\titemSeleccionarTodo.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemSeleccionarTodo);\n\n\t\titemSeleccionarTodoYCopiar = new JMenuItem(\"Selec All+Copy\");\n\t\titemSeleccionarTodoYCopiar.setEnabled(false);\n\t\titemSeleccionarTodoYCopiar.setMnemonic(KeyEvent.VK_M);\n\t\titemSeleccionarTodoYCopiar.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemSeleccionarTodoYCopiar);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\titemHora = new JMenuItem(\"Hora\");\n\t\titemHora.setEnabled(true);\n\t\titemHora.setMnemonic(KeyEvent.VK_H);\n\t\titemHora.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_H, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemHora);\n\n\t}",
"private void loadMenu() {\n theView.getGamePanel().removeAll();\n Menu menu = new Menu(theView);\n menu.revalidate();\n menu.repaint();\n theView.getGamePanel().add(menu);\n menu.requestFocusInWindow();\n theView.setVisible(true);\n }",
"private void goToMenu() {\n\t\tgame.setScreen(new MainMenuScreen(game));\n\n\t}",
"private static void returnMenu() {\n\t\t\r\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu){\r\n getMenuInflater().inflate(R.menu.menu, menu); //Recibe como parametro el menu donde se situan las acciones\r\n return true; //Para que la barra sea visible\r\n }",
"@Override\n\tpublic void setUpMenu() {\n\t\t\n\t}",
"public void InitializeMenu(){\n\t\tmnbBar = new JMenuBar();\n\t\tmnuFile = new JMenu(\"File\");\n\t\tmnuFormat = new JMenu(\"Format\");\n\t\tmniOpen = new JMenuItem(\"Open\");\n\t\tmniExit = new JMenuItem(\"Exit\");\n\t\tmniSave = new JMenuItem(\"Save\");\n\t\tmniSaveAs = new JMenuItem(\"Save as\");\n\t\tmniSaveAs.setMnemonic(KeyEvent.VK_A);\n\t\tmniSave.setMnemonic(KeyEvent.VK_S);\n\t\tmniChangeBgColor = new JMenuItem(\"Change Backgroud Color\");\n\t\tmniChangeFontColor = new JMenuItem(\"Change Font Color\");\n\t\t//them menu item vao menu file\n\t\tmnuFile.add(mniOpen);\n\t\tmnuFile.addSeparator();\n\t\tmnuFile.add(mniExit);\n\t\tmnuFile.add(mniSaveAs);\n\t\tmnuFile.add(mniSave);\n\t\t//them menu item vao menu format\n\t\tmnuFormat.add(mniChangeBgColor);\n\t\tmnuFormat.addSeparator();\n\t\tmnuFormat.add(mniChangeFontColor);\n\t\t//them menu file va menu format vao menu bar\n\t\tmnbBar.add(mnuFile);\n\t\tmnbBar.add(mnuFormat);\n\t\t//thiet lap menubar thanh menu chinh cua frame\n\t\tsetJMenuBar(mnbBar);\n\t}",
"public void initMenu() {\n\t\t\r\n\t\treturnToGame = new JButton(\"Return to Game\");\r\n\t\treturnToGame.setBounds(900, 900, 0, 0);\r\n\t\treturnToGame.setBackground(Color.BLACK);\r\n\t\treturnToGame.setForeground(Color.WHITE);\r\n\t\treturnToGame.setVisible(false);\r\n\t\treturnToGame.addActionListener(this);\r\n\t\t\r\n\t\treturnToStart = new JButton(\"Main Menu\");\r\n\t\treturnToStart.setBounds(900, 900, 0, 0);\r\n\t\treturnToStart.setBackground(Color.BLACK);\r\n\t\treturnToStart.setForeground(Color.WHITE);\r\n\t\treturnToStart.setVisible(false);\r\n\t\treturnToStart.addActionListener(this);\r\n\t\t\r\n\t\t//add(menubackground);\r\n\t\tadd(returnToGame);\r\n\t\tadd(returnToStart);\r\n\t}",
"@Override\r\n\tpublic void createMenu(Menu menu) {\n\r\n\t}",
"public void generateMenu(){\n menuBar = new JMenuBar();\n\n JMenu file = new JMenu(\"Datei\");\n JMenu tools = new JMenu(\"Werkzeuge\");\n JMenu help = new JMenu(\"Hilfe\");\n\n JMenuItem open = new JMenuItem(\"Öffnen \");\n JMenuItem save = new JMenuItem(\"Speichern \");\n JMenuItem exit = new JMenuItem(\"Beenden \");\n JMenuItem preferences = new JMenuItem(\"Einstellungen \");\n JMenuItem about = new JMenuItem(\"Über das Projekt \");\n\n\n file.add(open);\n file.add(save);\n file.addSeparator();\n file.add(exit);\n tools.add(preferences);\n help.add(about);\n\n menuBar.add(file);\n menuBar.add(tools);\n menuBar.add(help);\n }",
"public static void afficherMenu() {\r\n System.out.println(\"\\n## Menu de l'application ##\\n\" +\r\n \" Actions Membres :\\n\"+\r\n \" [ 1] : Inscription d'un Membre\\n\" +\r\n \" [ 2] : Désinscription d'un Membre\\n\" +\r\n \" ( 3) : Afficher liste des Membres\\n\" +\r\n \" [ 4] : Payer Cotisation\\n\" +\r\n \" Actions vote Arbres d'un Membre :\\n\" +\r\n \" ( 5) : Voter pour un Arbre\\n\" +\r\n \" ( 6) : Afficher liste des votes\\n\" +\r\n \" ( 7) : Retirer un vote\\n\" +\r\n \" ( 8) : Supprimer les votes d'un Membre.\\n\" +\r\n \" ( 9) : Remplacer un vote\\n\" +\r\n \" Actions Arbres :\\n\" +\r\n \" (10) : Afficher la liste des Arbres\\n\" +\r\n // ...\r\n \" Actions Administration :\\n\" +\r\n \" (11) : Nommer nouveau Président\\n\" +\r\n // ...\r\n \"\\n ( 0) : Quitter l'application\\n\" +\r\n \" - Veuillez saisir une action. -\");\r\n }",
"public Menu() { //Menu pannel constructor\n\t\tmenuBar = new JMenuBar();\n\t\tmenu = new JMenu(\"Menu\");\n\t\tabout = new JMenu(\"About\");\n\t\tabout.addMenuListener(new MenuListener() {\n\t\t\tpublic void menuSelected(MenuEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Ragnarock Web Browser 2017\\nIvan Mykolenko\\u00AE\", \"About\",\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t\t\t}\n\t\t\tpublic void menuDeselected(MenuEvent e) {\n\t\t\t}\n\t\t\tpublic void menuCanceled(MenuEvent e) {\n\t\t\t}\n\t\t});\n\t\thistory = new JMenu(\"History\");\n\t\thistory.addMenuListener(new MenuListener() {\n\t\t\tpublic void menuSelected(MenuEvent e) {\n\t\t\t\tcreateList(\"history\");\n\t\t\t\taddBackButton();\n\t\t\t\tuserViewPort.add(new JScrollPane(list), \"History\");\n\t\t\t\tlayer.show(userViewPort, \"History\");\n\t\t\t\tmenuBar.remove(removeButton);\n\t\t\t\tmenuBar.revalidate();\n\t\t\t\tviewMode = 2;\n\t\t\t}\n\t\t\tpublic void menuDeselected(MenuEvent e) {\n\t\t\t}\n\t\t\tpublic void menuCanceled(MenuEvent e) {\n\t\t\t}\n\t\t});\n\t\tbookmarks = new JMenu(\"Bookmarks\");\n\t\tbookmarks.addMenuListener(new MenuListener() {\n\t\t\tpublic void menuSelected(MenuEvent e) {\n\t\t\t\tcreateList(\"bookmarks\");\n\t\t\t\taddBackButton();\n\t\t\t\tuserViewPort.add(new JScrollPane(list), \"Bookmarks\");\n\t\t\t\tlayer.show(userViewPort, \"Bookmarks\");\n\t\t\t\tmenuBar.remove(removeButton);\n\t\t\t\tmenuBar.revalidate();\n\t\t\t\tviewMode = 3;\n\t\t\t}\n\t\t\tpublic void menuDeselected(MenuEvent e) {\n\t\t\t}\n\t\t\tpublic void menuCanceled(MenuEvent e) {\n\t\t\t}\n\t\t});\n\t\tsettingsMenuItem = new JMenuItem(\"Settings\", KeyEvent.VK_X);\n\t\tsettingsMenuItem.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tcreateSettings();\n\t\t\t\tsettings.setVisible(true);\n\t\t\t}\n\t\t});\n\t\texitMenuItem = new JMenuItem(\"Exit\");\n\t\texitMenuItem.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\t\tbackButton = new JButton(\"Back\");\n\t\tremoveButton = new JButton(\"Remove\");\n\t\tmenu.add(settingsMenuItem);\n\t\tmenu.add(exitMenuItem);\n\t\tmenuBar.add(menu);\n\t\tmenuBar.add(history);\n\t\tmenuBar.add(bookmarks);\n\t\tmenuBar.add(about);\n\t\tmenuBar.add(Box.createHorizontalGlue()); // Changing backButton's alignment to right\n\t\tsettings = new JDialog();\n\t\tadd(menuBar);\n\t\tsaveButton = new JButton(\"Save\");\n\t\tclearHistory = new JButton(\"Clear History\");\n\t\tclearBookmarks = new JButton(\"Clear Bookmarks\");\n\t\tbuttonsPanel = new JPanel();\n\t\tpanel = new JPanel();\n\t\turlField = new JTextField(15);\n\t\tedit = new JLabel(\"Edit Homepage:\");\n\t\tviewMode = 1;\n\t\tlistModel = new DefaultListModel<String>();\n\t\tlist = new JList<String>(listModel);\n\t\tlist.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);\n\t\tlist.setLayoutOrientation(JList.VERTICAL);\n\t}",
"public void initMenuContext(){\n GralMenu menuCurve = getContextMenu();\n //menuCurve.addMenuItemGthread(\"pause\", \"pause\", null);\n menuCurve.addMenuItem(\"refresh\", actionPaintAll);\n menuCurve.addMenuItem(\"go\", actionGo);\n menuCurve.addMenuItem(\"show All\", actionShowAll);\n //menuCurve.addMenuItemGthread(\"zoomOut\", \"zoom in\", null);\n menuCurve.addMenuItem(\"zoomBetweenCursor\", \"zoom between Cursors\", actionZoomBetweenCursors);\n menuCurve.addMenuItem(\"zoomOut\", \"zoom out\", actionZoomOut);\n menuCurve.addMenuItem(\"cleanBuffer\", \"clean Buffer\", actionCleanBuffer);\n //menuCurve.addMenuItemGthread(\"zoomOut\", \"to left\", null);\n //menuCurve.addMenuItemGthread(\"zoomOut\", \"to right\", null);\n \n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_uz, menu);\n return true;\n }",
"private void createMenus() {\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\t\r\n\t\tJMenu fileMenu = new LJMenu(\"file\", flp);\r\n\t\tmenuBar.add(fileMenu);\r\n\t\t\r\n\t\tfileMenu.add(new JMenuItem(createBlankDocument));\r\n\t\tfileMenu.add(new JMenuItem(openDocumentAction));\r\n\t\tfileMenu.add(new JMenuItem(saveDocumentAction));\r\n\t\tfileMenu.add(new JMenuItem(saveDocumentAsAction));\r\n\t\tfileMenu.add(new JMenuItem(closeCurrentTabAction));\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(new JMenuItem(getStatsAction));\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(new JMenuItem(exitAction));\r\n\t\t\r\n\t\tJMenu editMenu = new LJMenu(\"edit\", flp);\r\n\t\tmenuBar.add(editMenu);\r\n\t\t\r\n\t\teditMenu.add(new JMenuItem(copyAction));\r\n\t\teditMenu.add(new JMenuItem(pasteAction));\r\n\t\teditMenu.add(new JMenuItem(cutAction));\r\n\t\t\r\n\t\tJMenu langMenu = new LJMenu(\"lang\", flp);\r\n\t\tJMenuItem hr = new LJMenuItem(\"cro\", flp);\r\n\t\thr.addActionListener((l) -> { \r\n\t\t\tLocalizationProvider.getInstance().setLanguage(\"hr\");\r\n\t\t\tcurrentLang = \"hr\";\r\n\t\t});\r\n\t\t\r\n\t\tlangMenu.add(hr);\r\n\t\tJMenuItem en = new LJMenuItem(\"eng\", flp);\r\n\t\ten.addActionListener((l) -> { \r\n\t\t\t LocalizationProvider.getInstance().setLanguage(\"en\");\r\n\t\t\t currentLang = \"en\";\r\n\t\t});\r\n\t\tlangMenu.add(en);\r\n\t\tJMenuItem de = new LJMenuItem(\"de\", flp);\r\n\t\tde.addActionListener((l) -> { \r\n\t\t\t LocalizationProvider.getInstance().setLanguage(\"de\");\r\n\t\t\t currentLang = \"de\";\r\n\t\t});\r\n\t\tlangMenu.add(de);\r\n\t\tmenuBar.add(langMenu);\r\n\t\t\r\n\t\tJMenu toolsMenu = new LJMenu(\"tools\", flp);\r\n\t\tJMenuItem toUp = new JMenuItem(toUpperCaseAction);\r\n\t\ttoolsMenu.add(toUp);\r\n\t\ttoggable.add(toUp);\r\n\t\ttoUp.setEnabled(false);\r\n\t\tJMenuItem toLow = new JMenuItem(toLowerCaseAction);\r\n\t\ttoolsMenu.add(toLow);\r\n\t\ttoggable.add(toLow);\r\n\t\ttoLow.setEnabled(false);\r\n\t\tJMenuItem inv = new JMenuItem(invertSelected);\r\n\t\ttoolsMenu.add(inv);\r\n\t\ttoggable.add(inv);\r\n\t\tinv.setEnabled(false);\r\n\t\tmenuBar.add(toolsMenu);\r\n\t\t\r\n\t\tJMenu sort = new LJMenu(\"sort\", flp);\r\n\t\tJMenuItem sortAsc = new JMenuItem(sortAscAction);\r\n\t\tsort.add(sortAsc);\r\n\t\ttoggable.add(sortAsc);\r\n\t\tJMenuItem sortDesc = new JMenuItem(sortDescAction);\r\n\t\tsort.add(sortDesc);\r\n\t\ttoggable.add(sortDesc);\r\n\t\tJMenuItem uniq = new JMenuItem(uniqueLinesAction);\r\n\t\ttoolsMenu.add(uniq);\r\n\t\ttoggable.add(uniq);\r\n\t\t\r\n\t\ttoolsMenu.add(sort);\r\n\t\tsetJMenuBar(menuBar);\r\n\r\n\t}",
"public void menu() {\n m.add(\"Go adventuring!!\", this::goAdventuring );\n m.add(\"Display information about your character\", this::displayCharacter );\n m.add(\"Visit shop\", this::goShopping);\n m.add (\"Exit game...\", this::exitGame);\n }",
"static void afficherMenu() {\n\t\tSystem.out.println(\"\\n\\n\\n\\t\\tMENU PRINCIPAL\\n\");\n\t\tSystem.out.println(\"\\t1. Additionner deux nombres\\n\");\n\t\tSystem.out.println(\"\\t2. Soustraire deux nombres\\n\");\n\t\tSystem.out.println(\"\\t3. Multiplier deux nombres\\n\");\n\t\tSystem.out.println(\"\\t4. Deviser deux nombres\\n\");\n\t\tSystem.out.println(\"\\t0. Quitter\\n\");\n\t\tSystem.out.print(\"\\tFaites votre choix : \");\n\t}",
"public void setMenu(){\n opciones='.';\n }",
"public void drawLoadMenu(){\n implementation.devDrawLoadMenu();\n }",
"void ajouterMenu(){\r\n\t\t\tJMenuBar menubar = new JMenuBar();\r\n\t \r\n\t JMenu file = new JMenu(\"File\");\r\n\t file.setMnemonic(KeyEvent.VK_F);\r\n\t \r\n\t JMenuItem eMenuItemNew = new JMenuItem(\"Nouvelle Partie\");\r\n\t eMenuItemNew.addActionListener(new ActionListener() {\r\n\t @Override\r\n\t public void actionPerformed(ActionEvent event) {\r\n\t \t\r\n\t \t\t\r\n\t \t\t\r\n\t \tnew NouvellePartie();\r\n\t }\r\n\t });\r\n\t file.add(eMenuItemNew);\r\n\t \r\n\t JMenuItem eMenuItemFermer = new JMenuItem(\"Fermer\");\r\n\t eMenuItemFermer.setMnemonic(KeyEvent.VK_E);\r\n\t eMenuItemFermer.setToolTipText(\"Fermer l'application\");\r\n\t \r\n\t eMenuItemFermer.addActionListener(new ActionListener() {\r\n\t @Override\r\n\t public void actionPerformed(ActionEvent event) {\r\n\t System.exit(0);\r\n\t }\r\n\t });\r\n\r\n\t file.add(eMenuItemFermer);\r\n\r\n\t menubar.add(file);\r\n\t \r\n\t JMenu aide = new JMenu(\"?\");\r\n\t JMenuItem eMenuItemRegle = new JMenuItem(\"Règles\");\r\n\t aide.add(eMenuItemRegle);\r\n\t menubar.add(aide);\r\n\r\n\t final String regles=\"<html><p>Le but est de récupérer les 4 objets Graal puis de retourner au château.</p>\"\t\r\n\t +\"<p>Après avoir récupéré un objet, chaque déplacement vous enlève autant de vie que le poids de l'objet</p></html>\";\r\n\t eMenuItemRegle.addActionListener(new ActionListener() {\r\n\t @Override\r\n\t public void actionPerformed(ActionEvent event) {\r\n\t \t//default title and icon\r\n\t \t\t\tJOptionPane.showMessageDialog(gameFrame,\r\n\t \t\t\t regles,\"Règles du jeu\", JOptionPane.INFORMATION_MESSAGE);\r\n\t \t\t\t\r\n\t }\r\n\t });\r\n\t \t\r\n\t\t\t\r\n\t this.setJMenuBar(menubar);\t\r\n\t\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_gla_dos_me_p2, menu);\n return true;\n }",
"private void goToMenu() {\n game.setScreen(new MainMenuScreen(game));\n\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_paylasim, menu);\n return true;\n }",
"void omoguciIzmenu() {\n this.setEnabled(true);\n }",
"private void updateMenus()\n {\n m_KernelMenu.updateMenu();\n m_AgentMenu.updateMenu();\n }",
"private static void showMenu() {\n System.out.println(\"1. Dodaj zadanie\");\n System.out.println(\"2. Wykonaj zadanie.\");\n System.out.println(\"3. Zamknij program\");\n }",
"public static void f_menu(){\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n System.out.println(\"_/_/_/_/_/_/softvectorwhith/_/_/_/_/_/_/\");\n System.out.println(\"/_/_/_/version 1.0 2020-oct-29_/_/_/_/_/\");\n System.out.println(\"/_/maked by Andres Felipe Torres Lopez_/\");\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n }",
"public void startMenu() {\n setTitle(\"Nier Protomata\");\n setSize(ICoord.LAST_COL + ICoord.ADD_SIZE,\n ICoord.LAST_ROW + ICoord.ADD_SIZE);\n \n setButton();\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n menu.findItem(R.id.action_settings).setVisible(false);\n menu.findItem(R.id.action_cambiar_pass).setVisible(false);\n menu.findItem(R.id.action_ayuda).setVisible(false);\n menu.findItem(R.id.action_settings).setVisible(false);\n menu.findItem(R.id.action_cancel).setVisible(false);\n return true;\n }",
"protected void fillMenu(MenuBar menuBar) {\n\t\tMenu fileMenu = new Menu(\"Файл\");\n\t\n\t\tMenuItem loginMenuItem = new MenuItem(\"Сменить пользователя\");\n\t\tloginMenuItem.setOnAction(actionEvent -> main.logout());\n\t\n\t\tMenuItem exitMenuItem = new MenuItem(\"Выход (выключить планшет)\");\n\t\texitMenuItem.setOnAction(actionEvent -> main.requestShutdown());\n\t\texitMenuItem.setAccelerator(KeyCombination.keyCombination(\"Alt+F4\"));\n\t\n\t\n\t\tfileMenu.getItems().addAll( loginMenuItem,\n\t\t\t\tnew SeparatorMenuItem(), exitMenuItem);\n\t\n\t\n\t\n\t\tMenu navMenu = new Menu(\"Навигация\");\n\t\n\t\tMenuItem navHomeMap = new MenuItem(\"На общую карту\");\n\t\t//navHomeMap.setOnAction(actionEvent -> setMapData(bigMapData));\n\t\tnavHomeMap.setOnAction(actionEvent -> setMapData(main.ml.getRootMap()));\n\t\n\t\tMenu navMaps = new Menu(\"Карты\");\n\t\t//navMaps.setOnAction(actionEvent -> setMapData(bigMapData));\n\t\tmain.ml.fillMapsMenu( navMaps, this );\n\t\n\t\tMenuItem navOverview = new MenuItem(\"Обзор\");\n\t\tnavOverview.setOnAction(actionEvent -> setOverviewScale());\n\t\n\t\tnavMenu.getItems().addAll( navHomeMap, navMaps, new SeparatorMenuItem(), navOverview );\n\t\n\t\t\n\t\t\n\t\tMenu dataMenu = new Menu(\"Данные\");\n\t\n\t\tServerUnitType.forEach(t -> {\n\t\t\tMenuItem dataItem = new MenuItem(t.getDisplayName());\n\t\t\tdataItem.setOnAction(actionEvent -> new EntityListWindow(t, main.rc, main.sc));\n\t\n\t\t\tdataMenu.getItems().add(dataItem);\t\t\t\n\t\t});\n\t\t\n\t\t//dataMenu.Menu debugMenu = new Menu(\"Debug\");\n\t\t//MenuItem d1 = new MenuItem(\"На общую карту\");\n\t\t//d1.setOnAction(actionEvent -> setMapData(main.ml.getRootMap()));\n\t\n\t\t\n\t\t/*\n\t Menu webMenu = new Menu(\"Web\");\n\t CheckMenuItem htmlMenuItem = new CheckMenuItem(\"HTML\");\n\t htmlMenuItem.setSelected(true);\n\t webMenu.getItems().add(htmlMenuItem);\n\t\n\t CheckMenuItem cssMenuItem = new CheckMenuItem(\"CSS\");\n\t cssMenuItem.setSelected(true);\n\t webMenu.getItems().add(cssMenuItem);\n\t\n\t Menu sqlMenu = new Menu(\"SQL\");\n\t ToggleGroup tGroup = new ToggleGroup();\n\t RadioMenuItem mysqlItem = new RadioMenuItem(\"MySQL\");\n\t mysqlItem.setToggleGroup(tGroup);\n\t\n\t RadioMenuItem oracleItem = new RadioMenuItem(\"Oracle\");\n\t oracleItem.setToggleGroup(tGroup);\n\t oracleItem.setSelected(true);\n\t\n\t sqlMenu.getItems().addAll(mysqlItem, oracleItem,\n\t new SeparatorMenuItem());\n\t\n\t Menu tutorialManeu = new Menu(\"Tutorial\");\n\t tutorialManeu.getItems().addAll(\n\t new CheckMenuItem(\"Java\"),\n\t new CheckMenuItem(\"JavaFX\"),\n\t new CheckMenuItem(\"Swing\"));\n\t\n\t sqlMenu.getItems().add(tutorialManeu);\n\t\t */\n\t\n\t\tMenu aboutMenu = new Menu(\"О системе\");\n\t\n\t\tMenuItem version = new MenuItem(\"Версия\");\n\t\tversion.setOnAction(actionEvent -> showAbout());\n\t\n\t\tMenuItem aboutDz = new MenuItem(\"Digital Zone\");\n\t\taboutDz.setOnAction(actionEvent -> main.getHostServices().showDocument(Defs.HOME_URL));\n\t\n\t\tMenuItem aboutVita = new MenuItem(\"VitaSoft\");\n\t\taboutVita.setOnAction(actionEvent -> main.getHostServices().showDocument(\"vtsft.ru\"));\n\t\n\t\taboutMenu.getItems().addAll( version, new SeparatorMenuItem(), aboutDz, aboutVita );\n\t\n\t\t// --------------- Menu bar\n\t\n\t\t//menuBar.getMenus().addAll(fileMenu, webMenu, sqlMenu);\n\t\tmenuBar.getMenus().addAll(fileMenu, navMenu, dataMenu, aboutMenu );\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_spilen5, menu);\n return true;\n }",
"public void setUpEditMenu() {\n add(editMenu);\n\n //editMenu.add(cutItem);\n //editMenu.add(copyItem);\n //editMenu.add(pasteItem);\n //editMenu.addSeparator();\n clearAllItems.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n world.deleteAllEntities();\n }\n });\n editMenu.add(clearAllItems);\n editMenu.addSeparator();\n JMenuItem loadVectors = new JMenuItem(\"Load stimulus vectors...\");\n loadVectors.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n SFileChooser chooser = new SFileChooser(\".\", \"Load vectors\");\n File theFile = chooser.showOpenDialog();\n if (theFile != null) {\n double[][] vecs = Utils.getDoubleMatrix(theFile);\n world.loadStimulusVectors(vecs);\n }\n }\n });\n editMenu.add(loadVectors);\n\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_lihat_rekam_medis_inap, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.lesson4_draw, menu);\n return true;\n }",
"public Menu createToolsMenu();",
"private void createMenuChildScene() {\n\t\tmenuChildScene = new MenuScene(camera);\n\t\tmenuChildScene.setPosition(0, 0);\n\n\t\tfinal IMenuItem profile02MenuItem = new ScaleMenuItemDecorator(\n\t\t\t\tnew SpriteMenuItem(MENU_PROFILE02,\n\t\t\t\t\t\tresourcesManager.btProfile02TR, vbom), 1f, .8f);\n\t\tfinal IMenuItem profile24MenuItem = new ScaleMenuItemDecorator(\n\t\t\t\tnew SpriteMenuItem(MENU_PROFILE24,\n\t\t\t\t\t\tresourcesManager.btProfile24TR, vbom), 1f, .8f);\n\t\tfinal IMenuItem profile4MenuItem = new ScaleMenuItemDecorator(\n\t\t\t\tnew SpriteMenuItem(MENU_PROFILE4,\n\t\t\t\t\t\tresourcesManager.btProfile4TR, vbom), 1f, .8f);\n\n\t\tmenuChildScene.addMenuItem(profile02MenuItem);\n\t\tmenuChildScene.addMenuItem(profile24MenuItem);\n\t\tmenuChildScene.addMenuItem(profile4MenuItem);\n\n\t\tmenuChildScene.buildAnimations();\n\t\tmenuChildScene.setBackgroundEnabled(false);\n\n\t\tprofile02MenuItem.setPosition(150, 280);\n\t\tprofile24MenuItem.setPosition(400, 280);\n\t\tprofile4MenuItem.setPosition(650, 280);\n\n\t\tmenuChildScene.setOnMenuItemClickListener(this);\n\t\t\n\t\t//-- change language button -----------------------------------------------------------------------------\n\t\t\n\t\tchangLang = new TiledSprite(400,60, resourcesManager.btLangTR, vbom){\n\t\t\t\t\n\t\t\t@Override\n\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\tswitch(pSceneTouchEvent.getAction()){\n\t\t\tcase TouchEvent.ACTION_DOWN:\n\t\t\t\tbreak;\n\t\t\tcase TouchEvent.ACTION_UP:\n\t\t\t\tplaySelectSound();\n\t\t\t\tif(localLanguage==0){\n\t\t\t\t\tchangeLanguage(\"UK\");\n\t\t\t\t\tthis.setCurrentTileIndex(1);\n\t\t\t\t\tlocalLanguage=1;\n\t\t\t\t}else if (localLanguage==1) {\n\t\t\t\t\tchangeLanguage(\"FR\");\n\t\t\t\t\tthis.setCurrentTileIndex(0);\n\t\t\t\t\tlocalLanguage=0;\n\t\t\t\t}\n\t\t\t\tupdateTexts();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\t\n\t\tif(localLanguage==0){\t\t\t\n\t\t\tchangLang.setCurrentTileIndex(0);\n\t\t}else{\t\t\n\t\t\tchangLang.setCurrentTileIndex(1);\n\t\t}\n\t\t\n\t\tthis.attachChild(changLang);\n\t\tthis.registerTouchArea(changLang);\n\t\t//-----------------------------------------------------------------------------------------------------\n\n\n\t\tsetChildScene(menuChildScene);\n\t}",
"@Override\n public boolean onPrepareOptionsMenu (Menu menu) {\n \n return super.onPrepareOptionsMenu (menu);\n \n }",
"private void buildMenu() {\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n\n JMenu fileMenu = new JMenu(\"File\");\n fileMenu.addMenuListener(this);\n\n JMenuItem openItem = new JMenuItem(\"Open\");\n openItem.setEnabled(false);\n JMenuItem newItem = new JMenuItem(\"New\");\n newItem.setEnabled(false);\n saveItem = new JMenuItem(\"Save\");\n saveItem.setEnabled(false);\n saveAsItem = new JMenuItem(\"Save As\");\n saveAsItem.setEnabled(false);\n reloadCalItem = new JMenuItem(RELOAD_CAL);\n exitItem = new JMenuItem(EXIT);\n\n mbar.add(makeMenu(fileMenu, new Object[]{newItem, openItem, null,\n reloadCalItem, null,\n saveItem, saveAsItem, null, exitItem}, this));\n\n JMenu viewMenu = new JMenu(\"View\");\n mbar.add(viewMenu);\n JMenuItem columnItem = new JMenuItem(COLUMNS);\n columnItem.addActionListener(this);\n JMenuItem logItem = new JMenuItem(LOG);\n logItem.addActionListener(this);\n JMenu satMenu = new JMenu(\"Satellite Image\");\n JMenuItem irItem = new JMenuItem(INFRA_RED);\n irItem.addActionListener(this);\n JMenuItem wvItem = new JMenuItem(WATER_VAPOUR);\n wvItem.addActionListener(this);\n satMenu.add(irItem);\n satMenu.add(wvItem);\n viewMenu.add(columnItem);\n viewMenu.add(logItem);\n viewMenu.add(satMenu);\n\n observability = new JCheckBoxMenuItem(\"Observability\", true);\n observability.setToolTipText(\"Check that the source is observable.\");\n remaining = new JCheckBoxMenuItem(\"Remaining\", true);\n remaining.setToolTipText(\n \"Check that the MSB has repeats remaining to be observed.\");\n allocation = new JCheckBoxMenuItem(\"Allocation\", true);\n allocation.setToolTipText(\n \"Check that the project still has sufficient time allocated.\");\n\n String ZOA = System.getProperty(\"ZOA\", \"true\");\n boolean tickZOA = true;\n if (\"false\".equalsIgnoreCase(ZOA)) {\n tickZOA = false;\n }\n\n zoneOfAvoidance = new JCheckBoxMenuItem(\"Zone of Avoidance\", tickZOA);\n localQuerytool.setZoneOfAvoidanceConstraint(!tickZOA);\n\n disableAll = new JCheckBoxMenuItem(\"Disable All\", false);\n JMenuItem cutItem = new JMenuItem(\"Cut\",\n new ImageIcon(ClassLoader.getSystemResource(\"cut.gif\")));\n cutItem.setEnabled(false);\n JMenuItem copyItem = new JMenuItem(\"Copy\",\n new ImageIcon(ClassLoader.getSystemResource(\"copy.gif\")));\n copyItem.setEnabled(false);\n JMenuItem pasteItem = new JMenuItem(\"Paste\",\n new ImageIcon(ClassLoader.getSystemResource(\"paste.gif\")));\n pasteItem.setEnabled(false);\n\n mbar.add(makeMenu(\"Edit\",\n new Object[]{\n cutItem,\n copyItem,\n pasteItem,\n null,\n makeMenu(\"Constraints\", new Object[]{observability,\n remaining, allocation, zoneOfAvoidance, null,\n disableAll}, this)}, this));\n\n mbar.add(SampClient.getInstance().buildMenu(this, sorter, table));\n\n JMenu helpMenu = new JMenu(\"Help\");\n helpMenu.setMnemonic('H');\n\n mbar.add(makeMenu(helpMenu, new Object[]{new JMenuItem(INDEX, 'I'),\n new JMenuItem(ABOUT, 'A')}, this));\n\n menuBuilt = true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_zawadiaka, menu);\n return true;\n }",
"static void listerMenu() {\n System.out.println(\n \"-------------------------------------\\n\" +\n \"Saisir une option :\\n\" +\n \"1 : Liste des hôtes\\n\" +\n \"2 : Liste des logements\\n\" +\n \"3 : Liste des voyageurs\\n\" +\n \"4 : Liste des réservations\\n\" +\n \"5 : Fermer le programme\"\n );\n switch (Menu.choix(5)) {\n case 1:\n GestionHotes.listerHotes();\n break;\n case 2:\n GestionLogements.listerLogements();\n break;\n case 3:\n GestionVoyageurs.listerVoyageurs();\n break;\n case 4:\n GestionReservations.listerReservations();\n break;\n case 5:\n System.exit(0);\n break;\n }\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_guia_turistica, menu);\n return true;\n }",
"public static void menuInicial() {\n System.out.println(\"Boas vindas à Arena pokemon Treinador!!!\");\n System.out.println(\"Digite 1 para fazer sua inscrição\");\n System.out.println(\"Digite 2 para sair\");\n\n }",
"public Menu getStartMenu() {\n Menu menu = new Menu(new Point(475, 0), 672-475, 320, 8, 1, new Cursor(new Point(0, 7)), \"exit\");\n Button PokedexButton = new Button(new Point(475, 0), 672-475, 40, \"Pokédex\", new Point(0, 7), \"Pokédex\");\n Button PokemonButton = new Button(new Point(475, 40), 672-475, 40, \"Pokémon\", new Point(0, 6), \"Pokémon\");\n Button BagButton = new Button(new Point(475, 80), 672-475, 40, \"Bag\", new Point(0, 5), \"Bag\");\n Button PokenavButton = new Button(new Point(475, 120), 672-475, 40, \"Pokénav\", new Point(0, 4), \"Pokénav\");\n Button PlayerButton = new Button(new Point(475, 160), 672-475, 40, trainer.getName(), new Point(0, 3), trainer.getName());\n Button SaveButton = new Button(new Point(475, 200), 672-475, 40, \"save\", new Point(0, 2), \"Save\");\n Button OptionButton = new Button(new Point(475, 240), 672-475, 40, \"add_menu_other\", new Point(0, 1), \"Options\");\n Button ExitButton = new Button(new Point(475, 280), 672-475, 40, \"exit\", new Point(0, 0), \"exit\");\n menu.addButton(PokedexButton);\n menu.addButton(PokemonButton);\n menu.addButton(BagButton);\n menu.addButton(PokenavButton);\n menu.addButton(PlayerButton);\n menu.addButton(SaveButton);\n menu.addButton(OptionButton);\n menu.addButton(ExitButton);\n menu.getButton(menu.getCursor().getPos()).Highlight();\n return menu;\n }",
"@Override\n \tpublic boolean onPrepareOptionsMenu(Menu menu) {\n \t\tmenu.clear();\n \t\tswitch (mViewFlipper.getDisplayedChild()) {\n \t\tcase 0:\n \t\t\tmenu.add(Menu.NONE, Menu.FIRST + 4, 4, getString(R.string.omenuitem_reglogin)).setIcon(R.drawable.ic_menu_login);\n \t\t\tmenu.add(Menu.NONE, Menu.FIRST + 5, 5, getString(R.string.omenuitem_quit)).setIcon(android.R.drawable.ic_menu_close_clear_cancel);\n \t\t\tbreak;\n \t\tcase 1:\n \t\t\tif (mBrowPage.isDooming()) {\n \t\t\t\tmenu.add(Menu.NONE, Menu.FIRST + 1, 1, R.string.label_browse).setIcon(android.R.drawable.ic_menu_zoom);\n \t\t\t} else {\n \t\t\t\tmenu.add(Menu.NONE, Menu.FIRST + 1, 1, R.string.label_zoom).setIcon(android.R.drawable.ic_menu_zoom);\n \t\t\t}\n \t\t\tmenu.add(Menu.NONE, Menu.FIRST + 2, 1, R.string.label_reset).setIcon(android.R.drawable.ic_menu_revert);\n \t\t\tmenu.add(Menu.NONE, Menu.FIRST + 3, 1, R.string.label_refresh).setIcon(R.drawable.ic_menu_refresh);\n \t\t\tbreak;\n \t\tcase 2:\n \t\t\tbreak;\n \t\t}\n \t\tmenu.add(Menu.NONE, Menu.FIRST + 6, 6, getString(R.string.omenuitem_about)).setIcon(android.R.drawable.ic_menu_help);\n \n \t\treturn super.onPrepareOptionsMenu(menu);\n \t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_zadania, menu);\n return true;\n }",
"private void setUpMenu() {\n resideMenu = new ResideMenu(this);\n resideMenu.setBackground(R.drawable.menu_background);\n resideMenu.attachToActivity(this);\n\n //resideMenu.setMenuListener(menuListener);\n //scaling activity slide ke menu\n resideMenu.setScaleValue(0.7f);\n\n itemHome = new ResideMenuItem(this, R.drawable.ic_home, \"Home\");\n itemProfile = new ResideMenuItem(this, R.drawable.ic_profile, \"Profile\");\n //itemCalendar = new ResideMenuItem(this, R.drawable.ic_calendar, \"Calendar\");\n itemSchedule = new ResideMenuItem(this, R.drawable.ic_schedule, \"Schedule\");\n //itemExams = new ResideMenuItem(this, R.drawable.ic_exams, \"Exams\");\n //itemSettings = new ResideMenuItem(this, R.drawable.ic_setting, \"Settings\");\n //itemChat = new ResideMenuItem(this, R.drawable.ic_chat, \"Chat\");\n //itemTask = new ResideMenuItem(this, R.drawable.ic_task, \"Task\");\n\n\n resideMenu.addMenuItem(itemHome, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemProfile, ResideMenu.DIRECTION_LEFT);\n // resideMenu.addMenuItem(itemCalendar, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemSchedule, ResideMenu.DIRECTION_LEFT);\n //resideMenu.addMenuItem(itemExams, ResideMenu.DIRECTION_LEFT);\n //resideMenu.addMenuItem(itemTask, ResideMenu.DIRECTION_LEFT);\n //resideMenu.addMenuItem(itemChat, ResideMenu.DIRECTION_LEFT);\n //resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_LEFT);\n\n // matikan slide ke kanan\n resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n itemHome.setOnClickListener(this);\n itemSchedule.setOnClickListener(this);\n itemProfile.setOnClickListener(this);\n //itemSettings.setOnClickListener(this);\n\n\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return true; /** true -> el menú ya está visible */\n }",
"private void paintMenu(){ \n\t\t\n\t\t//Idee: Vllt. lieber Menü auf unsichtbar setzen und immer wieder anzeigen, wenn benötigt? Vllt. auch praktisch für Pause...Aber was mit entsprechenden Labels?\n\t\tif(spiel_status == 3){ //Spiel noch gar nicht gestartet\n\t\t\tframe3 = new JFrame(\"Spiel starten?\");\n\t\t\tframe3.setLocation(650,300);\n\t\t\tframe3.setSize(100, 100);\n\t\t\tJButton b1 = new JButton(\"Einzelspieler\");\n\t\t\tb1.setMnemonic(KeyEvent.VK_ENTER);//Shortcut Enter\n\t\t\tJButton b2 = new JButton(\"Beenden\");\n\t\t\tb2.setMnemonic(KeyEvent.VK_ESCAPE);//Shortcut Escape\n\t\t\tJButton b3 = new JButton(\"Mehrspieler\");\n\t\t\tJButton b4 = new JButton(\"Einstellungen\");\n\t\t\tJButton b5 = new JButton(\"Handbuch\");\n\t\t\t\n\t\t\t//Neues Layout. 4 Zeilen, 1 Spalte. \n\t\t\tframe3.setLayout(new GridLayout(5,1));\n\t\t\tframe3.add(b1);\n\t\t\tframe3.add(b3);\n\t\t\tframe3.add(b4);\n\t\t\tframe3.add(b5);\n\t\t\tframe3.add(b2);\n\n\t\t\tframe3.pack();\n\t\t\tframe3.setVisible(true);\n\t\t\t\n\t\t\t\n\t\t\tb1.addActionListener(new ActionListener(){\n\t\t\t\tpublic void actionPerformed(ActionEvent arg0){\n\t\t\t\t\tsingleplayer = true;\n\t\t\t\t\tdoInitializations(frame3);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\t\n\t\t\tb2.addActionListener(new ActionListener(){\n\t\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t});\n\t\t\t\n\t\t\tb3.addActionListener(new ActionListener(){\n\t\t\t\tpublic void actionPerformed(ActionEvent arg1){\n\t\t\t\t\tmultiplayer = true;\n\t\t\t\t\tpaintNetworkMenu();\n\t\t\t\t}\n\t\t\t});\t\t\t\n\t\t\t\n\t\t\tb4.addActionListener(new ActionListener(){\n\t\t\t\tpublic void actionPerformed(ActionEvent arg1){\n\t\t\t\t\tpaintSettingMenu();\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tb5.addActionListener(new ActionListener(){\n\t\t\t\tpublic void actionPerformed(ActionEvent arg1){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tRuntime.getRuntime().exec(\"rundll32 url.dll,FileProtocolHandler \"+ \"resources\\\\handbuch\\\\Handbuch.pdf\");\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\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\tif(spiel_status == 1|| spiel_status == 0){ //Wenn Spiel gewonnen oder verloren\n//\t\t\tif (!multiplayer){\n\t\t\t\tframe2 = new JFrame(\"Neues Einzelspielerspiel?\");\n\t\t\t\tframe2.setLocation(500,300);\n\t\t\t\tframe2.setSize(100, 100);\n\t\t\t\tJLabel label;\n\t\t\t\tif(spiel_status == 1){\n\t\t\t\t\tlabel = new JLabel(\"Bravo, du hast gewonnen! Neues Einzelspielerspiel?\");\n\t\t\t\t}else{\n\t\t\t\t\tif(player.getLifes() == 0){\n\t\t\t\t\t\tlabel = new JLabel(\"Schade, du hast verloren! Neues Einzelspielerspiel?\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tlabel = new JLabel(\"Du hast gewonnen! Neues Einzelspielerspiel?\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tframe2.add(BorderLayout.NORTH, label);\n\t\t\t\tJButton b1 = new JButton(\"Neues Einzelspielerspiel\");\n\t\t\t\tb1.setMnemonic(KeyEvent.VK_ENTER);//Shortcut Enter\n\t\t\t\tb1.addActionListener(new ActionListener(){\n\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0){ //bzgl. Starten\n\t\t\t\t\t\tsoundlib.stopLoopingSound();\n\t\t\t\t\t\tdoInitializations(frame2);\n\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tJButton b2 = new JButton(\"Zurück zum Hauptmenü\");\n\t\t\t\tb2.setMnemonic(KeyEvent.VK_ESCAPE);//Shortcut Escape\n\t\t\t\tb2.addActionListener(new ActionListener(){\n\t\t\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n\t\t\t\t\t\tsoundlib.stopLoopingSound();\n\t\t\t\t\t\tspiel_status=3;\n\t\t\t\t\t\tpaintMenu();\n\t\t\t\t\t\tframe2.setVisible(false);\n\t\t\t\t\t\t\n\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});\n\t\t\t\tframe2.add(BorderLayout.CENTER, b1);\n\t\t\t\tframe2.add(BorderLayout.SOUTH, b2);\n\t\t\t\tframe2.pack();\n\t\t\t\tframe2.setVisible(true);\n\t\t\t\tspiel_status = 0;\n\t\t\t}\n//\t\t}else{\n//\t\t\tframe2 = new JFrame(\"Ende\");\n//\t\t\tframe2.setLocation(500,300);\n//\t\t\tframe2.setSize(100, 100);\n//\t\t\tJLabel label;\n//\t\t\tif(player.getLifes() == 0){\n//\t\t\t\tlabel = new JLabel(\"Du Lusche hast verloren!\");\n//\t\t\t}else{\n//\t\t\t\tlabel = new JLabel(\"Boom-Headshot! Du hast gewonnen!\");\n//\t\t\t}\n//\t\t\t\n//\t\t\tframe2.add(BorderLayout.NORTH, label);\n//\t\t\t\n//\t\t\tJButton b2 = new JButton(\"Zurück zum Hauptmenü\");\n//\t\t\tb2.setMnemonic(KeyEvent.VK_ESCAPE);//Shortcut Escape\n//\t\t\tb2.addActionListener(new ActionListener(){\n//\t\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n//\t\t\t\t\tif(sound_running){\n//\t\t\t\t\t\tsoundlib.stopLoopingSound();\n//\t\t\t\t\t}\n//\t\t\t\t\tspiel_status=3;\n//\t\t\t\t\tpaintMenu();\n//\t\t\t\t\tframe2.setVisible(false);\n//\t\t\t\t\tframe2.dispose();\n//\t\t\t\t\t\n//\t\t\t\n//\t\t\t\t\t\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t});\n//\t\t\tframe2.add(BorderLayout.CENTER, b2);\n//\t\t\tframe2.pack();\n//\t\t\tframe2.setVisible(true);\n//\t\t\tspiel_status = 0;\n//\t\t}\n\t\tspiel_status = 0; // Daraus folgt, dass wenn man das Spiel per ESC-taste verlässt, man verliert.\n\t\t\n\t}",
"void clickAmFromMenu();",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu_weproov, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_btn_bienbao, menu);\n return true;\n }",
"@Override\n public void menuSelected(MenuEvent e) {\n \n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_skale, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.menu_principal, menu);\n \t//Fin del menu\n \treturn true;\n }",
"private void afficheMenu() {\n\t\tSystem.out.println(\"------------------------------ Bien venu -----------------------------\");\n\t\tSystem.out.println(\"--------------------------- \"+this.getName()+\" ------------------------\\n\");\n\t\t\n\t\ttry {\n\t\t\tThread.sleep(40);\n\t\t\tSystem.out.println(\"A- Afficher l'état de l'hôtel. \");\n\t\t\tThread.sleep(50);\n\t\t\tSystem.out.println(\"B- Afficher Le nombre de chambres réservées.\");\n\t\t\tThread.sleep(60);\n\t\t\tSystem.out.println(\"C- Afficher Le nombre de chambres libres.\");\n\t\t\tThread.sleep(70);\n\t\t\tSystem.out.println(\"D- Afficher Le numéro de la première chambre vide.\");\n\t\t\tThread.sleep(80);\n\t\t\tSystem.out.println(\"E- Afficher La numéro de la dernière chambre vide.\");\n\t\t\tThread.sleep(90);\n\t\t\tSystem.out.println(\"F- Reserver une chambre.\");\n\t\t\tThread.sleep(100);\n\t\t\tSystem.out.println(\"G- Libérer une chambre.\");\n\t\t\tThread.sleep(100);\n\t\t\tSystem.out.println(\"O- Voire toutes les options possibles?\");\n\t\t\tThread.sleep(100);\n\t\t\tSystem.out.println(\"H- Aide?\");\n\t\t\tThread.sleep(100);\n\t\t\tSystem.out.println(\"-------------------------------------------------------------------------\");\n\t\t}catch(Exception err) {\n\t\t\tSystem.out.println(\"Error d'affichage!\");\n\t\t}\n\t\n\t}",
"public void menu() {\n\t\tstate.menu();\n\t}",
"private void makePOSMenu() {\r\n\t\tJMenu POSMnu = new JMenu(\"Punto de Venta\");\r\n\t\tboolean isAccesible = false;\r\n\r\n\t\tif (StoreCore.getAccess(\"Cotizaciones\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Cotizaciones\", \r\n\t\t\t\t\timageLoader.getImage(\"quote.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 't',\r\n\t\t\t\t\t\"Ver el listado de cotizaciones\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F4, 0), Quote.class);\r\n\t\t\tPOSMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Compra\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Compras\", \r\n\t\t\t\t\timageLoader.getImage(\"purchase.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'c',\r\n\t\t\t\t\t\"Ver el listado de facturas\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F5, 0), Purchase.class);\r\n\r\n\t\t\tPOSMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Facturacion\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Facturacion\", \r\n\t\t\t\t\timageLoader.getImage(\"invoice.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'f',\r\n\t\t\t\t\t\"Ver el listado de facturas\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F6, 0), Invoice.class);\r\n\r\n\t\t\tPOSMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (isAccesible) {\r\n\t\t\tPOSMnu.setMnemonic('p');\r\n\t\t\tadd(POSMnu);\r\n\t\t}\r\n\t}",
"private void construireMenuBar() {\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\tthis.setJMenuBar(menuBar);\r\n\t\t\r\n\t\tJMenu menuFichier = new JMenu(\"Fichier\");\r\n\t\tmenuBar.add(menuFichier);\r\n\t\t\r\n\t\tJMenuItem itemCharger = new JMenuItem(\"Charger\", new ImageIcon(this.getClass().getResource(\"/images/charger.png\")));\r\n\t\tmenuFichier.add(itemCharger);\r\n\t\titemCharger.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O,KeyEvent.CTRL_DOWN_MASK));\r\n\t\titemCharger.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tJFileChooser fc = new JFileChooser();\r\n\t\t\t\tfc.setDialogTitle(\"Sélectionnez le circuit à charger\");\r\n\t\t\t\tint returnVal = fc.showOpenDialog(EditeurCircuit.this);\r\n\t\t\t\tif(returnVal == JFileChooser.APPROVE_OPTION) {\r\n\t\t\t\t\tFile file = fc.getSelectedFile();\r\n\t\t\t\t\tCircuit loadedTrack = (Circuit)Memento.objLoading(file);\r\n\t\t\t\t\tfor(IElement elem : loadedTrack) {\r\n\t\t\t\t\t\telem.setEditeurCircuit(EditeurCircuit.this);\r\n\t\t\t\t\t\tCircuit.getInstance().addElement(elem);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tCircuit.getInstance().estValide();\r\n\t\t\t\t\tEditeurCircuit.this.paint(EditeurCircuit.this.getGraphics());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJMenuItem itemSauvegarder = new JMenuItem(\"Sauvegarder\", new ImageIcon(this.getClass().getResource(\"/images/disquette.png\")));\r\n\t\tmenuFichier.add(itemSauvegarder);\r\n\t\titemSauvegarder.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,KeyEvent.CTRL_DOWN_MASK));\r\n\t\titemSauvegarder.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif(Circuit.getInstance().estValide()) {\r\n\t\t\t\t\tJFileChooser fc = new JFileChooser();\r\n\t\t\t\t\tfc.setDialogTitle(\"Sélectionnez le fichier de destination\");\r\n\t\t\t\t\tint returnVal = fc.showSaveDialog(EditeurCircuit.this);\r\n\t\t\t\t\tif(returnVal == JFileChooser.APPROVE_OPTION) {\r\n\t\t\t\t\t\tFile file = fc.getSelectedFile();\r\n\t\t\t\t\t\tint returnConfirm = JFileChooser.APPROVE_OPTION;\r\n\t\t\t\t\t\tif(file.exists()) {\r\n\t\t\t\t\t\t\tString message = \"Le fichier \"+file.getName()+\" existe déjà : voulez-vous le remplacer ?\";\r\n\t\t\t\t\t\t\treturnConfirm = JOptionPane.showConfirmDialog(EditeurCircuit.this, message, \"Fichier existant\", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(returnConfirm == JFileChooser.APPROVE_OPTION) {\r\n\t\t\t\t\t\t\tnew Memento(Circuit.getInstance(),file);\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\telse {\r\n\t\t\t\t\tString messageErreur;\r\n\t\t\t\t\tif(Circuit.getInstance().getElementDepart() == null) {\r\n\t\t\t\t\t\tmessageErreur = \"Le circuit doit comporter un élément de départ.\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tmessageErreur = \"Le circuit doit être fermé.\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tJOptionPane.showMessageDialog(EditeurCircuit.this,messageErreur,\"Erreur de sauvegarde\",JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tmenuFichier.addSeparator();\r\n\t\t\r\n\t\tJMenuItem itemQuitter = new JMenuItem(\"Quitter\", new ImageIcon(this.getClass().getResource(\"/images/quitter.png\")));\r\n\t\tmenuFichier.add(itemQuitter);\r\n\t\titemQuitter.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q,KeyEvent.CTRL_DOWN_MASK));\r\n\t\titemQuitter.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tEditeurCircuit.this.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJMenu menuEdition = new JMenu(\"Edition\");\r\n\t\tmenuBar.add(menuEdition);\r\n\t\t\r\n\t\tJMenuItem itemChangerTailleGrille = new JMenuItem(\"Changer la taille de la grille\", new ImageIcon(this.getClass().getResource(\"/images/resize.png\")));\r\n\t\tmenuEdition.add(itemChangerTailleGrille);\r\n\t\titemChangerTailleGrille.setAccelerator( KeyStroke.getKeyStroke(KeyEvent.VK_N,KeyEvent.CTRL_DOWN_MASK));\r\n\t\titemChangerTailleGrille.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tEditeurCircuit.this.dispose();\r\n\t\t\t\tnew MenuEditeurCircuit();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJMenuItem itemNettoyerGrille = new JMenuItem(\"Nettoyer la grille\", new ImageIcon(this.getClass().getResource(\"/images/clear.png\")));\r\n\t\tmenuEdition.add(itemNettoyerGrille);\r\n\t\titemNettoyerGrille.setAccelerator( KeyStroke.getKeyStroke(KeyEvent.VK_C,KeyEvent.CTRL_DOWN_MASK));\r\n\t\titemNettoyerGrille.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tEditeurCircuit.this.construireGrilleParDefaut();\r\n\t\t\t\tEditeurCircuit.this.repaint();\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"private void displayMenu() {\r\n\t\tif (this.user instanceof Administrator) {\r\n\t\t\tnew AdminMenu(this.database, (Administrator) this.user);\r\n\t\t} else {\r\n\t\t\tnew BorrowerMenu(this.database);\r\n\t\t}\r\n\t}",
"protected abstract void addMenuOptions();",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.wydatki, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_juego_principal, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.game_main, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_free_draw, menu);\n return true;\n }",
"private JMenu brugerMenuSetup() {\n JMenu brugerMenu = generalMenuSetup(\"Bruger\");\n JMenuItem logUdItem = new JMenuItem(\"Log ud\");\n brugerMenu.add(logUdItem);\n logUdItem.addActionListener(\n e -> System.exit(0)\n );\n JMenuItem minListeItem = new JMenuItem(\"Min liste\");\n brugerMenu.add(minListeItem);\n\n return brugerMenu;\n }",
"private void buildGameMenu() {\r\n gameMenu = new JMenu( Msgs.str( \"Game\" ) );\r\n\r\n tinyFieldItem = new JMenuItem( Msgs.str( \"field.xs\" ) + FIELD_SIZE_XS + Msgs.str( \"sqr_side\" ) );\r\n ks = KeyStroke.getKeyStroke( KeyEvent.VK_T, Event.ALT_MASK );\r\n tinyFieldItem.setAccelerator( ks );\r\n tinyFieldItem.setMnemonic( 'T' );\r\n tinyFieldItem.addActionListener( listener );\r\n\r\n smallFieldItem = new JMenuItem( Msgs.str( \"field.sm\" ) + FIELD_SIZE_SM + Msgs.str( \"sqr_side\" ) );\r\n ks = KeyStroke.getKeyStroke( KeyEvent.VK_S, Event.ALT_MASK );\r\n smallFieldItem.setAccelerator( ks );\r\n smallFieldItem.setMnemonic( 'S' );\r\n smallFieldItem.addActionListener( listener );\r\n\r\n medFieldItem = new JMenuItem( Msgs.str( \"field.md\" ) + FIELD_SIZE_MD + Msgs.str( \"sqr_side\" ) );\r\n ks = KeyStroke.getKeyStroke( KeyEvent.VK_M, Event.ALT_MASK );\r\n medFieldItem.setAccelerator( ks );\r\n medFieldItem.setMnemonic( 'M' );\r\n medFieldItem.addActionListener( listener );\r\n\r\n largeFieldItem = new JMenuItem( Msgs.str( \"field.lg\" ) + FIELD_SIZE_LG + Msgs.str( \"sqr_side\" ) );\r\n ks = KeyStroke.getKeyStroke( KeyEvent.VK_L, Event.ALT_MASK );\r\n largeFieldItem.setAccelerator( ks );\r\n largeFieldItem.setMnemonic( 'L' );\r\n largeFieldItem.addActionListener( listener );\r\n\r\n hugeFieldItem = new JMenuItem( Msgs.str( \"field.xl\" ) + FIELD_SIZE_XL + Msgs.str( \"sqr_side\" ) );\r\n ks = KeyStroke.getKeyStroke( KeyEvent.VK_H, Event.ALT_MASK );\r\n hugeFieldItem.setAccelerator( ks );\r\n hugeFieldItem.setMnemonic( 'H' );\r\n hugeFieldItem.addActionListener( listener );\r\n\r\n exitGameItem = new JMenuItem( Msgs.str( \"Exit\" ) );\r\n ks = KeyStroke.getKeyStroke( KeyEvent.VK_X, Event.ALT_MASK );\r\n exitGameItem.setAccelerator( ks );\r\n exitGameItem.setMnemonic( 'X' );\r\n exitGameItem.addActionListener( listener );\r\n\r\n gameMenu.add( tinyFieldItem );\r\n gameMenu.add( smallFieldItem );\r\n gameMenu.add( medFieldItem );\r\n gameMenu.add( largeFieldItem );\r\n gameMenu.add( hugeFieldItem );\r\n gameMenu.addSeparator();\r\n gameMenu.add( exitGameItem );\r\n }",
"public static void initPauseMenu() {\n pausemenu.setBounds(0, 0, Display.WIDTH, Display.HEIGHT);\n pausemenu.setOpaque(false);\n\n pausemenu_resume_btn.setBounds(250, 210, 300, 50);\n pausemenu_resume_btn.setFont(main_menu_button_font);\n pausemenu_resume_btn.setFocusPainted(false);\n pausemenu_resume_btn.setOpaque(false);\n pausemenu_resume_btn.setBorderPainted(false);\n pausemenu_resume_btn.addActionListener(e -> game.resume());\n\n pausemenu_settings_btn.setBounds(250, 270, 300, 50);\n pausemenu_settings_btn.setFont(main_menu_button_font);\n pausemenu_settings_btn.setFocusPainted(false);\n pausemenu_settings_btn.setOpaque(false);\n pausemenu_settings_btn.setBorderPainted(false);\n pausemenu_settings_btn.addActionListener(e -> {\n options_menu.remove(options_back_button_tomainmenu);\n options_menu.add(options_back_button_topausemenu);\n PanelSlide.slideToLeft(pausemenu, options_menu, -1, -1);\n });\n\n pausemenu_quit_btn.setBounds(250, 330, 300, 50);\n pausemenu_quit_btn.setFont(main_menu_button_font);\n pausemenu_quit_btn.setFocusPainted(false);\n pausemenu_quit_btn.setOpaque(false);\n pausemenu_quit_btn.setBorderPainted(false);\n pausemenu_quit_btn.addActionListener(e -> {\n int pane = JOptionPane.showOptionDialog(null, \"Ana menüye dönmek istediğinize emin misiniz?\",\n \"Ana Menüye Dön\", JOptionPane.DEFAULT_OPTION, JOptionPane.QUESTION_MESSAGE, null, singleplayer_menu_yesno, 1);\n if (pane == 0) {\n main_menu.forward();\n }\n });\n\n pausemenu.add(pausemenu_resume_btn);\n pausemenu.add(pausemenu_settings_btn);\n pausemenu.add(pausemenu_quit_btn);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.game_menu, menu);\n \treturn true;\n }",
"public static void updateMainMenu() {\n instance.updateMenu();\n }",
"private void updateMenuItems(){\n String awayState = mStructure.getAway();\n MenuItem menuAway = menu.findItem(R.id.menu_away);\n if (KEY_AUTO_AWAY.equals(awayState) || KEY_AWAY.equals(awayState)) {\n menuAway.setTitle(R.string.away_state_home);\n } else if (KEY_HOME.equals(awayState)) {\n menuAway.setTitle(R.string.away_state_away);\n }\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu2, menu);\n this.menu=menu;\n if(idName!=null) {menu.getItem(1).setVisible(false);\n menu.getItem(2).setVisible(true);}\n if(create) menu.getItem(0).setVisible(false);\n else menu.getItem(0).setVisible(true);\n /* if(extrasBundle!=null) if(extrasBundle.getBoolean(\"From Option\")==true) {\n menu.getItem(1).setVisible(false);\n menu.getItem(0).setVisible(true);\n\n }*/\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.ficha_contenedor, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"public void desplegarMenuAdministrativo() {\n// //Hacia arriba\n// paneles.jLabelYDown(-50, 40, WIDTH, HEIGHT, jLabelTextoBienvenida);\n// \n// paneles.jLabelYUp(580, 82, WIDTH, HEIGHT, jLabelEntregas);\n// paneles.jLabelYUp(580, 82, WIDTH, HEIGHT, jLabelClientes);\n// paneles.jLabelYUp(580, 82, WIDTH, HEIGHT, jLabelNotas);\n// paneles.jLabelYUp(736, 238, WIDTH, HEIGHT, jLabelTextoEntrega);\n// paneles.jLabelYUp(736, 238, WIDTH, HEIGHT, jLabelTextoClientes);\n// paneles.jLabelYUp(736, 238, WIDTH, HEIGHT, jLabelTextoNotas);\n// \n// paneles.jLabelYUp(793, 295, WIDTH, HEIGHT, jLabelTrabajadores);\n// paneles.jLabelYUp(793, 295, WIDTH, HEIGHT, jLabelEntregasActivas);\n// paneles.jLabelYUp(793, 295, WIDTH, HEIGHT, jLabelEditarDatosPersonales);\n// \n// paneles.jLabelYUp(949, 451, WIDTH, HEIGHT, jLabelTextoTrabajadores);\n// paneles.jLabelYUp(949, 451, WIDTH, HEIGHT, jLabelTextoEntregasProgreso);\n// paneles.jLabelYUp(949, 451, WIDTH, HEIGHT, jLabelTextoEditarPersonales);\n }",
"public void menuListados() {\n\t\tSystem.out.println(\"MENU LISTADOS\");\n\t\tSystem.out.println(\"1. Personas con la misma actividad\");\n\t\tSystem.out.println(\"2. Cantidad de personas con la misma actividad\");\n\t\tSystem.out.println(\"0. Salir\");\n\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_edit_evento_pessoa, menu);\r\n menu.findItem(R.id.action_save).setVisible(false);\r\n this.mInterno = menu;\r\n\r\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\r\n\r\n return true;\r\n }",
"private void createMenus() {\r\n\t\t// File menu\r\n\t\tmenuFile = new JMenu(Constants.C_FILE_MENU_TITLE);\r\n\t\tmenuBar.add(menuFile);\r\n\t\t\r\n\t\tmenuItemExit = new JMenuItem(Constants.C_FILE_ITEM_EXIT_TITLE);\r\n\t\tmenuItemExit.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tactionOnClicExit();\t\t// Action triggered when the Exit item is clicked.\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuFile.add(menuItemExit);\r\n\t\t\r\n\t\t// Help menu\r\n\t\tmenuHelp = new JMenu(Constants.C_HELP_MENU_TITLE);\r\n\t\tmenuBar.add(menuHelp);\r\n\t\t\r\n\t\tmenuItemHelp = new JMenuItem(Constants.C_HELP_ITEM_HELP_TITLE);\r\n\t\tmenuItemHelp.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicHelp();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemHelp);\r\n\t\t\r\n\t\tmenuItemAbout = new JMenuItem(Constants.C_HELP_ITEM_ABOUT_TITLE);\r\n\t\tmenuItemAbout.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicAbout();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemAbout);\r\n\t\t\r\n\t\tmenuItemReferences = new JMenuItem(Constants.C_HELP_ITEM_REFERENCES_TITLE);\r\n\t\tmenuItemReferences.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicReferences();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemReferences);\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_home, menu);\n /* Make an Language option so the user can change the language of the game*/\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main,menu);\n super.onCreateOptionsMenu(menu);\n\n menu.add(1, SALIR, 0, R.string.menu_salir);\n return true;\n }",
"@Override\n\t\tpublic void openMenu() {\n\t\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n mOption = menu;\n getMenuInflater().inflate(R.menu.menu, menu);\n int menunya = sharedpreferences.getInt(\"menu\", 0);\n SharedPreferences.Editor editor = sharedpreferences.edit();\n if (menunya == 0) {\n editor.putInt(\"menu\", 2);\n editor.commit();\n f2.setVisibility(View.VISIBLE);\n f3.setVisibility(View.GONE);\n navigation.setSelectedItemId(R.id.navigation_dashboard);\n } else if (menunya == 2) {\n f2.setVisibility(View.VISIBLE);\n f3.setVisibility(View.GONE);\n navigation.setSelectedItemId(R.id.navigation_dashboard);\n } else if (menunya == 3) {\n f2.setVisibility(View.GONE);\n f3.setVisibility(View.VISIBLE);\n navigation.setSelectedItemId(R.id.navigation_notifications);\n } else {\n editor.putInt(\"menu\", 2);\n editor.commit();\n f2.setVisibility(View.VISIBLE);\n f3.setVisibility(View.GONE);\n }\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_detall_recepta, menu);\n return true;\n }",
"private void updateMenu() {\n if(customMenu || !menuDirty) {\n return;\n }\n \n // otherwise, reset up the menu.\n menuDirty = false;\n menu.removeAll();\n Icon emptyIcon = null; \n for(Action action : actions) {\n if(action.getValue(Action.SMALL_ICON) != null) {\n emptyIcon = new EmptyIcon(16, 16);\n break;\n }\n }\n \n selectedComponent = null;\n selectedLabel = null;\n \n for (Action action : actions) {\n \n // We create the label ourselves (instead of using JMenuItem),\n // because JMenuItem adds lots of bulky insets.\n\n ActionLabel menuItem = new ActionLabel(action);\n JComponent panel = wrapItemForSelection(menuItem);\n \n if (action != selectedAction) {\n panel.setOpaque(false);\n menuItem.setForeground(UIManager.getColor(\"MenuItem.foreground\"));\n } else {\n selectedComponent = panel;\n selectedLabel = menuItem;\n selectedComponent.setOpaque(true);\n selectedLabel.setForeground(UIManager.getColor(\"MenuItem.selectionForeground\"));\n }\n \n if(menuItem.getIcon() == null) {\n menuItem.setIcon(emptyIcon);\n }\n attachListeners(menuItem);\n decorateMenuComponent(menuItem);\n menuItem.setBorder(BorderFactory.createEmptyBorder(0, 6, 2, 6));\n\n menu.add(panel);\n }\n \n if (getText() == null) {\n menu.add(Box.createHorizontalStrut(getWidth()-4));\n } \n \n for(MenuCreationListener listener : menuCreationListeners) {\n listener.menuCreated(this, menu);\n }\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.robot_welcom_activity_nav, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.halaman_utama, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.tetris, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n super.onCreateOptionsMenu(menu);\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.settings, menu);\n MenuItem settings = menu.findItem(R.id.settings);\n if(currentScreenGameState == GameState.STOPPED ){\n settings.setVisible(true);\n }else{\n settings.setVisible(false);\n }\n return true;\n }"
]
| [
"0.74188733",
"0.736342",
"0.7216459",
"0.71699417",
"0.71693087",
"0.71262985",
"0.7119228",
"0.7088195",
"0.7015571",
"0.7010318",
"0.7008928",
"0.6961467",
"0.6959364",
"0.6954918",
"0.6920281",
"0.6851287",
"0.6840214",
"0.6832239",
"0.6827401",
"0.68252194",
"0.67877203",
"0.67854273",
"0.677897",
"0.67773014",
"0.6774029",
"0.6753283",
"0.6748792",
"0.6680063",
"0.667932",
"0.6677775",
"0.66736436",
"0.6671412",
"0.6670896",
"0.6668655",
"0.6668235",
"0.6661368",
"0.6657845",
"0.66574675",
"0.66518897",
"0.6647928",
"0.664583",
"0.6640751",
"0.6639845",
"0.66386545",
"0.6638176",
"0.66302025",
"0.6628554",
"0.6622851",
"0.6618788",
"0.6599177",
"0.6597729",
"0.65912014",
"0.6589824",
"0.65890276",
"0.65856785",
"0.65803564",
"0.6577098",
"0.6575011",
"0.65726054",
"0.6570799",
"0.65680474",
"0.65669477",
"0.65667886",
"0.65665257",
"0.65651214",
"0.6558919",
"0.6557297",
"0.65493584",
"0.65489817",
"0.6548757",
"0.65450877",
"0.6544162",
"0.6544023",
"0.6543083",
"0.6542362",
"0.6540526",
"0.65395236",
"0.6539349",
"0.65378946",
"0.6533909",
"0.6532049",
"0.652829",
"0.6524504",
"0.6518359",
"0.65082306",
"0.65065664",
"0.6504199",
"0.65026075",
"0.6498668",
"0.64964056",
"0.64945424",
"0.6494497",
"0.64944524",
"0.6491647",
"0.6490542",
"0.64895856",
"0.6488307",
"0.6487502",
"0.6484052",
"0.6482563",
"0.64782494"
]
| 0.0 | -1 |
Metoda ktora aktualizuje toto item menu. Aktualizujeme iba vtedy ked sa zmenil stav. Pri zmene menime pozicie selectedPosY a selectedPosX. | @Override
public void update() {
if (changedState) {
selectedPosY = selection * hItemBox + yPos + hItemBox;
selectedPosX = xPos;
changedState = false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 changeItem(int pos, MenuItem newItem) {\n set.set(pos-1, newItem);\n viewSetPackage();\n }",
"public void refreshMenu() {\n\t\tthis.Menu.setSize(this.Menu.getWidth(), this.Items.size() * (this.textSize + 4) + 4);\r\n\t\tthis.Menu.Camera.setPosition(0, 0);\r\n\t\tthis.anchorX();\r\n\t\tthis.anchorY();\r\n\t\t//println(\"----------\");\r\n\t\tthis.Menu.reposition((int) menuAnchor.x, (int) menuAnchor.y);\r\n\r\n\t\tfor (uTextButton t : this.Items) {\r\n\t\t\tt.setPosition(t.getX(), (this.Items.indexOf(t) * t.getHeight()));\r\n\t\t}\r\n\r\n\t}",
"private void updateMenu() {\n if(customMenu || !menuDirty) {\n return;\n }\n \n // otherwise, reset up the menu.\n menuDirty = false;\n menu.removeAll();\n Icon emptyIcon = null; \n for(Action action : actions) {\n if(action.getValue(Action.SMALL_ICON) != null) {\n emptyIcon = new EmptyIcon(16, 16);\n break;\n }\n }\n \n selectedComponent = null;\n selectedLabel = null;\n \n for (Action action : actions) {\n \n // We create the label ourselves (instead of using JMenuItem),\n // because JMenuItem adds lots of bulky insets.\n\n ActionLabel menuItem = new ActionLabel(action);\n JComponent panel = wrapItemForSelection(menuItem);\n \n if (action != selectedAction) {\n panel.setOpaque(false);\n menuItem.setForeground(UIManager.getColor(\"MenuItem.foreground\"));\n } else {\n selectedComponent = panel;\n selectedLabel = menuItem;\n selectedComponent.setOpaque(true);\n selectedLabel.setForeground(UIManager.getColor(\"MenuItem.selectionForeground\"));\n }\n \n if(menuItem.getIcon() == null) {\n menuItem.setIcon(emptyIcon);\n }\n attachListeners(menuItem);\n decorateMenuComponent(menuItem);\n menuItem.setBorder(BorderFactory.createEmptyBorder(0, 6, 2, 6));\n\n menu.add(panel);\n }\n \n if (getText() == null) {\n menu.add(Box.createHorizontalStrut(getWidth()-4));\n } \n \n for(MenuCreationListener listener : menuCreationListeners) {\n listener.menuCreated(this, menu);\n }\n }",
"public void selectionUp() {\n\t\tselectedSlotPosY = (selectedSlotPosY == (C.MENU_INVENTORY_ITEM_SLOT_HEIGHT - 1)) ? 0 : selectedSlotPosY+1;\n\t}",
"@Override\n\t\tpublic void update() {\n\t\t\tif(!Mouse.isDragging) return;\n\t\t\t\n\t\t\tfor(Editable editable : ServiceLocator.getService(EditorSystem.class).getSelectedEditables()){\n\t\t\t\teditable.getEntity().getComponent(Transform.class).setPosition(Mouse.worldCoordinates.copy());//.sub(SelectionTypeState.mouseClickWorldPosition).add(SelectionTypeState.colliderPositions.get(cnt)));\n\t\t\t}\n\t\t}",
"@Override\n\t\t\tpublic void menuSelected(MenuItem selectedItem)\n\t\t\t{\n\n\t\t\t}",
"@Override\n\t\t\tpublic void menuSelected(MenuItem selectedItem)\n\t\t\t{\n\n\t\t\t}",
"protected void updateSelection ()\n {\n // find the selected node\n ConfigTreeNode node = _tree.getSelectedNode();\n\n // update the editor panel\n _epanel.removeChangeListener(ManagerPanel.this);\n try {\n ManagedConfig cfg = (node == null) ? null : node.getConfig();\n _epanel.setObject(cfg);\n _lastValue = (cfg == null) ? null : (ManagedConfig)cfg.clone();\n } finally {\n _epanel.addChangeListener(ManagerPanel.this);\n }\n\n // enable or disable the menu items\n boolean enable = (node != null);\n boolean writeable = !_readOnly;\n _exportConfigs.setEnabled(enable);\n _cut.setEnabled(enable && writeable);\n _copy.setEnabled(enable);\n _delete.setEnabled(enable && writeable);\n _findUses.setEnabled(enable);\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 public void update() {\n selectedLevel.update();\n }",
"@Override\n\tpublic void update(Tmenu t) throws Exception {\n\t\tmenuMapper.update(t);\n\t}",
"public void selectionDown() {\n\t\tselectedSlotPosY = (selectedSlotPosY == 0) ? C.MENU_INVENTORY_ITEM_SLOT_HEIGHT - 1 : selectedSlotPosY-1;\n\t}",
"public void setUpEditMenu() {\n add(editMenu);\n\n //editMenu.add(cutItem);\n //editMenu.add(copyItem);\n //editMenu.add(pasteItem);\n //editMenu.addSeparator();\n clearAllItems.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n world.deleteAllEntities();\n }\n });\n editMenu.add(clearAllItems);\n editMenu.addSeparator();\n JMenuItem loadVectors = new JMenuItem(\"Load stimulus vectors...\");\n loadVectors.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n SFileChooser chooser = new SFileChooser(\".\", \"Load vectors\");\n File theFile = chooser.showOpenDialog();\n if (theFile != null) {\n double[][] vecs = Utils.getDoubleMatrix(theFile);\n world.loadStimulusVectors(vecs);\n }\n }\n });\n editMenu.add(loadVectors);\n\n }",
"public void updateSelection()\n {\n \trectForSelection.setRect(rettangoloX,rettangoloY,larghezza,altezza);\n \trectSelTopLeft.setRect(rettangoloX-3,rettangoloY-3,6,6);\n \trectSelBottomLeft.setRect(rettangoloX-3,rettangoloY+altezza-3,6,6);\n \trectSelTopRight.setRect(rettangoloX+larghezza-3,rettangoloY-3,6,6);\n \trectSelBottomRight.setRect(rettangoloX+larghezza-3,rettangoloY+altezza-3,6,6);\n }",
"@Override\n\tpublic void modifyMenuItem(MenuItem menuItem) \n\t{\n\t\tList<MenuItem> list=this.menuItemList;\n\t\tfor(MenuItem m:list)\n\t\t{\n\t\t\tif(m.getId()==menuItem.getId())\n\t\t\t{\n\t\t\t\tm.setName(menuItem.getName());\n\t\t\t\tm.setPrice(menuItem.getPrice());\n\t\t\t\tm.setCategory(menuItem.getCategory());\n\t\t\t\tm.setDateOfLaunch(menuItem.getDateOfLaunch());\n\t\t\t\tm.setFreeDelivery(menuItem.isFreeDelivery());\n\t\t\t\tm.setActive(menuItem.isActive());\n\t\t\t}\n\t\t}\n\t}",
"private void initializeMenu() {\n menu = new Menu(parent.getShell());\n MenuItem item1 = new MenuItem(menu, SWT.NONE);\n item1.setText(Resources.getMessage(\"LatticeView.9\")); //$NON-NLS-1$\n item1.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n model.getClipboard().addToClipboard(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.CLIPBOARD, selectedNode));\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n \n MenuItem item2 = new MenuItem(menu, SWT.NONE);\n item2.setText(Resources.getMessage(\"LatticeView.10\")); //$NON-NLS-1$\n item2.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n controller.actionApplySelectedTransformation();\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n }",
"public void updateMenuData(){\n if(datasetTable == null)\n return;\n boolean canEdit = dataset.getRight() == DataConstants.EXECUTIVE_RIGHT;\n if(menuItemSave != null)\n menuItemSave.setEnabled(canEdit);\n this.menuItemInsert.setEnabled(canEdit && datasetTable.canInsert());\n getMenuItemSuppr().setEnabled(canEdit &&datasetTable.canSuppr());\n getMenuItemTextLeft().setEnabled(canEdit &&datasetTable.canAlignText());\n getMenuItemTextCenter().setEnabled(canEdit &&datasetTable.canAlignText());\n getMenuItemTextRight().setEnabled(canEdit &&datasetTable.canAlignText());\n getMenuItemCopy().setEnabled(canEdit &&datasetTable.canCopy());\n getMenuItemPaste().setEnabled(canEdit &&datasetTable.canPaste());\n getMenuItemCut().setEnabled(canEdit &&datasetTable.canCut());\n getMenuItemSort().setEnabled(datasetTable.canSort());\n this.menuItemIgnore.setEnabled(canEdit &&datasetTable.canIgnore());\n if(isAllSelectionIgnore()){\n this.menuItemIgnore.setItemIcon(getCopexImage(\"Bouton-AdT-28_ignore_push.png\"));\n this.menuItemIgnore.setItemRolloverIcon(getCopexImage(\"Bouton-AdT-28_ignore_surcli.png\"));\n }else{\n this.menuItemIgnore.setItemIcon(getCopexImage(\"Bouton-AdT-28_ignore.png\"));\n this.menuItemIgnore.setItemRolloverIcon(getCopexImage(\"Bouton-AdT-28_ignore_sur.png\"));\n }\n getMenuItemUndo().setEnabled(canEdit &&datasetTable.canUndo());\n getMenuItemRedo().setEnabled(canEdit &&datasetTable.canRedo());\n boolean canOp = datasetTable.canOperations();\n this.menuItemSum.setEnabled(canEdit &&canOp);\n this.menuItemAvg.setEnabled(canEdit &&canOp);\n this.menuItemMin.setEnabled(canEdit &&canOp);\n this.menuItemMax.setEnabled(canEdit &&canOp);\n //boolean isData = isData() && dataset.getListDataHeaderDouble(true).length > 0;\n boolean isData = dataset.getListDataHeaderDouble(true).length > 0;\n this.menuItemAddGraph.setEnabled(canEdit &&isData);\n if(menuItemPrint != null)\n this.menuItemPrint.setEnabled(dataset != null);\n repaint();\n }",
"@Override\n\t\tpublic void update() {\n\t\t\tif(!Mouse.isDragging) return;\n\t\t\t\n\t\t\tfor(Editable editable : ServiceLocator.getService(EditorSystem.class).getSelectedEditables()){\n\t\t\t\teditable.getEntity().getComponent(Transform.class).setRotation(editable.getEntity().getComponent(Transform.class).getRotation().add(0, 0, -Math.signum(lastMouseWorldPosition.get(Vector.Y) - Mouse.worldCoordinates.get(Vector.Y)) * rotationAngle));\t\n\t\t\t}\n\t\t\t\n\t\t\t// Update all selected editables\n//\t\t\tfor(Editable editable: SelectionTypeState.selectedEditables){\n//\t\t\t\t// Set the rotation\n//\t\t\t\teditable.getEntity().getComponent(Transform.class).getRotation().set(editable.getEntity().getComponent(Transform.class).getRotation().cpy().add(0, 0, -Math.signum(lastMouseWorldPosition.y - Mouse.worldCoordinates.y) * rotationAngle));\n//\t\t\t}\n\n\t\t\t// Update last mouse world position\n\t\t\tlastMouseWorldPosition = Mouse.worldCoordinates.copy();\n\t\t}",
"public void updateMenusRegardingGPSData() {\r\n\t\tthis.menuBar.updateAdditionalGPSMenuItems();\r\n\t\tthis.menuToolBar.updateGoogleEarthToolItem();\r\n\t}",
"@Override\n public void redo(){\n this.parent.getSelectedArea().clear();\n \n //And add the point to the list again\n this.parent.getSelectedArea().add(this.selected);\n }",
"public void updateContextMenu(Menu contextMenu) {\n \t\tList<SVGElementModel> selectedModels = selectionModel.getSelectedItems();\n \t\tList<Item> items = new ArrayList<Item>();\n \t\tint size = selectedModels.size();\n \t\tif (size == 0) {\n \t\t\t// Empty selection\n \t\t\titems.add(new CommandFactoryMenuItem(AddLineCommandFactory.INSTANTIATOR));\n \t\t\titems.add(new CommandFactoryMenuItem(AddCircleCommandFactory.INSTANTIATOR));\n \t\t\titems.add(new CommandFactoryMenuItem(AddEllipseCommandFactory.INSTANTIATOR));\n \t\t\titems.add(new CommandFactoryMenuItem(AddRectCommandFactory.INSTANTIATOR));\n \t\t\titems.add(new CommandFactoryMenuItem(AddPolylineCommandFactory.INSTANTIATOR));\n \t\t\titems.add(new CommandFactoryMenuItem(AddPolygonCommandFactory.INSTANTIATOR));\n \t\t\titems.add(new CommandFactoryMenuItem(AddPathCommandFactory.INSTANTIATOR));\n \t\t\titems.add(new CommandFactoryMenuItem(AddGroupCommandFactory.INSTANTIATOR));\n \t\t} else if (size == 1) {\n \t\t\t// Mono selection\n \t\t\tMetaModel metaModel = selectedModels.get(0).getMetaModel();\n \t\t\titems.addAll(metaModel.getContextMenuItems());\n \t\t\titems.add(new CommandFactoryMenuItem(RemoveElementsCommandFactory.INSTANTIATOR));\n \t\t} else {\n \t\t\t// Multi selection\n \t\t\titems.add(new CommandFactoryMenuItem(RemoveElementsCommandFactory.INSTANTIATOR));\n \t\t}\n \t\titems.add(new CommandFactoryMenuItem(ShowPropertiesCommandFactory.INSTANTIATOR));\n \t\tcontextMenu.removeAll();\n \t\tfor (Item item : items) {\n \t\t\tcontextMenu.add(item);\t\t\t\n \t\t}\n \t}",
"public void updateMenu() {\n updateMenuGroupError = true;\n if (menu.updateMenu()) {\n deleteMenuError = false;\n createMenuError = false;\n updateMenuError = true;\n } else {\n setName(menu.name);\n updateMenuError = false;\n }\n }",
"@Override\n\tpublic void update(float dt) {\n\t\tif (selectableEntities.size() == 0) {\n\t\t\tisFinished = true;\n\t\t\treturn;\n\t\t}\n\t\tfor (int i = 0; i < selectableEntities.size(); i++){\n\t\t\tEntity e = selectableEntities.get(i);\n\t\t\tPosition pos = posM.get(e);\n\t\t\tDragOption drag = dragoM.get(e);\n\t\t\tif (drag.selected){\n\t\t\t\tposM.get(parent.e).pos.set(pos.pos);\n\t\t\t\t//Gdx.app.log(TAG, \"selected\" + e.getId() + pos.pos);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}",
"private void updateMenus()\n {\n m_KernelMenu.updateMenu();\n m_AgentMenu.updateMenu();\n }",
"@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tListSelectionModel lsm = list.getSelectionModel();\r\n\t\t\tint selected = lsm.getMinSelectionIndex();\r\n\r\n\t\t\tItemView itemView = (ItemView) list.getModel().getElementAt(selected);\r\n\r\n\t\t\t// change item\r\n\t\t\tJOptionPane options = new JOptionPane();\r\n\t\t\tObject[] addFields = { \"Name: \", nameTextField, \"Price: \", priceTextField, \"URL: \", urlTextField, };\r\n\t\t\tint option = JOptionPane.showConfirmDialog(null, addFields, \"Edit item\", JOptionPane.OK_CANCEL_OPTION);\r\n\t\t\tif (option == JOptionPane.OK_OPTION) {\r\n\t\t\t\tString name = nameTextField.getText();\r\n\t\t\t\tString price = priceTextField.getText();\r\n\t\t\t\tString url = urlTextField.getText();\r\n\r\n\t\t\t\tdouble doublePrice = Double.parseDouble(price);\r\n\r\n\t\t\t\titemView.getItem().setName(name);\r\n\t\t\t\titemView.getItem().setCurrentPrice(doublePrice);\r\n\t\t\t\titemView.getItem().setUrl(url);\r\n\t\t\t\t// clear text fields\r\n\t\t\t\tnameTextField.setText(\"\");\r\n\t\t\t\tpriceTextField.setText(\"\");\r\n\t\t\t\turlTextField.setText(\"\");\r\n\t\t\t}\r\n\t\t}",
"@Override\n public void doUpdate(float delta) {\n if(cursorPosX > maxItemX)\n {\n cursorPosX = 0;\n }\n if(cursorPosX < 0)\n {\n cursorPosX = maxItemX;\n }\n if(cursorPosY > maxItemY)\n {\n cursorPosY = 0;\n }\n if(cursorPosY < 0)\n {\n cursorPosY = maxItemY;\n }\n cursorPosX = MathUtils.clamp(cursorPosX,0,maxItemX);\n // System.out.println(\"CURSOR X POST: \" + cursorPosX);\n cursorPosY = MathUtils.clamp(cursorPosY,0,maxItemY);\n int tempCursorPos = cursorPosY*maxItemX + cursorPosX + cursorPosY*1; //En etta läggs till om pekaren är på annan rad än första, annars kommer sista item:en i en rad vara samma som första.\n // System.out.println(\"Cursorpos: \" + tempCursorPos + \" X: \" + cursorPosX + \" Y: \" + cursorPosY);\n if(tempCursorPos < OverworldScreen.manager.getPlayer().itemList.size()){\n OverworldScreen.manager.getPlayer().activeItem = OverworldScreen.manager.getPlayer().itemList.get(tempCursorPos);\n }\n }",
"@Override\n public void setCurrentItem(int item) {\n super.setCurrentItem(item, false);\n }",
"private void setMenu() {\n\n if (tree.isEmpty() || !treeGrid.anySelected()) {\n mainMenu.setItems(newMenuItem, new MenuItemSeparator(), settingMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecord() == null) {\n mainMenu.setItems(renameMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecords().length > 1) {\n ListGridRecord[] selectedNode = treeGrid.getSelectedRecords();\n if (isSameExtension(selectedNode, Extension.FP)) {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem, exportMenuItem);\n } else if (isSameExtension(selectedNode, Extension.FPS)) {\n mainMenu.setItems(newFPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.BPS)) {\n mainMenu.setItems(newBPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.SCSS)) {\n mainMenu.setItems(newSCSItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n }\n } else if (tree.isFolder(treeGrid.getSelectedRecord())) {\n mainMenu.setItems(newMenuItem, deleteMenu, renameMenuItem, copyMenuItem, pasteMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem, downloadMenuItem,\n copyPathMenuItem);\n } else {\n FileTreeNode selectedNode = (FileTreeNode) treeGrid.getSelectedRecord();\n VMResource resource = selectedNode.getResource();\n if (resource instanceof VMDirectory) {\n return;\n }\n Extension extension = ((VMFile) resource).getExtension();\n if (extension == null) {\n mainMenu.setItems(openWithMenuItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n } else\n switch (extension) {\n case ARC:\n mainMenu.setItems(newBPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FM:\n mainMenu.setItems(newFMCItem, newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FMC:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case TC:\n mainMenu.setItems(newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n case FPS:\n mainMenu.setItems(newFPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, exportMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BPS:\n mainMenu.setItems(newBPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCSS:\n mainMenu.setItems(newSCSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCS:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n default:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n }\n }\n }",
"public void resetUpdating() {\n MenuItem m = mymenu.findItem(R.id.Actualizar);\n if(m.getActionView()!=null)\n {\n // Remove the animation.\n m.getActionView().clearAnimation();\n m.setActionView(null);\n }\n\n }",
"private void updateMenu() {\n\n\t\t\tblockActionsStart();\n\n\t\t\tArrayList<OutputConfig> theConfigs = OutputConfig.getConfigs(getDbID(), type);\n\t\t\ttheConfigs.add(0, OutputConfig.getDefaultObject(type));\n\t\t\tif (!theConfigs.contains(config)) {\n\t\t\t\ttheConfigs.add(0, config);\n\t\t\t}\n\t\t\tif (showNullObject && !config.isNull()) {\n\t\t\t\ttheConfigs.add(0, OutputConfig.getNullObject(type));\n\t\t\t}\n\n\t\t\tconfigMenu.removeAllItems();\n\t\t\tfor (OutputConfig theConfig : theConfigs) {\n\t\t\t\tconfigMenu.addItem(theConfig);\n\t\t\t}\n\t\t\tconfigMenu.setSelectedItem(config);\n\n\t\t\tupdateConfig();\n\n\t\t\tblockActionsEnd();\n\t\t}",
"public void moverElementoSiguiente() {\n\t\tif(elementosMenu!=null && indiceElementoMenuActual< elementosMenu.size()-1) {\n\t\t\tindiceElementoMenuActual++;\n\t\t}\n\t\tsetElementoMenuActual();\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}",
"void updateSelected(Coord c) {\n this.selected = c;\n }",
"private void updateMenuItems()\r\n\t {\r\n\t\t setListAdapter(new ArrayAdapter<String>(this,\r\n\t\t android.R.layout.simple_list_item_1, home_menu));\r\n\t\t \t \r\n\t }",
"public boolean updateMenu() {\n selectedMotifNames=panel.getSelectedMotifNames();\n if (selectedMotifNames==null) return false;\n for (JMenuItem item:limitedToOne) {\n item.setEnabled(selectedMotifNames.length==1);\n }\n selectMotifsFromMenu.removeAll();\n selectOnlyMotifsFromMenu.removeAll(); \n for (String collectionName:engine.getNamesForAllDataItemsOfType(MotifCollection.class)) {\n JMenuItem subitem=new JMenuItem(collectionName);\n subitem.addActionListener(selectFromCollectionListener);\n selectMotifsFromMenu.add(subitem);\n JMenuItem subitem2=new JMenuItem(collectionName);\n subitem2.addActionListener(clearAndselectFromCollectionListener);\n selectOnlyMotifsFromMenu.add(subitem2);\n } \n for (String partitionName:engine.getNamesForAllDataItemsOfType(MotifPartition.class)) {\n Data data=engine.getDataItem(partitionName);\n if (data instanceof MotifPartition) {\n JMenu selectMotifsFromMenuCluster=new JMenu(data.getName()); \n JMenu selectOnlyMotifsFromMenuCluster=new JMenu(data.getName()); \n for (String cluster:((MotifPartition)data).getClusterNames()) { \n JMenuItem subitem=new JMenuItem(cluster);\n subitem.setActionCommand(partitionName+\".\"+cluster);\n subitem.addActionListener(selectFromCollectionListener);\n selectMotifsFromMenuCluster.add(subitem);\n JMenuItem subitem2=new JMenuItem(cluster);\n subitem2.setActionCommand(partitionName+\".\"+cluster);\n subitem2.addActionListener(clearAndselectFromCollectionListener);\n selectOnlyMotifsFromMenuCluster.add(subitem2);\n }\n selectMotifsFromMenu.add(selectMotifsFromMenuCluster);\n selectOnlyMotifsFromMenu.add(selectOnlyMotifsFromMenuCluster);\n }\n } \n selectMotifsFromMenu.setEnabled(selectMotifsFromMenu.getMenuComponentCount()>0);\n selectOnlyMotifsFromMenu.setEnabled(selectOnlyMotifsFromMenu.getMenuComponentCount()>0);\n dbmenu.updateMenu((selectedMotifNames.length==1)?selectedMotifNames[0]:null,true);\n if (selectedMotifNames.length==1) {\n displayMotif.setText(DISPLAY_MOTIF+\" \"+selectedMotifNames[0]);\n displayMotif.setVisible(true);\n compareMotifToOthers.setText(\"Compare \"+selectedMotifNames[0]+\" To Other Motifs\");\n compareMotifToOthers.setVisible(true);\n saveMotifLogo.setVisible(true);\n dbmenu.setVisible(true);\n } else { \n displayMotif.setVisible(false);\n compareMotifToOthers.setVisible(true);\n saveMotifLogo.setVisible(true);\n dbmenu.setVisible(false);\n }\n return true;\n }",
"private void setElementoMenuActual() {\n\t\tif(elementoMenuActual!=null) {\n\t\t\telementoMenuActual.setSeleccionado(false);\n\t\t}\n\t\telementoMenuActual = elementosMenu.get(indiceElementoMenuActual);\n\t\telementoMenuActual.setSeleccionado(true);\n\t}",
"private void setItemMenu() {\n choices = new ArrayList<>();\n \n choices.add(Command.INFO);\n if (item.isUsable()) {\n choices.add(Command.USE);\n }\n if (item.isEquipped()) {\n choices.add(Command.UNEQUIP);\n } else {\n if (item.isEquipable()) {\n choices.add(Command.EQUIP);\n }\n }\n \n if (item.isActive()) {\n choices.add(Command.UNACTIVE);\n } else {\n if (item.isActivable()) {\n choices.add(Command.ACTIVE);\n }\n }\n if (item.isDropable()) {\n choices.add(Command.DROP);\n }\n if (item.isPlaceable()) {\n choices.add(Command.PLACE);\n }\n choices.add(Command.DESTROY);\n choices.add(Command.CLOSE);\n \n this.height = choices.size() * hItemBox + hGap * 2;\n }",
"@Override\n public void paintMenu(Graphics g) {\n if (visible) {\n g.drawImage(toDraw, xPos, yPos, null); \n \n if (selection >= 0) {\n g.setColor(Colors.getColor(Colors.selectedColor));\n g.fillRoundRect(xPos + wGap, selection * hItemBox + yPos + hGap, getWidth() - wGap, hItemBox, wGap, hGap);\n }\n \n if (!activated) {\n g.setColor(Colors.getColor(Colors.selectedColor));\n g.fillRoundRect(xPos, yPos, getWidth(), getHeight(), wGap, hGap);\n }\n }\n }",
"public void setItemPosition(int position) {\n if (position != -1 && items.size() > 0) {\n clearSelections();\n items.get(position).setSelected(true);\n onCancel(null);\n }\n }",
"@Override\n\t\t\tpublic void mouseMoved(MouseEvent e) {\n\t\t\t\tmouseX = e.getX();\n\t\t\t\tmouseY = e.getY();\n\t\t\t\tmenu.setMouseX(mouseX);\n\t\t\t\tmenu.setMouseY(mouseY);\n\t\t\t}",
"public void selectionLeft() {\n\t\tselectedSlotPosX = (selectedSlotPosX == 0) ? C.MENU_INVENTORY_ITEM_SLOT_WIDTH - 1 : selectedSlotPosX-1;\n\t}",
"public Edit_Menu(MainPanel mp) {\r\n mainPanel = mp;\r\n setText(\"Засах\");\r\n// Uitem.setEnabled(false);//TODO : nemsen\r\n Ritem.setEnabled(false);//TODO : nemsen\r\n add(Uitem);\r\n add(Ritem);\r\n }",
"private void updateMenuItems(){\n String awayState = mStructure.getAway();\n MenuItem menuAway = menu.findItem(R.id.menu_away);\n if (KEY_AUTO_AWAY.equals(awayState) || KEY_AWAY.equals(awayState)) {\n menuAway.setTitle(R.string.away_state_home);\n } else if (KEY_HOME.equals(awayState)) {\n menuAway.setTitle(R.string.away_state_away);\n }\n }",
"public void updateSelection() {\n\t\t\n\t}",
"protected void getEditMenuItems(List items, boolean forMenuBar) {\n ObjectListener listener = new ObjectListener(\"\") {\n public void actionPerformed(ActionEvent ae, Object obj) {\n stationTableName = ((NamedStationTable) obj).getFullName();\n stationIdx = 0;\n setStations();\n }\n };\n List stationTables = getControlContext().getLocationList();\n items.add(\n GuiUtils.makeMenu(\n \"Set Locations\",\n NamedStationTable.makeMenuItems(stationTables, listener)));\n \n super.getEditMenuItems(items, forMenuBar);\n }",
"@Override\n public void setSelectedPosition(int selectedPosition, int savedPosition)\n {\n Log.i(Constant.TAG, \"setSelectedPosition - Selected Position : \" + selectedPosition);\n Log.i(Constant.TAG, \"setSelectedPosition - Saved Position : \" + savedPosition);\n selectedPosArray[savedPosition] = selectedPosition;\n }",
"public void selectionRight() {\n\t\tselectedSlotPosX = (selectedSlotPosX == (C.MENU_INVENTORY_ITEM_SLOT_WIDTH - 1)) ? 0 : selectedSlotPosX+1;\n\t}",
"public void setPositionPauseMenu(){\r\n\t\tpauseMenu.setPosition(camera.position.x- canvas.getWidth()/PAUSE_MENU_POSITION_SCALE , camera.position.y-canvas.getHeight()/PAUSE_MENU_POSITION_SCALE );\r\n\t}",
"public void updateMenuWindow() {\n\t\twindowMenu.update();\n\t}",
"private void move_mode_true(MenuItem item) {\n\t\t/*----------------------------\n\t\t * Steps: Current mode => false\n\t\t * 1. Set icon => On\n\t\t * 2. move_mode => false\n\t\t * 2-2. TNActv.checkedPositions => clear()\n\t\t * \n\t\t * 2-3. Get position from preference\n\t\t * \n\t\t * 3. Re-set tiList\n\t\t * 4. Update aAdapter\n\t\t\t----------------------------*/\n\t\t\n\t\titem.setIcon(R.drawable.ifm8_thumb_actv_opt_menu_move_mode_off);\n\t\t\n\t\tmove_mode = false;\n\n\t\t// Log\n\t\tLog.d(\"TNActv.java\"\n\t\t\t\t+ \"[\"\n\t\t\t\t+ Thread.currentThread().getStackTrace()[2]\n\t\t\t\t\t\t.getLineNumber() + \"]\", \"move_mode => Now false\");\n\t\t/*----------------------------\n\t\t * 2-2. TNActv.checkedPositions => clear()\n\t\t\t----------------------------*/\n\t\tTNActv.checkedPositions.clear();\n\t\t\n\t\t/*----------------------------\n\t\t * 2-3. Get position from preference\n\t\t\t----------------------------*/\n\t\tint selected_position = Methods.get_pref(this, tnactv_selected_item, 0);\n\t\t\n\t\t/*----------------------------\n\t\t * 3. Re-set tiList\n\t\t\t----------------------------*/\n//\t\tString tableName = Methods.convertPathIntoTableName(this);\n\t\tString currentPath = Methods.get_currentPath_from_prefs(this);\n\t\t\n\t\tString tableName = Methods.convert_filePath_into_table_name(this, currentPath);\n\n\n\t\ttiList.clear();\n\n\t\t// Log\n\t\tLog.d(\"TNActv.java\"\n\t\t\t\t+ \"[\"\n\t\t\t\t+ Thread.currentThread().getStackTrace()[2]\n\t\t\t\t\t\t.getLineNumber() + \"]\", \"tiList => Cleared\");\n\n\t\tLog.d(\"TNActv.java\"\n\t\t\t\t+ \"[\"\n\t\t\t\t+ Thread.currentThread().getStackTrace()[2]\n\t\t\t\t\t\t.getLineNumber() + \"]\", \"checkedPositions.size() => \" + checkedPositions.size());\n\t\t\n\t\tif (long_searchedItems == null) {\n\n\t\t\ttiList.addAll(Methods.getAllData(this, tableName));\n\t\t\t\n\t\t} else {//if (long_searchedItems == null)\n\n//\t\t\ttiList = Methods.getAllData(this, tableName);\n//\t\t\ttiList = Methods.convert_fileIdArray2tiList(this, \"IFM8\", long_searchedItems);\n\t\t\t\n\t\t}//if (long_searchedItems == null)\n\n\t\t// Log\n\t\tLog.d(\"TNActv.java\"\n\t\t\t\t+ \"[\"\n\t\t\t\t+ Thread.currentThread().getStackTrace()[2]\n\t\t\t\t\t\t.getLineNumber() + \"]\", \"tiList.size() => \" + tiList.size());\n\t\t\n\t\t/*----------------------------\n\t\t * 4. Update aAdapter\n\t\t\t----------------------------*/\n\t\tMethods.sort_tiList(tiList);\n\t\t\n\t\taAdapter = \n\t\t\t\tnew TIListAdapter(\n\t\t\t\t\t\tthis, \n\t\t\t\t\t\tR.layout.thumb_activity, \n\t\t\t\t\t\ttiList,\n\t\t\t\t\t\tCONS.MoveMode.OFF);\n\t\t\n\t\tsetListAdapter(aAdapter);\n\t\t\n\t\tthis.setSelection(selected_position);\n\t\t\n\t}",
"private void setSelectedItem(int selectedItem, boolean scrollIntoView) {\n mSelectedItem = selectedItem;\n if (mSelectedItemChangeListener != null) {\n mSelectedItemChangeListener.OnSelectedItemChange(this, selectedItem);\n }\n if (scrollIntoView) {\n centerOnItem(selectedItem);\n }\n invalidate();\n requestLayout();\n }",
"public void invSelected()\n {\n\t\t//informaPreUpdate();\n \tisSelected = !isSelected;\n\t\t//informaPostUpdate();\n }",
"public void modifyMenuItem(MenuItem modified){\n databaseGargoyle.createConnection();\n databaseGargoyle.executeUpdateOnDatabase(\"UPDATE MENUITEM SET \" +\n \"DESCRIPTION = '\" + modified.getDescription() + \"', \" +\n \"STOCKAVAILABLE = \" + modified.getStockAvailable() + \", \" +\n \"CALORIES = \" + modified.getCalories() + \", \" +\n \"ISVEGAN = '\" + modified.getVegan().toString() + \"', \" +\n \"ISDIABETIC = '\" + modified.getDiabetic().toString() + \"', \" +\n \"ISGLUTTENFREE = '\" + modified.getGluttenFree().toString() + \"' \" +\n \"WHERE FOODNAME = '\" + modified.getFoodName() + \"'\");\n databaseGargoyle.destroyConnection();\n }",
"private void addFormatItemsToMenu(javax.swing.JComponent m){\r\n\r\n\r\n jMenuItemFillCell = new javax.swing.JMenuItem();\r\n jMenuItemFillCell.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_maximise.png\")));\r\n jMenuItemFillCell.setText(it.businesslogic.ireport.util.I18n.getString(\"fillCell\", \"Fill the cell\"));\r\n jMenuItemFillCell.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n FormatCommand.getCommand( OperationType.ELEMENT_MAXIMIZE).execute();\r\n }\r\n });\r\n\r\n m.add(jMenuItemFillCell);\r\n\r\n jMenuItemFillCellH = new javax.swing.JMenuItem();\r\n jMenuItemFillCellH.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_hmaximise.png\")));\r\n jMenuItemFillCellH.setText(it.businesslogic.ireport.util.I18n.getString(\"fillCellHorizontally\", \"Fill the cell (horizontally)\"));\r\n jMenuItemFillCellH.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n FormatCommand.getCommand( OperationType.ELEMENT_MAXIMIZE_H).execute();\r\n }\r\n });\r\n\r\n m.add(jMenuItemFillCellH);\r\n\r\n jMenuItemFillCellV = new javax.swing.JMenuItem();\r\n\r\n jMenuItemFillCellV.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_vmaximise.png\")));\r\n jMenuItemFillCellV.setText(it.businesslogic.ireport.util.I18n.getString(\"fillCellVertically\", \"Fill the cell (vertically)\"));\r\n jMenuItemFillCellV.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n FormatCommand.getCommand( OperationType.ELEMENT_MAXIMIZE_V).execute();\r\n }\r\n });\r\n\r\n m.add(jMenuItemFillCellV);\r\n\r\n\r\n jMenuAlign = new javax.swing.JMenu();\r\n jMenuAlign.setText(it.businesslogic.ireport.util.I18n.getString(\"align\", \"Align...\"));\r\n\r\n jMenuItemAlignLeft = new javax.swing.JMenuItem();\r\n\r\n jMenuItemAlignLeft.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_align_left.png\")));\r\n jMenuItemAlignLeft.setText(it.businesslogic.ireport.util.I18n.getString(\"alignLeft\", \"Align left\"));\r\n jMenuItemAlignLeft.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemAlignLeftActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuAlign.add(jMenuItemAlignLeft);\r\n\r\n jMenuItemAlignRight = new javax.swing.JMenuItem();\r\n jMenuItemAlignRight.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_align_right.png\")));\r\n jMenuItemAlignRight.setText(it.businesslogic.ireport.util.I18n.getString(\"alignRight\", \"Align right\"));\r\n jMenuItemAlignRight.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemAlignRightActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuAlign.add(jMenuItemAlignRight);\r\n\r\n jMenuItemAlignTop = new javax.swing.JMenuItem();\r\n jMenuItemAlignTop.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_align_top.png\")));\r\n jMenuItemAlignTop.setText(it.businesslogic.ireport.util.I18n.getString(\"alignTop\", \"Align top\"));\r\n jMenuItemAlignTop.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemAlignTopActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuAlign.add(jMenuItemAlignTop);\r\n\r\n jMenuItemAlignBottom = new javax.swing.JMenuItem();\r\n jMenuItemAlignBottom.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_align_bottom.png\")));\r\n jMenuItemAlignBottom.setText(it.businesslogic.ireport.util.I18n.getString(\"alignBottom\", \"Align bottom\"));\r\n jMenuItemAlignBottom.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemAlignBottomActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuAlign.add(jMenuItemAlignBottom);\r\n\r\n jSeparator19 = new javax.swing.JSeparator();\r\n jMenuAlign.add(jSeparator19);\r\n\r\n jMenuItemAlignVerticalAxis = new javax.swing.JMenuItem();\r\n jMenuItemAlignVerticalAxis.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_center_axis.png\")));\r\n jMenuItemAlignVerticalAxis.setText(it.businesslogic.ireport.util.I18n.getString(\"alignVerticalAxis\", \"Align vertical axis\"));\r\n jMenuItemAlignVerticalAxis.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemAlignVerticalAxisActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuAlign.add(jMenuItemAlignVerticalAxis);\r\n\r\n jMenuItemAlignHorizontalAxis = new javax.swing.JMenuItem();\r\n jMenuItemAlignHorizontalAxis.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_vcenter_axis.png\")));\r\n jMenuItemAlignHorizontalAxis.setText(it.businesslogic.ireport.util.I18n.getString(\"alignHorizontalAxis\", \"Align horizontal axis\"));\r\n jMenuItemAlignHorizontalAxis.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemAlignHorizontalAxisActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuAlign.add(jMenuItemAlignHorizontalAxis);\r\n\r\n m.add(jMenuAlign);\r\n\r\n jMenuSize = new javax.swing.JMenu();\r\n jMenuSize.setText(it.businesslogic.ireport.util.I18n.getString(\"size\", \"Size...\"));\r\n jMenuItemSameWidth = new javax.swing.JMenuItem();\r\n jMenuItemSameWidth.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_same_hsize.png\")));\r\n jMenuItemSameWidth.setText(it.businesslogic.ireport.util.I18n.getString(\"sameWidth\", \"Same width\"));\r\n jMenuItemSameWidth.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemSameWidthActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuSize.add(jMenuItemSameWidth);\r\n\r\n jMenuItemSameWidthMax = new javax.swing.JMenuItem();\r\n jMenuItemSameWidthMax.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_same_hsize_plus.png\")));\r\n jMenuItemSameWidthMax.setText(it.businesslogic.ireport.util.I18n.getString(\"sameWidthMax\", \"Same width (max)\"));\r\n jMenuItemSameWidthMax.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemSameWidthMaxActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuSize.add(jMenuItemSameWidthMax);\r\n\r\n jMenuItemSameWidthMin = new javax.swing.JMenuItem();\r\n jMenuItemSameWidthMin.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_same_hsize_min.png\")));\r\n jMenuItemSameWidthMin.setText(it.businesslogic.ireport.util.I18n.getString(\"sameWidthMin\", \"Same width (min)\"));\r\n jMenuItemSameWidthMin.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemSameWidthMinActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuSize.add(jMenuItemSameWidthMin);\r\n\r\n jSeparator17 = new javax.swing.JSeparator();\r\n jMenuSize.add(jSeparator17);\r\n\r\n jMenuItemSameHeight = new javax.swing.JMenuItem();\r\n jMenuItemSameHeight.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_same_vsize.png\")));\r\n jMenuItemSameHeight.setText(it.businesslogic.ireport.util.I18n.getString(\"sameHeight\", \"Same height\"));\r\n jMenuItemSameHeight.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemSameHeightActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuSize.add(jMenuItemSameHeight);\r\n\r\n jMenuItemSameHeightMin = new javax.swing.JMenuItem();\r\n jMenuItemSameHeightMin.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_same_vsize_min.png\")));\r\n jMenuItemSameHeightMin.setText(it.businesslogic.ireport.util.I18n.getString(\"sameHeightMin\", \"Same height (min)\"));\r\n jMenuItemSameHeightMin.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemSameHeightMinActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuSize.add(jMenuItemSameHeightMin);\r\n\r\n jMenuItemSameHeightMax = new javax.swing.JMenuItem();\r\n jMenuItemSameHeightMax.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_same_vsize_plus.png\")));\r\n jMenuItemSameHeightMax.setText(it.businesslogic.ireport.util.I18n.getString(\"sameHeightMax\", \"Same height (max)\"));\r\n jMenuItemSameHeightMax.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemSameHeightMaxActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuSize.add(jMenuItemSameHeightMax);\r\n\r\n jSeparator18 = new javax.swing.JSeparator();\r\n jMenuSize.add(jSeparator18);\r\n\r\n jMenuItemSameSize = new javax.swing.JMenuItem();\r\n jMenuItemSameSize.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_same_size.png\")));\r\n jMenuItemSameSize.setText(it.businesslogic.ireport.util.I18n.getString(\"sameSize\", \"Same size\"));\r\n jMenuItemSameSize.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemSameSizeActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuSize.add(jMenuItemSameSize);\r\n\r\n m.add(jMenuSize);\r\n\r\n jMenuPosition = new javax.swing.JMenu();\r\n jMenuPosition.setText(it.businesslogic.ireport.util.I18n.getString(\"position\", \"Position...\"));\r\n jMenuItemCenterH = new javax.swing.JMenuItem();\r\n jMenuItemCenterH.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_hcenter.png\")));\r\n jMenuItemCenterH.setText(it.businesslogic.ireport.util.I18n.getString(\"centerHorizontallyCellBased\", \"Center horizontally (cell based)\"));\r\n jMenuItemCenterH.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemCenterHActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuPosition.add(jMenuItemCenterH);\r\n\r\n jMenuItemCenterV = new javax.swing.JMenuItem();\r\n jMenuItemCenterV.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_vcenter.png\")));\r\n jMenuItemCenterV.setText(it.businesslogic.ireport.util.I18n.getString(\"centerVerticallyCellBased\", \"Center vertically (cell based)\"));\r\n jMenuItemCenterV.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemCenterVActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuPosition.add(jMenuItemCenterV);\r\n\r\n jMenuItemCenterInCell = new javax.swing.JMenuItem();\r\n jMenuItemCenterInCell.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/elem_ccenter.png\")));\r\n jMenuItemCenterInCell.setText(it.businesslogic.ireport.util.I18n.getString(\"centerInCell\", \"Center in cell\"));\r\n jMenuItemCenterInCell.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemCenterInBandActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuPosition.add(jMenuItemCenterInCell);\r\n\r\n jMenuItemJoinLeft = new javax.swing.JMenuItem();\r\n jMenuItemJoinLeft.setText(it.businesslogic.ireport.util.I18n.getString(\"joinSidesLeft\", \"Join sides left\"));\r\n jMenuItemJoinLeft.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemJoinLeftActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuPosition.add(jMenuItemJoinLeft);\r\n\r\n jMenuItemJoinRight = new javax.swing.JMenuItem();\r\n jMenuItemJoinRight.setText(it.businesslogic.ireport.util.I18n.getString(\"joinSidesRight\", \"Join sides right\"));\r\n jMenuItemJoinRight.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemJoinRightActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuPosition.add(jMenuItemJoinRight);\r\n\r\n m.add(jMenuPosition);\r\n\r\n jSeparator5 = new javax.swing.JSeparator();\r\n m.add(jSeparator5);\r\n\r\n jMenuHSpacing = new javax.swing.JMenu();\r\n jMenuHSpacing.setText(it.businesslogic.ireport.util.I18n.getString(\"horizontalSpacing\", \"Horizontal spacing...\"));\r\n\r\n jMenuItemHSMakeEqual = new javax.swing.JMenuItem();\r\n jMenuItemHSMakeEqual.setText(it.businesslogic.ireport.util.I18n.getString(\"makeEqual\", \"Make equal\"));\r\n jMenuItemHSMakeEqual.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemHSMakeEqualActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuHSpacing.add(jMenuItemHSMakeEqual);\r\n\r\n jMenuItemHSIncrease = new javax.swing.JMenuItem();\r\n jMenuItemHSIncrease.setText(it.businesslogic.ireport.util.I18n.getString(\"increase\", \"Increase\"));\r\n jMenuItemHSIncrease.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemHSIncreaseActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuHSpacing.add(jMenuItemHSIncrease);\r\n\r\n jMenuItemHSDecrease = new javax.swing.JMenuItem();\r\n jMenuItemHSDecrease.setText(it.businesslogic.ireport.util.I18n.getString(\"decrease\", \"Decrease\"));\r\n jMenuItemHSDecrease.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemHSDecreaseActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuHSpacing.add(jMenuItemHSDecrease);\r\n\r\n jMenuItemHSRemove = new javax.swing.JMenuItem();\r\n jMenuItemHSRemove.setText(it.businesslogic.ireport.util.I18n.getString(\"remove\", \"Remove\"));\r\n jMenuItemHSRemove.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemHSRemoveActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuHSpacing.add(jMenuItemHSRemove);\r\n\r\n m.add(jMenuHSpacing);\r\n\r\n jMenuVSpacing = new javax.swing.JMenu();\r\n jMenuVSpacing.setText(it.businesslogic.ireport.util.I18n.getString(\"verticalSpacing\", \"Vertical spacing\"));\r\n jMenuItemVSMakeEqual = new javax.swing.JMenuItem();\r\n jMenuItemVSMakeEqual.setText(it.businesslogic.ireport.util.I18n.getString(\"makeEqual\", \"Make equal\"));\r\n jMenuItemVSMakeEqual.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemVSMakeEqualActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuVSpacing.add(jMenuItemVSMakeEqual);\r\n\r\n jMenuItemVSIncrease = new javax.swing.JMenuItem();\r\n jMenuItemVSIncrease.setText(it.businesslogic.ireport.util.I18n.getString(\"increase\", \"Increase\"));\r\n jMenuItemVSIncrease.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemVSIncreaseActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuVSpacing.add(jMenuItemVSIncrease);\r\n\r\n jMenuItemVSDecrease = new javax.swing.JMenuItem();\r\n jMenuItemVSDecrease.setText(it.businesslogic.ireport.util.I18n.getString(\"decrease\", \"Decrease\"));\r\n jMenuItemVSDecrease.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemVSDecreaseActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuVSpacing.add(jMenuItemVSDecrease);\r\n\r\n jMenuItemVSRemove = new javax.swing.JMenuItem();\r\n jMenuItemVSRemove.setText(it.businesslogic.ireport.util.I18n.getString(\"remove\", \"Remove\"));\r\n jMenuItemVSRemove.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemVSRemoveActionPerformed(evt);\r\n }\r\n });\r\n\r\n jMenuVSpacing.add(jMenuItemVSRemove);\r\n\r\n m.add(jMenuVSpacing);\r\n\r\n jSeparator8 = new javax.swing.JSeparator();\r\n m.add(jSeparator8);\r\n\r\n jMenuItemBringToFront = new javax.swing.JMenuItem();\r\n jMenuItemBringToFront.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/sendtofront.png\")));\r\n jMenuItemBringToFront.setText(it.businesslogic.ireport.util.I18n.getString(\"bringToFront\", \"Bring to front\"));\r\n jMenuItemBringToFront.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemBringToFrontActionPerformed(evt);\r\n }\r\n });\r\n\r\n m.add(jMenuItemBringToFront);\r\n\r\n jMenuItemSendToBack = new javax.swing.JMenuItem();\r\n jMenuItemSendToBack.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/it/businesslogic/ireport/icons/menu/sendtoback.png\")));\r\n jMenuItemSendToBack.setText(it.businesslogic.ireport.util.I18n.getString(\"sendToBack\", \"Send to back\"));\r\n jMenuItemSendToBack.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n getMainFrame().jMenuItemSendToBackActionPerformed(evt);\r\n }\r\n });\r\n\r\n m.add(jMenuItemSendToBack);\r\n\r\n }",
"public void mousePressed(MouseEvent e) {\n JMenu menu = (JMenu)menuItem;\n if (!menu.isEnabled())\n return;\n MenuSelectionManager manager = \n MenuSelectionManager.defaultManager();\n if(menu.isTopLevelMenu()) {\n if(menu.isSelected()) {\n manager.clearSelectedPath();\n } else {\n Container cnt = menu.getParent();\n if(cnt != null && cnt instanceof JMenuBar) {\n MenuElement me[] = new MenuElement[2];\n me[0]=(MenuElement)cnt;\n me[1]=menu;\n manager.setSelectedPath(me); } } }\n MenuElement selectedPath[] = manager.getSelectedPath();\n if (selectedPath.length > 0 && \n selectedPath[selectedPath.length-1] != menu.getPopupMenu()) {\n if(menu.isTopLevelMenu() || \n menu.getDelay() == 0) {\n appendPath(selectedPath, menu.getPopupMenu());\n } else {\n setupPostTimer(menu); } } }",
"boolean updateItems() {\n return updateItems(selectedIndex);\n }",
"@Override\n\tpublic void OnUpdateNavigation(int itemPosition, long selectedDate) {\n\t\tthis.selectedDate = selectedDate;\n\t\tactionBar.setSelectedNavigationItem(0);\n\t\t\n\t}",
"public void setSeletedItemPosition(int position){\n\t\tif(mAdapter.getCount() == 0 && position == 0) position = -1;\n\t\tif(position < -1 || position > mAdapter.getCount()-1)\n\t\t\tthrow new IllegalArgumentException(\"Position index must be in range of adapter values (0 - getCount()-1) or -1 to unselect\");\n\t\t\n\t\tmSelectedPosition = position;\n\t}",
"public static void updateMainMenu() {\n instance.updateMenu();\n }",
"public void actualizar() {\n if(fondoJuego1 != null) {\n fondoJuego1.mover(10);\n fondoJuego2.mover(10);\n juegoNuevo.mover(2);\n continuar.mover(2);\n seleccion = null;\n }\n if(seleccion != null) {\n seleccion.actualizar();\n }\n\n if(highLight != null) {\n int estado = menu.getKeyStates();\n if(estado == 0) {\n tecla = false;\n }\n if(highLight.getPrioridad()==regresar.getPrioridad()) {\n if((estado & DOWN_PRESSED) !=0 && !tecla) {\n highLight.setPosicion(juegoNuevo.getX(), juegoNuevo.getY());\n highLight.setPrioridad(juegoNuevo.getPrioridad());\n tecla = true;\n }\n if((estado & UP_PRESSED) != 0 && !tecla) {\n highLight.setPosicion(continuar.getX(), continuar.getY());\n highLight.setPrioridad(continuar.getPrioridad());\n tecla = true;\n }\n if((estado & FIRE_PRESSED) != 0 && !tecla) {\n inicio.crearImagenes();\n borrarTodo();\n tecla = true;\n }\n } else if(highLight.getPrioridad()==juegoNuevo.getPrioridad()) {\n if((estado & UP_PRESSED) != 0 && !tecla) {\n highLight.setPosicion(regresar.getX(), regresar.getY());\n highLight.setPrioridad(regresar.getPrioridad());\n tecla = true;\n }\n if((estado & FIRE_PRESSED) != 0 && !tecla) {\n seleccion = new SeleccionPersonaje(menu,this,null);\n borrarTodo();\n tecla = true;\n }\n } else if(highLight.getPrioridad()==continuar.getPrioridad()) {\n if((estado & DOWN_PRESSED) != 0 && !tecla) {\n highLight.setPosicion(regresar.getX(), regresar.getY());\n highLight.setPrioridad(regresar.getPrioridad());\n tecla = true;\n }\n if((estado & FIRE_PRESSED) != 0 && !tecla) {\n try {\n menu.setHighscores(menu.convertirSAI(menu.lecturaSalvado()));\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n menu.setSeleccionPersonaje(true);\n menu.setInicioJuego(tecla);\n tecla = true;\n }\n }\n }\n }",
"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 }",
"public void editMenu(Menu menu) throws Exception {\r\n\t\tem.merge(menu);\r\n\t}",
"private void selectItem(int position) {\n Fragment fragment = new MenuFragment();\n Bundle args = new Bundle();\n args.putInt(MenuFragment.ARG_MENU_NUMBER, position);\n fragment.setArguments(args);\n\n FragmentManager fragmentManager = getFragmentManager();\n fragmentManager.beginTransaction().replace(R.id.content_frame, fragment).commit();\n\n // update selected item and title, then close the drawer\n mDrawerList.setItemChecked(position, true);\n setTitle(mMenuTitles[position]);\n mDrawerLayout.closeDrawer(mDrawerList);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (R.id.menu_edit == id) {\n item.setVisible(false);\n gMenu.findItem(R.id.menu_save).setVisible(true);\n gMenu.findItem(R.id.menu_cancel).setVisible(true);\n switchEditStatus(true);\n }\n else if (R.id.menu_save == id) {\n try {\n mPageItemValues[0] = mEtxName.getText().toString();\n mPageItemValues[1] = String.valueOf(mSpnCategory.getSelectedItemPosition());\n mPageItemValues[2] = mEtxBrief.getText().toString();\n mPageItemValues[3] = mEtxDetails.getText().toString();\n mPageItemValues[4] = mEtxRemarks.getText().toString();\n mPageItemValues[5] = getIntent().getStringExtra(\"id\");\n mDbHelper.updateItemDetails(mPageItemValues);\n\n Hint.alert(this, R.string.save_successfully, R.string.asking_after_save_operation,\n mExitActivity, null);\n } catch(SQLException e) {\n Hint.alert(this, getString(R.string.alert_failed_to_update),\n getString(R.string.alert_checking_input) + e.getMessage());\n }\n }\n else if (R.id.menu_cancel == id) {\n item.setVisible(false);\n gMenu.findItem(R.id.menu_save).setVisible(false);\n gMenu.findItem(R.id.menu_edit).setVisible(true);\n switchEditStatus(false);\n }\n else\n ;\n\n return super.onOptionsItemSelected(item);\n }",
"void setMenuItem(MenuItem menuItem);",
"@Override\n\t public void onItemSelected(AdapterView<?> arg0, View arg1,int position, long id) {\n\t \tGlobal gs = (Global) getApplication();\n\t \t\tgs.mQblockSettings.selected_chemist=position;\n\t \t\tgs.SaveSettings();\n\t }",
"public final void resetMenuPosition(float posx, float posy, float height) {\r\n\t\tComponentPosition pos = layout.getPosition(menu);\r\n\t\tif (posy >= NumberConstants.NUM40) {\r\n\t\t\tpos.setTopValue(posy - NumberConstants.NUM40);\r\n\t\t} else if (posy + height + NumberConstants.NUM40 >= layout.getHeight()) {\r\n\t\t\tpos.setTopValue(0f);\r\n\t\t} else {\r\n\t\t\tpos.setTopValue(posy + height);\r\n\t\t}\r\n\r\n\t\tfloat posxVar = posx;\r\n\t\tif (posx < 0) {\r\n\t\t\tposxVar = 0;\r\n\t\t} else if (posx > layout.getWidth() - menu.getSizeAprox()) {\r\n\t\t\tposxVar = layout.getWidth() - menu.getSizeAprox();\r\n\t\t}\r\n\t\tpos.setLeftValue(posxVar);\r\n\t}",
"@Override\n protected void setMenuItemsAsync() {\n try {\n if (plot.getStatus().equals(Status.unreviewed)) {\n getMenu().getSlot(10)\n .setItem(new ItemBuilder(Material.FIREBALL, 1)\n .setName(\"§c§lUndo Submit\").setLore(new LoreBuilder()\n .addLine(\"Click to undo your submission.\").build())\n .build());\n } else {\n getMenu().getSlot(10)\n .setItem(new ItemBuilder(Material.NAME_TAG, 1)\n .setName(\"§a§lSubmit\").setLore(new LoreBuilder()\n .addLines(\"Click to complete this plot and submit it to be reviewed.\",\n \"\",\n Utils.getNoteFormat(\"You won't be able to continue building on this plot!\"))\n .build())\n .build());\n }\n } catch (SQLException ex) {\n Bukkit.getLogger().log(Level.SEVERE, \"A SQL error occurred!\", ex);\n getMenu().getSlot(10).setItem(MenuItems.errorItem());\n }\n\n // Set teleport to plot item\n getMenu().getSlot(hasFeedback ? 12 : 13)\n .setItem(new ItemBuilder(Material.COMPASS, 1)\n .setName(\"§6§lTeleport\").setLore(new LoreBuilder()\n .addLine(\"Click to teleport to the plot.\").build())\n .build());\n\n // Set plot abandon item\n getMenu().getSlot(hasFeedback ? 14 : 16)\n .setItem(new ItemBuilder(Material.BARRIER, 1)\n .setName(\"§c§lAbandon\").setLore(new LoreBuilder()\n .addLines(\"Click to reset your plot and to give it to someone else.\",\n \"\",\n Utils.getNoteFormat(\"You won't be able to continue building on your plot!\"))\n .build())\n .build());\n\n // Set plot feedback item\n if (hasFeedback) {\n getMenu().getSlot(16)\n .setItem(new ItemBuilder(Material.BOOK_AND_QUILL)\n .setName(\"§b§lFeedback\").setLore(new LoreBuilder()\n .addLine(\"Click to view your plot review feedback.\").build())\n .build());\n }\n\n // Set plot members item\n try {\n if (!plot.isReviewed()) {\n if (getMenuPlayer() == plot.getPlotOwner().getPlayer() || getMenuPlayer().hasPermission(\"plotsystem.admin\")) {\n getMenu().getSlot(22)\n .setItem(new ItemBuilder(Utils.getItemHead(Utils.CustomHead.ADD_BUTTON))\n .setName(\"§b§lManage Members\").setLore(new LoreBuilder()\n .addLines(\"Click to open your Plot Member menu, where you can add\",\n \"and remove other players on your plot.\",\n \"\",\n Utils.getNoteFormat(\"Score will be split between all members when reviewed!\"))\n .build())\n .build());\n } else if (plot.getPlotMembers().stream().anyMatch(m -> m.getUUID().equals(getMenuPlayer().getUniqueId()))) {\n getMenu().getSlot(22)\n .setItem(new ItemBuilder(Utils.getItemHead(Utils.CustomHead.REMOVE_BUTTON))\n .setName(\"§b§lLeave Plot\").setLore(new LoreBuilder()\n .addLines(\"Click to leave this plot.\",\n \"\",\n Utils.getNoteFormat(\"You will no longer be able to continue build or get any score on it!\"))\n .build())\n .build());\n }\n }\n } catch (SQLException ex) {\n Bukkit.getLogger().log(Level.SEVERE, \"A SQL error occurred!\", ex);\n }\n }",
"@Override\n \tpublic boolean onTouch(View v, MotionEvent event) {\n \t\tif(event.getActionMasked() == MotionEvent.ACTION_DOWN) \n \t\t{\n \t\t\toffset_x = (int) event.getX();\n \t\t\toffset_y = (int) event.getY();\n \t\t\tselected_item = v;\n \t\t}\nreturn false;\n}",
"@Override\r\n\tpublic void itemStateChanged(ItemEvent e) {\n\t\tif(e.getStateChange()== ItemEvent.SELECTED){\r\n\t\t\tcargarCantidades();\r\n\t\t\tactivarBoton();\r\n\t\t}\r\n\t}",
"public void menuSelected (MenuEvent event) {\n TreeEditorPanel panel = (TreeEditorPanel)SwingUtilities.getAncestorOfClass(\n TreeEditorPanel.class, getFocusOwner());\n if (panel != null) {\n edit.getItem(CUT_INDEX).setAction(panel.getCutAction());\n edit.getItem(CUT_INDEX + 1).setAction(panel.getCopyAction());\n edit.getItem(CUT_INDEX + 2).setAction(panel.getPasteAction());\n edit.getItem(CUT_INDEX + 3).setAction(panel.getDeleteAction());\n } else {\n restoreActions();\n }\n }",
"public void editSelectedItem() {\n\t\tfinal ColumnInfo oldinfo = m_view.getSelectedItem();\n\t\tif (oldinfo != null) {\n\t\t\tfinal TableId tableid = m_view.getModel().getTableId();\n\t\t\tfinal TSConnection tsconn = m_view.getModel().getConnection();\n\t\t\tSQLCommandDialog dlg = SQLCommandDialog.createDialog(tsconn, true);\n\t\t\tdlg.setMessage(I18N.getLocalizedMessage(\"Modify Column\"));\n\n\t\t\tModelerFactory factory = ModelerFactory.getFactory(tsconn);\n\t\t\tfinal ColumnPanel panel = factory.createColumnPanel(tsconn, tableid, oldinfo, false);\n\t\t\tdlg.setPrimaryPanel(panel);\n\t\t\tdlg.addValidator(panel);\n\t\t\tdlg.setSize(dlg.getPreferredSize());\n\t\t\tdlg.addDialogListener(new SQLDialogListener() {\n\t\t\t\tpublic boolean cmdOk() throws SQLException {\n\t\t\t\t\tTSTable tablesrv = (TSTable) tsconn.getImplementation(TSTable.COMPONENT_ID);\n\t\t\t\t\tColumnInfo newinfo = panel.getColumnInfo();\n\t\t\t\t\ttablesrv.modifyColumn(tableid, newinfo, oldinfo);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t});\n\t\t\tdlg.showCenter();\n\t\t\tif (dlg.isOk()) {\n\t\t\t\tSystem.out.println(\"AlterColumnsController.editSelected item: \" + tableid);\n\t\t\t\ttsconn.getModel(tableid.getCatalog()).reloadTable(tableid);\n\t\t\t\tm_view.getModel().setTableId(tableid);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n setCurrentPanel(e.getActionCommand());\n menuContainer.repaint();\n }",
"protected void addEditMenuItems (JMenu edit)\n {\n }",
"public void initSelectedItems(int position) {\n\n/* for(int i=0; i < itemsList.size(); i++){\n selectView(i, itemsList.get(i).isSelected());\n }*/\n }",
"@Override\n public boolean onContextItemSelected(MenuItem item) {\n if(item.getTitle()==\"Usuń wpis\") {\n AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) item.getMenuInfo();\n assert info != null;\n int index = info.position;\n bazaDanych.usunWydatki(lista.get(index));\n lista.remove(index);\n adapter.notifyDataSetChanged();\n }\n else if(item.getTitle()==\"Edytuj wpis\"){\n AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) item.getMenuInfo();\n assert info != null;\n int index = info.position;\n Toast.makeText(this, String.valueOf(index), Toast.LENGTH_SHORT).show();\n }\n else {return false;}\n return true;\n }",
"@Override\n\t\tpublic void update() {\n\t\t\tif(!Mouse.isDragging) return;\n\t\t\t\n\t\t\tfor(Editable editable : ServiceLocator.getService(EditorSystem.class).getSelectedEditables()){\n\t\t\t\tfloat currentScale = (float) (-Math.signum(lastMouseWorldPosition.get(Vector.Y) - Mouse.worldCoordinates.get(Vector.Y)) * scale);\n\t\t\t\teditable.getEntity().getComponent(Transform.class).setScale(editable.getEntity().getComponent(Transform.class).getScale().add(currentScale, currentScale, 0));\n\t\t\t}\n\t\t\t\n\t\t\t// Update last mouse world position\n\t\t\tlastMouseWorldPosition = Mouse.worldCoordinates.copy();\n\t\t}",
"@Override\n\tpublic void setSelectedNavigationItem(int position) {\n\t\t\n\t}",
"public void editMenuItem() {\n\t\tviewMenu();\n\n\t\t// Clean arraylist so that you can neatly add data from saved file\n\t\tmm.clear();\n\t\t\n\t\tString menuEdit;\n\t\tint editC;\n\n\t\tSystem.out.println(\"Which one do you want to edit?\");\n\n\t\tString toChange;\n\t\tDouble changePrice;\n\t\tScanner menuE = new Scanner(System.in);\n\t\tmenuEdit = menuE.next();\n\n\t\ttry \n\t\t{\n\t\t\t// Get data contents from saved file\n\t\t\tFileInputStream fis = new FileInputStream(\"menuData\");\n ObjectInputStream ois = new ObjectInputStream(fis);\n \n mm = (ArrayList<AlacarteMenu>) ois.readObject();\n \n ois.close();\n fis.close();\n \n try {\n \tfor (int i = 0; i < mm.size(); i++) {\n \t\t\tif (mm.get(i).getMenuName().equals(menuEdit.toUpperCase())) {\n \t\t\t\tSystem.out.println(\n \t\t\t\t\t\t\"Edit Option \\n 1 : Menu Description \\n 2 : Menu Price \\n 3 : Menu Type \");\n \t\t\t\teditC = menuE.nextInt();\n\n \t\t\t\tif (editC == 1) {\n \t\t\t\t\tmenuE.nextLine();\n \t\t\t\t\tSystem.out.println(\"Change in Menu Description : \");\n \t\t\t\t\ttoChange = menuE.nextLine();\n \t\t\t\t\tmm.get(i).setMenuDesc(toChange);\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\telse if (editC == 2) {\n \t\t\t\t\tSystem.out.println(\"Change in Menu Price : \");\n \t\t\t\t\tchangePrice = menuE.nextDouble();\n \t\t\t\t\tmm.get(i).setMenuPrice(changePrice);\n \t\t\t\t\tbreak;\n \t\t\t\t} \n \t\t\t\telse if (editC == 3) {\n \t\t\t\t\tSystem.out.println(\"Change in Menu Type : \\n1 : Appetizers \\n2 : Main \\n3 : Sides \\n4 : Drinks\");\n \t\t\t\t\tchangePrice = menuE.nextDouble();\n \t\t\t\t\tif (changePrice == 1) {\n \t\t\t\t\t\tmm.get(i).setMenuType(\"Appetizers\");\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\telse if (changePrice == 2) {\n \t\t\t\t\t\tmm.get(i).setMenuType(\"Main\");\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\telse if (changePrice == 3) {\n \t\t\t\t\t\tmm.get(i).setMenuType(\"Sides\");\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t} \n \t\t\t\t\telse if (changePrice == 4) {\n \t\t\t\t\t\tmm.get(i).setMenuType(\"Drinks\");\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\n \tFileOutputStream fos = new FileOutputStream(\"menuData\");\n\t\t\t\tObjectOutputStream oos = new ObjectOutputStream(fos);\n\t\t\t\toos.writeObject(mm);\n\t\t\t\toos.close();\n\t\t\t\tfos.close();\n }\n catch (IOException e) {\n \t\t\tSystem.out.println(\"Error editing menu item!\");\n \t\t\treturn;\n \t\t}\n ois.close();\n fis.close();\n\t\t} \n\t\tcatch (IOException e) {\n\t\t\t//System.out.println(\"No menu items found!\");\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\tSystem.out.format(\"| Menu ID | Description | Price | Type |%n\");\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\treturn;\n\t\t}\n\t\tcatch (ClassNotFoundException c) {\n\t\t\tc.printStackTrace();\n\t\t\treturn;\n\t\t}\n\t}",
"private void selectItem(int position) {\n mDrawerList.setItemChecked(position, true);\n // setTitle(mPlanetTitles[position]);\n setTitle(getResources().getStringArray(R.array.planets_array)[position]);\n mDrawerLayout.closeDrawer(mDrawerList);\n // simpleTV.setText(position + \"\");\n\n\n }",
"public void drawSaveMenu() {\n implementation.devDrawSaveMenu();\n }",
"public void setEditedItem(Object item) {editedItem = item;}",
"public void atualizaTxtListaPSVs(){\n for(MenuItem item : txtListaPSVs.getItems()) {\n CheckMenuItem checkMenuItem = (CheckMenuItem) item;\n if(checkMenuItem.isSelected()) {\n// System.out.println(\"Selected item :\" + checkMenuItem.getText());\n txtListaPSVs.setText(checkMenuItem.getText());\n checkMenuItem.setSelected(false);\n pegaIndicePSVPeloNome(checkMenuItem.getText().toString());\n }\n }\n }",
"private void updateStateUiAfterSelection() {\n stageManager.updateStateUi();\n eventBus.publish(EventTopic.DEFAULT, EventType.SELECTED_OBJECT_CHANGED);\n eventManager.fireEvent(EngineEventType.SELECTED_OBJECT_CHANGED);\n }",
"@Override\n public void menuSelected(MenuEvent e) {\n \n }",
"@Override\r\n\t\t\t\t\tprotected void updateItem(Object arg0, boolean arg1) {\n\t\t\t\t\t\tsuper.updateItem(arg0, arg1);\r\n\t\t\t\t\t\tif (arg1) {\r\n\t\t\t\t\t\t\tsetGraphic(null);\r\n\t\t\t\t\t\t\tsetText(null);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tbtn.setOnAction(new EventHandler<ActionEvent>() {\r\n\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void handle(ActionEvent arg0) {\r\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t\t\t\t\t\t\tProducts data=(Products) tbl_view.getItems().get(getIndex());\r\n\t\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\t\tProducts data=(Products) tbl_view.getSelectionModel().getSelectedItem();\r\n\t\t\t\t\t\t\t\t\tSystem.out.println(data.toString());\r\n\t\t\t\t\t\t\t\t\tif(ConnectionManager.queryInsert(conn, \"DELETE FROM dbo.product WHERE id=\"+data.getId())>0) {\r\n\t\t\t\t\t\t\t\t\t\ttxt_cost.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_date.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_name.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_price.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_qty.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_reorder.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_search.clear();\r\n\t\t\t\t\t\t\t\t\t\tfetchData(FETCH_DATA);\r\n\t\t\t\t\t\t\t\t\t}\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\t\t\tsetGraphic(btn);\r\n\t\t\t\t\t\t\tsetText(null);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}",
"private void move_mode_false(MenuItem item) {\n\t\t\n\t\t/*----------------------------\n\t\t * Steps: Current mode => false\n\t\t * 1. Set icon => On\n\t\t * 2. move_mode => true\n\t\t * \n\t\t * 2-1. Set position to preference\n\t\t * \n\t\t * 3. Update aAdapter\n\t\t * 4. Re-set tiList\n\t\t\t----------------------------*/\n\t\t\n\t\titem.setIcon(R.drawable.ifm8_thumb_actv_opt_menu_move_mode_on);\n\t\t\n\t\tmove_mode = true;\n\t\t\n\t\t/*----------------------------\n\t\t * 4. Re-set tiList\n\t\t\t----------------------------*/\n//\t\tString tableName = Methods.convertPathIntoTableName(this);\n\n\t\tString currentPath = Methods.get_currentPath_from_prefs(this);\n\t\t\n\t\tString tableName = Methods.convert_filePath_into_table_name(this, currentPath);\n\t\t\n\t\t// Log\n\t\tLog.d(\"TNActv.java\"\n\t\t\t\t+ \"[\"\n\t\t\t\t+ Thread.currentThread().getStackTrace()[2]\n\t\t\t\t\t\t.getLineNumber() + \"]\", \"tableName: \" + tableName);\n\t\t\n\t\t\n\t\t//\n\t\ttiList.clear();\n\n\t\t// Log\n\t\tLog.d(\"TNActv.java\"\n\t\t\t\t+ \"[\"\n\t\t\t\t+ Thread.currentThread().getStackTrace()[2]\n\t\t\t\t\t\t.getLineNumber() + \"]\", \"tiList => Cleared\");\n\n//\t\tLog.d(\"TNActv.java\"\n//\t\t\t\t+ \"[\"\n//\t\t\t\t+ Thread.currentThread().getStackTrace()[2]\n//\t\t\t\t\t\t.getLineNumber() + \"]\", \"checkedPositions.size() => \" + checkedPositions.size());\n\n\t\tif (long_searchedItems == null) {\n\n\t\t\ttiList = Methods.getAllData(this, tableName);\n\t\t\t\n\t\t} else {//if (long_searchedItems == null)\n\n\t\t\t// Log\n\t\t\tLog.d(\"TNActv.java\" + \"[\"\n\t\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getLineNumber()\n\t\t\t\t\t+ \"]\", \"long_searchedItems != null\");\n\t\t\t\n\t\t\ttiList = Methods.convert_fileIdArray2tiList(this, tableName, long_searchedItems);\n\t\t\t\n\t\t}//if (long_searchedItems == null)\n\n\n\t\t// Log\n\t\tLog.d(\"TNActv.java\"\n\t\t\t\t+ \"[\"\n\t\t\t\t+ Thread.currentThread().getStackTrace()[2]\n\t\t\t\t\t\t.getLineNumber() + \"]\", \"tiList.size() => \" + tiList.size());\n\t\t\n\t\t/*----------------------------\n\t\t * 3. Update aAdapter\n\t\t\t----------------------------*/\n\t\tMethods.sort_tiList(tiList);\n\t\t\n\t\tbAdapter =\n\t\t\t\tnew TIListAdapter(\n\t\t\t\t\t\tthis, \n\t\t\t\t\t\tR.layout.thumb_activity, \n\t\t\t\t\t\ttiList,\n\t\t\t\t\t\tCONS.MoveMode.ON);\n\n\t\tsetListAdapter(bAdapter);\n\n\t}",
"private void changeMenu()\n {\n if (_menuMode)\n {\n menuLayout.getChildAt(0).setVisibility(View.VISIBLE);\n menuLayout.getChildAt(1).setVisibility(View.VISIBLE);\n menuLayout.getChildAt(2).setVisibility(View.GONE);\n menuLayout.getChildAt(3).setVisibility(View.GONE);\n menuLayout.getChildAt(4).setVisibility(View.VISIBLE);\n _switchMode.setText(\"Watch Mode\");\n\n }\n else\n {\n menuLayout.getChildAt(0).setVisibility(View.GONE);\n menuLayout.getChildAt(1).setVisibility(View.VISIBLE);\n _switchMode.setText(\"Paint Mode\");\n menuLayout.getChildAt(2).setVisibility(View.VISIBLE);\n menuLayout.getChildAt(3).setVisibility(View.VISIBLE);\n menuLayout.getChildAt(4).setVisibility(View.GONE);\n _timeBar.setProgress((int) (_paintArea.getPercent() * 100f));\n }\n _paintArea.setPaintMode(_menuMode);\n _menuMode = !_menuMode;\n }",
"public void prepareIdemen(ActionEvent event) {\n Submenu selected = this.getSelected();\n if (selected != null && idemenController.getSelected() == null) {\n idemenController.setSelected(selected.getIdemen());\n }\n }",
"public void update() {\n String foodName, description;\n int stockAvailable, calories, price;\n Boolean isVegan, isDiabetic, isGluttenFree;\n\n menuItems.clear();\n\n databaseGargoyle.createConnection();\n ResultSet rs = databaseGargoyle.executeQueryOnDatabase(\"SELECT * FROM MENUITEM\");\n try {\n while (rs.next()){\n foodName = rs.getString(\"FOODNAME\");\n description = rs.getString(\"DESCRIPTION\");\n stockAvailable = rs.getInt(\"STOCKAVAILABLE\");\n calories = rs.getInt(\"CALORIES\");\n if (rs.getString(\"ISVEGAN\").equalsIgnoreCase(\"true\")){\n isVegan = true;\n } else isVegan = false;\n if (rs.getString(\"ISDIABETIC\").equalsIgnoreCase(\"true\")){\n isDiabetic = true;\n } else isDiabetic = false;\n if (rs.getString(\"ISGLUTTENFREE\").equalsIgnoreCase(\"true\")){\n isGluttenFree = true;\n } else isGluttenFree = false;\n price = rs.getInt(\"PRICE\");\n menuItems.add(new MenuItem(foodName, description, stockAvailable, calories, isVegan, isDiabetic, isGluttenFree, price));\n }\n } catch (SQLException e) {\n System.out.println(\"Failed to get Menu Items from database!\");\n e.printStackTrace();\n }\n databaseGargoyle.destroyConnection();\n }",
"@Override\n public void menuSelected(MenuEvent e) {\n undoMenuItem.setEnabled(view.canUndo());\n redoMenuItem.setEnabled(view.canRedo());\n }",
"public void mouseEntered(MouseEvent e) {\n JMenu menu = (JMenu)menuItem;\n if (!menu.isEnabled())\n return;\n MenuSelectionManager manager = \n MenuSelectionManager.defaultManager();\n MenuElement selectedPath[] = manager.getSelectedPath(); \n if (!menu.isTopLevelMenu()) {\n if(!(selectedPath.length > 0 && \n selectedPath[selectedPath.length-1] == \n menu.getPopupMenu())) {\n if(menu.getDelay() == 0) {\n appendPath(getPath(), menu.getPopupMenu());\n } else {\n manager.setSelectedPath(getPath());\n setupPostTimer(menu); } }\n } else {\n if(selectedPath.length > 0 &&\n selectedPath[0] == menu.getParent()) {\n MenuElement newPath[] = new MenuElement[3];\n // A top level menu's parent is by definition \n // a JMenuBar\n newPath[0] = (MenuElement)menu.getParent();\n newPath[1] = menu;\n newPath[2] = menu.getPopupMenu();\n manager.setSelectedPath(newPath); } } }",
"public void setSelectedItem(int selectedItem) {\n setSelectedItem(selectedItem, true);\n }",
"@Override\r\n\tpublic void itemStateChanged(ItemEvent e) {\n\t\tint a=c1.getSelectedIndex();\r\n\t\tString b=c1.getItemAt(a).toString();\r\n\t\tl1.setText(\"\"+b);\r\n\t}",
"public void desplegarMenuAdministrativo() {\n// //Hacia arriba\n// paneles.jLabelYDown(-50, 40, WIDTH, HEIGHT, jLabelTextoBienvenida);\n// \n// paneles.jLabelYUp(580, 82, WIDTH, HEIGHT, jLabelEntregas);\n// paneles.jLabelYUp(580, 82, WIDTH, HEIGHT, jLabelClientes);\n// paneles.jLabelYUp(580, 82, WIDTH, HEIGHT, jLabelNotas);\n// paneles.jLabelYUp(736, 238, WIDTH, HEIGHT, jLabelTextoEntrega);\n// paneles.jLabelYUp(736, 238, WIDTH, HEIGHT, jLabelTextoClientes);\n// paneles.jLabelYUp(736, 238, WIDTH, HEIGHT, jLabelTextoNotas);\n// \n// paneles.jLabelYUp(793, 295, WIDTH, HEIGHT, jLabelTrabajadores);\n// paneles.jLabelYUp(793, 295, WIDTH, HEIGHT, jLabelEntregasActivas);\n// paneles.jLabelYUp(793, 295, WIDTH, HEIGHT, jLabelEditarDatosPersonales);\n// \n// paneles.jLabelYUp(949, 451, WIDTH, HEIGHT, jLabelTextoTrabajadores);\n// paneles.jLabelYUp(949, 451, WIDTH, HEIGHT, jLabelTextoEntregasProgreso);\n// paneles.jLabelYUp(949, 451, WIDTH, HEIGHT, jLabelTextoEditarPersonales);\n }",
"@Override\n public boolean onContextItemSelected(MenuItem item) {\n int id=item.getItemId();\n AdapterView.AdapterContextMenuInfo info =(AdapterView.AdapterContextMenuInfo) item.getMenuInfo();\n final int index=info.position;\n if (id == R.id.m_editar) {\n editar(index);\n }else {\n if (id == R.id.m_borrar) {\n datos.remove(index);\n ad.notifyDataSetChanged();\n }\n }\n return super.onContextItemSelected(item);\n }",
"private void updateEnableStatus()\n {\n this.menu.setEnabled(this.menu.getItemCount() > 0);\n }",
"private void codigoInicial() {\r\n itemPanels = new itemPanel[5];\r\n itemPanels[0] = new itemPanel(null, null, false);\r\n itemPanels[1] = new itemPanel(null, null, false);\r\n itemPanels[2] = new itemPanel(null, null, false);\r\n itemPanels[3] = new itemPanel(null, null, false);\r\n itemPanels[4] = new itemPanel(null, null, false);\r\n\r\n setSize(1082, 662);\r\n jpaneMenu.setBackground(AtributosGUI.color_principal);\r\n setLocationRelativeTo(null);\r\n\r\n\r\n java.awt.Color color_primario = AtributosGUI.color_principal;\r\n\r\n jpanePerfil.setBackground(color_primario);\r\n jpaneHorario.setBackground(color_primario);\r\n jpaneCursos.setBackground(color_primario);\r\n jpaneTramites.setBackground(color_primario);\r\n jpaneSalud.setBackground(color_primario);\r\n jpaneMenuItems.setBackground(color_primario);\r\n\r\n jlblCursos.setFont(AtributosGUI.item_label_font);\r\n jlblHorario.setFont(AtributosGUI.item_label_font);\r\n jlblPerfil.setFont(AtributosGUI.item_label_font);\r\n jlblSalud.setFont(AtributosGUI.item_label_font);\r\n jlblTramites.setFont(AtributosGUI.item_label_font);\r\n\r\n jlblCursos.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n jlblHorario.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n jlblPerfil.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n jlblSalud.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n jlblTramites.setForeground(AtributosGUI.item_mouseExited_label_foreground);\r\n\r\n jpaneActiveCursos.setBackground(AtributosGUI.item_Off_panel_active);\r\n jpaneActiveHorario.setBackground(AtributosGUI.item_Off_panel_active);\r\n jpaneActivePerfil.setBackground(AtributosGUI.item_Off_panel_active);\r\n jpaneActiveSalud.setBackground(AtributosGUI.item_Off_panel_active);\r\n jpaneActiveTramites.setBackground(AtributosGUI.item_Off_panel_active);\r\n\r\n \r\n\r\n }",
"public void setPosition(int newPos) {\n this.position = newPos;\n\n this.database.update(\"AnswerOptions\", \"matchingPosition = '\" + position + \"'\", \"optionId = \" + this.optionId);\n }"
]
| [
"0.713786",
"0.6451069",
"0.6424524",
"0.636926",
"0.63220596",
"0.62033904",
"0.6184366",
"0.6184366",
"0.61733043",
"0.6156531",
"0.61468726",
"0.6122283",
"0.6078675",
"0.599153",
"0.5939827",
"0.59176654",
"0.5917549",
"0.5891778",
"0.58620995",
"0.58579266",
"0.5827924",
"0.5814816",
"0.58115494",
"0.5780801",
"0.5778125",
"0.5770212",
"0.57670814",
"0.5765788",
"0.57630676",
"0.57472736",
"0.5709123",
"0.57016873",
"0.56965876",
"0.5694932",
"0.5675834",
"0.5674269",
"0.56677175",
"0.5666047",
"0.56633765",
"0.56605196",
"0.56591785",
"0.565817",
"0.5648272",
"0.5647765",
"0.5642664",
"0.56350183",
"0.562124",
"0.5620459",
"0.55979145",
"0.5596809",
"0.5582884",
"0.5578379",
"0.5575973",
"0.55743814",
"0.55686516",
"0.5567188",
"0.556512",
"0.55623406",
"0.55602807",
"0.55590886",
"0.5558183",
"0.5538082",
"0.5528619",
"0.55135757",
"0.5501259",
"0.54976785",
"0.5496604",
"0.5493177",
"0.54878914",
"0.5466247",
"0.5458103",
"0.5456781",
"0.5449351",
"0.5446905",
"0.54452616",
"0.544204",
"0.54416966",
"0.54400986",
"0.5437863",
"0.54338783",
"0.5424304",
"0.5415911",
"0.54158306",
"0.54150915",
"0.54086095",
"0.5404276",
"0.53970414",
"0.539385",
"0.53913474",
"0.53831416",
"0.5383011",
"0.53827536",
"0.53783363",
"0.5377454",
"0.53774095",
"0.5370755",
"0.5365166",
"0.5353319",
"0.53528416",
"0.5351325"
]
| 0.7335491 | 0 |
Metoda ktora spravne ukonci menu volanim super metody. | @Override
public void exit() {
super.exit();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void visKontingenthaandteringMenu ()\r\n {\r\n System.out.println(\"Du har valgt kontingent.\");\r\n System.out.println(\"Hvad oensker du at foretage dig?\");\r\n System.out.println(\"1: Se priser\");\r\n System.out.println(\"2: Se medlemmer i restance\");\r\n System.out.println(\"0: Afslut\");\r\n\r\n }",
"public static void menuInicial() {\n System.out.println(\"Boas vindas à Arena pokemon Treinador!!!\");\n System.out.println(\"Digite 1 para fazer sua inscrição\");\n System.out.println(\"Digite 2 para sair\");\n\n }",
"public void visMedlemskabsMenu ()\r\n {\r\n System.out.println(\"Du har valgt medlemskab.\");\r\n System.out.println(\"Hvad Oensker du at foretage dig?\");\r\n System.out.println(\"1: Oprette et nyt medlem\");\r\n System.out.println(\"2: Opdatere oplysninger paa et eksisterende medlem\");\r\n System.out.println(\"0: Afslut\");\r\n\r\n }",
"private void createMenu(){\n\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n JMenu Opcje = new JMenu(\"Opcje\");\n mbar.add(Opcje);\n JMenuItem Ustawienia = new JMenuItem(\"Ustawienia\");\n /** Obsluga zdarzen wcisniecia przycisku ustawien w menu */\n Ustawienia.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if(Justawienia==null)\n Justawienia =new JUstawienia();\n Justawienia.setVisible(true);\n if (controller.timer!=null)\n controller.timer.stop();\n }\n });\n Opcje.add(Ustawienia);\n Opcje.addSeparator();\n JMenuItem Info = new JMenuItem(\"Info\");\n /** Obsluga zdarzen wcisniecia przycisku info w menu */\n Info.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n controller.WyswietlInfo();\n }\n });\n Opcje.add(Info);\n }",
"public abstract Menu mo2158c();",
"private void afficheMenu() {\n\t\tSystem.out.println(\"------------------------------ Bien venu -----------------------------\");\n\t\tSystem.out.println(\"--------------------------- \"+this.getName()+\" ------------------------\\n\");\n\t\t\n\t\ttry {\n\t\t\tThread.sleep(40);\n\t\t\tSystem.out.println(\"A- Afficher l'état de l'hôtel. \");\n\t\t\tThread.sleep(50);\n\t\t\tSystem.out.println(\"B- Afficher Le nombre de chambres réservées.\");\n\t\t\tThread.sleep(60);\n\t\t\tSystem.out.println(\"C- Afficher Le nombre de chambres libres.\");\n\t\t\tThread.sleep(70);\n\t\t\tSystem.out.println(\"D- Afficher Le numéro de la première chambre vide.\");\n\t\t\tThread.sleep(80);\n\t\t\tSystem.out.println(\"E- Afficher La numéro de la dernière chambre vide.\");\n\t\t\tThread.sleep(90);\n\t\t\tSystem.out.println(\"F- Reserver une chambre.\");\n\t\t\tThread.sleep(100);\n\t\t\tSystem.out.println(\"G- Libérer une chambre.\");\n\t\t\tThread.sleep(100);\n\t\t\tSystem.out.println(\"O- Voire toutes les options possibles?\");\n\t\t\tThread.sleep(100);\n\t\t\tSystem.out.println(\"H- Aide?\");\n\t\t\tThread.sleep(100);\n\t\t\tSystem.out.println(\"-------------------------------------------------------------------------\");\n\t\t}catch(Exception err) {\n\t\t\tSystem.out.println(\"Error d'affichage!\");\n\t\t}\n\t\n\t}",
"public void volvreAlMenu() {\r\n\t\t// Muestra el menu y no permiye que se cambie el tamaņo\r\n\t\tMenu.frame.setVisible(true);\r\n\t\tMenu.frame.setResizable(false);\r\n\t\t// Oculta la ventana del flappyBird\r\n\t\tjframe.setVisible(false);\r\n\t}",
"private void menuArmadura(){\n System.out.println(\"Escolha o local em que queira colocar a uma armadura:\");\n System.out.println(\"1 - Cabeça\");\n System.out.println(\"2 - Tronco\");\n System.out.println(\"3 - Pernas\");\n System.out.println(\"4 - Pés\");\n System.out.println(\"0 - Sair\");\n }",
"private void voltarMenu() {\n\t\tmenu = new TelaMenu();\r\n\t\tmenu.setVisible(true);\r\n\t\tthis.dispose();\r\n\t}",
"private static void returnMenu() {\n\t\t\r\n\t}",
"public static void afficherMenu() {\r\n System.out.println(\"\\n## Menu de l'application ##\\n\" +\r\n \" Actions Membres :\\n\"+\r\n \" [ 1] : Inscription d'un Membre\\n\" +\r\n \" [ 2] : Désinscription d'un Membre\\n\" +\r\n \" ( 3) : Afficher liste des Membres\\n\" +\r\n \" [ 4] : Payer Cotisation\\n\" +\r\n \" Actions vote Arbres d'un Membre :\\n\" +\r\n \" ( 5) : Voter pour un Arbre\\n\" +\r\n \" ( 6) : Afficher liste des votes\\n\" +\r\n \" ( 7) : Retirer un vote\\n\" +\r\n \" ( 8) : Supprimer les votes d'un Membre.\\n\" +\r\n \" ( 9) : Remplacer un vote\\n\" +\r\n \" Actions Arbres :\\n\" +\r\n \" (10) : Afficher la liste des Arbres\\n\" +\r\n // ...\r\n \" Actions Administration :\\n\" +\r\n \" (11) : Nommer nouveau Président\\n\" +\r\n // ...\r\n \"\\n ( 0) : Quitter l'application\\n\" +\r\n \" - Veuillez saisir une action. -\");\r\n }",
"static void afficherMenu() {\n\t\tSystem.out.println(\"\\n\\n\\n\\t\\tMENU PRINCIPAL\\n\");\n\t\tSystem.out.println(\"\\t1. Additionner deux nombres\\n\");\n\t\tSystem.out.println(\"\\t2. Soustraire deux nombres\\n\");\n\t\tSystem.out.println(\"\\t3. Multiplier deux nombres\\n\");\n\t\tSystem.out.println(\"\\t4. Deviser deux nombres\\n\");\n\t\tSystem.out.println(\"\\t0. Quitter\\n\");\n\t\tSystem.out.print(\"\\tFaites votre choix : \");\n\t}",
"static void listerMenu() {\n System.out.println(\n \"-------------------------------------\\n\" +\n \"Saisir une option :\\n\" +\n \"1 : Liste des hôtes\\n\" +\n \"2 : Liste des logements\\n\" +\n \"3 : Liste des voyageurs\\n\" +\n \"4 : Liste des réservations\\n\" +\n \"5 : Fermer le programme\"\n );\n switch (Menu.choix(5)) {\n case 1:\n GestionHotes.listerHotes();\n break;\n case 2:\n GestionLogements.listerLogements();\n break;\n case 3:\n GestionVoyageurs.listerVoyageurs();\n break;\n case 4:\n GestionReservations.listerReservations();\n break;\n case 5:\n System.exit(0);\n break;\n }\n }",
"private JMenu brugerMenuSetup() {\n JMenu brugerMenu = generalMenuSetup(\"Bruger\");\n JMenuItem logUdItem = new JMenuItem(\"Log ud\");\n brugerMenu.add(logUdItem);\n logUdItem.addActionListener(\n e -> System.exit(0)\n );\n JMenuItem minListeItem = new JMenuItem(\"Min liste\");\n brugerMenu.add(minListeItem);\n\n return brugerMenu;\n }",
"public void componentesimplementacionIsmael() {\n\t\t// En el menu bar Ismael\n\t\tmenuIsmael = new JMenu(\"Ismael\");\n\t\tmenuBar.add(menuIsmael);\n\n\t\t// SUBMENU\n\t\tsubMenuRecientes = new JMenu(\"Recientes\");\n\t\titemSubMenuRecientes = new ArrayList<>();\n\t\trutasRecientes = new ArrayList<>();\n\t\ttry {\n\t\t\trutasRecientes = manejadorFichero.obtenerLineasDelFichero();\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\tif (!rutasRecientes.isEmpty()) {\n\t\t\tfor (int i = 0; i < rutasRecientes.size(); i++) {\n\t\t\t\tJMenuItem textoSubmenu = new JMenuItem(rutasRecientes.get(i));\n\t\t\t\titemSubMenuRecientes.add(textoSubmenu);\n\t\t\t\tsubMenuRecientes.add(textoSubmenu);\n\t\t\t}\n\t\t}\n\t\tmenuIsmael.add(subMenuRecientes);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\t// Fuente\n\t\titemFuente = new JMenuItem(\"Fuente\");\n\t\titemFuente.setEnabled(false);\n\t\titemFuente.setMnemonic(KeyEvent.VK_F);\n\t\titemFuente.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemFuente);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\titemSeleccionarTodo = new JMenuItem(\"Selec.Todo\");\n\t\titemSeleccionarTodo.setEnabled(false);\n\t\titemSeleccionarTodo.setMnemonic(KeyEvent.VK_N);\n\t\titemSeleccionarTodo.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemSeleccionarTodo);\n\n\t\titemSeleccionarTodoYCopiar = new JMenuItem(\"Selec All+Copy\");\n\t\titemSeleccionarTodoYCopiar.setEnabled(false);\n\t\titemSeleccionarTodoYCopiar.setMnemonic(KeyEvent.VK_M);\n\t\titemSeleccionarTodoYCopiar.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemSeleccionarTodoYCopiar);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\titemHora = new JMenuItem(\"Hora\");\n\t\titemHora.setEnabled(true);\n\t\titemHora.setMnemonic(KeyEvent.VK_H);\n\t\titemHora.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_H, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemHora);\n\n\t}",
"public void initMenu(){\n\t}",
"static void mostrarMenu(){\n \t\t\n\t\tout.println();\n\t\tout.println(\"1. Crear lavadora.\");\n\t\tout.println(\"2. Mostrar lavadoras.\");\n\t\tout.println(\"3. Seleccionar lavadora.\");\n\t\tout.println(\"4. Cargar agua.\");\n\t\tout.println(\"5. Cargar ropa.\");\n\t\tout.println(\"6. Cargar detergente.\");\n\t\tout.println(\"7. Especificar tiempo.\");\n\t\tout.println(\"8. Drenar.\");\n\t\tout.println(\"9. Mostrar estado de la lavadora.\");\n\t\tout.println(\"10. Mostrar estado de la ropa.\");\n\t\tout.println(\"11. Pausar o Reanudar lavadora\");\n\t\tout.println(\"12. Probar sistema.\");\n\t\tout.println(\"13. Reiniciar sistema.\");\n\t\tout.println(\"22. Salir\");\n\t\tout.println((SELECTNOW != -1) ? \"!/*!/* Lv seleccionada: \" + SELECTNOW + \" !/*!/*\": \"\");\n\t\tout.println();\n\t}",
"public static void f_menu(){\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n System.out.println(\"_/_/_/_/_/_/softvectorwhith/_/_/_/_/_/_/\");\n System.out.println(\"/_/_/_/version 1.0 2020-oct-29_/_/_/_/_/\");\n System.out.println(\"/_/maked by Andres Felipe Torres Lopez_/\");\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n }",
"public MenuTamu() {\n initComponents();\n \n }",
"private void setMenu() {\n\n if (tree.isEmpty() || !treeGrid.anySelected()) {\n mainMenu.setItems(newMenuItem, new MenuItemSeparator(), settingMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecord() == null) {\n mainMenu.setItems(renameMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecords().length > 1) {\n ListGridRecord[] selectedNode = treeGrid.getSelectedRecords();\n if (isSameExtension(selectedNode, Extension.FP)) {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem, exportMenuItem);\n } else if (isSameExtension(selectedNode, Extension.FPS)) {\n mainMenu.setItems(newFPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.BPS)) {\n mainMenu.setItems(newBPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.SCSS)) {\n mainMenu.setItems(newSCSItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n }\n } else if (tree.isFolder(treeGrid.getSelectedRecord())) {\n mainMenu.setItems(newMenuItem, deleteMenu, renameMenuItem, copyMenuItem, pasteMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem, downloadMenuItem,\n copyPathMenuItem);\n } else {\n FileTreeNode selectedNode = (FileTreeNode) treeGrid.getSelectedRecord();\n VMResource resource = selectedNode.getResource();\n if (resource instanceof VMDirectory) {\n return;\n }\n Extension extension = ((VMFile) resource).getExtension();\n if (extension == null) {\n mainMenu.setItems(openWithMenuItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n } else\n switch (extension) {\n case ARC:\n mainMenu.setItems(newBPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FM:\n mainMenu.setItems(newFMCItem, newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FMC:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case TC:\n mainMenu.setItems(newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n case FPS:\n mainMenu.setItems(newFPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, exportMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BPS:\n mainMenu.setItems(newBPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCSS:\n mainMenu.setItems(newSCSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCS:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n default:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n }\n }\n }",
"public void menuListados() {\n\t\tSystem.out.println(\"MENU LISTADOS\");\n\t\tSystem.out.println(\"1. Personas con la misma actividad\");\n\t\tSystem.out.println(\"2. Cantidad de personas con la misma actividad\");\n\t\tSystem.out.println(\"0. Salir\");\n\t}",
"public void menu() {\n m.add(\"Go adventuring!!\", this::goAdventuring );\n m.add(\"Display information about your character\", this::displayCharacter );\n m.add(\"Visit shop\", this::goShopping);\n m.add (\"Exit game...\", this::exitGame);\n }",
"private JMenuItem getSauvegardejMenuItem() {\r\n\t\tif (SauvegardejMenuItem == null) {\r\n\t\t\tSauvegardejMenuItem = new JMenuItem();\r\n\t\t\tSauvegardejMenuItem.setText(\"Sauvegarde\");\r\n\t\t\tSauvegardejMenuItem.setIcon(new ImageIcon(getClass().getResource(\"/sauvegarde_petit.png\")));\r\n\t\t\tSauvegardejMenuItem.setFont(new Font(\"Dialog\", Font.PLAIN, 12));\r\n\t\t\tSauvegardejMenuItem.setActionCommand(\"Sauvegarde\");\r\n\t\t\tSauvegardejMenuItem.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\t//System.out.println(\"actionPerformed()\"); // TODO Auto-generated Event stub actionPerformed()\r\n\t\t\t\t\tif (e.getActionCommand().equals(\"Sauvegarde\")) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tHistorique.ecrire(\"Ouverture de : \"+e);\r\n\t\t\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tnew FEN_Sauvegarde();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn SauvegardejMenuItem;\r\n\t}",
"private static void menuno(int menuno2) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void menu() {\n\t\tSystem.out.println(\"go to menu\");\r\n\t\t\r\n\t}",
"public void setMenu(){\n opciones='.';\n }",
"public void menu(){\n super.goToMenuScreen();\n }",
"private static void showMenu() {\n System.out.println(\"1. Dodaj zadanie\");\n System.out.println(\"2. Wykonaj zadanie.\");\n System.out.println(\"3. Zamknij program\");\n }",
"private void makePOSMenu() {\r\n\t\tJMenu POSMnu = new JMenu(\"Punto de Venta\");\r\n\t\tboolean isAccesible = false;\r\n\r\n\t\tif (StoreCore.getAccess(\"Cotizaciones\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Cotizaciones\", \r\n\t\t\t\t\timageLoader.getImage(\"quote.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 't',\r\n\t\t\t\t\t\"Ver el listado de cotizaciones\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F4, 0), Quote.class);\r\n\t\t\tPOSMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Compra\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Compras\", \r\n\t\t\t\t\timageLoader.getImage(\"purchase.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'c',\r\n\t\t\t\t\t\"Ver el listado de facturas\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F5, 0), Purchase.class);\r\n\r\n\t\t\tPOSMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Facturacion\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Facturacion\", \r\n\t\t\t\t\timageLoader.getImage(\"invoice.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'f',\r\n\t\t\t\t\t\"Ver el listado de facturas\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F6, 0), Invoice.class);\r\n\r\n\t\t\tPOSMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (isAccesible) {\r\n\t\t\tPOSMnu.setMnemonic('p');\r\n\t\t\tadd(POSMnu);\r\n\t\t}\r\n\t}",
"private static int menu() {\n\t\tint opcion;\n\t\topcion = Leer.pedirEntero(\"1:Crear 4 Almacenes y 15 muebeles\" + \"\\n2: Mostrar los muebles\"\n\t\t\t\t+ \"\\n3: Mostrar los almacenes\" + \"\\n4: Mostrar muebles y su almacen\" + \"\\n0: Finalizar\");\n\t\treturn opcion;\n\t}",
"void ajouterMenu(){\r\n\t\t\tJMenuBar menubar = new JMenuBar();\r\n\t \r\n\t JMenu file = new JMenu(\"File\");\r\n\t file.setMnemonic(KeyEvent.VK_F);\r\n\t \r\n\t JMenuItem eMenuItemNew = new JMenuItem(\"Nouvelle Partie\");\r\n\t eMenuItemNew.addActionListener(new ActionListener() {\r\n\t @Override\r\n\t public void actionPerformed(ActionEvent event) {\r\n\t \t\r\n\t \t\t\r\n\t \t\t\r\n\t \tnew NouvellePartie();\r\n\t }\r\n\t });\r\n\t file.add(eMenuItemNew);\r\n\t \r\n\t JMenuItem eMenuItemFermer = new JMenuItem(\"Fermer\");\r\n\t eMenuItemFermer.setMnemonic(KeyEvent.VK_E);\r\n\t eMenuItemFermer.setToolTipText(\"Fermer l'application\");\r\n\t \r\n\t eMenuItemFermer.addActionListener(new ActionListener() {\r\n\t @Override\r\n\t public void actionPerformed(ActionEvent event) {\r\n\t System.exit(0);\r\n\t }\r\n\t });\r\n\r\n\t file.add(eMenuItemFermer);\r\n\r\n\t menubar.add(file);\r\n\t \r\n\t JMenu aide = new JMenu(\"?\");\r\n\t JMenuItem eMenuItemRegle = new JMenuItem(\"Règles\");\r\n\t aide.add(eMenuItemRegle);\r\n\t menubar.add(aide);\r\n\r\n\t final String regles=\"<html><p>Le but est de récupérer les 4 objets Graal puis de retourner au château.</p>\"\t\r\n\t +\"<p>Après avoir récupéré un objet, chaque déplacement vous enlève autant de vie que le poids de l'objet</p></html>\";\r\n\t eMenuItemRegle.addActionListener(new ActionListener() {\r\n\t @Override\r\n\t public void actionPerformed(ActionEvent event) {\r\n\t \t//default title and icon\r\n\t \t\t\tJOptionPane.showMessageDialog(gameFrame,\r\n\t \t\t\t regles,\"Règles du jeu\", JOptionPane.INFORMATION_MESSAGE);\r\n\t \t\t\t\r\n\t }\r\n\t });\r\n\t \t\r\n\t\t\t\r\n\t this.setJMenuBar(menubar);\t\r\n\t\t}",
"@Override\n\tpublic void setUpMenu() {\n\t\t\n\t}",
"public static void f_menu() {\n System.out.println(\"----------------------------------------\");\n System.out.println(\"--------------DIGITALSOFT---------------\");\n System.out.println(\"-----version:1.0------28/04/2020.-------\");\n System.out.println(\"-----Angel Manuel Correa Rivera---------\");\n System.out.println(\"----------------------------------------\");\n }",
"static void montaMenu() {\n System.out.println(\"\");\r\n System.out.println(\"1 - Novo cliente\");\r\n System.out.println(\"2 - Lista clientes\");\r\n System.out.println(\"3 - Apagar cliente\");\r\n System.out.println(\"0 - Finalizar\");\r\n System.out.println(\"Digite a opcao desejada: \");\r\n System.out.println(\"\");\r\n }",
"public static void menu() {\n\t\tSystem.out.println(\"Menu:\");\n\t\tSystem.out.println(\"1: Create\");\n\t\tSystem.out.println(\"2: Merge\");\n\t\tSystem.out.println(\"3: Collection\");\n\t\tSystem.out.println(\"4: Upgrades\");\n\t\tSystem.out.println(\"5: Sell\");\n\t\tSystem.out.println(\"6: Identify Crystal\");\n\t\tSystem.out.println(\"\");\n\t}",
"public static void imprimirMenuAdmin() {\r\n\tSystem.out.println(\"---------------------------menu---------------------------\");\r\n\tSystem.out.println(\"opciones: (ingrese la letra)\");\r\n\tSystem.out.println(\"A: despliega la opción taquilla\");\r\n System.out.println(\"B: despliega la opción informacion cliente\");\r\n\tSystem.out.println(\"C: Salir\");\r\n\tSystem.out.println(\"----------------------------------------------------------\");\r\n }",
"public static void mainMenu() {\r\n\t\tSystem.out.println(\"============= Text-Werkzeuge =============\");\r\n\t\tSystem.out.println(\"Bitte Aktion auswählen:\");\r\n\t\tSystem.out.println(\"1: Text umkehren\");\r\n\t\tSystem.out.println(\"2: Palindrom-Test\");\r\n\t\tSystem.out.println(\"3: Wörter zählen\");\r\n\t\tSystem.out.println(\"4: Caesar-Chiffre\");\r\n\t\tSystem.out.println(\"5: Längstes Wort ermitteln\");\r\n\t\tSystem.out.println(\"0: Programm beenden\");\r\n\t\tSystem.out.println(\"==========================================\");\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_lihat_rekam_medis_inap, menu);\n return true;\n }",
"public static void imprimirMenu() {\r\n\tSystem.out.println(\"---------------------------menu---------------------------\");\r\n\tSystem.out.println(\"opciones: (ingrese como RF#)\");\r\n\tSystem.out.println(\"RF1: iniciar sesion \");\r\n System.out.println(\"RF2: registrarse al sistema\");\r\n\tSystem.out.println(\"RF3: Salir\");\r\n\t\r\n }",
"public void menu() {\n\t\tstate.menu();\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_spilen5, menu);\n return true;\n }",
"public static void f_menu(){\n System.out.println(\"╔══════════════════════╗\");\r\n System.out.println(\"║ SoftAverageHeight ║\");\r\n System.out.println(\"║Version 1.0 20200428 ║\");\r\n System.out.println(\"║Created by:Andres Diaz║\");\r\n System.out.println(\"╚══════════════════════╝\");\r\n\r\n }",
"public static int menu()\n {\n \n int choix;\n System.out.println(\"MENU PRINCIPAL\");\n System.out.println(\"--------------\");\n System.out.println(\"1. Operation sur les membres\");\n System.out.println(\"2. Operation sur les taches\");\n System.out.println(\"3. Assignation de tache\");\n System.out.println(\"4. Rechercher les taches assigne a un membre\");\n System.out.println(\"5. Rechercher les taches en fonction de leur status\");\n System.out.println(\"6. Afficher la liste des taches assignees\");\n System.out.println(\"7. Sortir\");\n System.out.println(\"--------------\");\n System.out.print(\"votre choix : \");\n choix = Keyboard.getEntier();\n System.out.println();\n return choix;\n }",
"@Override\n\t\tpublic void openMenu() {\n\t\t}",
"static void menuPrincipal() {\n System.out.println(\n \"\\nPizzaria o Rato que Ri:\" + '\\n' +\n \"1 - Novo pedido\" + '\\n' +\n \"2 - Mostrar pedidos\" + '\\n' +\n \"3 - Alterar estado do pedido\" + '\\n' +\n \"9 - Sair\"\n );\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main,menu);\n super.onCreateOptionsMenu(menu);\n\n menu.add(1, SALIR, 0, R.string.menu_salir);\n return true;\n }",
"@Override\r\n public void actionPerformed(ActionEvent e) {\n Menu_Produtos m2= new Menu_Produtos();\r\n \r\n }",
"public void showMenu()\r\n {\r\n System.out.println(\"Enter Truck order: \");\r\n \r\n super.showCommon();\r\n \r\n \r\n super.showMenu(\"What size truck is this? \", SIZE);\r\n \r\n \r\n \r\n \r\n \r\n \r\n super.showMenu(\"What is the engine size of the truck?\", ENGINE_SIZE);\r\n \r\n \r\n \r\n }",
"private void printMenu()\n {\n System.out.println(\"\");\n System.out.println(\"*** Salg ***\");\n System.out.println(\"(0) Tilbage\");\n System.out.println(\"(1) Opret\");\n System.out.println(\"(2) Find\");\n System.out.println(\"(3) Slet\");\n System.out.print(\"Valg: \");\n }",
"public void popMenu() {\r\n\t\tthis.menu = new JPopupMenu();\r\n\t\tmenu.setLocation(jf.getLocation());\r\n\t\tthis.beenden = new JMenuItem(\"Beenden\");\r\n\t\tthis.info = new JMenuItem(\"Info\");\r\n\t\tmenu.add(beenden);\r\n\t\tbeenden.addActionListener(new ActionListener() {\r\n\t\t\t// vergleicht ob gleiches Objekt, bei ActionEvent fuer Beenden\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (e.getSource() == beenden) {\r\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t\tmenu.add(info);\r\n\t\tinfo.addActionListener(new ActionListener() {\r\n\t\t\t//vergleicht ob gleiches Objekt, ActionEvent fuer Info\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (e.getSource() == info) {\r\n\t\t\t\t\tmenu.setVisible(false);\r\n\t\t\t\t\tJOptionPane\r\n\t\t\t\t\t\t\t.showMessageDialog(null,\r\n\t\t\t\t\t\t\t\t\t\"Dies ist eine Uhr mit einstellbaren Wecker\\nVersion 1.0\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t\tmenu.setVisible(true);\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_gla_dos_me_p2, menu);\n return true;\n }",
"public void InitializeMenu(){\n\t\tmnbBar = new JMenuBar();\n\t\tmnuFile = new JMenu(\"File\");\n\t\tmnuFormat = new JMenu(\"Format\");\n\t\tmniOpen = new JMenuItem(\"Open\");\n\t\tmniExit = new JMenuItem(\"Exit\");\n\t\tmniSave = new JMenuItem(\"Save\");\n\t\tmniSaveAs = new JMenuItem(\"Save as\");\n\t\tmniSaveAs.setMnemonic(KeyEvent.VK_A);\n\t\tmniSave.setMnemonic(KeyEvent.VK_S);\n\t\tmniChangeBgColor = new JMenuItem(\"Change Backgroud Color\");\n\t\tmniChangeFontColor = new JMenuItem(\"Change Font Color\");\n\t\t//them menu item vao menu file\n\t\tmnuFile.add(mniOpen);\n\t\tmnuFile.addSeparator();\n\t\tmnuFile.add(mniExit);\n\t\tmnuFile.add(mniSaveAs);\n\t\tmnuFile.add(mniSave);\n\t\t//them menu item vao menu format\n\t\tmnuFormat.add(mniChangeBgColor);\n\t\tmnuFormat.addSeparator();\n\t\tmnuFormat.add(mniChangeFontColor);\n\t\t//them menu file va menu format vao menu bar\n\t\tmnbBar.add(mnuFile);\n\t\tmnbBar.add(mnuFormat);\n\t\t//thiet lap menubar thanh menu chinh cua frame\n\t\tsetJMenuBar(mnbBar);\n\t}",
"public void menu()\r\n\t{\r\n\t\t//TODO\r\n\t\t//Exits for now\r\n\t\tSystem.exit(0);\r\n\t}",
"private void mainMenu() {\n System.out.println(\"Canteen Management System\");\n System.out.println(\"-----------------------\");\n System.out.println(\"1. Show Menu\");\n System.out.println(\"2.AcceptReject\");\n System.out.println(\"3.place orders\");\n System.out.println(\"4.show orders\");\n System.out.println(\"5. Exit\");\n mainMenuDetails();\n }",
"public Menu() {\r\n \r\n ingresaVehiculo (); \r\n }",
"@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}",
"public menu_utama() {\n initComponents();\n this.setLocationRelativeTo(null);\n jPanel11.setVisible(false);\n jPanel11.setEnabled(false);\n getjam();\n \n }",
"public void startMenu() {\n setTitle(\"Nier Protomata\");\n setSize(ICoord.LAST_COL + ICoord.ADD_SIZE,\n ICoord.LAST_ROW + ICoord.ADD_SIZE);\n \n setButton();\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu){\r\n getMenuInflater().inflate(R.menu.menu, menu); //Recibe como parametro el menu donde se situan las acciones\r\n return true; //Para que la barra sea visible\r\n }",
"void Menu();",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.halaman_utama, menu);\n return true;\n }",
"private void abrirVentanaChatPrivada() {\n\t\tthis.chatPublico = new MenuVentanaChat(\"Sala\", this, false);\n\t}",
"public MenuKullanimi()\n {\n initComponents();\n setLocationRelativeTo(null);\n }",
"public MenuUtama() { \n initComponents();\n // setIconImage(new javax.swing.ImageIcon(getClass().getResource(\"/image/palito.jpg\")).getImage());\n getContentPane().add(deskPane,java.awt.BorderLayout.CENTER);\n \n ctrlAlert = new ctrlAlert(this);\n animasiStatusBar();\n setMenu(true);\n LoginUser();\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_paylasim, menu);\n return true;\n }",
"public MenuCreditos(Game world) {\n this.world=world;\n this.setVisible(true);\n teclas= new Sonido();\n onEnter();\n }",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetSupportMenuInflater().inflate(R.menu.activity_display_selected_scripture,\n \t\t\t\tmenu);\n \t\treturn true;\n \t}",
"private static int menu() {\r\n\t\tSystem.out.println(\"Elige opcion de jugada:\");\r\n\t\tSystem.out.println(\"1-Piedra\");\r\n\t\tSystem.out.println(\"2-Papel\");\r\n\t\tSystem.out.println(\"3-Tijera\");\r\n\t\tSystem.out.println(\"0-Salir\");\r\n\t\tSystem.out.print(\"Opcion: \");\r\n\t\treturn Teclado.leerInt();\r\n\t}",
"private void initializeMenu() {\n menu = new Menu(parent.getShell());\n MenuItem item1 = new MenuItem(menu, SWT.NONE);\n item1.setText(Resources.getMessage(\"LatticeView.9\")); //$NON-NLS-1$\n item1.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n model.getClipboard().addToClipboard(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.CLIPBOARD, selectedNode));\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n \n MenuItem item2 = new MenuItem(menu, SWT.NONE);\n item2.setText(Resources.getMessage(\"LatticeView.10\")); //$NON-NLS-1$\n item2.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n controller.actionApplySelectedTransformation();\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n }",
"public int menu() {\n System.out.println(\"MENU PRINCIPAL\\n\"\n + \"1 - CADASTRO DE PRODUTOS\\n\"\n + \"2 - MOVIMENTAÇÃO\\n\"\n + \"3 - REAJUSTE DE PREÇOS\\n\"\n + \"4 - RELATÓRIOS\\n\"\n + \"0 - FINALIZAR\\n\");\n return getEscolhaMenu(); \n }",
"@Override\r\n public void run() {\n opsi_menu();\r\n\r\n }",
"static void mainMenu ()\r\n \t{\r\n \t\tfinal byte width = 45; //Menu is 45 characters wide.\r\n \t\tString label [] = {\"Welcome to my RedGame 2 compiler\"};\r\n \t\t\r\n \t\tMenu front = new Menu(label, \"Main Menu\", (byte) width);\r\n \t\t\r\n \t\tMenu systemTests = systemTests(); //Gen a test object.\r\n \t\tMenu settings = settings(); //Gen a setting object.\r\n \t\t\r\n \t\tfront.addOption (systemTests);\r\n \t\tfront.addOption (settings);\r\n \t\t\r\n \t\tfront.select();\r\n \t\t//The program should exit after this menu has returned. CLI-specific\r\n \t\t//exit operations should be here:\r\n \t\t\r\n \t\tprint (\"\\nThank you for using my program.\");\r\n \t}",
"public MenuCriarArranhaCeus() {\n initComponents();\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_juego_principal, menu);\n return true;\n }",
"public static void imprimirMenuCliente() {\r\n\tSystem.out.println(\"---------------------------menu---------------------------\");\r\n\tSystem.out.println(\"opciones: (ingrese la letra)\");\r\n\tSystem.out.println(\"A: despliega la opción comprar entrada\");\r\n System.out.println(\"B: despliega la opción informacion usuario\");\r\n System.out.println(\"C: despliega la opción devolucion entrada\");\r\n System.out.println(\"D: despliega la opción cartelera\");\r\n\tSystem.out.println(\"E: Salir\");\r\n\tSystem.out.println(\"----------------------------------------------------------\");\r\n \r\n }",
"@Override\n public void menuSelected(MenuEvent e) {\n \n }",
"public MenuBangunRuang() {\n initComponents();\n }",
"public abstract void displayMenu();",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_anamnesis_ver, menu);\n return true;\n }",
"public menuFornecedorView() {\n initComponents();\n botoes(true,true,false,true,false,false);\n campos(false,true,false,false,false,false);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.lausir_timar, menu);\n return true;\n }",
"private void menu() { \r\n\t\tSystem.out.println(\" ---------WHAT WOULD YOU LIKE TO DO?---------\");\r\n\t\tSystem.out.println(\"1) Move\");\r\n\t\tSystem.out.println(\"2) Save\");\r\n\t\tSystem.out.println(\"3) Quit\");\r\n\t\t\r\n\t}",
"public static void proManagerUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the Project Manager's Information\");\n System.out.println(\"2 - Would you like to search for a Project Manager's information\");\n System.out.println(\"3 - Adding a new Project Manager's details\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_uz, menu);\n return true;\n }",
"public void barraprincipal(){\n setJMenuBar(barra);\n //Menu archivo\n archivo.add(\"Salir del Programa\").addActionListener(this);\n barra.add(archivo);\n //Menu tareas\n tareas.add(\"Registros Diarios\").addActionListener(this);\n tareas.addSeparator();\n tareas.add(\"Ver Catalogo de Cuentas\").addActionListener(this);\n tareas.addSeparator();\n tareas.add(\"Empleados\").addActionListener(this);\n tareas.addSeparator();\n tareas.add(\"Productos\").addActionListener(this);\n tareas.addSeparator();\n tareas.add(\"Generacion de Estados Financieros\").addActionListener(this);\n barra.add(tareas);\n //Menu Ayuda\n ayuda.add(\"Acerca de...\").addActionListener(this);\n ayuda.addSeparator();\n barra.add(ayuda);\n //Para ventana interna\n acciones.addItem(\"Registros Diarios\");\n acciones.addItem(\"Ver Catalogo de Cuentas\");\n acciones.addItem(\"Empleados\");\n acciones.addItem(\"Productos\");\n acciones.addItem(\"Generacion de Estados Financieros\");\n aceptar.addActionListener(this);\n salir.addActionListener(this);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.allgemein, menu);\n return true;\n }",
"private void mainMenu() {\r\n System.out.println(\"Canteen Management System\");\r\n System.out.println(\"-----------------------\");\r\n System.out.println(\"1. Show Menu\");\r\n System.out.println(\"2. Employee Login\");\r\n System.out.println(\"3. Vendor Login\");\r\n System.out.println(\"4. Exit\");\r\n mainMenuDetails();\r\n }",
"private static void mostrarMenu() {\n\t\tSystem.out.println(\"------------------------------\");\n\t\tSystem.out.println(\"-----------OPCIONES-----------\");\n\t\tSystem.out.println(\"------------------------------\");\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"\\n\\t1) Mostrar los procesos\");\n\t\tSystem.out.println(\"\\n\\t2) Parar un proceso\");\n\t\tSystem.out.println(\"\\n\\t3) Arrancar un proceso\");\n\t\tSystem.out.println(\"\\n\\t4) A�adir un proceso\");\n\t\tSystem.out.println(\"\\n\\t5) Terminar ejecucion\");\n\t\tSystem.out.println(\"\\n------------------------------\");\n\t}",
"public static void menuPrincicipal() {\n\t\tSystem.out.println(\"+---------------------------+\");\n\t\tSystem.out.println(\"| Elige una opcion |\");\n\t\tSystem.out.println(\"+---------------------------+\");\n\t\tSystem.out.println(\"| 1-Modificar Orden |\");\n\t\tSystem.out.println(\"+---------------------------+\");\n\t\tSystem.out.println(\"| 2-Eliminar orden |\");\n\t\tSystem.out.println(\"+---------------------------+\");\n\t\tSystem.out.println(\"| 3-Ver todas las ordenes |\");\n\t\tSystem.out.println(\"+---------------------------+\");\n\t\tSystem.out.println(\"| 0-Salir |\");\n\t\tSystem.out.println(\"+---------------------------+\");\n\t}",
"public void menu(){\n menuMusic.loop(pitch, volume);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_skale, menu);\n return true;\n }",
"@Override\n\tpublic void showmenu() {\n\t\t\n\t\tint choice;\n \n System.out.println(\"请选择1.查询 2.退出\");\n choice=console.nextInt();\n \n switch (choice){\n \n case 1:\n Menu.searchMenu();\n break;\n default:\n \tSystem.out.println(\"感谢您使用本系统 欢迎下次使用!\");\n System.exit(0);\n }\n \n \n\t}",
"private static void menuManejoJugadores() {\n\t\tint opcion;\n\t\tdo{\n\t\t\topcion=menuManejoJugadores.gestionar();\n\t\t\tgestionarMenuManejoJugador(opcion);\n\t\t}while(opcion!=menuManejoJugadores.getSALIR());\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.menu_principal, menu);\n \t//Fin del menu\n \treturn true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_mecanismo, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.segundo_semestre, menu);\n\t\treturn true;\n\t}",
"public void generateMenu(){\n menuBar = new JMenuBar();\n\n JMenu file = new JMenu(\"Datei\");\n JMenu tools = new JMenu(\"Werkzeuge\");\n JMenu help = new JMenu(\"Hilfe\");\n\n JMenuItem open = new JMenuItem(\"Öffnen \");\n JMenuItem save = new JMenuItem(\"Speichern \");\n JMenuItem exit = new JMenuItem(\"Beenden \");\n JMenuItem preferences = new JMenuItem(\"Einstellungen \");\n JMenuItem about = new JMenuItem(\"Über das Projekt \");\n\n\n file.add(open);\n file.add(save);\n file.addSeparator();\n file.add(exit);\n tools.add(preferences);\n help.add(about);\n\n menuBar.add(file);\n menuBar.add(tools);\n menuBar.add(help);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_guia_turistica, menu);\n return true;\n }",
"public static void MenuPrincipal() {\n System.out.println(\"Ingrese Opcion deseada :.\\n\"\r\n + \"1. Ingresar un perro a la guardería.\\n\"\r\n + \"2. Contar cuántos Perros de la raza y el Genero deceado hay o pasaron por la guardería durante el verano.\\n\"\r\n + \"3. Listar todos los perros (con su respectiva información) que ingresaron en una determinada fecha.\\n\"\r\n + \"4. Listar todos los Perrros de la Raza que decea con estadía mayor a 20 días.\\n\"\r\n + \"5. Dado el código de un perro, informar los datos de su dueño.\\n\"\r\n + \"6. Terminar.\\n\"\r\n +\"______________________________________________________________________________________________________________\"\r\n \r\n );\r\n\r\n }",
"private void makeUtilitiesMenu() {\r\n\t\tJMenu utilitiesMnu = new JMenu(\"Utilidades\");\r\n\t\tboolean isAccesible = false;\r\n\r\n\t\tif (StoreCore.getAccess(\"Reportes\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Reportes\",\r\n\t\t\t\t\timageLoader.getImage(\"reports.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'r',\r\n\t\t\t\t\t\"Ver los reportes del sistema\", null,\r\n\t\t\t\t\tReports.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"ConsultarPrecios\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Consultar Precios\",\r\n\t\t\t\t\timageLoader.getImage(\"money.gif\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'p',\r\n\t\t\t\t\t\"Consultar los precios de los productos\", null,\r\n\t\t\t\t\tPriceRead.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Calculadora\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Calculadora Impuesto\",\r\n\t\t\t\t\timageLoader.getImage(\"pc.gif\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'c',\r\n\t\t\t\t\t\"Calculadora de impuesto\", null, Calculator.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tutilitiesMnu.addSeparator();\r\n\t\tif (StoreCore.getAccess(\"Categorias\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Categorias Inventario\",\r\n\t\t\t\t\timageLoader.getImage(\"group.gif\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'i',\r\n\t\t\t\t\t\"Manejar las categorias del inventario\", null, Groups.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Impuestos\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Impuestos\");\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 't',\r\n\t\t\t\t\t\"Manejar el listado de impuestos\", null, Tax.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Ciudades\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Ciudades\");\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'u',\r\n\t\t\t\t\t\"Manejar el listado de ciudades\", null, City.class);\r\n\t\t\tutilitiesMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (isAccesible) {\r\n\t\t\tutilitiesMnu.setMnemonic('u');\r\n\t\t\tadd(utilitiesMnu);\r\n\t\t}\r\n\t}",
"private static void gestionarMenuGeneral(int opcion) {\n\t\tswitch(opcion){\n\t\tcase 1:\n\t\t\tmenuManejoJugadores();\n\t\t\tbreak;\n\t\tcase 2: jugar();\n\t\t\tbreak;\n\t\tcase 3:System.out.println(\"Hasta pronto.\");\n\t\t\tbreak;\n\t\t}\n\t}"
]
| [
"0.7485148",
"0.7308122",
"0.7247681",
"0.7171922",
"0.713978",
"0.713594",
"0.70854723",
"0.7061016",
"0.70576817",
"0.7050538",
"0.70466727",
"0.7043886",
"0.70422983",
"0.7023834",
"0.6970935",
"0.69415015",
"0.69211614",
"0.6920125",
"0.68954587",
"0.6895371",
"0.68703645",
"0.6868167",
"0.68228847",
"0.6822298",
"0.68121856",
"0.6795668",
"0.6794517",
"0.6784424",
"0.673107",
"0.6724",
"0.67202294",
"0.67159915",
"0.6710012",
"0.67013",
"0.6697923",
"0.6691789",
"0.6676479",
"0.6668558",
"0.66668147",
"0.666137",
"0.66589004",
"0.66358644",
"0.6631216",
"0.6630952",
"0.6626029",
"0.66133374",
"0.66129327",
"0.66091925",
"0.66015357",
"0.6600587",
"0.6593807",
"0.6591886",
"0.6589731",
"0.6584647",
"0.656921",
"0.6560234",
"0.65559226",
"0.655384",
"0.65507233",
"0.65468365",
"0.6538064",
"0.6533962",
"0.65295863",
"0.65265423",
"0.65252924",
"0.65247667",
"0.65222347",
"0.65215635",
"0.6517604",
"0.6512818",
"0.6493828",
"0.64898914",
"0.6488347",
"0.64870805",
"0.64867246",
"0.6478598",
"0.64738554",
"0.6471877",
"0.64715827",
"0.6471185",
"0.6469432",
"0.64689606",
"0.64666754",
"0.64554864",
"0.64542806",
"0.6453647",
"0.6453614",
"0.6452425",
"0.64493734",
"0.6441473",
"0.6441118",
"0.64410144",
"0.64391106",
"0.6438678",
"0.6431967",
"0.6426038",
"0.6426026",
"0.6425141",
"0.6420244",
"0.64202166",
"0.6418446"
]
| 0.0 | -1 |
Metoda ktora zavola akciu na predmet pre ktory sme vytvorili menu. Akcia je dana podla toho co bolo oznacene v tomto menu. Prikazy su vykonavane prechadzanim case vetiev. | private void use() {
switch (choices.get(selection)) {
case INFO : {
AbstractInMenu newMenu = new ItemInfo(sourceMenu, item);
this.sourceMenu.setMenu(newMenu);
newMenu.setVisible(true);
} break;
case USE : {
entity.use(item);
sourceMenu.activate();
sourceMenu.setState(true);
} break;
case EQUIP : {
entity.equip(item);
sourceMenu.activate();
sourceMenu.setState(true);
} break;
case ACTIVE : {
entity.setActiveItem(item);
sourceMenu.activate();
sourceMenu.setState(true);
} break;
case UNEQUIP : {
entity.equip(item);
sourceMenu.activate();
sourceMenu.setState(true);
} break;
case UNACTIVE : {
entity.setActiveItem(null);
sourceMenu.activate();
sourceMenu.setState(true);
} break;
case DROP : {
entity.drop(item);
sourceMenu.activate();
sourceMenu.setState(true);
} break;
case PLACE : {
entity.placeItem(item);
entity.removeItem(item);
sourceMenu.activate();
sourceMenu.setState(true);
} break;
case CLOSE : {
sourceMenu.activate();
} break;
case DESTROY : {
entity.removeItem(item);
sourceMenu.activate();
sourceMenu.setState(true);
} break;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void createMenu(){\n\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n JMenu Opcje = new JMenu(\"Opcje\");\n mbar.add(Opcje);\n JMenuItem Ustawienia = new JMenuItem(\"Ustawienia\");\n /** Obsluga zdarzen wcisniecia przycisku ustawien w menu */\n Ustawienia.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if(Justawienia==null)\n Justawienia =new JUstawienia();\n Justawienia.setVisible(true);\n if (controller.timer!=null)\n controller.timer.stop();\n }\n });\n Opcje.add(Ustawienia);\n Opcje.addSeparator();\n JMenuItem Info = new JMenuItem(\"Info\");\n /** Obsluga zdarzen wcisniecia przycisku info w menu */\n Info.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n controller.WyswietlInfo();\n }\n });\n Opcje.add(Info);\n }",
"public void initMenu(){\n\t}",
"private static void returnMenu() {\n\t\t\r\n\t}",
"@Override\n\tpublic void setUpMenu() {\n\t\t\n\t}",
"static void listerMenu() {\n System.out.println(\n \"-------------------------------------\\n\" +\n \"Saisir une option :\\n\" +\n \"1 : Liste des hôtes\\n\" +\n \"2 : Liste des logements\\n\" +\n \"3 : Liste des voyageurs\\n\" +\n \"4 : Liste des réservations\\n\" +\n \"5 : Fermer le programme\"\n );\n switch (Menu.choix(5)) {\n case 1:\n GestionHotes.listerHotes();\n break;\n case 2:\n GestionLogements.listerLogements();\n break;\n case 3:\n GestionVoyageurs.listerVoyageurs();\n break;\n case 4:\n GestionReservations.listerReservations();\n break;\n case 5:\n System.exit(0);\n break;\n }\n }",
"private void setMenu() {\n\n if (tree.isEmpty() || !treeGrid.anySelected()) {\n mainMenu.setItems(newMenuItem, new MenuItemSeparator(), settingMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecord() == null) {\n mainMenu.setItems(renameMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecords().length > 1) {\n ListGridRecord[] selectedNode = treeGrid.getSelectedRecords();\n if (isSameExtension(selectedNode, Extension.FP)) {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem, exportMenuItem);\n } else if (isSameExtension(selectedNode, Extension.FPS)) {\n mainMenu.setItems(newFPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.BPS)) {\n mainMenu.setItems(newBPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.SCSS)) {\n mainMenu.setItems(newSCSItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n }\n } else if (tree.isFolder(treeGrid.getSelectedRecord())) {\n mainMenu.setItems(newMenuItem, deleteMenu, renameMenuItem, copyMenuItem, pasteMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem, downloadMenuItem,\n copyPathMenuItem);\n } else {\n FileTreeNode selectedNode = (FileTreeNode) treeGrid.getSelectedRecord();\n VMResource resource = selectedNode.getResource();\n if (resource instanceof VMDirectory) {\n return;\n }\n Extension extension = ((VMFile) resource).getExtension();\n if (extension == null) {\n mainMenu.setItems(openWithMenuItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n } else\n switch (extension) {\n case ARC:\n mainMenu.setItems(newBPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FM:\n mainMenu.setItems(newFMCItem, newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FMC:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case TC:\n mainMenu.setItems(newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n case FPS:\n mainMenu.setItems(newFPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, exportMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BPS:\n mainMenu.setItems(newBPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCSS:\n mainMenu.setItems(newSCSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCS:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n default:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n }\n }\n }",
"private void voltarMenu() {\n\t\tmenu = new TelaMenu();\r\n\t\tmenu.setVisible(true);\r\n\t\tthis.dispose();\r\n\t}",
"public void componentesimplementacionIsmael() {\n\t\t// En el menu bar Ismael\n\t\tmenuIsmael = new JMenu(\"Ismael\");\n\t\tmenuBar.add(menuIsmael);\n\n\t\t// SUBMENU\n\t\tsubMenuRecientes = new JMenu(\"Recientes\");\n\t\titemSubMenuRecientes = new ArrayList<>();\n\t\trutasRecientes = new ArrayList<>();\n\t\ttry {\n\t\t\trutasRecientes = manejadorFichero.obtenerLineasDelFichero();\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\tif (!rutasRecientes.isEmpty()) {\n\t\t\tfor (int i = 0; i < rutasRecientes.size(); i++) {\n\t\t\t\tJMenuItem textoSubmenu = new JMenuItem(rutasRecientes.get(i));\n\t\t\t\titemSubMenuRecientes.add(textoSubmenu);\n\t\t\t\tsubMenuRecientes.add(textoSubmenu);\n\t\t\t}\n\t\t}\n\t\tmenuIsmael.add(subMenuRecientes);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\t// Fuente\n\t\titemFuente = new JMenuItem(\"Fuente\");\n\t\titemFuente.setEnabled(false);\n\t\titemFuente.setMnemonic(KeyEvent.VK_F);\n\t\titemFuente.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemFuente);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\titemSeleccionarTodo = new JMenuItem(\"Selec.Todo\");\n\t\titemSeleccionarTodo.setEnabled(false);\n\t\titemSeleccionarTodo.setMnemonic(KeyEvent.VK_N);\n\t\titemSeleccionarTodo.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemSeleccionarTodo);\n\n\t\titemSeleccionarTodoYCopiar = new JMenuItem(\"Selec All+Copy\");\n\t\titemSeleccionarTodoYCopiar.setEnabled(false);\n\t\titemSeleccionarTodoYCopiar.setMnemonic(KeyEvent.VK_M);\n\t\titemSeleccionarTodoYCopiar.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemSeleccionarTodoYCopiar);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\titemHora = new JMenuItem(\"Hora\");\n\t\titemHora.setEnabled(true);\n\t\titemHora.setMnemonic(KeyEvent.VK_H);\n\t\titemHora.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_H, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemHora);\n\n\t}",
"public void menuListados() {\n\t\tSystem.out.println(\"MENU LISTADOS\");\n\t\tSystem.out.println(\"1. Personas con la misma actividad\");\n\t\tSystem.out.println(\"2. Cantidad de personas con la misma actividad\");\n\t\tSystem.out.println(\"0. Salir\");\n\t}",
"public static void afficherMenu() {\r\n System.out.println(\"\\n## Menu de l'application ##\\n\" +\r\n \" Actions Membres :\\n\"+\r\n \" [ 1] : Inscription d'un Membre\\n\" +\r\n \" [ 2] : Désinscription d'un Membre\\n\" +\r\n \" ( 3) : Afficher liste des Membres\\n\" +\r\n \" [ 4] : Payer Cotisation\\n\" +\r\n \" Actions vote Arbres d'un Membre :\\n\" +\r\n \" ( 5) : Voter pour un Arbre\\n\" +\r\n \" ( 6) : Afficher liste des votes\\n\" +\r\n \" ( 7) : Retirer un vote\\n\" +\r\n \" ( 8) : Supprimer les votes d'un Membre.\\n\" +\r\n \" ( 9) : Remplacer un vote\\n\" +\r\n \" Actions Arbres :\\n\" +\r\n \" (10) : Afficher la liste des Arbres\\n\" +\r\n // ...\r\n \" Actions Administration :\\n\" +\r\n \" (11) : Nommer nouveau Président\\n\" +\r\n // ...\r\n \"\\n ( 0) : Quitter l'application\\n\" +\r\n \" - Veuillez saisir une action. -\");\r\n }",
"private void goToMenu() {\n Intent intentProfile = new Intent(PregonesActivosActivity.this, MenuInicial.class);\n PregonesActivosActivity.this.startActivity(intentProfile);\n }",
"static void afficherMenu() {\n\t\tSystem.out.println(\"\\n\\n\\n\\t\\tMENU PRINCIPAL\\n\");\n\t\tSystem.out.println(\"\\t1. Additionner deux nombres\\n\");\n\t\tSystem.out.println(\"\\t2. Soustraire deux nombres\\n\");\n\t\tSystem.out.println(\"\\t3. Multiplier deux nombres\\n\");\n\t\tSystem.out.println(\"\\t4. Deviser deux nombres\\n\");\n\t\tSystem.out.println(\"\\t0. Quitter\\n\");\n\t\tSystem.out.print(\"\\tFaites votre choix : \");\n\t}",
"@Override\n\t\tpublic void openMenu() {\n\t\t}",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu){\r\n getMenuInflater().inflate(R.menu.menu, menu); //Recibe como parametro el menu donde se situan las acciones\r\n return true; //Para que la barra sea visible\r\n }",
"@Override\r\n\tpublic void menu() {\n\t\tSystem.out.println(\"go to menu\");\r\n\t\t\r\n\t}",
"static void mostrarMenu(){\n \t\t\n\t\tout.println();\n\t\tout.println(\"1. Crear lavadora.\");\n\t\tout.println(\"2. Mostrar lavadoras.\");\n\t\tout.println(\"3. Seleccionar lavadora.\");\n\t\tout.println(\"4. Cargar agua.\");\n\t\tout.println(\"5. Cargar ropa.\");\n\t\tout.println(\"6. Cargar detergente.\");\n\t\tout.println(\"7. Especificar tiempo.\");\n\t\tout.println(\"8. Drenar.\");\n\t\tout.println(\"9. Mostrar estado de la lavadora.\");\n\t\tout.println(\"10. Mostrar estado de la ropa.\");\n\t\tout.println(\"11. Pausar o Reanudar lavadora\");\n\t\tout.println(\"12. Probar sistema.\");\n\t\tout.println(\"13. Reiniciar sistema.\");\n\t\tout.println(\"22. Salir\");\n\t\tout.println((SELECTNOW != -1) ? \"!/*!/* Lv seleccionada: \" + SELECTNOW + \" !/*!/*\": \"\");\n\t\tout.println();\n\t}",
"public void volvreAlMenu() {\r\n\t\t// Muestra el menu y no permiye que se cambie el tamaņo\r\n\t\tMenu.frame.setVisible(true);\r\n\t\tMenu.frame.setResizable(false);\r\n\t\t// Oculta la ventana del flappyBird\r\n\t\tjframe.setVisible(false);\r\n\t}",
"public static void menuInicial() {\n System.out.println(\"Boas vindas à Arena pokemon Treinador!!!\");\n System.out.println(\"Digite 1 para fazer sua inscrição\");\n System.out.println(\"Digite 2 para sair\");\n\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_juego_principal, menu);\n return true;\n }",
"private static void showMenu() {\n System.out.println(\"1. Dodaj zadanie\");\n System.out.println(\"2. Wykonaj zadanie.\");\n System.out.println(\"3. Zamknij program\");\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_zadania, menu);\n return true;\n }",
"private JMenu brugerMenuSetup() {\n JMenu brugerMenu = generalMenuSetup(\"Bruger\");\n JMenuItem logUdItem = new JMenuItem(\"Log ud\");\n brugerMenu.add(logUdItem);\n logUdItem.addActionListener(\n e -> System.exit(0)\n );\n JMenuItem minListeItem = new JMenuItem(\"Min liste\");\n brugerMenu.add(minListeItem);\n\n return brugerMenu;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.menu_principal, menu);\n \t//Fin del menu\n \treturn true;\n }",
"public void menu(){\n super.goToMenuScreen();\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.principal, menu);\n\n\n return true;\n }",
"private void mainMenu() {\r\n System.out.println(\"Canteen Management System\");\r\n System.out.println(\"-----------------------\");\r\n System.out.println(\"1. Show Menu\");\r\n System.out.println(\"2. Employee Login\");\r\n System.out.println(\"3. Vendor Login\");\r\n System.out.println(\"4. Exit\");\r\n mainMenuDetails();\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_zawadiaka, menu);\n return true;\n }",
"private void goToMenu() {\n\t\tgame.setScreen(new MainMenuScreen(game));\n\n\t}",
"@Override\n\tpublic void showmenu() {\n\t\t\n\t\tint choice;\n \n System.out.println(\"请选择1.查询 2.退出\");\n choice=console.nextInt();\n \n switch (choice){\n \n case 1:\n Menu.searchMenu();\n break;\n default:\n \tSystem.out.println(\"感谢您使用本系统 欢迎下次使用!\");\n System.exit(0);\n }\n \n \n\t}",
"public static void activateMenu() {\n instance.getMenu().show();\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actividad_principal, menu);\n return true;\n }",
"private void displayMenu() {\r\n\t\tif (this.user instanceof Administrator) {\r\n\t\t\tnew AdminMenu(this.database, (Administrator) this.user);\r\n\t\t} else {\r\n\t\t\tnew BorrowerMenu(this.database);\r\n\t\t}\r\n\t}",
"public String chooseMenu() {\n String input = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"menu_id\");\n setName(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"name\"));\n setType(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"type\"));\n setMenu_id(Integer.parseInt(input));\n return \"EditMenu\";\n\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_principal, menu);//Menu Resource, Menu\n return true;\n }",
"private void mainMenu() {\n System.out.println(\"Canteen Management System\");\n System.out.println(\"-----------------------\");\n System.out.println(\"1. Show Menu\");\n System.out.println(\"2.AcceptReject\");\n System.out.println(\"3.place orders\");\n System.out.println(\"4.show orders\");\n System.out.println(\"5. Exit\");\n mainMenuDetails();\n }",
"public void gotoMenu() {\n try {\n MenuClienteController menu = (MenuClienteController) replaceSceneContent(\"MenuCliente.fxml\");\n menu.setApp(this);\n } catch (Exception ex) {\n Logger.getLogger(IndieAirwaysClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.ficha_contenedor, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.inicio, menu);\r\n return true;\r\n }",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main_web, menu);\n \t\treturn true;\n \t}",
"@Override\n public boolean onPrepareOptionsMenu (Menu menu) {\n \n return super.onPrepareOptionsMenu (menu);\n \n }",
"public void menu() {\n m.add(\"Go adventuring!!\", this::goAdventuring );\n m.add(\"Display information about your character\", this::displayCharacter );\n m.add(\"Visit shop\", this::goShopping);\n m.add (\"Exit game...\", this::exitGame);\n }",
"public void menu() {\n\t\tstate.menu();\n\t}",
"@Test\n public void testMenu() {\n MAIN_MENU[] menusDefined = MAIN_MENU.values();\n\n // get menu items\n List<String> menuList = rootPage.menu().items();\n _logger.debug(\"Menu items:{}\", menuList);\n // check the count\n Assert.assertEquals(menuList.size(), menusDefined.length, \"Number of menus test\");\n // check the names\n for (String item : menuList) {\n Assert.assertNotNull(MAIN_MENU.fromText(item), \"Checking menu: \" + item);\n }\n // check the navigation\n for (MAIN_MENU item : menusDefined) {\n _logger.debug(\"Testing menu:[{}]\", item.getText());\n rootPage.menu().select(item.getText());\n Assert.assertEquals(item.getText(), rootPage.menu().selected());\n }\n }",
"public static int menu()\n {\n \n int choix;\n System.out.println(\"MENU PRINCIPAL\");\n System.out.println(\"--------------\");\n System.out.println(\"1. Operation sur les membres\");\n System.out.println(\"2. Operation sur les taches\");\n System.out.println(\"3. Assignation de tache\");\n System.out.println(\"4. Rechercher les taches assigne a un membre\");\n System.out.println(\"5. Rechercher les taches en fonction de leur status\");\n System.out.println(\"6. Afficher la liste des taches assignees\");\n System.out.println(\"7. Sortir\");\n System.out.println(\"--------------\");\n System.out.print(\"votre choix : \");\n choix = Keyboard.getEntier();\n System.out.println();\n return choix;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_uz, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_detall_recepta, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.halaman_utama, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_paylasim, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_guia_turistica, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.inicio, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.inicio, menu);\n return true;\n }",
"@Override\r\n\tpublic void createMenu(Menu menu) {\n\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_actividad_principal, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return true; /** true -> el menú ya está visible */\n }",
"public void setMenu(){\n opciones='.';\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.contenedor, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main,menu);\n super.onCreateOptionsMenu(menu);\n\n menu.add(1, SALIR, 0, R.string.menu_salir);\n return true;\n }",
"void clickAmFromMenu();",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_home, menu);\n /* Make an Language option so the user can change the language of the game*/\n return true;\n }",
"private void menuArmadura(){\n System.out.println(\"Escolha o local em que queira colocar a uma armadura:\");\n System.out.println(\"1 - Cabeça\");\n System.out.println(\"2 - Tronco\");\n System.out.println(\"3 - Pernas\");\n System.out.println(\"4 - Pés\");\n System.out.println(\"0 - Sair\");\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.opciones_principal, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.nav_c, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_notas_activudad, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_lihat_rekam_medis_inap, menu);\n return true;\n }",
"private void afficheMenu() {\n\t\tSystem.out.println(\"------------------------------ Bien venu -----------------------------\");\n\t\tSystem.out.println(\"--------------------------- \"+this.getName()+\" ------------------------\\n\");\n\t\t\n\t\ttry {\n\t\t\tThread.sleep(40);\n\t\t\tSystem.out.println(\"A- Afficher l'état de l'hôtel. \");\n\t\t\tThread.sleep(50);\n\t\t\tSystem.out.println(\"B- Afficher Le nombre de chambres réservées.\");\n\t\t\tThread.sleep(60);\n\t\t\tSystem.out.println(\"C- Afficher Le nombre de chambres libres.\");\n\t\t\tThread.sleep(70);\n\t\t\tSystem.out.println(\"D- Afficher Le numéro de la première chambre vide.\");\n\t\t\tThread.sleep(80);\n\t\t\tSystem.out.println(\"E- Afficher La numéro de la dernière chambre vide.\");\n\t\t\tThread.sleep(90);\n\t\t\tSystem.out.println(\"F- Reserver une chambre.\");\n\t\t\tThread.sleep(100);\n\t\t\tSystem.out.println(\"G- Libérer une chambre.\");\n\t\t\tThread.sleep(100);\n\t\t\tSystem.out.println(\"O- Voire toutes les options possibles?\");\n\t\t\tThread.sleep(100);\n\t\t\tSystem.out.println(\"H- Aide?\");\n\t\t\tThread.sleep(100);\n\t\t\tSystem.out.println(\"-------------------------------------------------------------------------\");\n\t\t}catch(Exception err) {\n\t\t\tSystem.out.println(\"Error d'affichage!\");\n\t\t}\n\t\n\t}",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n \tmenu.findItem(R.id.menu_principla_4).setTitle(\"Notificacion\");\n \treturn true;\n }",
"public static void imprimirMenuAdmin() {\r\n\tSystem.out.println(\"---------------------------menu---------------------------\");\r\n\tSystem.out.println(\"opciones: (ingrese la letra)\");\r\n\tSystem.out.println(\"A: despliega la opción taquilla\");\r\n System.out.println(\"B: despliega la opción informacion cliente\");\r\n\tSystem.out.println(\"C: Salir\");\r\n\tSystem.out.println(\"----------------------------------------------------------\");\r\n }",
"void ajouterMenu(){\r\n\t\t\tJMenuBar menubar = new JMenuBar();\r\n\t \r\n\t JMenu file = new JMenu(\"File\");\r\n\t file.setMnemonic(KeyEvent.VK_F);\r\n\t \r\n\t JMenuItem eMenuItemNew = new JMenuItem(\"Nouvelle Partie\");\r\n\t eMenuItemNew.addActionListener(new ActionListener() {\r\n\t @Override\r\n\t public void actionPerformed(ActionEvent event) {\r\n\t \t\r\n\t \t\t\r\n\t \t\t\r\n\t \tnew NouvellePartie();\r\n\t }\r\n\t });\r\n\t file.add(eMenuItemNew);\r\n\t \r\n\t JMenuItem eMenuItemFermer = new JMenuItem(\"Fermer\");\r\n\t eMenuItemFermer.setMnemonic(KeyEvent.VK_E);\r\n\t eMenuItemFermer.setToolTipText(\"Fermer l'application\");\r\n\t \r\n\t eMenuItemFermer.addActionListener(new ActionListener() {\r\n\t @Override\r\n\t public void actionPerformed(ActionEvent event) {\r\n\t System.exit(0);\r\n\t }\r\n\t });\r\n\r\n\t file.add(eMenuItemFermer);\r\n\r\n\t menubar.add(file);\r\n\t \r\n\t JMenu aide = new JMenu(\"?\");\r\n\t JMenuItem eMenuItemRegle = new JMenuItem(\"Règles\");\r\n\t aide.add(eMenuItemRegle);\r\n\t menubar.add(aide);\r\n\r\n\t final String regles=\"<html><p>Le but est de récupérer les 4 objets Graal puis de retourner au château.</p>\"\t\r\n\t +\"<p>Après avoir récupéré un objet, chaque déplacement vous enlève autant de vie que le poids de l'objet</p></html>\";\r\n\t eMenuItemRegle.addActionListener(new ActionListener() {\r\n\t @Override\r\n\t public void actionPerformed(ActionEvent event) {\r\n\t \t//default title and icon\r\n\t \t\t\tJOptionPane.showMessageDialog(gameFrame,\r\n\t \t\t\t regles,\"Règles du jeu\", JOptionPane.INFORMATION_MESSAGE);\r\n\t \t\t\t\r\n\t }\r\n\t });\r\n\t \t\r\n\t\t\t\r\n\t this.setJMenuBar(menubar);\t\r\n\t\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.wydatki, menu);\n return true;\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) \r\n\t{\n\t\tgetMenuInflater().inflate(R.menu.carrito_compra, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_principal, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.web_formularia, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.details_cliente_menu, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_contatos, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_contatos, menu);\n return true;\n }",
"public FormMenu() {\n initComponents();\n menuController = new MenuController(this);\n menuController.nonAktif();\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_detail_berita, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_spilen5, menu);\n return true;\n }",
"public static void menu() {\n\t\tSystem.out.println(\"Menu:\");\n\t\tSystem.out.println(\"1: Create\");\n\t\tSystem.out.println(\"2: Merge\");\n\t\tSystem.out.println(\"3: Collection\");\n\t\tSystem.out.println(\"4: Upgrades\");\n\t\tSystem.out.println(\"5: Sell\");\n\t\tSystem.out.println(\"6: Identify Crystal\");\n\t\tSystem.out.println(\"\");\n\t}",
"public static void mainMenu() {\r\n\t\tSystem.out.println(\"============= Text-Werkzeuge =============\");\r\n\t\tSystem.out.println(\"Bitte Aktion auswählen:\");\r\n\t\tSystem.out.println(\"1: Text umkehren\");\r\n\t\tSystem.out.println(\"2: Palindrom-Test\");\r\n\t\tSystem.out.println(\"3: Wörter zählen\");\r\n\t\tSystem.out.println(\"4: Caesar-Chiffre\");\r\n\t\tSystem.out.println(\"5: Längstes Wort ermitteln\");\r\n\t\tSystem.out.println(\"0: Programm beenden\");\r\n\t\tSystem.out.println(\"==========================================\");\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.principal, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.principal, menu);\n return true;\n }",
"@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}",
"public static void imprimirMenuCliente() {\r\n\tSystem.out.println(\"---------------------------menu---------------------------\");\r\n\tSystem.out.println(\"opciones: (ingrese la letra)\");\r\n\tSystem.out.println(\"A: despliega la opción comprar entrada\");\r\n System.out.println(\"B: despliega la opción informacion usuario\");\r\n System.out.println(\"C: despliega la opción devolucion entrada\");\r\n System.out.println(\"D: despliega la opción cartelera\");\r\n\tSystem.out.println(\"E: Salir\");\r\n\tSystem.out.println(\"----------------------------------------------------------\");\r\n \r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n menu.findItem(R.id.action_settings).setVisible(false);\n menu.findItem(R.id.action_cambiar_pass).setVisible(false);\n menu.findItem(R.id.action_ayuda).setVisible(false);\n menu.findItem(R.id.action_settings).setVisible(false);\n menu.findItem(R.id.action_cancel).setVisible(false);\n return true;\n }",
"public void returnToMenu()\n\t{\n\t\tchangePanels(menu);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_skale, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_gla_dos_me_p2, menu);\n return true;\n }",
"private void initializeMenu() {\n menu = new Menu(parent.getShell());\n MenuItem item1 = new MenuItem(menu, SWT.NONE);\n item1.setText(Resources.getMessage(\"LatticeView.9\")); //$NON-NLS-1$\n item1.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n model.getClipboard().addToClipboard(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.CLIPBOARD, selectedNode));\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n \n MenuItem item2 = new MenuItem(menu, SWT.NONE);\n item2.setText(Resources.getMessage(\"LatticeView.10\")); //$NON-NLS-1$\n item2.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n controller.actionApplySelectedTransformation();\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.principal, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_btn_bienbao, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n if(names==null ||names==\"\" ){\n menu.findItem(R.id.login).setTitle(\"登入\");\n }\n else{\n menu.findItem(R.id.login).setTitle(\"歡迎\"+names);\n }\n this.menu = menu;\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n if(names==null ||names==\"\" ){\n menu.findItem(R.id.login).setTitle(\"登入\");\n }\n else{\n menu.findItem(R.id.login).setTitle(\"歡迎\"+names);\n }\n this.menu = menu;\n return true;\n }",
"IMenu getMainMenu();",
"protected abstract void addMenuOptions();",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.lausir_timar, menu);\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu_weproov, menu);\n\t\treturn true;\n\t}",
"C getMenu();",
"public int menu() {\n System.out.println(\"MENU PRINCIPAL\\n\"\n + \"1 - CADASTRO DE PRODUTOS\\n\"\n + \"2 - MOVIMENTAÇÃO\\n\"\n + \"3 - REAJUSTE DE PREÇOS\\n\"\n + \"4 - RELATÓRIOS\\n\"\n + \"0 - FINALIZAR\\n\");\n return getEscolhaMenu(); \n }",
"private void searchMenu(){\n\t\t\n\t}",
"@Override\n public boolean onOptionsItemSelected (MenuItem item){\n final Context context=this;\n switch(item.getItemId()){\n\n // Intent intent1 = new Intent(context, visalle.class);\n //startActivity(intent1);\n }\n\n //noinspection SimplifiableIfStatement\n /*if (id == R.id.action_settings) {\n return true;\n }*/\n\n return super.onOptionsItemSelected(item);\n }"
]
| [
"0.7456632",
"0.72127324",
"0.71869016",
"0.7138873",
"0.7102813",
"0.7082007",
"0.70347106",
"0.69902736",
"0.69772583",
"0.69390154",
"0.6932006",
"0.69174784",
"0.6903934",
"0.68738204",
"0.6871913",
"0.6852465",
"0.6822881",
"0.67966455",
"0.67903215",
"0.6785341",
"0.6780954",
"0.67480564",
"0.6743544",
"0.6739797",
"0.6736675",
"0.67273575",
"0.6720447",
"0.6718011",
"0.67170453",
"0.6715028",
"0.6712515",
"0.67083406",
"0.6705468",
"0.670097",
"0.66998565",
"0.66970134",
"0.6693422",
"0.66815203",
"0.6670619",
"0.66670257",
"0.666517",
"0.66639596",
"0.66634387",
"0.6663384",
"0.66571116",
"0.6651781",
"0.6650861",
"0.664783",
"0.6646564",
"0.6642682",
"0.6642682",
"0.66334575",
"0.6633249",
"0.6628693",
"0.66262805",
"0.66228205",
"0.6621483",
"0.6616787",
"0.6616651",
"0.66159916",
"0.6611468",
"0.6602913",
"0.6602136",
"0.6598962",
"0.6596812",
"0.6593312",
"0.6591008",
"0.658972",
"0.65877277",
"0.6587319",
"0.65869576",
"0.65857095",
"0.657875",
"0.65761036",
"0.65761036",
"0.65750307",
"0.6574949",
"0.6570397",
"0.6569231",
"0.6567187",
"0.6560785",
"0.6560785",
"0.655393",
"0.65448135",
"0.65443206",
"0.6543597",
"0.654056",
"0.65394694",
"0.65392506",
"0.6538941",
"0.6536776",
"0.653446",
"0.653446",
"0.65339506",
"0.6531999",
"0.6531994",
"0.6531619",
"0.65305436",
"0.6530181",
"0.65271306",
"0.6523731"
]
| 0.0 | -1 |
Metoda ktora rekalkuluje poziciu pozicie pre toto menu. | @Override
public void recalculatePositions() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void initMenu(){\n\t}",
"private void setMenu() {\n\n if (tree.isEmpty() || !treeGrid.anySelected()) {\n mainMenu.setItems(newMenuItem, new MenuItemSeparator(), settingMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecord() == null) {\n mainMenu.setItems(renameMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem);\n } else if (treeGrid.getSelectedRecords().length > 1) {\n ListGridRecord[] selectedNode = treeGrid.getSelectedRecords();\n if (isSameExtension(selectedNode, Extension.FP)) {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem, exportMenuItem);\n } else if (isSameExtension(selectedNode, Extension.FPS)) {\n mainMenu.setItems(newFPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.BPS)) {\n mainMenu.setItems(newBPItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else if (isSameExtension(selectedNode, Extension.SCSS)) {\n mainMenu.setItems(newSCSItem, deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n } else {\n mainMenu.setItems(deleteMenu, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, progMenuItem);\n }\n } else if (tree.isFolder(treeGrid.getSelectedRecord())) {\n mainMenu.setItems(newMenuItem, deleteMenu, renameMenuItem, copyMenuItem, pasteMenuItem, searchMenuItem, correlationDiagramMenuItem, progMenuItem, downloadMenuItem,\n copyPathMenuItem);\n } else {\n FileTreeNode selectedNode = (FileTreeNode) treeGrid.getSelectedRecord();\n VMResource resource = selectedNode.getResource();\n if (resource instanceof VMDirectory) {\n return;\n }\n Extension extension = ((VMFile) resource).getExtension();\n if (extension == null) {\n mainMenu.setItems(openWithMenuItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n } else\n switch (extension) {\n case ARC:\n mainMenu.setItems(newBPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FM:\n mainMenu.setItems(newFMCItem, newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FMC:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case TC:\n mainMenu.setItems(newTCItem, newFPSItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n case FPS:\n mainMenu.setItems(newFPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case FP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, exportMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BPS:\n mainMenu.setItems(newBPItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case BP:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCSS:\n mainMenu.setItems(newSCSItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n case SCS:\n mainMenu.setItems(newSPQLItem, deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem,\n correlationDiagramMenuItem, copyPathMenuItem);\n break;\n default:\n mainMenu.setItems(deleteMenu, renameMenuItem, historyMenuItem, copyMenuItem, pasteMenuItem, downloadMenuItem, searchMenuItem, correlationDiagramMenuItem,\n copyPathMenuItem);\n break;\n }\n }\n }",
"private static void returnMenu() {\n\t\t\r\n\t}",
"private void createMenu(){\n\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n JMenu Opcje = new JMenu(\"Opcje\");\n mbar.add(Opcje);\n JMenuItem Ustawienia = new JMenuItem(\"Ustawienia\");\n /** Obsluga zdarzen wcisniecia przycisku ustawien w menu */\n Ustawienia.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if(Justawienia==null)\n Justawienia =new JUstawienia();\n Justawienia.setVisible(true);\n if (controller.timer!=null)\n controller.timer.stop();\n }\n });\n Opcje.add(Ustawienia);\n Opcje.addSeparator();\n JMenuItem Info = new JMenuItem(\"Info\");\n /** Obsluga zdarzen wcisniecia przycisku info w menu */\n Info.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n controller.WyswietlInfo();\n }\n });\n Opcje.add(Info);\n }",
"@Override\n\tpublic void setUpMenu() {\n\t\t\n\t}",
"public void setMenu(){\n opciones='.';\n }",
"static void afficherMenu() {\n\t\tSystem.out.println(\"\\n\\n\\n\\t\\tMENU PRINCIPAL\\n\");\n\t\tSystem.out.println(\"\\t1. Additionner deux nombres\\n\");\n\t\tSystem.out.println(\"\\t2. Soustraire deux nombres\\n\");\n\t\tSystem.out.println(\"\\t3. Multiplier deux nombres\\n\");\n\t\tSystem.out.println(\"\\t4. Deviser deux nombres\\n\");\n\t\tSystem.out.println(\"\\t0. Quitter\\n\");\n\t\tSystem.out.print(\"\\tFaites votre choix : \");\n\t}",
"public static void menuInicial() {\n System.out.println(\"Boas vindas à Arena pokemon Treinador!!!\");\n System.out.println(\"Digite 1 para fazer sua inscrição\");\n System.out.println(\"Digite 2 para sair\");\n\n }",
"public void menuListados() {\n\t\tSystem.out.println(\"MENU LISTADOS\");\n\t\tSystem.out.println(\"1. Personas con la misma actividad\");\n\t\tSystem.out.println(\"2. Cantidad de personas con la misma actividad\");\n\t\tSystem.out.println(\"0. Salir\");\n\t}",
"public static void afficherMenu() {\r\n System.out.println(\"\\n## Menu de l'application ##\\n\" +\r\n \" Actions Membres :\\n\"+\r\n \" [ 1] : Inscription d'un Membre\\n\" +\r\n \" [ 2] : Désinscription d'un Membre\\n\" +\r\n \" ( 3) : Afficher liste des Membres\\n\" +\r\n \" [ 4] : Payer Cotisation\\n\" +\r\n \" Actions vote Arbres d'un Membre :\\n\" +\r\n \" ( 5) : Voter pour un Arbre\\n\" +\r\n \" ( 6) : Afficher liste des votes\\n\" +\r\n \" ( 7) : Retirer un vote\\n\" +\r\n \" ( 8) : Supprimer les votes d'un Membre.\\n\" +\r\n \" ( 9) : Remplacer un vote\\n\" +\r\n \" Actions Arbres :\\n\" +\r\n \" (10) : Afficher la liste des Arbres\\n\" +\r\n // ...\r\n \" Actions Administration :\\n\" +\r\n \" (11) : Nommer nouveau Président\\n\" +\r\n // ...\r\n \"\\n ( 0) : Quitter l'application\\n\" +\r\n \" - Veuillez saisir une action. -\");\r\n }",
"private void voltarMenu() {\n\t\tmenu = new TelaMenu();\r\n\t\tmenu.setVisible(true);\r\n\t\tthis.dispose();\r\n\t}",
"public void componentesimplementacionIsmael() {\n\t\t// En el menu bar Ismael\n\t\tmenuIsmael = new JMenu(\"Ismael\");\n\t\tmenuBar.add(menuIsmael);\n\n\t\t// SUBMENU\n\t\tsubMenuRecientes = new JMenu(\"Recientes\");\n\t\titemSubMenuRecientes = new ArrayList<>();\n\t\trutasRecientes = new ArrayList<>();\n\t\ttry {\n\t\t\trutasRecientes = manejadorFichero.obtenerLineasDelFichero();\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\tif (!rutasRecientes.isEmpty()) {\n\t\t\tfor (int i = 0; i < rutasRecientes.size(); i++) {\n\t\t\t\tJMenuItem textoSubmenu = new JMenuItem(rutasRecientes.get(i));\n\t\t\t\titemSubMenuRecientes.add(textoSubmenu);\n\t\t\t\tsubMenuRecientes.add(textoSubmenu);\n\t\t\t}\n\t\t}\n\t\tmenuIsmael.add(subMenuRecientes);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\t// Fuente\n\t\titemFuente = new JMenuItem(\"Fuente\");\n\t\titemFuente.setEnabled(false);\n\t\titemFuente.setMnemonic(KeyEvent.VK_F);\n\t\titemFuente.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemFuente);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\titemSeleccionarTodo = new JMenuItem(\"Selec.Todo\");\n\t\titemSeleccionarTodo.setEnabled(false);\n\t\titemSeleccionarTodo.setMnemonic(KeyEvent.VK_N);\n\t\titemSeleccionarTodo.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemSeleccionarTodo);\n\n\t\titemSeleccionarTodoYCopiar = new JMenuItem(\"Selec All+Copy\");\n\t\titemSeleccionarTodoYCopiar.setEnabled(false);\n\t\titemSeleccionarTodoYCopiar.setMnemonic(KeyEvent.VK_M);\n\t\titemSeleccionarTodoYCopiar.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemSeleccionarTodoYCopiar);\n\n\t\tmenuIsmael.addSeparator();\n\n\t\titemHora = new JMenuItem(\"Hora\");\n\t\titemHora.setEnabled(true);\n\t\titemHora.setMnemonic(KeyEvent.VK_H);\n\t\titemHora.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_H, ActionEvent.CTRL_MASK));\n\t\tmenuIsmael.add(itemHora);\n\n\t}",
"static void mostrarMenu(){\n \t\t\n\t\tout.println();\n\t\tout.println(\"1. Crear lavadora.\");\n\t\tout.println(\"2. Mostrar lavadoras.\");\n\t\tout.println(\"3. Seleccionar lavadora.\");\n\t\tout.println(\"4. Cargar agua.\");\n\t\tout.println(\"5. Cargar ropa.\");\n\t\tout.println(\"6. Cargar detergente.\");\n\t\tout.println(\"7. Especificar tiempo.\");\n\t\tout.println(\"8. Drenar.\");\n\t\tout.println(\"9. Mostrar estado de la lavadora.\");\n\t\tout.println(\"10. Mostrar estado de la ropa.\");\n\t\tout.println(\"11. Pausar o Reanudar lavadora\");\n\t\tout.println(\"12. Probar sistema.\");\n\t\tout.println(\"13. Reiniciar sistema.\");\n\t\tout.println(\"22. Salir\");\n\t\tout.println((SELECTNOW != -1) ? \"!/*!/* Lv seleccionada: \" + SELECTNOW + \" !/*!/*\": \"\");\n\t\tout.println();\n\t}",
"static void listerMenu() {\n System.out.println(\n \"-------------------------------------\\n\" +\n \"Saisir une option :\\n\" +\n \"1 : Liste des hôtes\\n\" +\n \"2 : Liste des logements\\n\" +\n \"3 : Liste des voyageurs\\n\" +\n \"4 : Liste des réservations\\n\" +\n \"5 : Fermer le programme\"\n );\n switch (Menu.choix(5)) {\n case 1:\n GestionHotes.listerHotes();\n break;\n case 2:\n GestionLogements.listerLogements();\n break;\n case 3:\n GestionVoyageurs.listerVoyageurs();\n break;\n case 4:\n GestionReservations.listerReservations();\n break;\n case 5:\n System.exit(0);\n break;\n }\n }",
"public static void imprimirMenuAdmin() {\r\n\tSystem.out.println(\"---------------------------menu---------------------------\");\r\n\tSystem.out.println(\"opciones: (ingrese la letra)\");\r\n\tSystem.out.println(\"A: despliega la opción taquilla\");\r\n System.out.println(\"B: despliega la opción informacion cliente\");\r\n\tSystem.out.println(\"C: Salir\");\r\n\tSystem.out.println(\"----------------------------------------------------------\");\r\n }",
"private JMenu brugerMenuSetup() {\n JMenu brugerMenu = generalMenuSetup(\"Bruger\");\n JMenuItem logUdItem = new JMenuItem(\"Log ud\");\n brugerMenu.add(logUdItem);\n logUdItem.addActionListener(\n e -> System.exit(0)\n );\n JMenuItem minListeItem = new JMenuItem(\"Min liste\");\n brugerMenu.add(minListeItem);\n\n return brugerMenu;\n }",
"public void readTheMenu();",
"public int menu() {\n System.out.println(\"MENU PRINCIPAL\\n\"\n + \"1 - CADASTRO DE PRODUTOS\\n\"\n + \"2 - MOVIMENTAÇÃO\\n\"\n + \"3 - REAJUSTE DE PREÇOS\\n\"\n + \"4 - RELATÓRIOS\\n\"\n + \"0 - FINALIZAR\\n\");\n return getEscolhaMenu(); \n }",
"public static void imprimirMenu() {\r\n\tSystem.out.println(\"---------------------------menu---------------------------\");\r\n\tSystem.out.println(\"opciones: (ingrese como RF#)\");\r\n\tSystem.out.println(\"RF1: iniciar sesion \");\r\n System.out.println(\"RF2: registrarse al sistema\");\r\n\tSystem.out.println(\"RF3: Salir\");\r\n\t\r\n }",
"protected abstract void addMenuOptions();",
"@Override\n\t\tpublic void openMenu() {\n\t\t}",
"static void montaMenu() {\n System.out.println(\"\");\r\n System.out.println(\"1 - Novo cliente\");\r\n System.out.println(\"2 - Lista clientes\");\r\n System.out.println(\"3 - Apagar cliente\");\r\n System.out.println(\"0 - Finalizar\");\r\n System.out.println(\"Digite a opcao desejada: \");\r\n System.out.println(\"\");\r\n }",
"public static void imprimirMenuCliente() {\r\n\tSystem.out.println(\"---------------------------menu---------------------------\");\r\n\tSystem.out.println(\"opciones: (ingrese la letra)\");\r\n\tSystem.out.println(\"A: despliega la opción comprar entrada\");\r\n System.out.println(\"B: despliega la opción informacion usuario\");\r\n System.out.println(\"C: despliega la opción devolucion entrada\");\r\n System.out.println(\"D: despliega la opción cartelera\");\r\n\tSystem.out.println(\"E: Salir\");\r\n\tSystem.out.println(\"----------------------------------------------------------\");\r\n \r\n }",
"public void InitializeMenu(){\n\t\tmnbBar = new JMenuBar();\n\t\tmnuFile = new JMenu(\"File\");\n\t\tmnuFormat = new JMenu(\"Format\");\n\t\tmniOpen = new JMenuItem(\"Open\");\n\t\tmniExit = new JMenuItem(\"Exit\");\n\t\tmniSave = new JMenuItem(\"Save\");\n\t\tmniSaveAs = new JMenuItem(\"Save as\");\n\t\tmniSaveAs.setMnemonic(KeyEvent.VK_A);\n\t\tmniSave.setMnemonic(KeyEvent.VK_S);\n\t\tmniChangeBgColor = new JMenuItem(\"Change Backgroud Color\");\n\t\tmniChangeFontColor = new JMenuItem(\"Change Font Color\");\n\t\t//them menu item vao menu file\n\t\tmnuFile.add(mniOpen);\n\t\tmnuFile.addSeparator();\n\t\tmnuFile.add(mniExit);\n\t\tmnuFile.add(mniSaveAs);\n\t\tmnuFile.add(mniSave);\n\t\t//them menu item vao menu format\n\t\tmnuFormat.add(mniChangeBgColor);\n\t\tmnuFormat.addSeparator();\n\t\tmnuFormat.add(mniChangeFontColor);\n\t\t//them menu file va menu format vao menu bar\n\t\tmnbBar.add(mnuFile);\n\t\tmnbBar.add(mnuFormat);\n\t\t//thiet lap menubar thanh menu chinh cua frame\n\t\tsetJMenuBar(mnbBar);\n\t}",
"public static int menu()\n {\n \n int choix;\n System.out.println(\"MENU PRINCIPAL\");\n System.out.println(\"--------------\");\n System.out.println(\"1. Operation sur les membres\");\n System.out.println(\"2. Operation sur les taches\");\n System.out.println(\"3. Assignation de tache\");\n System.out.println(\"4. Rechercher les taches assigne a un membre\");\n System.out.println(\"5. Rechercher les taches en fonction de leur status\");\n System.out.println(\"6. Afficher la liste des taches assignees\");\n System.out.println(\"7. Sortir\");\n System.out.println(\"--------------\");\n System.out.print(\"votre choix : \");\n choix = Keyboard.getEntier();\n System.out.println();\n return choix;\n }",
"private void menuArmadura(){\n System.out.println(\"Escolha o local em que queira colocar a uma armadura:\");\n System.out.println(\"1 - Cabeça\");\n System.out.println(\"2 - Tronco\");\n System.out.println(\"3 - Pernas\");\n System.out.println(\"4 - Pés\");\n System.out.println(\"0 - Sair\");\n }",
"public static void f_menu(){\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n System.out.println(\"_/_/_/_/_/_/softvectorwhith/_/_/_/_/_/_/\");\n System.out.println(\"/_/_/_/version 1.0 2020-oct-29_/_/_/_/_/\");\n System.out.println(\"/_/maked by Andres Felipe Torres Lopez_/\");\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n }",
"protected abstract List<OpcionMenu> inicializarOpcionesMenu();",
"public void startMenu() {\n setTitle(\"Nier Protomata\");\n setSize(ICoord.LAST_COL + ICoord.ADD_SIZE,\n ICoord.LAST_ROW + ICoord.ADD_SIZE);\n \n setButton();\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu){\r\n getMenuInflater().inflate(R.menu.menu, menu); //Recibe como parametro el menu donde se situan las acciones\r\n return true; //Para que la barra sea visible\r\n }",
"@Override\r\n public void actionPerformed(ActionEvent e) {\n Menu_Produtos m2= new Menu_Produtos();\r\n \r\n }",
"public abstract Menu mo2158c();",
"public void volvreAlMenu() {\r\n\t\t// Muestra el menu y no permiye que se cambie el tamaņo\r\n\t\tMenu.frame.setVisible(true);\r\n\t\tMenu.frame.setResizable(false);\r\n\t\t// Oculta la ventana del flappyBird\r\n\t\tjframe.setVisible(false);\r\n\t}",
"@Override\r\n\tpublic void createMenu(Menu menu) {\n\r\n\t}",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n \tmenu.findItem(R.id.menu_principla_4).setTitle(\"Notificacion\");\n \treturn true;\n }",
"@Override\r\n\tpublic void menu() {\n\t\tSystem.out.println(\"go to menu\");\r\n\t\t\r\n\t}",
"public void menu() {\n\t\tstate.menu();\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.menu_principal, menu);\n \t//Fin del menu\n \treturn true;\n }",
"private static int menu() {\n\t\tint opcion;\n\t\topcion = Leer.pedirEntero(\"1:Crear 4 Almacenes y 15 muebeles\" + \"\\n2: Mostrar los muebles\"\n\t\t\t\t+ \"\\n3: Mostrar los almacenes\" + \"\\n4: Mostrar muebles y su almacen\" + \"\\n0: Finalizar\");\n\t\treturn opcion;\n\t}",
"void ajouterMenu(){\r\n\t\t\tJMenuBar menubar = new JMenuBar();\r\n\t \r\n\t JMenu file = new JMenu(\"File\");\r\n\t file.setMnemonic(KeyEvent.VK_F);\r\n\t \r\n\t JMenuItem eMenuItemNew = new JMenuItem(\"Nouvelle Partie\");\r\n\t eMenuItemNew.addActionListener(new ActionListener() {\r\n\t @Override\r\n\t public void actionPerformed(ActionEvent event) {\r\n\t \t\r\n\t \t\t\r\n\t \t\t\r\n\t \tnew NouvellePartie();\r\n\t }\r\n\t });\r\n\t file.add(eMenuItemNew);\r\n\t \r\n\t JMenuItem eMenuItemFermer = new JMenuItem(\"Fermer\");\r\n\t eMenuItemFermer.setMnemonic(KeyEvent.VK_E);\r\n\t eMenuItemFermer.setToolTipText(\"Fermer l'application\");\r\n\t \r\n\t eMenuItemFermer.addActionListener(new ActionListener() {\r\n\t @Override\r\n\t public void actionPerformed(ActionEvent event) {\r\n\t System.exit(0);\r\n\t }\r\n\t });\r\n\r\n\t file.add(eMenuItemFermer);\r\n\r\n\t menubar.add(file);\r\n\t \r\n\t JMenu aide = new JMenu(\"?\");\r\n\t JMenuItem eMenuItemRegle = new JMenuItem(\"Règles\");\r\n\t aide.add(eMenuItemRegle);\r\n\t menubar.add(aide);\r\n\r\n\t final String regles=\"<html><p>Le but est de récupérer les 4 objets Graal puis de retourner au château.</p>\"\t\r\n\t +\"<p>Après avoir récupéré un objet, chaque déplacement vous enlève autant de vie que le poids de l'objet</p></html>\";\r\n\t eMenuItemRegle.addActionListener(new ActionListener() {\r\n\t @Override\r\n\t public void actionPerformed(ActionEvent event) {\r\n\t \t//default title and icon\r\n\t \t\t\tJOptionPane.showMessageDialog(gameFrame,\r\n\t \t\t\t regles,\"Règles du jeu\", JOptionPane.INFORMATION_MESSAGE);\r\n\t \t\t\t\r\n\t }\r\n\t });\r\n\t \t\r\n\t\t\t\r\n\t this.setJMenuBar(menubar);\t\r\n\t\t}",
"private void makePOSMenu() {\r\n\t\tJMenu POSMnu = new JMenu(\"Punto de Venta\");\r\n\t\tboolean isAccesible = false;\r\n\r\n\t\tif (StoreCore.getAccess(\"Cotizaciones\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Cotizaciones\", \r\n\t\t\t\t\timageLoader.getImage(\"quote.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 't',\r\n\t\t\t\t\t\"Ver el listado de cotizaciones\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F4, 0), Quote.class);\r\n\t\t\tPOSMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Compra\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Compras\", \r\n\t\t\t\t\timageLoader.getImage(\"purchase.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'c',\r\n\t\t\t\t\t\"Ver el listado de facturas\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F5, 0), Purchase.class);\r\n\r\n\t\t\tPOSMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (StoreCore.getAccess(\"Facturacion\")) {\r\n\t\t\tisAccesible = true;\r\n\t\t\tJMenuItem menuItem = new JMenuItem(\"Facturacion\", \r\n\t\t\t\t\timageLoader.getImage(\"invoice.png\"));\r\n\t\t\tsetMenuItemSpecialFeatures(menuItem, 'f',\r\n\t\t\t\t\t\"Ver el listado de facturas\", KeyStroke.getKeyStroke(\r\n\t\t\t\t\t\t\tKeyEvent.VK_F6, 0), Invoice.class);\r\n\r\n\t\t\tPOSMnu.add(menuItem);\r\n\t\t}\r\n\t\tif (isAccesible) {\r\n\t\t\tPOSMnu.setMnemonic('p');\r\n\t\t\tadd(POSMnu);\r\n\t\t}\r\n\t}",
"private void initializeMenu() {\n menu = new Menu(parent.getShell());\n MenuItem item1 = new MenuItem(menu, SWT.NONE);\n item1.setText(Resources.getMessage(\"LatticeView.9\")); //$NON-NLS-1$\n item1.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n model.getClipboard().addToClipboard(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.CLIPBOARD, selectedNode));\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n \n MenuItem item2 = new MenuItem(menu, SWT.NONE);\n item2.setText(Resources.getMessage(\"LatticeView.10\")); //$NON-NLS-1$\n item2.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n controller.actionApplySelectedTransformation();\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n }",
"@Override\n public boolean onPrepareOptionsMenu (Menu menu) {\n \n return super.onPrepareOptionsMenu (menu);\n \n }",
"public MenuTamu() {\n initComponents();\n \n }",
"void Menu();",
"public static void menu() {\n\t\tSystem.out.println(\"Menu:\");\n\t\tSystem.out.println(\"1: Create\");\n\t\tSystem.out.println(\"2: Merge\");\n\t\tSystem.out.println(\"3: Collection\");\n\t\tSystem.out.println(\"4: Upgrades\");\n\t\tSystem.out.println(\"5: Sell\");\n\t\tSystem.out.println(\"6: Identify Crystal\");\n\t\tSystem.out.println(\"\");\n\t}",
"public void generateMenu(){\n menuBar = new JMenuBar();\n\n JMenu file = new JMenu(\"Datei\");\n JMenu tools = new JMenu(\"Werkzeuge\");\n JMenu help = new JMenu(\"Hilfe\");\n\n JMenuItem open = new JMenuItem(\"Öffnen \");\n JMenuItem save = new JMenuItem(\"Speichern \");\n JMenuItem exit = new JMenuItem(\"Beenden \");\n JMenuItem preferences = new JMenuItem(\"Einstellungen \");\n JMenuItem about = new JMenuItem(\"Über das Projekt \");\n\n\n file.add(open);\n file.add(save);\n file.addSeparator();\n file.add(exit);\n tools.add(preferences);\n help.add(about);\n\n menuBar.add(file);\n menuBar.add(tools);\n menuBar.add(help);\n }",
"private static void showMenu() {\n System.out.println(\"1. Dodaj zadanie\");\n System.out.println(\"2. Wykonaj zadanie.\");\n System.out.println(\"3. Zamknij program\");\n }",
"private void afficheMenu() {\n\t\tSystem.out.println(\"------------------------------ Bien venu -----------------------------\");\n\t\tSystem.out.println(\"--------------------------- \"+this.getName()+\" ------------------------\\n\");\n\t\t\n\t\ttry {\n\t\t\tThread.sleep(40);\n\t\t\tSystem.out.println(\"A- Afficher l'état de l'hôtel. \");\n\t\t\tThread.sleep(50);\n\t\t\tSystem.out.println(\"B- Afficher Le nombre de chambres réservées.\");\n\t\t\tThread.sleep(60);\n\t\t\tSystem.out.println(\"C- Afficher Le nombre de chambres libres.\");\n\t\t\tThread.sleep(70);\n\t\t\tSystem.out.println(\"D- Afficher Le numéro de la première chambre vide.\");\n\t\t\tThread.sleep(80);\n\t\t\tSystem.out.println(\"E- Afficher La numéro de la dernière chambre vide.\");\n\t\t\tThread.sleep(90);\n\t\t\tSystem.out.println(\"F- Reserver une chambre.\");\n\t\t\tThread.sleep(100);\n\t\t\tSystem.out.println(\"G- Libérer une chambre.\");\n\t\t\tThread.sleep(100);\n\t\t\tSystem.out.println(\"O- Voire toutes les options possibles?\");\n\t\t\tThread.sleep(100);\n\t\t\tSystem.out.println(\"H- Aide?\");\n\t\t\tThread.sleep(100);\n\t\t\tSystem.out.println(\"-------------------------------------------------------------------------\");\n\t\t}catch(Exception err) {\n\t\t\tSystem.out.println(\"Error d'affichage!\");\n\t\t}\n\t\n\t}",
"public static void menuPrincicipal() {\n\t\tSystem.out.println(\"+---------------------------+\");\n\t\tSystem.out.println(\"| Elige una opcion |\");\n\t\tSystem.out.println(\"+---------------------------+\");\n\t\tSystem.out.println(\"| 1-Modificar Orden |\");\n\t\tSystem.out.println(\"+---------------------------+\");\n\t\tSystem.out.println(\"| 2-Eliminar orden |\");\n\t\tSystem.out.println(\"+---------------------------+\");\n\t\tSystem.out.println(\"| 3-Ver todas las ordenes |\");\n\t\tSystem.out.println(\"+---------------------------+\");\n\t\tSystem.out.println(\"| 0-Salir |\");\n\t\tSystem.out.println(\"+---------------------------+\");\n\t}",
"public void menu(){\n super.goToMenuScreen();\n }",
"public void barraprincipal(){\n setJMenuBar(barra);\n //Menu archivo\n archivo.add(\"Salir del Programa\").addActionListener(this);\n barra.add(archivo);\n //Menu tareas\n tareas.add(\"Registros Diarios\").addActionListener(this);\n tareas.addSeparator();\n tareas.add(\"Ver Catalogo de Cuentas\").addActionListener(this);\n tareas.addSeparator();\n tareas.add(\"Empleados\").addActionListener(this);\n tareas.addSeparator();\n tareas.add(\"Productos\").addActionListener(this);\n tareas.addSeparator();\n tareas.add(\"Generacion de Estados Financieros\").addActionListener(this);\n barra.add(tareas);\n //Menu Ayuda\n ayuda.add(\"Acerca de...\").addActionListener(this);\n ayuda.addSeparator();\n barra.add(ayuda);\n //Para ventana interna\n acciones.addItem(\"Registros Diarios\");\n acciones.addItem(\"Ver Catalogo de Cuentas\");\n acciones.addItem(\"Empleados\");\n acciones.addItem(\"Productos\");\n acciones.addItem(\"Generacion de Estados Financieros\");\n aceptar.addActionListener(this);\n salir.addActionListener(this);\n }",
"public void visKontingenthaandteringMenu ()\r\n {\r\n System.out.println(\"Du har valgt kontingent.\");\r\n System.out.println(\"Hvad oensker du at foretage dig?\");\r\n System.out.println(\"1: Se priser\");\r\n System.out.println(\"2: Se medlemmer i restance\");\r\n System.out.println(\"0: Afslut\");\r\n\r\n }",
"@Override\n public void menuSelected(MenuEvent e) {\n \n }",
"public static void mainMenu() {\r\n\t\tSystem.out.println(\"============= Text-Werkzeuge =============\");\r\n\t\tSystem.out.println(\"Bitte Aktion auswählen:\");\r\n\t\tSystem.out.println(\"1: Text umkehren\");\r\n\t\tSystem.out.println(\"2: Palindrom-Test\");\r\n\t\tSystem.out.println(\"3: Wörter zählen\");\r\n\t\tSystem.out.println(\"4: Caesar-Chiffre\");\r\n\t\tSystem.out.println(\"5: Längstes Wort ermitteln\");\r\n\t\tSystem.out.println(\"0: Programm beenden\");\r\n\t\tSystem.out.println(\"==========================================\");\r\n\t}",
"private void mainMenu() {\n System.out.println(\"Canteen Management System\");\n System.out.println(\"-----------------------\");\n System.out.println(\"1. Show Menu\");\n System.out.println(\"2.AcceptReject\");\n System.out.println(\"3.place orders\");\n System.out.println(\"4.show orders\");\n System.out.println(\"5. Exit\");\n mainMenuDetails();\n }",
"C getMenu();",
"public static void f_menu() {\n System.out.println(\"----------------------------------------\");\n System.out.println(\"--------------DIGITALSOFT---------------\");\n System.out.println(\"-----version:1.0------28/04/2020.-------\");\n System.out.println(\"-----Angel Manuel Correa Rivera---------\");\n System.out.println(\"----------------------------------------\");\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.ficha_contenedor, menu);\n return super.onCreateOptionsMenu(menu);\n }",
"public abstract void displayMenu();",
"void omoguciIzmenu() {\n this.setEnabled(true);\n }",
"@Override\r\n\tpublic void cargarSubMenuPersona() {\n\t\t\r\n\t}",
"private static void mostrarMenu() {\n\t\tSystem.out.println(\"------------------------------\");\n\t\tSystem.out.println(\"-----------OPCIONES-----------\");\n\t\tSystem.out.println(\"------------------------------\");\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"\\n\\t1) Mostrar los procesos\");\n\t\tSystem.out.println(\"\\n\\t2) Parar un proceso\");\n\t\tSystem.out.println(\"\\n\\t3) Arrancar un proceso\");\n\t\tSystem.out.println(\"\\n\\t4) A�adir un proceso\");\n\t\tSystem.out.println(\"\\n\\t5) Terminar ejecucion\");\n\t\tSystem.out.println(\"\\n------------------------------\");\n\t}",
"public static void proManagerUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the Project Manager's Information\");\n System.out.println(\"2 - Would you like to search for a Project Manager's information\");\n System.out.println(\"3 - Adding a new Project Manager's details\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }",
"public void menu() {\n m.add(\"Go adventuring!!\", this::goAdventuring );\n m.add(\"Display information about your character\", this::displayCharacter );\n m.add(\"Visit shop\", this::goShopping);\n m.add (\"Exit game...\", this::exitGame);\n }",
"public void setUpEditMenu() {\n add(editMenu);\n\n //editMenu.add(cutItem);\n //editMenu.add(copyItem);\n //editMenu.add(pasteItem);\n //editMenu.addSeparator();\n clearAllItems.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n world.deleteAllEntities();\n }\n });\n editMenu.add(clearAllItems);\n editMenu.addSeparator();\n JMenuItem loadVectors = new JMenuItem(\"Load stimulus vectors...\");\n loadVectors.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n SFileChooser chooser = new SFileChooser(\".\", \"Load vectors\");\n File theFile = chooser.showOpenDialog();\n if (theFile != null) {\n double[][] vecs = Utils.getDoubleMatrix(theFile);\n world.loadStimulusVectors(vecs);\n }\n }\n });\n editMenu.add(loadVectors);\n\n }",
"private void searchMenu(){\n\t\t\n\t}",
"private static void menuno(int menuno2) {\n\t\t\r\n\t}",
"public Menu() {\r\n \r\n ingresaVehiculo (); \r\n }",
"public static void readMenu(){\n\t\tSystem.out.println(\"Menu....\");\n\t\tSystem.out.println(\"=====================\");\n\t\tSystem.out.println(\"1. Book A Ticket\\t2. See Settings\\n3. Withdraw\\t4. Deposit\");\n\n\t}",
"static void menuPrincipal() {\n System.out.println(\n \"\\nPizzaria o Rato que Ri:\" + '\\n' +\n \"1 - Novo pedido\" + '\\n' +\n \"2 - Mostrar pedidos\" + '\\n' +\n \"3 - Alterar estado do pedido\" + '\\n' +\n \"9 - Sair\"\n );\n }",
"public Edit_Menu(MainPanel mp) {\r\n mainPanel = mp;\r\n setText(\"Засах\");\r\n// Uitem.setEnabled(false);//TODO : nemsen\r\n Ritem.setEnabled(false);//TODO : nemsen\r\n add(Uitem);\r\n add(Ritem);\r\n }",
"private void mainMenu() {\r\n System.out.println(\"Canteen Management System\");\r\n System.out.println(\"-----------------------\");\r\n System.out.println(\"1. Show Menu\");\r\n System.out.println(\"2. Employee Login\");\r\n System.out.println(\"3. Vendor Login\");\r\n System.out.println(\"4. Exit\");\r\n mainMenuDetails();\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_juego_principal, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main,menu);\n super.onCreateOptionsMenu(menu);\n\n menu.add(1, SALIR, 0, R.string.menu_salir);\n return true;\n }",
"private void setUpMenu() {\n resideMenu = new ResideMenu(this);\n\n resideMenu.setBackground(R.drawable.menu_background);\n resideMenu.attachToActivity(this);\n resideMenu.setMenuListener(menuListener);\n resideMenu.setScaleValue(0.6f);\n\n // create menu items;\n itemHome = new ResideMenuItem(this, R.drawable.icon_profile, \"Home\");\n itemSerre = new ResideMenuItem(this, R.drawable.serre, \"GreenHouse\");\n itemControl = new ResideMenuItem(this, R.drawable.ctrl, \"Control\");\n itemTable = new ResideMenuItem(this, R.drawable.database, \"Parametre\");\n\n // itemProfile = new ResideMenuItem(this, R.drawable.user, \"Profile\");\n // itemSettings = new ResideMenuItem(this, R.drawable.stat_n, \"Statistique\");\n itemPicture = new ResideMenuItem(this, R.drawable.cam, \"Picture\");\n itemLog = new ResideMenuItem(this, R.drawable.log, \"Log file \");\n\n itemLogout = new ResideMenuItem(this, R.drawable.logout, \"Logout\");\n\n\n\n itemHome.setOnClickListener(this);\n itemSerre.setOnClickListener(this);\n itemControl.setOnClickListener(this);\n itemTable.setOnClickListener(this);\n\n// itemProfile.setOnClickListener(this);\n // itemSettings.setOnClickListener(this);\n itemLogout.setOnClickListener(this);\n itemPicture.setOnClickListener(this);\n itemLog.setOnClickListener(this);\n\n\n resideMenu.addMenuItem(itemHome, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemSerre, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemControl, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemTable, ResideMenu.DIRECTION_LEFT);\n resideMenu.addMenuItem(itemLog, ResideMenu.DIRECTION_LEFT);\n\n\n // resideMenu.addMenuItem(itemProfile, ResideMenu.DIRECTION_RIGHT);\n // resideMenu.addMenuItem(itemSettings, ResideMenu.DIRECTION_RIGHT);\n resideMenu.addMenuItem(itemPicture, ResideMenu.DIRECTION_RIGHT);\n\n resideMenu.addMenuItem(itemLogout, ResideMenu.DIRECTION_RIGHT);\n\n // You can disable a direction by setting ->\n // resideMenu.setSwipeDirectionDisable(ResideMenu.DIRECTION_RIGHT);\n\n findViewById(R.id.title_bar_left_menu).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n resideMenu.openMenu(ResideMenu.DIRECTION_LEFT);\n }\n });\n findViewById(R.id.title_bar_right_menu).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n resideMenu.openMenu(ResideMenu.DIRECTION_RIGHT);\n }\n });\n }",
"public MenuCriarArranhaCeus() {\n initComponents();\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_principal, menu);//Menu Resource, Menu\n return true;\n }",
"IMenu getMainMenu();",
"@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n\treturn super.onPrepareOptionsMenu(menu);\n\n }",
"private void displayMenu() {\n System.out.println(\"\\nSelect from:\");\n System.out.println(\"\\t1 -> add item to to-do list\");\n System.out.println(\"\\t2 -> remove item from to-do list\");\n System.out.println(\"\\t3 -> view to-do list\");\n System.out.println(\"\\t4 -> save work room to file\");\n System.out.println(\"\\t5 -> load work room from file\");\n System.out.println(\"\\t6 -> quit\");\n }",
"public void returnToMenu()\n\t{\n\t\tchangePanels(menu);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_uz, menu);\n return true;\n }",
"public Menu createToolsMenu();",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.inicio, menu);\r\n return true;\r\n }",
"public FormMenu() {\n initComponents();\n menuController = new MenuController(this);\n menuController.nonAktif();\n }",
"private void setearPermisosMenu()\r\n\t{\r\n\t\t/*Permisos del usuario para los mantenimientos*/\r\n\t\tthis.setearOpcionesMenuMantenimientos();\r\n\t\tthis.setearOpcionesMenuFacturacion();\r\n\t\tthis.setearOpcionesMenuCobros();\r\n\t\tthis.setearOpcionesMenuProcesos();\r\n\t\tthis.setearOpcionesReportes();\r\n\t\tthis.setearOpcionesMenuAdministracion();\r\n\t}",
"public void setMenu() {\n\t \n\t\ttop = new JPanel(new FlowLayout(FlowLayout.LEFT));\n\t add(top, BorderLayout.CENTER);\n\t \n\t lPro = new JLabel(\"Projects: \");\n\t top.add(lPro);\n\t \n\t cPro = new JComboBox();\n\t getProject();\n\t\ttop.add(cPro);\n\t\t\n\t\tview = new JButton(\"View Sample\");\n\t\ttop.add(view);\n\t\t\n\t\tbottom = new JPanel(new FlowLayout(FlowLayout.CENTER));\n\t\tadd(bottom, BorderLayout.SOUTH);\n\t\t\n\t\tcancel = new JButton(\"Cancel\");\n\t\tbottom.add(cancel);\n\t\t\n\t\tdownload = new JButton(\"Download\");\n\t\tbottom.add(download);\n\t\t\n\t\tsetActionListener();\t\n\t}",
"private void menuSetup()\n {\n menuChoices = new String []\n {\n \"Add a new product\",\n \"Remove a product\",\n \"Rename a product\",\n \"Print all products\",\n \"Deliver a product\",\n \"Sell a product\",\n \"Search for a product\",\n \"Find low-stock products\",\n \"Restock low-stock products\",\n \"Quit the program\" \n };\n }",
"private void createMenus() {\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\t\r\n\t\tJMenu fileMenu = new LJMenu(\"file\", flp);\r\n\t\tmenuBar.add(fileMenu);\r\n\t\t\r\n\t\tfileMenu.add(new JMenuItem(createBlankDocument));\r\n\t\tfileMenu.add(new JMenuItem(openDocumentAction));\r\n\t\tfileMenu.add(new JMenuItem(saveDocumentAction));\r\n\t\tfileMenu.add(new JMenuItem(saveDocumentAsAction));\r\n\t\tfileMenu.add(new JMenuItem(closeCurrentTabAction));\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(new JMenuItem(getStatsAction));\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(new JMenuItem(exitAction));\r\n\t\t\r\n\t\tJMenu editMenu = new LJMenu(\"edit\", flp);\r\n\t\tmenuBar.add(editMenu);\r\n\t\t\r\n\t\teditMenu.add(new JMenuItem(copyAction));\r\n\t\teditMenu.add(new JMenuItem(pasteAction));\r\n\t\teditMenu.add(new JMenuItem(cutAction));\r\n\t\t\r\n\t\tJMenu langMenu = new LJMenu(\"lang\", flp);\r\n\t\tJMenuItem hr = new LJMenuItem(\"cro\", flp);\r\n\t\thr.addActionListener((l) -> { \r\n\t\t\tLocalizationProvider.getInstance().setLanguage(\"hr\");\r\n\t\t\tcurrentLang = \"hr\";\r\n\t\t});\r\n\t\t\r\n\t\tlangMenu.add(hr);\r\n\t\tJMenuItem en = new LJMenuItem(\"eng\", flp);\r\n\t\ten.addActionListener((l) -> { \r\n\t\t\t LocalizationProvider.getInstance().setLanguage(\"en\");\r\n\t\t\t currentLang = \"en\";\r\n\t\t});\r\n\t\tlangMenu.add(en);\r\n\t\tJMenuItem de = new LJMenuItem(\"de\", flp);\r\n\t\tde.addActionListener((l) -> { \r\n\t\t\t LocalizationProvider.getInstance().setLanguage(\"de\");\r\n\t\t\t currentLang = \"de\";\r\n\t\t});\r\n\t\tlangMenu.add(de);\r\n\t\tmenuBar.add(langMenu);\r\n\t\t\r\n\t\tJMenu toolsMenu = new LJMenu(\"tools\", flp);\r\n\t\tJMenuItem toUp = new JMenuItem(toUpperCaseAction);\r\n\t\ttoolsMenu.add(toUp);\r\n\t\ttoggable.add(toUp);\r\n\t\ttoUp.setEnabled(false);\r\n\t\tJMenuItem toLow = new JMenuItem(toLowerCaseAction);\r\n\t\ttoolsMenu.add(toLow);\r\n\t\ttoggable.add(toLow);\r\n\t\ttoLow.setEnabled(false);\r\n\t\tJMenuItem inv = new JMenuItem(invertSelected);\r\n\t\ttoolsMenu.add(inv);\r\n\t\ttoggable.add(inv);\r\n\t\tinv.setEnabled(false);\r\n\t\tmenuBar.add(toolsMenu);\r\n\t\t\r\n\t\tJMenu sort = new LJMenu(\"sort\", flp);\r\n\t\tJMenuItem sortAsc = new JMenuItem(sortAscAction);\r\n\t\tsort.add(sortAsc);\r\n\t\ttoggable.add(sortAsc);\r\n\t\tJMenuItem sortDesc = new JMenuItem(sortDescAction);\r\n\t\tsort.add(sortDesc);\r\n\t\ttoggable.add(sortDesc);\r\n\t\tJMenuItem uniq = new JMenuItem(uniqueLinesAction);\r\n\t\ttoolsMenu.add(uniq);\r\n\t\ttoggable.add(uniq);\r\n\t\t\r\n\t\ttoolsMenu.add(sort);\r\n\t\tsetJMenuBar(menuBar);\r\n\r\n\t}",
"private void displayMenu() {\r\n\t\tif (this.user instanceof Administrator) {\r\n\t\t\tnew AdminMenu(this.database, (Administrator) this.user);\r\n\t\t} else {\r\n\t\t\tnew BorrowerMenu(this.database);\r\n\t\t}\r\n\t}",
"private void menu() { \r\n\t\tSystem.out.println(\" ---------WHAT WOULD YOU LIKE TO DO?---------\");\r\n\t\tSystem.out.println(\"1) Move\");\r\n\t\tSystem.out.println(\"2) Save\");\r\n\t\tSystem.out.println(\"3) Quit\");\r\n\t\t\r\n\t}",
"@Override\r\n public void actionPerformed(ActionEvent e) {\n Menu_Contabilidade m3= new Menu_Contabilidade();\r\n \r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.principal, menu);\n\n\n return true;\n }",
"@Override\n\tpublic void showmenu() {\n\t\t\n\t\tint choice;\n \n System.out.println(\"请选择1.查询 2.退出\");\n choice=console.nextInt();\n \n switch (choice){\n \n case 1:\n Menu.searchMenu();\n break;\n default:\n \tSystem.out.println(\"感谢您使用本系统 欢迎下次使用!\");\n System.exit(0);\n }\n \n \n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.opciones_principal, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actividad_principal, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.halaman_utama, menu);\n return true;\n }",
"private static void submenu() {\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }",
"public String chooseMenu() {\n String input = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"menu_id\");\n setName(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"name\"));\n setType(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"type\"));\n setMenu_id(Integer.parseInt(input));\n return \"EditMenu\";\n\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_paylasim, menu);\n return true;\n }"
]
| [
"0.75936353",
"0.7559283",
"0.7526947",
"0.7480014",
"0.7447159",
"0.73745537",
"0.7372323",
"0.7300552",
"0.72424895",
"0.7190559",
"0.71621346",
"0.7160184",
"0.71489114",
"0.71360236",
"0.7124428",
"0.7101894",
"0.7054499",
"0.7054406",
"0.704105",
"0.69693553",
"0.69608676",
"0.6952926",
"0.6933109",
"0.6928817",
"0.6928594",
"0.6923931",
"0.6909658",
"0.69086576",
"0.6907369",
"0.6886371",
"0.6885461",
"0.6884025",
"0.6882194",
"0.6881403",
"0.68807423",
"0.6867646",
"0.6862035",
"0.6860594",
"0.6852884",
"0.6845476",
"0.6842576",
"0.68422663",
"0.68388313",
"0.6826055",
"0.68244106",
"0.6823023",
"0.68193144",
"0.68023217",
"0.6793387",
"0.6787775",
"0.6784707",
"0.6780256",
"0.6779049",
"0.6773848",
"0.67668116",
"0.6760142",
"0.6758452",
"0.6751814",
"0.6750158",
"0.67452884",
"0.6736897",
"0.6732296",
"0.6728284",
"0.67281693",
"0.6727834",
"0.6722823",
"0.67211264",
"0.67061883",
"0.670596",
"0.66967106",
"0.669641",
"0.6689689",
"0.6686882",
"0.6683614",
"0.6682252",
"0.66805446",
"0.6679676",
"0.6676166",
"0.6675483",
"0.66742426",
"0.6672913",
"0.66680557",
"0.66676563",
"0.66657645",
"0.6663853",
"0.6663174",
"0.6663004",
"0.66598314",
"0.66587687",
"0.6657955",
"0.66569847",
"0.665216",
"0.66472906",
"0.66421556",
"0.6639839",
"0.66370815",
"0.663629",
"0.6632102",
"0.6626734",
"0.6621985",
"0.66211075"
]
| 0.0 | -1 |
Metoda ktora spracovava vstup. Pri stlaceni ESC ukoncujeme menu. Pri stlaceni UP alebo DOWN menime oznacenie, ENTER potvrdzuje a vykona akciu nad predmetom. | @Override
public void inputHandling() {
if (input.clickedKeys.contains(InputHandle.DefinedKey.ESCAPE.getKeyCode())
|| input.clickedKeys.contains(InputHandle.DefinedKey.RIGHT.getKeyCode())) {
if (sourceMenu != null) {
exit();
sourceMenu.activate();
return;
}
}
if (input.clickedKeys.contains(InputHandle.DefinedKey.UP.getKeyCode())) {
if (selection > 0) {
selection--;
}
}
if (input.clickedKeys.contains(InputHandle.DefinedKey.DOWN.getKeyCode())) {
if (selection < choices.size() - 1) {
selection++;
}
}
if (input.clickedKeys.contains(InputHandle.DefinedKey.ENTER.getKeyCode())) {
if (choices.size() > 0) {
use();
}
exit();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void keyDown() {\n\n driver.switchTo().activeElement().sendKeys(Keys.ARROW_DOWN);\n driver.switchTo().activeElement().sendKeys( Keys.ENTER);\n\n\n }",
"public void keyPressed(KeyEvent e) {\n if (e.getKeyCode() == 27) { \n subTotalFrame.setVisible(false); \n Menu menu = new Menu(); \n menu.launchFrame(); \n } \n }",
"private void pressUpFromCLI() {\n\t\tupLastPressed = true;\n\t\tif (commandIterator.hasNext()) {\n\t\t\ttextInput.setText(commandIterator.next());\n\t\t}\n\t\tif (downLastPressed) {\n\t\t\ttextInput.setText(commandIterator.next());\n\t\t\tdownLastPressed = false;\n\t\t}\n\t}",
"public static void menuInicial() {\n System.out.println(\"Boas vindas à Arena pokemon Treinador!!!\");\n System.out.println(\"Digite 1 para fazer sua inscrição\");\n System.out.println(\"Digite 2 para sair\");\n\n }",
"private void menuOptionOne(){\n SimulatorFacade.printTransactions();\n pressAnyKey();\n }",
"private void formKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_formKeyPressed\n \n //Llama a la función escalable\n vKeyPreEsc(evt);\n \n }",
"@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\tif(keyDown!=e.getKeyCode()-65&&e.getKeyCode()-65>=0&&e.getKeyCode()-65<=25) {\n\t\t\tif(keyDown>-1) {\n\t\t\t\tk1.pressed(keyDown, false);\n\t\t\t\tk2.pressed(-1, false);\n\t\t\t}\n\t\t\tk1.pressed(e.getKeyCode()-65, true);\n\t\t\t\n\t\t\tint n = machine.run(e.getKeyCode()-65);\n\t\t\tk2.pressed(n, true);\n\t\t\tkeyDown = e.getKeyCode()-65;\n\t\t}\n\t\telse if(e.getKeyCode() == KeyEvent.VK_SPACE) {\n\t\t\tmachine.space();\n\t\t}\n\t\telse if(e.getKeyCode() == KeyEvent.VK_BACK_SPACE) {\n\t\t\tmachine.back();\n\t\t}\n\t\telse if(e.getKeyCode() == KeyEvent.VK_ENTER) {\n\t\t\tmachine.enter();\n\t\t}\n\t\t\n\t}",
"@Override\n public void keyPressed(KeyEvent e) {\n if(getGameState().equals(GameState.SELECCION)){\n\n if (menu.getCurrentOption().equals(menu.getOptions().get(0))) {\n\n if (e.getKeyCode() == KeyEvent.VK_ENTER) {\n setGameState(GameState.GAME_STATE);\n }\n\n if (e.getKeyCode() == KeyEvent.VK_DOWN) {\n menu.setCurrentOption(\"QUIT\");\n } else if (e.getKeyCode() == KeyEvent.VK_UP) {\n menu.setCurrentOption(\"QUIT\");\n }\n } else if (menu.getCurrentOption().equals(menu.getOptions().get(1))) {\n if(e.getKeyCode() == KeyEvent.VK_ENTER) {\n this.frame.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));\n }\n\n if (e.getKeyCode() == KeyEvent.VK_DOWN) {\n menu.setCurrentOption(\"Game ON\");\n } else if (e.getKeyCode() == KeyEvent.VK_UP) {\n menu.setCurrentOption(\"Game ON\");\n }\n }\n } else if (getGameState().equals(GameState.GAME_STATE)) {\n\n // Checking if the player PAUSED the game (with P key)\n if(e.getKeyCode() == KeyEvent.VK_P) {\n setGameState(GameState.PAUSED);\n }\n\n // We are going to setMoving for the first time only if the player moves to UP, DOWN or RIGHT\n if (!snake.isMoving()) {\n if (e.getKeyCode() == KeyEvent.VK_UP || e.getKeyCode() == KeyEvent.VK_DOWN\n || e.getKeyCode() == KeyEvent.VK_RIGHT) {\n snake.setMoving(true);\n }\n }\n\n if (e.getKeyCode() == KeyEvent.VK_UP) {\n if (snake.getyDir() != 1) {\n snake.setyDir(-1);\n snake.setxDir(0);\n }\n }\n\n if (e.getKeyCode() == KeyEvent.VK_DOWN) {\n if (snake.getyDir() != -1) {\n snake.setyDir(1);\n snake.setxDir(0);\n }\n }\n\n if (e.getKeyCode() == KeyEvent.VK_LEFT) {\n if (snake.getxDir() != 1) {\n snake.setxDir(-1);\n snake.setyDir(0);\n }\n }\n\n if (e.getKeyCode() == KeyEvent.VK_RIGHT) {\n if (snake.getxDir() != -1) {\n snake.setxDir(1);\n snake.setyDir(0);\n }\n }\n } else if (getGameState().equals(GameState.PAUSED)) {\n if(e.getKeyCode() == KeyEvent.VK_ENTER) {\n setGameState(GameState.GAME_STATE);\n }\n\n } else if (getGameState().equals(GameState.GAME_OVER)) {\n if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {\n this.frame.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));\n }\n }\n }",
"@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\tint keyCode = e.getKeyCode();\n\t\tif(keyCode == KeyEvent.VK_SPACE) { \n\t up();\n\t goDown = false;\n\t }\n\t repaint();\n\t}",
"@Override\r\n\tpublic void keyPressed(KeyEvent e)\r\n\t{\n\t\tif (e.getKeyCode() == KeyEvent.VK_ESCAPE)\r\n\t\t{\r\n\t\t\tvolvreAlMenu();\r\n\t\t\ttry {\r\n\t\t\t\t// Para la musica de fondo + la musica al morir\r\n\t\t\t\trepro.Stop();\r\n\t\t\t\tdeath.Stop();\r\n\t\t\t} catch (Exception e1) {\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Cuando se presiona control + alt, sumara 10 puntos al score\r\n\t\tif (e.isControlDown() && e.getKeyCode() == KeyEvent.VK_ALT) {\r\n\t\t\t// Si es un cheratr, no guardara la puntuacion en el documento\r\n\t\t\tcheater=true;\r\n\t\t\tscore += 10; \r\n\t\t}\r\n\t\t\r\n\t\t// Cuando se presione control + c, agrandara el espacio entre columnas\r\n\t\tif (e.isControlDown() && e.getKeyCode() == KeyEvent.VK_C) {\r\n\t\t\tif (space <= 1000) {\r\n\t\t\t\tspace += 100;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"private void menu() { \r\n\t\tSystem.out.println(\" ---------WHAT WOULD YOU LIKE TO DO?---------\");\r\n\t\tSystem.out.println(\"1) Move\");\r\n\t\tSystem.out.println(\"2) Save\");\r\n\t\tSystem.out.println(\"3) Quit\");\r\n\t\t\r\n\t}",
"@Override\r\n\t\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\tswitch(e.getKeyCode()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase KeyEvent.VK_UP:\r\n\t\t\t\t\t\tcontrol.up = true;\r\n\t\t\t\t\t\t//juego.moverBombermanUP();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tcase KeyEvent.VK_DOWN:\t\r\n\t\t\t\t\t\tcontrol.down = true;\r\n//\t\t\t\t\t\tjuego.moverBombermanDOWN();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tcase KeyEvent.VK_RIGHT:\t\r\n\t\t\t\t\t\tcontrol.der = true;\r\n//\t\t\t\t\t\tjuego.moverBombermanRIGHT();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tcase KeyEvent.VK_LEFT:\t\r\n\t\t\t\t\t\tcontrol.izq = true;\r\n//\t\t\t\t\t\tjuego.moverBombermanLEFT();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\r\n\t\t\t\t\tcase KeyEvent.VK_SPACE:\r\n\t\t\t\t\t\tjuego.ponerBomba();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\t}",
"public static void imprimirMenu() {\r\n\tSystem.out.println(\"---------------------------menu---------------------------\");\r\n\tSystem.out.println(\"opciones: (ingrese como RF#)\");\r\n\tSystem.out.println(\"RF1: iniciar sesion \");\r\n System.out.println(\"RF2: registrarse al sistema\");\r\n\tSystem.out.println(\"RF3: Salir\");\r\n\t\r\n }",
"public void keyPressed(KeyEvent e)\r\n {\r\n if (e.getKeyCode() == KeyEvent.VK_SPACE)\r\n {\r\n onMenu = true;\r\n init();\r\n }\r\n\r\n if (e.getKeyCode() == KeyEvent.VK_UP)\r\n {\r\n if (delay > 0)\r\n delay--;\r\n }\r\n\r\n if (e.getKeyCode() == KeyEvent.VK_DOWN)\r\n {\r\n delay++;\r\n }\r\n\r\n if (e.getKeyCode() == KeyEvent.VK_P)\r\n {\r\n if (paused)\r\n {\r\n paused = false;\r\n }\r\n else\r\n {\r\n paused = true;\r\n repaint();\r\n }\r\n }\r\n if (e.getKeyCode() == KeyEvent.VK_R)\r\n {\r\n repaint();\r\n }\r\n }",
"@Override\n public void triggerKeyPress(KeyEvent e) {\n if (e.getKeyCode() == KeyEvent.VK_DOWN) {\n menuSelection++;\n } else if (e.getKeyCode() == KeyEvent.VK_UP) {\n menuSelection--;\n if (menuSelection < 0) {\n menuSelection = menuLengths[menuState] - 1;\n }\n } else if (e.getKeyCode() == KeyEvent.VK_ENTER) {\n handleEnterPress();\n }\n\n menuSelection %= menuLengths[menuState];\n\n }",
"private void jED1KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jED1KeyPressed\n \n /*Función escalable para cuando se presiona una tecla en el módulo*/\n vKeyPreEsc(evt);\n \n }",
"private void escActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_escActionPerformed\n back();\n dispose();\n }",
"@Override\n public void keyUp(KeyEvent e){\n super.keyUp(e);\n// if(e.getKeyCode() == KeyEvent.VK_S)\n// spawnControl.spawnNow();\n// if(e.getKeyCode() == KeyEvent.VK_D)\n// player.sleep();\n// if(e.getKeyCode() == KeyEvent.VK_E)\n// player.invincibility();\n// if(e.getKeyCode() == KeyEvent.VK_F)\n// player.fast();\n }",
"public void keyReleased(KeyEvent e) {\r\n\t\tif(e.getKeyCode() == KeyEvent.VK_ENTER)\r\n\t\t\tverBtn.doClick();\r\n\t\tif(e.getKeyCode() == KeyEvent.VK_ESCAPE)\r\n\t\t\tcancelarBtn.doClick();\r\n\t}",
"private void jTAMsjKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTAMsjKeyPressed\n\n /*Si la tecla presiona fue enter entonces presiona el botón de enviar*/ \n if(evt.getKeyCode() == KeyEvent.VK_ENTER) \n jBEnvi.doClick();\n /*Else llama a la función escalable*/\n else \n vKeyPreEsc(evt);\n \n }",
"public void keyPressed(KeyEvent e)\n {\n // tecla O que mueve la nave Guardian hacia la izquierda\n if (e.getKeyCode() == KeyEvent.VK_O) {\n moverIzquierda = true;\n }\n // tecla P que mueve la nave Guardian hacia la derecha\n if (e.getKeyCode() == KeyEvent.VK_P) {\n moverDerecha = true;\n }\n // tecla Espacio dispara\n if (e.getKeyCode() == KeyEvent.VK_SPACE) {\n disparar = true;\n }\n }",
"@Override\n public void keyPressed(KeyEvent e) {\n if(State == STATE.MENU){\n if(e.getKeyCode() == KeyEvent.VK_ENTER)State = STATE.GAME;\n if(e.getKeyCode() == KeyEvent.VK_ESCAPE) System.exit(0); \n }\n if(State == STATE.GAMEOVER){\n if(e.getKeyCode() == KeyEvent.VK_ESCAPE) System.exit(0); \n }\n if(e.getKeyCode() == KeyEvent.VK_RIGHT) pacMan.right = true;\n if(e.getKeyCode() == KeyEvent.VK_LEFT) pacMan.left = true;\n if (e.getKeyCode() == KeyEvent.VK_UP) pacMan.up = true;\n if (e.getKeyCode() == KeyEvent.VK_DOWN) pacMan.down = true;\n }",
"@Override\n\tpublic void keyPressed(KeyEvent e) \n\t{\n\t\tint key = e.getKeyCode();\n\t\tif(key == e.VK_SPACE)\n\t\t{\n\t\t\thome = false;\n\t\t\tinstruction = false;\n\t\t}\n\t\tif(key == e.VK_R)\n\t\t{\n\t\t\thome = true;\n\t\t}\n\t\tif(key == e.VK_Z)\n\t\t{\n\t\t\thome = false;\n\t\t}\n\t\tif(key == e.VK_B)\n\t\t{\n\t\t\thome = true;\n\t\t}\n\t}",
"public void setKeyDown() {\r\n keys[KeyEvent.VK_P] = false;\r\n }",
"default public void clickUp() {\n\t\tremoteControlAction(RemoteControlKeyword.UP);\n\t}",
"@Override\n public void keyPressed(KeyEvent e) {\n if (gra.getWatekStatus() != null && gra.getPlansza().getBloczek() != null) {\n switch (e.getKeyCode()) {\n case KeyEvent.VK_LEFT:\n if (gra.getPlansza().czyMoznaPrzesunacBloczek(-1)) {\n gra.getPlansza().getBloczek().setJ(gra.getPlansza().getBloczek().getJ() - 1);\n }\n break;\n case KeyEvent.VK_RIGHT:\n if (gra.getPlansza().czyMoznaPrzesunacBloczek(1)) {\n gra.getPlansza().getBloczek().setJ(gra.getPlansza().getBloczek().getJ() + 1);\n }\n break;\n case KeyEvent.VK_DOWN:\n gra.getTimerGry().stop();\n if (gra.getPlansza().czyMoznaOpuscicBloczek()) {\n Bloczek bloczek = gra.getPlansza().getBloczek();\n bloczek.setI(bloczek.getI() + 1);\n }\n else {\n gra.getPlansza().przeniesBloczekDoPlanszy();\n gra.getPlansza().losujBloczek();\n }\n gra.getTimerGry().start();\n break;\n case KeyEvent.VK_SPACE:\n gra.getTimerGry().stop();\n while (gra.getPlansza().czyMoznaOpuscicBloczek()) {\n Bloczek bloczek = gra.getPlansza().getBloczek();\n bloczek.setI(bloczek.getI() + 1);\n }\n gra.getPlansza().przeniesBloczekDoPlanszy();\n gra.getPlansza().losujBloczek();\n gra.getTimerGry().restart();\n break;\n case KeyEvent.VK_UP:\n if (gra.getPlansza().czyMoznaObrocicKlocek()) {\n gra.getPlansza().obrocKlocek();\n }\n break;\n }\n }\n }",
"@Override\n public boolean keyDown(int keyCode) {\n if (keyCode == Input.Keys.BACK) {\n\n screenControl.setnScreen(1);\n }\n return super.keyDown(keyCode);\n }",
"@Override\n\tpublic void keyReleased(KeyEvent e) {\n\t\tif(e.getKeyCode()-65>=0&&e.getKeyCode()-65<=25) {\n\t\t\tk1.pressed(e.getKeyCode()-65, false);\n\t\t\tk2.pressed(-1, false);\n\t\t\tif(keyDown==e.getKeyCode()-65) {\n\t\t\t\tkeyDown = -1;\n\t\t\t}\n\t\t}\n\t}",
"private static void panelKeyPressAction(KeyEvent event) {\n \n if (event.getKeyCode() == KeyEvent.VK_UP || event.getKeyCode() == KeyEvent.VK_DOWN) {\n String userCommand = \"\";\n if (event.getKeyCode() == KeyEvent.VK_UP) {\n userCommandCount++;\n if (userCommandCount > mMainLogic.getOldUserCommandSize()) {\n userCommandCount--;\n }\n userCommand = mMainLogic.getOldUserCommand(userCommandCount);\n } else {\n userCommandCount--;\n if (userCommandCount < 0) {\n userCommandCount = 0;\n } else {\n userCommand = mMainLogic.getOldUserCommand(userCommandCount);\n }\n }\n input.requestFocus();\n input.setText(userCommand);\n input.setCaretPosition(userCommand.length());\n }\n \n if (event.getKeyCode() == KeyEvent.VK_PAGE_DOWN) {\n \tuserScrollCount++;\n \tif (userScrollCount + AppConst.UI_CONST.MAX_NUMBER_ROWS > mTableRowCount) {\n \t\tuserScrollCount--;\n \t}\n \t\n \ttable.scrollRectToVisible(new Rectangle(0, \n \t\t\t\t\t\t\t\t\t\t\tuserScrollCount * table.getRowHeight(), \n \t\t\t\t\t\t\t\t\t\t\ttable.getWidth(), \n \t\t\t\t\t\t\t\t\t\t\tAppConst.UI_CONST.MAX_NUMBER_ROWS * table.getRowHeight()));\n \t\n }\n if (event.getKeyCode() == KeyEvent.VK_PAGE_UP) {\n \t\n \tuserScrollCount--;\n \tif (userScrollCount < 0) {\n \t\tuserScrollCount++;\n \t}\n \t\n \ttable.scrollRectToVisible(new Rectangle(0, \n \t\t\t\t\t\t\t\t\t\t\tuserScrollCount * table.getRowHeight(), \n \t\t\t\t\t\t\t\t\t\t\ttable.getWidth(), \n \t\t\t\t\t\t\t\t\t\t\tAppConst.UI_CONST.MAX_NUMBER_ROWS * table.getRowHeight()));\n }\n }",
"private void chkKeyPressed(KeyEvent e) {\r\n if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {\r\n cerrarVentana(false);\r\n } else if (UtilityPtoVenta.verificaVK_F11(e)) {\r\n aceptaCantidadIngresada(\"VK_F11\");\r\n //DVELIZ\r\n //cerrarVentana(true);\r\n \r\n \r\n } else if (UtilityPtoVenta.verificaVK_F12(e)) {\r\n if (vIndTieneSug) {\r\n aceptaCantidadIngresada(\"VK_F12\");\r\n //DVELIZ\r\n //cerrarVentana(true);\r\n }\r\n }\r\n }",
"public void keyPressed(KeyEvent e){\n\t\t if((e.getKeyCode() == KeyEvent.VK_W) || (e.getKeyCode() == KeyEvent.VK_UP)){ \n\t\t \tSystem.out.println(\"Cima\\n\");\n\t\t \tjogo.movePecaCima();\n\t\t } \n\t\t \n\t\t if((e.getKeyCode() == KeyEvent.VK_S) || (e.getKeyCode() == KeyEvent.VK_DOWN)){ \n\t\t \tSystem.out.println(\"Baixo\\n\");\n\t\t \tjogo.movePecaBaixo();\n\t\t }\n\t\t if((e.getKeyCode() == KeyEvent.VK_A) || (e.getKeyCode() == KeyEvent.VK_LEFT)){ \n\t\t \tSystem.out.println(\"Esquerda\\n\");\n\t\t \tjogo.movePecaEsquerda();\n\t\t }\n\t\t \n\t\t if((e.getKeyCode() == KeyEvent.VK_D) || (e.getKeyCode() == KeyEvent.VK_RIGHT)){ \n\t\t \tSystem.out.println(\"Direita\\n\");\n\t\t \tjogo.movePecaDireita();\n\t\t }\n\t\t if(e.getKeyCode() == KeyEvent.VK_INSERT) {\n\t\t \tjogo.trapaca();\n\t\t }\n\t\t \n\t\t atualizaJogo();\n\t\t verificaJogo();\n\t\t }",
"@Override\n public void onDirectUpKeyPress() {\n \n }",
"@Override\n public void onDirectUpKeyPress() {\n \n }",
"public void keyPressed(KeyEvent e) {\n\t\t\t\t\n\t\t int captura = e.getKeyCode();\n\t\t\n\t\t if (captura == 84) {\n\t\t \ttranslacao = true;\n\t\t \trotacao = false;\n\t\t \tescala = false;\n\t\t \tprimeiraVez = true;\n\t\t } else if (captura == 82) {\n\t\t \traio = 1;\n\t\t \trotacao = true;\n\t\t \ttranslacao = false;\n\t\t \tescala = false;\n\t\t \tprimeiraVez = true;\n\t\t } else if (captura == 83) {\n\t\t \tsx = 1;\n\t\t \tsy = 1;\n\t\t \tescala = true;\n\t\t \ttranslacao = false;\n\t\t \trotacao = false;\n\t\t \tprimeiraVez = true;\n\t\t }\n\t\t \n\t\t if(translacao) {\n\t\t\t switch(captura) {\n\t\t\t case 40: // move para baixo\n\t\t\t mudaY(pontos, 40, g);\n\t\t\t break;\n\t\t\t case 38: // move para cima\n\t\t\t \tmudaY(pontos, 38, g);\n\t\t\t break;\n\t\t\t case 37: // move para esquerda\n\t\t\t \tmudaX(pontos, 37, g);\n\t\t\t break;\n\t\t\t case 39: // move para direita\n\t\t\t \tmudaX(pontos, 39, g);\n\t\t\t break;\n\t\t\t }\n\t\t\t repaint();\n\t\t\t \n\t\t } else if (rotacao) {\n\t\t \tif(primeiraVez) {\n\t\t \t\tfor(int i = 0; i < auxPontos.length; i++ ) {\n\t\t \t\t\tauxPontos[i] = pontos[i];\n\t\t \t\t}\n\t\t \t\t\n\t\t \t\tprimeiraVez = false;\n\t\t \t}\n\t\t \tswitch(captura) {\n\t\t\t case 37: // move para esquerda\n\t\t\t \trotacao(pontos, 37, g);\n\t\t\t break;\n\t\t\t case 39: // move para direita\n\t\t\t \trotacao(pontos, 39, g);\n\t\t\t break;\n\t\t\t }\n\t\t\t repaint();\n\t\t \t\n\t\t } else if (escala) {\n\t\t \tif(primeiraVez) {\n\t\t \t\tfor(int i = 0; i < auxPontos.length; i++ ) {\n\t\t \t\t\tauxPontos[i] = pontos[i];\n\t\t \t\t}\n\t\t \t\t\n\t\t \t\tprimeiraVez = false;\n\t\t \t}\n\t\t \tswitch(captura) {\n\t\t\t case 40: // move para baixo\n\t\t\t \tescala(pontos, 40, g);\n\t\t\t break;\n\t\t\t case 38: // move para cima\n\t\t\t \tescala(pontos, 38, g);\n\t\t\t break;\n\t\t\t }\n\t\t\t repaint();\n\t\t }\n\t\t\t}",
"public void downPressed() {\n System.out.println(\"downPressed()\");\n current.translate(1, 0);\n display.showBlocks();\n }",
"public void keyPressed(KeyEvent e) {\n int key = e.getKeyCode();\n\n if (key == KeyEvent.VK_M) {\n getStateMachine().change(\"game\");\n }\n\n if (key == KeyEvent.VK_ESCAPE) {\n getStateMachine().change(\"menu\");\n }\n }",
"private void chkKeyPressed(KeyEvent e) {\n\t\tif (venta.reference.UtilityPtoVenta.verificaVK_F11(e)) {\n\t\t\tif (datosValidados())\n\t\t\t\tif (componentes.gs.componentes.JConfirmDialog.rptaConfirmDialog(this,\n\t\t\t\t\t\t\"Esta seguro que desea afectar la página?\")) {\n\t\t\t\t\tVariablesInventario.vNumPag = cmbPagina.getSelectedItem()\n\t\t\t\t\t\t\t.toString().trim();\n\t\t\t\t\tcerrarVentana(true);\n\t\t\t\t}\n\t\t} else if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {\n\t\t\tcerrarVentana(false);\n\t\t}\n\t}",
"private void chkKeyPressed(KeyEvent e) {\n \n if (e.getKeyCode() == KeyEvent.VK_ESCAPE) \n { \n FarmaVariables.vAceptar = true;\n this.setVisible(false);\n this.dispose();\n e.consume();\n //cerrarVentana(true); \n } \n \n else if (venta.reference.UtilityPtoVenta.verificaVK_F11(e)) \n {\n if (datosValidados()) {\n try {\n ingresarCantidad();\n FarmaUtility.aceptarTransaccion();\n cerrarVentana(false);\n } catch (SQLException sql) {\n FarmaUtility.liberarTransaccion();\n log.error(\"\",sql);\n FarmaUtility.showMessage(this, \n \"Ocurrió un error al registrar la cantidad : \\n\" +\n sql.getMessage(), txtCruce);\n cerrarVentana(false);\n }\n }\n }\n }",
"private void printMenu()\n {\n System.out.println(\"\");\n System.out.println(\"*** Salg ***\");\n System.out.println(\"(0) Tilbage\");\n System.out.println(\"(1) Opret\");\n System.out.println(\"(2) Find\");\n System.out.println(\"(3) Slet\");\n System.out.print(\"Valg: \");\n }",
"public static void f_menu() {\n System.out.println(\"----------------------------------------\");\n System.out.println(\"--------------DIGITALSOFT---------------\");\n System.out.println(\"-----version:1.0------28/04/2020.-------\");\n System.out.println(\"-----Angel Manuel Correa Rivera---------\");\n System.out.println(\"----------------------------------------\");\n }",
"public void keyReleased(KeyEvent e) {\n if (e.getKeyCode() == 0) {\n return;\n }\n\n // Check accelerator of actions.\n if (checkActionAccelerators(e)) {\n return;\n }\n\n switch (e.getKeyCode()) {\n case KeyEvent.VK_ACCEPT:\n case KeyEvent.VK_ENTER:\n gui.openSelected();\n break;\n }\n }",
"private static boolean backToMenu() {\n boolean exit = false;\n System.out.println(\"Return to Main Menu? Type Yes / No\");\n Scanner sc2 = new Scanner(System.in);\n if (sc2.next().equalsIgnoreCase(\"no\"))\n exit = true;\n return exit;\n }",
"@Override\n public void keyPressed(KeyEvent e) {\n int code = e.getKeyCode();\n\n if (code == KeyEvent.VK_DOWN) {\n this.revButtonKeyPressed(e);\n }\n if (code == KeyEvent.VK_UP) {\n this.fwdButtonKeyPressed(e);\n }\n if (code == KeyEvent.VK_LEFT) {\n this.leftButtonKeyPressed(e);\n }\n if (code == KeyEvent.VK_RIGHT) {\n this.rightButtonKeyPressed(e);\n }\n if (code == KeyEvent.VK_A) {\n this.leftServoButtonKeyPressed(e);\n }\n if (code == KeyEvent.VK_D) {\n this.rightServoButtonKeyPressed(e);\n }\n if (code == KeyEvent.VK_S) {\n debuggerFrame.setVisible(true); \n }\n }",
"private void codigoProductoTBKeyPressed(java.awt.event.KeyEvent evt) {\n }",
"@Override\r\n\tpublic void keyPressed(KeyEvent e) {\n\t\tactivarBoton();\r\n\t}",
"public int getKeyMenu() {\r\n return getKeyEscape();\r\n }",
"@Override\r\n\tpublic void keyReleased(final KeyEvent keyEvent) {\n\t\tint key = keyEvent.getKeyCode();\r\n\t\tif (key == KeyEvent.VK_Z)\r\n\t\t\tup = false;\r\n\t\tif (key == KeyEvent.VK_D) {\r\n\t\t\tright = false;\r\n\t\t\torderSprint = \"0000\";//if D is released then the sprint is over\r\n\t\t}\r\n\t\tif (key == KeyEvent.VK_S)\r\n\t\t\tdown = false;\r\n\t\tif (key == KeyEvent.VK_Q) {\r\n\t\t\tleft = false;\r\n\t\t\torderSprint = \"0000\"; //if Q is released then the sprint is over\r\n\t\t}\r\n\t\tif (key == KeyEvent.VK_SPACE)\r\n\t\t\torderJump = \"0000\";\r\n\t\tif (key == KeyEvent.VK_B)\r\n\t\t\torderFire = \"0000\";\r\n\t}",
"public boolean takeControl() {\r\n\t\tif(Button.ESCAPE.isDown())\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"public Menu_Principal() {\n this.setExtendedState(Frame.MAXIMIZED_BOTH);\n initComponents();\n KeyStroke escapeKeyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);\n Action escapeAction = new AbstractAction() {\n @Override\n public void actionPerformed(ActionEvent e) {\n fechar();\n }\n };\n getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(escapeKeyStroke, \"ESCAPE\");\n getRootPane().getActionMap().put(\"ESCAPE\", escapeAction); \n alteraIcone();\n AplicaNimbusLookAndFeel.pegaNimbus();\n Color minhaCor = new Color(204,255,204);\n this.getContentPane().setBackground(minhaCor);\n labelFundo.setDropTarget(null);\n }",
"public void keyPressed(int key) {\n\t\tif(key==GameSystem.DOWN){\n\t\t\tif(dSelected==DEATH.RESTART){\n\t\t\t\tdSelected=DEATH.BACKTOMENU;\n\t\t\t}\n\t\t}\n\t\telse if(key==GameSystem.UP){\n\t\t\tif(dSelected==DEATH.BACKTOMENU){\n\t\t\t\tdSelected=DEATH.RESTART;\n\t\t\t}\t\n\t\t}\n\t\telse if(key==GameSystem.CONFIRM){\n\t\t\tif(dSelected==DEATH.BACKTOMENU){\n\t\t\t\tGameSystem.TWO_PLAYER_MODE=false;\n\t\t\t\tGameSystem.PLAYER_ONE_CHOSEN=false;\n\t\t\t\tMenu.backToMenu();\n\t\t\t}\n\t\t\telse if(dSelected==DEATH.RESTART){\n\t\t\t\tMenu.toGameMode();\n\t\t\t}\n\t\t}\n\t}",
"@Override\r\n\tpublic void keyReleased(KeyEvent e) {\n\t\tactivarBoton();\r\n\t}",
"@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tsuper.keyPressed(e);\n\t\t\t\tif (e.getKeyCode() == e.VK_UP) {\n\n\t\t\t\t\tjp.zc.up = true;\n\t\t\t\t}\n\t\t\t\tif (e.getKeyCode() == e.VK_DOWN) {\n\t\t\t\t\tjp.zc.down = true;\n\t\t\t\t}\n\t\t\t\tif (e.getKeyCode() == e.VK_LEFT) {\n\t\t\t\t\tjp.zc.left = true;\n\t\t\t\t}\n\t\t\t\tif (e.getKeyCode() == e.VK_RIGHT) {\n\t\t\t\t\tjp.zc.right = true;\n\t\t\t\t}\n\n\t\t\t\tif (e.getKeyCode() == e.VK_W) {\n\n\t\t\t\t\tjp.gyj.up = true;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif (e.getKeyCode() == e.VK_S) {\n\t\t\t\t\tjp.gyj.down = true;\n\t\t\t\t}\n\t\t\t\tif (e.getKeyCode() == e.VK_A) {\n\t\t\t\t\tjp.gyj.left = true;\n\t\t\t\t}\n\t\t\t\tif (e.getKeyCode() == e.VK_D) {\n\t\t\t\t\tjp.gyj.right = true;\n\t\t\t\t}\n\n\t\t\t\tif (e.getKeyCode() == e.VK_NUMPAD1) {\n\t\t\t\t\tif(jp.zc.att==false)\n\t\t\t\t\t{\n\t\t\t\t\tjp.zc.att=true;\n\t\t\t\t\tjp.zc.presstime+=1;\n\t\t\t\t\tjp.zc.xuli();\n\t\t\t\t\t}\n\t\t\t\t \n\n\t\t\t\t}\n\t\t\t\tif (e.getKeyCode() == e.VK_J) {\n\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(jp.gyj.att==false)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\tjp.gyj.att=true;\n\t\t\t\t\t\tjp.gyj.presstime+=1;\n\t\t\t\t\t\tjp.gyj.xuli();\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 \n\t\t\t\t\t \n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (e.getKeyCode() == e.VK_K) {\n\t\t\t\t\t\n\t\t\t\t\tif(jp.gyj.xuli==false)\n\t\t\t\t\t{\n\t\t\t\t\tjp.gyj.status=AStatus.DEFENT;\t\t\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(e.getKeyCode()==e.VK_U)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tJineng jn=jp.gyj.jns.get(0);\n\t\t\t\t\tif(jn.jnstatus==JNstatus.USEABLE)\n\t\t\t\t\t{\n\t\t\t\t\tjn.usejineng(jp.gyj);\n\t\t\t\t\tjn.jinengtime=10;\n\t\t\t\t\tjn.jnstatus=JNstatus.USEING;\t\t\t\t\n\t\t\t\t\tThread jn1yundong =new Thread(()->{\n\t\t\t\t\t\twhile(jn.jnstatus==JNstatus.USEING)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tjn.yundong();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tThread.sleep(40);\n\t\t\t\t\t\t} catch (InterruptedException 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\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\t\n\t\t\t\t\tjn1yundong.start();\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\tif(e.getKeyCode()==e.VK_NUMPAD4)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tJineng jn=jp.zc.jns.get(0);\n\t\t\t\t\tif(jn.jnstatus==JNstatus.USEABLE)\n\t\t\t\t\t{\n\t\t\t\t\tjn.usejineng(jp.zc);\n\t\t\t\t\tjn.jinengtime=10;\n\t\t\t\t\tjn.jnstatus=JNstatus.USEING;\t\t\t\t\n\t\t\t\t\tThread jn1yundong =new Thread(()->{\n\t\t\t\t\t\twhile(jn.jnstatus==JNstatus.USEING)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tjn.yundong();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tThread.sleep(40);\n\t\t\t\t\t\t} catch (InterruptedException 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\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\t\n\t\t\t\t\tjn1yundong.start();\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\tif (e.getKeyCode() == e.VK_NUMPAD2) {\n\t\t\t\t\tif(jp.zc.xuli==false)\n\t\t\t\t\t{\n\t\t\t\t\tjp.zc.status=AStatus.DEFENT;\t\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\n\t\t\t}",
"private static void showMenu() {\n System.out.println(\"1. Dodaj zadanie\");\n System.out.println(\"2. Wykonaj zadanie.\");\n System.out.println(\"3. Zamknij program\");\n }",
"@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, vt.get(2));\r\n\t\t\t}",
"@Override\n\tpublic void showmenu() {\n\t\t\n\t\tint choice;\n \n System.out.println(\"请选择1.查询 2.退出\");\n choice=console.nextInt();\n \n switch (choice){\n \n case 1:\n Menu.searchMenu();\n break;\n default:\n \tSystem.out.println(\"感谢您使用本系统 欢迎下次使用!\");\n System.exit(0);\n }\n \n \n\t}",
"@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, vt.get(1));\r\n\t\t\t}",
"public void keyTraversed(TraverseEvent e) {\n \t\t\t\tif (e.detail == SWT.TRAVERSE_ESCAPE\n \t\t\t\t\t|| e.detail == SWT.TRAVERSE_RETURN) {\n \t\t\t\t\te.doit = false;\n \t\t\t\t}\n \t\t\t}",
"public boolean onKeyUp(int keyCode, KeyEvent event)\n {\n if (keyCode == KeyEvent.KEYCODE_MENU)\n {\n mostrarDialogoOpciones();\n return true;\n }\n\n return super.onKeyUp(keyCode, event);\n }",
"@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, vt.get(4));\r\n\t\t\t}",
"private void chkKeyPressed(KeyEvent e) {\n\t\tif (venta.reference.UtilityPtoVenta.verificaVK_F11(e)) {\n\t\t\tif(tblListaDetallePedido.getRowCount() > 0)\n {\n if(!validaChecksTable())\n {\n FarmaUtility.showMessage(this,\"No es posible realizar la operación. Existen productos sin selección de lotes.\",tblListaDetallePedido);\n return;\n }\n if(componentes.gs.componentes.JConfirmDialog.rptaConfirmDialog(this,\"Está seguro de generar el pedido institucional?\"))\n cerrarVentana(true);\n }\n\t\t} else if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {\n\t\t\tcerrarVentana(false);\n\t\t}\n }",
"public static void f_menu(){\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n System.out.println(\"_/_/_/_/_/_/softvectorwhith/_/_/_/_/_/_/\");\n System.out.println(\"/_/_/_/version 1.0 2020-oct-29_/_/_/_/_/\");\n System.out.println(\"/_/maked by Andres Felipe Torres Lopez_/\");\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n }",
"@Override\n public boolean keyUp(int arg0) {\n return false;\n }",
"@Override\r\n public void keyReleased(KeyEvent e) {\n keys[e.getKeyCode()] = false;\r\n // if(e.getKeyCode()==KeyEvent.VK_SPACE)\r\n // System.out.println(\"libero\");\r\n }",
"public void ReturnToMenu() throws Exception {\n menu.ReturnToMenu(btnMenu, menu.getGuiType());\n }",
"@Override\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\t\t\t\tSystem.out.println(\"ta soltando o brouuu a tecla\");\n\t\t\t}",
"private void bidMenu() {\r\n String command;\r\n input = new Scanner(System.in);\r\n\r\n command = input.next();\r\n\r\n if (command.equals(\"N\")) {\r\n System.out.println(\"You are now returning to the main menu\");\r\n }\r\n if (command.equals(\"Y\")) {\r\n setBid();\r\n }\r\n }",
"public void interactWithKeyboard() {\n renderMenu();\n Interaction interact = null;\n // open from the menu\n boolean wait = true;\n while (wait) {\n if (!StdDraw.hasNextKeyTyped()) {\n continue;\n }\n String c = (\"\" + StdDraw.nextKeyTyped()).toUpperCase();\n System.out.println(c);\n switch (c) {\n case \"N\":\n // get the seed\n renderTypeString();\n long seed = getSeed();\n TETile[][] WorldFrame = null;\n WorldFrame = WorldGenerator.generate(seed, WorldFrame, WIDTH, HEIGHT);\n interact = new Interaction(WorldFrame, seed);\n wait = false;\n break;\n case \"L\":\n interact = loadInteraction();\n wait = false;\n break;\n case \"Q\":\n System.exit(0);\n break;\n default:\n System.exit(0);\n break;\n }\n }\n // start to play\n interact.initialize();\n char preKey = ',';\n while (true) {\n if (StdDraw.hasNextKeyTyped()) {\n char key = StdDraw.nextKeyTyped();\n // if a user enter ':' then 'Q', then save and exit the game\n if ((\"\" + preKey + key).toUpperCase().equals(\":Q\")) {\n saveInteraction(interact);\n System.exit(0);\n }\n // in case the player enter something else\n if (\"WSAD\".contains((\"\" + key).toUpperCase())) {\n interact.move((\"\" + key).toUpperCase());\n }\n preKey = key;\n }\n interact.show();\n }\n }",
"void keyPressed() {\n if (key == 'w') {\n up = true;\n }\n if (key == 's') {\n down = true;\n }\n if (key == 'a') {\n left = true;\n\n }\n if (key == 'd') {\n right = true;\n\n }\n \n if (key == 27) {\n pause = !pause;\n }\n\n // player.turnToDir(0);\n}",
"void askMenu();",
"@Override\n public void keyPressed(KeyEvent keyEvent) {\n int keyCode = keyEvent.getKeyCode();\n if(keyCode==KeyEvent.VK_SPACE)obsluga_naboi();\n if(keyCode==KeyEvent.VK_ESCAPE)gra();\n b.keyPressed(keyEvent);\n }",
"void keyHome();",
"public void upPressed() {\n\t\tif (edit) {\n\t\t\tcurrentDeck.up();\n\t\t} else {\n\t\t\tactiveNode.nextChild();\n\t\t}\n\t}",
"public static void imprimirMenuCliente() {\r\n\tSystem.out.println(\"---------------------------menu---------------------------\");\r\n\tSystem.out.println(\"opciones: (ingrese la letra)\");\r\n\tSystem.out.println(\"A: despliega la opción comprar entrada\");\r\n System.out.println(\"B: despliega la opción informacion usuario\");\r\n System.out.println(\"C: despliega la opción devolucion entrada\");\r\n System.out.println(\"D: despliega la opción cartelera\");\r\n\tSystem.out.println(\"E: Salir\");\r\n\tSystem.out.println(\"----------------------------------------------------------\");\r\n \r\n }",
"@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tSystem.out.println(e.getKeyChar()+\" ta precionando a tecla igual um idiota\");\n\t\t\t\tSystem.out.println(e.getKeyCode());\n\t\t\t}",
"@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, vt.get(3));\r\n\t\t\t}",
"public void keyPressed(KeyEvent e) {\n\n\t\tint tecla = e.getKeyCode();\n\t\t\n\t\tif(nave!=null){\n\t\t\n\t if (tecla == KeyEvent.VK_UP) {\n\t nave.acelerador = true;\n\t }\n\t\n\t else if (tecla == KeyEvent.VK_RIGHT) {\n\t nave.girarDerecha = true;\n\t }\n\t \n\t else if (tecla == KeyEvent.VK_LEFT) {\n\t nave.girarIzquierda = true;\n\t }\n\t \n\t else if (tecla == KeyEvent.VK_P){\n\t \tif(pausa==false){\n\t \t\tpausa = true;\n\t \t}\n\t \telse if(pausa==true){\n\t \t\tpausa = false;\n\t \t}\t\n\t }\n\t \n\t else if (tecla == KeyEvent.VK_SPACE){\n\t \tthis.disparando = true;\n\t }\n\t \n\t else if (tecla == KeyEvent.VK_T){\n\t \tnave.setX(Math.random()*this.getWidth());\n\t \tnave.setY(Math.random()*this.getHeight());\n\t }\n\t else if(tecla == KeyEvent.VK_ENTER){\n\t \t\n\t \tif(this.reiniciar==true){\n\t \t\tthis.vidas = 3;\n\t\t \tthis.puntuacion = 0;\n\t\t \tthis.nivel = 0;\n\t\t \tthis.cuentaAtras = 10;\n\t\t \t\n\t\t \treiniciar = false;\n\t\t \t\n\t\t \tsiguienteNivel();\n\t \t}\n\t }\n\t else if(tecla == KeyEvent.VK_ESCAPE){\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n }",
"@Override\r\n\tpublic void keyPressed(KeyEvent e)\r\n\t{\r\n\t\tchar entered = e.getKeyChar();\r\n\t\tswitch (entered)\r\n\t\t{\r\n\t\tcase 'w':\r\n\t\t\tmove.execute(entered);\r\n\t\t\tbreak;\r\n\t\tcase 's':\r\n\t\t\tmove.execute(entered);\r\n\t\t\tbreak;\r\n\t\tcase 'a':\r\n\t\t\tmove.execute(entered);\r\n\t\t\tbreak;\r\n\t\tcase 'd':\r\n\t\t\tmove.execute(entered);\r\n\t\t\tbreak;\r\n\t\tcase 'x':\r\n\t\t\tequip.execute(entered);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tgame.updateState();\r\n\t}",
"@Override\n public void keyboardAction( KeyEvent ke )\n {\n \n }",
"private void backToMenu() {\n game.setScreen(new StartScreen(game));\n }",
"@Override\r\n public void keyPressed(KeyEvent e)\r\n {\r\n\tif (e.getKeyCode() == KeyEvent.VK_P)\r\n\t{\r\n\t _paused = !_paused;\r\n\t SoundLibrary.getInstance().play(SOUND_PAUSE);\r\n\t}\r\n\tif (_paused)\r\n\t return;\r\n\tswitch (e.getKeyCode())\r\n\t{\r\n\tcase KeyEvent.VK_RIGHT:\r\n\t _level.getMario().moveRight();\r\n\t break;\r\n\tcase KeyEvent.VK_LEFT:\r\n\t _level.getMario().moveLeft();\r\n\t break;\r\n\tcase KeyEvent.VK_UP:\r\n\t _level.getMario().jump(true);\r\n\t break;\r\n\tcase KeyEvent.VK_DOWN:\r\n\t _level.getMario().doSpecial();\r\n\t break;\r\n\tcase KeyEvent.VK_R:\r\n\t _level.resetMario();\r\n\t break;\r\n\t}\r\n }",
"private void txt_montoKeyReleased(java.awt.event.KeyEvent evt) {\n if (evt.getKeyCode()==KeyEvent.VK_ENTER){\n insertarRubro();\n } \n }",
"public void menu(){\n int numero;\n \n //x.setVisible(true);\n //while(opc>=3){\n r = d.readString(\"Que tipo de conversion deseas hacer?\\n\"\n + \"1)Convertir de F a C\\n\"\n + \"2)Convertir de C a F\\n\"\n + \"3)Salir\"); \n opc=Character.getNumericValue(r.charAt(0));\n //}\n }",
"public void userForm(){\n\t\tSystem.out.print(menu);\n\t\tScanner input = new Scanner(System.in);\n\t\tselection = input.nextInt();\n\t\tmenuActions(selection);\n\t\t}",
"@Override\n\t\t\tpublic boolean keyUp(int keycode) {\n\t\t\t\treturn false;\n\t\t\t}",
"private void KeyActionPerformed(java.awt.event.ActionEvent evt) {\n }",
"@Override\r\n //used the keyPressed event \r\n public void keyPressed(KeyEvent e) {\n int key = e.getKeyCode();\r\n //If statements works if the key pressed && opposite direction from what it is travelling in \r\n //can't Double back ,should be game over so to avoid it we use the !(not) variable \r\n if ((key == KeyEvent.VK_LEFT) && (!right)) {\r\n left = true;\r\n up = false;\r\n down = false;\r\n }\r\n if ((key == KeyEvent.VK_RIGHT) && (!left)) {\r\n right = true;\r\n up = false;\r\n down = false;\r\n }\r\n if ((key == KeyEvent.VK_UP) && (!down)) {\r\n up= true;\r\n right = false;\r\n left = false;\r\n }\r\n if ((key == KeyEvent.VK_DOWN) && (!up)) {\r\n down= true;\r\n right = false;\r\n left = false;\r\n }\r\n }",
"public void keyPressed (KeyEvent tecla){\n presionada=tecla.getKeyCode(); //Así se guarda la tecla 'presionada'\n if(presionada== KeyEvent.VK_ESCAPE){\n System.exit(0);\n }else if(tecla.isControlDown()&&presionada==KeyEvent.VK_H){ //isControlDown() es muy útil para combinaciones con CTRL\n JOptionPane.showMessageDialog(null,\"Lo sentimos. Sin usuario y/o contraseña deberás ponerte en contanto con el administrador del sistema\",\"\",1); \n }else if (presionada== KeyEvent.VK_ENTER){\n validateLogin();\n }\n }",
"public void showMenu()\r\n {\r\n System.out.println(\"Enter Truck order: \");\r\n \r\n super.showCommon();\r\n \r\n \r\n super.showMenu(\"What size truck is this? \", SIZE);\r\n \r\n \r\n \r\n \r\n \r\n \r\n super.showMenu(\"What is the engine size of the truck?\", ENGINE_SIZE);\r\n \r\n \r\n \r\n }",
"private static void returnMenu() {\n\t\t\r\n\t}",
"private void menuArmadura(){\n System.out.println(\"Escolha o local em que queira colocar a uma armadura:\");\n System.out.println(\"1 - Cabeça\");\n System.out.println(\"2 - Tronco\");\n System.out.println(\"3 - Pernas\");\n System.out.println(\"4 - Pés\");\n System.out.println(\"0 - Sair\");\n }",
"@Override\r\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\t\t\t\tint key = e.getKeyCode();\r\n\t\t\t\tif(key == KeyEvent.VK_UP)\r\n\t\t\t\t\tisPress01 = false;\r\n\r\n\t\t\t\tif(key == KeyEvent.VK_DOWN)\r\n\t\t\t\t\tisPress02 = false;\r\n\r\n\t\t\t\tif(key == KeyEvent.VK_LEFT)\r\n\t\t\t\t\tisPress03 = false;\r\n\r\n\t\t\t\tif(key == KeyEvent.VK_RIGHT)\r\n\t\t\t\t\tisPress04 = false;\r\n\t\t\t}",
"@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\tif (e.getKeyCode() == KeyEvent.VK_ENTER) {\n\t\t\tcurrentState = currentState + 1;\n\t\t\tif (currentState > END_STATE) {\n\t\t\t\tcurrentState = MENU_STATE;\n\t\t\t}\n\t\t}\n\t\tif (e.getKeyCode() == KeyEvent.VK_UP) {\n\t\t\tr.up = true;\n\t\t\t// System.out.println(\"up\");\n\t\t}\n\t\tif (e.getKeyCode() == KeyEvent.VK_DOWN) {\n\t\t\tr.down = true;\n\t\t}\n\t\tif (e.getKeyCode() == KeyEvent.VK_LEFT) {\n\t\t\tr.left = true;\n\t\t}\n\t\tif (e.getKeyCode() == KeyEvent.VK_RIGHT) {\n\t\t\tr.right = true;\n\t\t}\n\t\tif (e.getKeyCode() == KeyEvent.VK_SPACE) {\n\t\t\t/* Projectiles p = new Projectiles(r.x, r.y, 10, 10); */\n\t\t\tS2.play();\n\t\t\tom.addObject(new Projectiles(r.x + 22, r.y + 22, 10, 10));\n\t\t}\n\t\tif (e.getKeyCode() == KeyEvent.VK_D) {\n\t\t\tS1.play();\n\t\t\tom.addObject(new Projectiles(r.x, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 10, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 20, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 30, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 40, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 50, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 60, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 70, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 80, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 90, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 100, r.y + 22, 10, 10));\n\t\t\tom.addObject(new Projectiles(r.x + 110, r.y + 22, 10, 10));\n\t\t\tspecialPower = specialPower + 1;\n\t\t}\n\t}",
"@Override\r\n public void keyPressed(KeyEvent e) {\r\n switch(e.getKeyCode()) {\r\n case KeyEvent.VK_UP:\r\n System.out.println(\"Go up\");\r\n this.setRotation(this.getRotation() + 3);\r\n break;\r\n case KeyEvent.VK_DOWN:\r\n System.out.println(\"Go down\");\r\n this.setRotation(this.getRotation() - 3);\r\n break;\r\n\r\n case KeyEvent.VK_SPACE:\r\n \tif(up) {\r\n \t\tthis.setPosition(this.getPosition().getX(), this.getPosition().getY()+1.6f);\r\n \t\tup = false;\r\n \t}\r\n \telse {\r\n \t\t\r\n \t//\tthis.die ++;\r\n \t\tif(checkStatus()) {\r\n \t\t\tthis.setPosition(this.getPosition().getX(), this.getPosition().getY()-1.6f);\r\n \t\t\tup = true;\r\n \t\t}\r\n \t\telse {\r\n \t\t\tthis.setPosition(this.getPosition().getX(), this.getPosition().getY()-3.5f);\r\n \t\t\tthis.die = -1;\r\n \t\t\tSystem.out.println(\"Game over\");\r\n \t\t}\r\n \t}\r\n break;\r\n case KeyEvent.VK_ENTER:\r\n \tif(die == -2) {\r\n \t\tdie = 0;\r\n \t\tbreak;\r\n \t}\r\n }\r\n\r\n }",
"@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tif (e.getKeyCode() == KeyEvent.VK_ENTER) {\n\t\t\t\t\tsbt_jbt.doClick();\n\t\t\t\t}\n\t\t\t}",
"private void backToMenu()\n\t{\n\t\t//switch to menu screen\n\t\tgame.setScreen(new MenuScreen(game));\n\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n \t Robot r;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tr = new Robot();\r\n\t\t\t\t int keyCode = KeyEvent.VK_ENTER; // the A key\r\n\t\t\t\t r.keyPress(keyCode);\t\t\t\t \r\n\t\t\t\t} catch (AWTException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}",
"private void chkKeyPressed(KeyEvent e) {\n\t\tif (UtilityPtoVenta.verificaVK_F1(e)) // Reservado para ayuda\n\t\t{\n\t\t} else if (UtilityPtoVenta.verificaVK_F11(e)) {\n \n boolean valor=true;\n if (datosValidados()){\n //JCORTEZ 14.03.09 solo para tipo ticket no se podra modificar la cola de impresion con una que ya exista\n if (VariablesImpresoras.vTipoComp.trim().equalsIgnoreCase(ConstantsPtoVenta.TIP_COMP_TICKET)){\n if(!validaRuta()){\n FarmaUtility.showMessage(this,\"No se puede asignar una ruta de impresion que ya existe.\",txtColaImpresion);\n valor=false;\n }\n }\n if(valor)\n if (JConfirmDialog.rptaConfirmDialog(this,\"¿Está seguro que desea grabar los datos ?\")) {\n try {\n if (existenDatos) {\n actualizarImpresora();\n } else {\n insertarImpresora();\n actualizaNumeracionImpresoras();\n }\n\n FarmaUtility.aceptarTransaccion();\n FarmaUtility.showMessage(this,\"La operación se realizó correctamente\",txtDescImpresora);\n\n } catch (SQLException ex) {\n FarmaUtility.liberarTransaccion();\n FarmaUtility.showMessage(this,\"Error al grabar datos de la impresora: \\n\"+ ex.getMessage(), txtDescImpresora);\n log.error(\"\",ex);\n\n }\n cerrarVentana(true);\n }\n }\n\n\t\t} else if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {\n\t\t\tcerrarVentana(false);\n\t\t}\n\n\t}",
"@Override\n public boolean keyUp(int keycode) {\n return false;\n }",
"static void mostrarMenu(){\n \t\t\n\t\tout.println();\n\t\tout.println(\"1. Crear lavadora.\");\n\t\tout.println(\"2. Mostrar lavadoras.\");\n\t\tout.println(\"3. Seleccionar lavadora.\");\n\t\tout.println(\"4. Cargar agua.\");\n\t\tout.println(\"5. Cargar ropa.\");\n\t\tout.println(\"6. Cargar detergente.\");\n\t\tout.println(\"7. Especificar tiempo.\");\n\t\tout.println(\"8. Drenar.\");\n\t\tout.println(\"9. Mostrar estado de la lavadora.\");\n\t\tout.println(\"10. Mostrar estado de la ropa.\");\n\t\tout.println(\"11. Pausar o Reanudar lavadora\");\n\t\tout.println(\"12. Probar sistema.\");\n\t\tout.println(\"13. Reiniciar sistema.\");\n\t\tout.println(\"22. Salir\");\n\t\tout.println((SELECTNOW != -1) ? \"!/*!/* Lv seleccionada: \" + SELECTNOW + \" !/*!/*\": \"\");\n\t\tout.println();\n\t}",
"@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tevent(e, vt.get(0));\r\n\t\t\t}"
]
| [
"0.65300333",
"0.6495028",
"0.64314586",
"0.63323337",
"0.6301498",
"0.62813467",
"0.6274804",
"0.6259323",
"0.62544346",
"0.6242944",
"0.6195642",
"0.61893916",
"0.61759484",
"0.6171856",
"0.61581784",
"0.61569387",
"0.61394817",
"0.61202514",
"0.6107361",
"0.609788",
"0.6056113",
"0.60389626",
"0.6036028",
"0.6003397",
"0.59894544",
"0.5964045",
"0.5960998",
"0.59464985",
"0.59451896",
"0.594371",
"0.5923822",
"0.5902547",
"0.5902547",
"0.5901368",
"0.5901139",
"0.58915865",
"0.58734536",
"0.5872005",
"0.5864343",
"0.5846971",
"0.58458763",
"0.58382857",
"0.5838006",
"0.58345324",
"0.5821964",
"0.5809016",
"0.5806747",
"0.5803816",
"0.5799216",
"0.5798689",
"0.57952553",
"0.5790157",
"0.5789422",
"0.5781413",
"0.5781056",
"0.57588845",
"0.57442605",
"0.5741601",
"0.5733488",
"0.5728789",
"0.57242906",
"0.5721942",
"0.57187015",
"0.5717577",
"0.571409",
"0.5711415",
"0.5709979",
"0.57097346",
"0.5703762",
"0.57030314",
"0.5701832",
"0.56997854",
"0.5698139",
"0.5697158",
"0.56948876",
"0.5681557",
"0.5679038",
"0.56771463",
"0.56734186",
"0.56721866",
"0.5669695",
"0.5663561",
"0.56579757",
"0.5652357",
"0.5649984",
"0.5638766",
"0.56382173",
"0.5637043",
"0.56327105",
"0.56324714",
"0.56301355",
"0.56251836",
"0.5623484",
"0.562101",
"0.56171465",
"0.5615278",
"0.5610841",
"0.5604233",
"0.5603974",
"0.5603434"
]
| 0.6150417 | 16 |
String bin = Integer.toBinaryString(0x10000 | nval).substring(1); | public void genAdrCode(int nval) {
addressSpace.write(lc.getAndIncrement(),nval);//const
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String intToBinaryNumber(int n){\n return Integer.toBinaryString(n);\n }",
"public static String intToBinaryString(int value) {\r\n String bin = \"00000000000000000000000000000000\" + Integer.toBinaryString(value);\r\n\r\n return bin.substring(bin.length() - 32, bin.length() - 24)\r\n + \" \"\r\n + bin.substring(bin.length() - 24, bin.length() - 16)\r\n + \" \"\r\n + bin.substring(bin.length() - 16, bin.length() - 8)\r\n + \" \"\r\n + bin.substring(bin.length() - 8, bin.length());\r\n }",
"public static String toBinary(int n){\n int length = (int)Math.ceil(Math.log(n)/Math.log(2));\n int[] bits = new int[length];\n for(int x = 0; x < length; x++){\n double val = Math.pow(2, length - x);\n if(n >= val){\n bits[x] = 1;\n n -= val;\n }\n else{\n bits[x] = 0;\n }\n }\n String convert = \"\";\n for(int x = 0; x < length; x++){\n convert += bits[x];\n }\n return convert;\n }",
"public static String dexToBin(int value) {\n\tString binVal = Integer.toBinaryString(value);\n\t\treturn binVal;\n\t\t\n\t}",
"public static String decToBin( int n ) {\n\tString x = \"\";\n\twhile(n != 0){\n\t x = n % 2 + x;\n\t n /= 2;\n\t}\n\treturn x;\n }",
"public static String decToBinR( int n ) { \n\tif (n == 0)\n\t return \"0\";\n\telse if (n == 1)\n\t return \"1\";\n\telse\n\t return n % 2 + decToBin(n / 2);\n }",
"public static String binConvertInt(long num) {\n\t\tString binString = \"\";\n\n\t\t// ORIGINAL CODE FOR INT BINCONVERT\n\n\t\tlong binary = 0;\n\t\tint count = 0;\n\n\t\tif (num >= 0) {\n\t\t\twhile (num > 0) {\n\t\t\t\tbinary = num % 2;\n\t\t\t\tif (binary == 1) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\tbinString = binary + \"\" + binString;\n\t\t\t\tnum = num / 2;\n\t\t\t}\n\n\t\t}\n\n\t\telse {\n\n\t\t\tnum = -1 * num;\n\n\t\t\twhile (num > 0) {\n\t\t\t\tbinary = num % 2;\n\t\t\t\tif (binary == 1) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\n\t\t\t\tbinString = binary + \"\" + binString;\n\t\t\t\tnum = num / 2;\n\t\t\t}\n\n\t\t\t// flip the binary to negative conversion\n\n\t\t\tchar ch[] = binString.toCharArray();\n\t\t\tboolean addedOne = false;\n\n\t\t\tfor (int i = binString.length() - 1; i >= 0; i--) {\n\t\t\t\tif (ch[i] == '0') {\n\t\t\t\t\tch[i] = '1';\n\t\t\t\t} else {\n\t\t\t\t\tch[i] = '0';\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (ch[binString.length() - 1] == '0') {\n\n\t\t\t\tch[binString.length() - 1] = '1';\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tch[binString.length() - 1] = '0';\n\t\t\t\tfor (int i = binString.length() - 1; i >= 0; i--) {\n\t\t\t\t\tif(ch[i] == '1') {\n\t\t\t\t\t\tch[i] = '0';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tch[i] = '1';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\tbinString = new String(ch);\n\t\t}\n\n\t\t\n\t\treturn binString;\n\t}",
"public static String binValue(byte b) {\n StringBuilder sb = new StringBuilder(8);\n for (int i = 0; i < 8; i++) {\n if ((b & 0x01) == 0x01) {\n sb.append('1');\n } else {\n sb.append('0');\n }\n b >>>= 1;\n }\n return sb.reverse().toString();\n }",
"public static String binaryCode(String n)\n\t{\n\t\tString retValue = \"\";\n\n\t\tint num = Integer.parseInt(n);\t//convert the input string into int\n\n\t\twhile(num>0)\n\t\t{\n\t\t\tif(num==1)\n\t\t\t\tretValue += num;\n\t\t\telse\n\t\t\t\tretValue += Integer.toString(num%2);\t//resto della divisione\n\t\t\t\tnum = num/2;\t\t\t\t\t\t\t//divide the number by 2\n\t\t}\n\n\t\treturn new StringBuilder(retValue).reverse().toString();\n\t}",
"public static String num2Bin(int a) {\n StringBuilder sb = new StringBuilder();\n for (int bitPow2 = 1, i = 0; i < Integer.SIZE; bitPow2 <<= 1,\n ++i) {\n if ((a & bitPow2) == bitPow2) {\n sb.append(\"1\");\n } else {\n sb.append(\"0\");\n }\n }\n return sb.reverse().toString();\n }",
"public static String toBinaryString(int number) {\r\n\t\tString result = \"\";\r\n\t\tint origin = Math.abs(number);\r\n\r\n\t\twhile (origin > 0) {\r\n\t\t\tif (origin % 2 == 0)\r\n\t\t\t\tresult = \"0\" + result;\r\n\t\t\telse\r\n\t\t\t\tresult = \"1\" + result;\r\n\t\t\torigin = origin / 2;\r\n\t\t}\r\n\t\twhile (result.length() < 16)\r\n\t\t\tresult = \"0\" + result;\r\n\r\n\t\tif (number > 0)\r\n\t\t\treturn result;\r\n\t\telse {\r\n\t\t\tString result2 = \"\";\r\n\t\t\tfor (int i = 0; i < result.length(); i++)\r\n\t\t\t\tresult2 += result.charAt(i) == '1' ? \"0\" : \"1\";\r\n\t\t\tchar[] result2Array = result2.toCharArray();\r\n\t\t\tfor (int i = result2Array.length - 1; i >= 0; i--)\r\n\t\t\t\tif (result2Array[i] == '0') {\r\n\t\t\t\t\tresult2Array[i] = '1';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else\r\n\t\t\t\t\tresult2Array[i] = '0';\r\n\t\t\tresult2 = \"\";\r\n\t\t\tfor (int i = 0; i < result2Array.length; i++)\r\n\t\t\t\tresult2 += String.valueOf(result2Array[i]);\r\n\t\t\treturn result2;\r\n\t\t}\r\n\t}",
"public static String binaryRepresentation(int n){\n\t\tint[] arr = new int[32]; \n\t\tArrays.fill(arr,0); //Filling the entire arrays with a default value of 0.\n\t\tint len = arr.length-1;\n\t\twhile(n > 0){\n\t\t\tint temp = n % 2;\n\t\t\tarr[len] = temp;\n \tlen--;\n\t\t\tn = n/2;\n\t\t}\n\t\tString ans = arrayToString(arr);\n\t\treturn ans;\n\n\t}",
"public String toBinary(final int n) {\n int[] binary = new int[35];\n int id = 0;\n \n // Number should be positive\n while (n > 0) {\n binary[id++] = n % 2;\n n = n / 2;\n }\n return \"Array.toString(binary)\";\n \n }",
"private static String convertP(int value)\n {\n String output = Integer.toBinaryString(value);\n\n for(int i = output.length(); i < 6; i++) // pad zeros\n output = \"0\" + output;\n\n return output;\n }",
"public static String toBinary(int number)\n\t{\n\t\tString total = \"\";\n\t\tint a;\n\t\twhile (number > 0) {\n\n\t\t\ta = number % 2;\n\n\t\t\ttotal = total + \"\" + a;\n// divide number by 2 \n\t\t\tnumber = number / 2;\n\n\t\t\t}\n\n// return value \n\t\treturn (new StringBuilder(total)).reverse().toString();\n\t\t\n\t}",
"public static String TextToBinary(String input){\n\t\tString output = \"\";\n\t\tfor(int i = 0; i < input.length(); i++){\n\t\t\toutput += Integer.toBinaryString(0x100 | input.charAt(i)).substring(1);\n\t\t}\n\t\treturn output;\n\t}",
"private byte[] intToBits(int number, int n) {\n\t\tbyte[] bits = new byte[n];\n\t\t\n\t\tString bitString = Integer.toBinaryString(number);\n\t\twhile (bitString.length() < n) {\n\t\t\tbitString = \"0\" + bitString;\n\t\t}\n\t\t\n\t\tfor(int i = 0, maxLen = bits.length; i < maxLen; i++) {\n\t\t\tbits[i] = (byte) (bitString.charAt(i) == 1 ? 1 : 0);\n\t\t}\n\t\t\n\t\treturn bits;\n\t}",
"public void setOpBin(int n) {\n opBin=Translate.decTobinN(n, 8);\n }",
"public static byte[] intToBinary(int value)\n {\n String tmp = Integer.toBinaryString(value);\n int len = tmp.length();\n int change = 8 - (len % 8);\n\n if(change != 0) len += change;\n\n byte[] res = new byte[len];\n for(int i = 0; i < len; i++) {\n if(i < change){\n // Tag on leading zeroes if needed\n res[i] = 0x00;\n }else{\n char c = tmp.charAt(i - change);\n res[i] = (byte) (c == '0' ? 0x00 : 0x01);\n }\n }\n\n return res;\n }",
"public void setFlagBin(int n) {\n flagBin=Translate.decTobinN(n, 4);\n }",
"public static void main(String[] args) {\n\t\tint i=10;\n\t\tSystem.out.println(Integer.toBinaryString(i));\n\t\tSystem.out.printf(\"%d --> %s \\n\",i<<1,Integer.toBinaryString(i<<1));\n\t\tSystem.out.printf(\"%d --> %s \\n\",i>>1, Integer.toBinaryString(i>>1));\n\t\t\n\t\tSystem.out.println(i&(1<<0));\n\t}",
"public void setInBin(int n) {\n inBin=Translate.decTobinN(n, 4);\n }",
"public static String toBinaryString(BigInteger data) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"0b\").append(data.toString(2));\n return sb.toString();\n }",
"public String asBinary() {\n String binaryString = \"\";\n\n for (; this.decimalValue > 0; decimalValue /= 2) {\n if (this.decimalValue % 2 == 0) {\n binaryString += \"0\";\n } else {\n binaryString += \"1\";\n }\n }\n\n return new StringBuilder(binaryString).reverse().toString();\n }",
"public static void toBinary (int number) {\r\n String binary = \"\";\r\n \r\n if (number > 0) {\r\n toBinary(number / 2); \r\n System.out.print(number % 2 + binary);\r\n }\r\n }",
"private static String zeroPaddedBitString(int value) {\n String bitString = Integer.toBinaryString(value);\n return String.format(\"%32s\", bitString).replace(\" \", \"0\");\n }",
"public String toBitString (int i) {\n\tint[] result = new int[64];\n\tint counter = 0;\n\twhile (i > 0) {\n\t\tresult[counter] = i % 2;\n\t\ti /= 2;\n\t\tcounter++;\n\t}\n\tString answer = \"\";\n\tfor (int j = 0; j < counter; j++)\n\t\tanswer += \"\" + result[j];\n\treturn answer;\t\n}",
"static String hexToBin(String s) {\n\t\treturn new BigInteger(s, 16).toString(2);\n\t}",
"public static String printBinary (String n){\n\t\tint intPart = Integer.parseInt(n.substring(0, n.indexOf(\".\")));\n\t\tdouble decPart = Double.parseDouble(n.substring(n.indexOf(\".\")));\n\t\tString iPart = \"\";\n\t\tint bit;\n\t\twhile(intPart > 0){\n\t\t\tbit = intPart %2; //take mod result as the last digit.\n\t\t\tintPart >>= 1;\n\t\t\tiPart = bit + iPart;\n\t\t}\n\t\t\n\t\tString dPart = \"\";\n\t\tdouble val;\n\t\twhile (decPart > 0) {//any left over value?\n\t\t\tif(dPart.length() > 32) return \"Error\";//too long to represent\n\t\t\tval = decPart * 2;\n\t\t\tif(val >= 1) {\n\t\t\t\tdecPart = val - 1;\n\t\t\t\tdPart += 1;\n\t\t\t} else {\n\t\t\t\tdecPart = val;\n\t\t\t\tdPart += 0;\n\t\t\t}\n\t\t}\n\t\treturn iPart + \".\" + dPart;\n\t}",
"public static void main(String[] args) {\n\t\tint x = ~0;\r\n\t\tSystem.out.println(Integer.toBinaryString(x));\r\n\t\tint y = x>>>8;\r\n\t\tSystem.out.println(Integer.toBinaryString(y));\r\n\t\tSystem.out.println(x+\" \"+y);\r\n\t\t\r\n\t\tint N = 1<<31;\r\n\t\tint M = 0b11;\r\n\t\tint j=2;\r\n\t\tint i=1;\r\n\t\tSystem.out.println(Integer.toBinaryString(N));\r\n\t\tSystem.out.println(Integer.toBinaryString(M));\r\n\t\tSystem.out.println(Integer.toBinaryString(insertMIntoNFromJtoI(M, N, j, i)));\r\n\t\t\r\n\t}",
"public static void displayAsBinary(int number)\n {\n System.out.println(Integer.toBinaryString(number));\n }",
"private String decimalToBinary(int num) {\n String result = \"\";\n \n while(num > 0 ) \n {\n \n \n //get the remainder\n result = num % 2 + result;\n \n // Divide the positive decimal number by two( then divide the quotient by two)\n num = num /2;\n }\n \n return result;\n }",
"public void encodeBinary(Buf out)\n {\n out.u2(val.length()+1);\n for (int i=0; i<val.length(); ++i)\n out.u1(val.charAt(i));\n out.u1(0);\n }",
"public String toString() { \n\treturn _binNum;\n }",
"public static int grayToBinary(int num) {\r\n\t\tint k = (INTEGER_SIZE >>> 1);\r\n\t\tint temp = num;\r\n\t\twhile (k > 0) {\r\n\t\t\ttemp ^= (temp >>> k);\r\n\t\t\tk >>>= 1;\r\n\t\t}\r\n\t\treturn temp;\r\n\t}",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"2:\"+Integer.toBinaryString(2));\n\t\tSystem.out.println(\"3:\"+Integer.toBinaryString(3));\n\t\t\n\t\tSystem.out.println(\"2&3: \"+(2 &3));\n\t\tSystem.out.println(\"2|3: \"+(2 |3));\n\t\tSystem.out.println(\"2^3: \"+(2^3));\n\t\tSystem.out.println(\"~3: \"+(+~3));\n\t\t\n\t\tSystem.out.println(\"~3 to binary:\"+Integer.toBinaryString(~3));\n\t\t\n\t\tSystem.out.println(Integer.toBinaryString(~3).length());\n\t\tSystem.out.println(Integer.MAX_VALUE);\n\t\t\t}",
"private String toBinary(byte caracter){\n byte byteDeCaracter = (byte)caracter;\n String binario=\"\";\n for( int i = 7; i>=0; i--){\n binario += ( ( ( byteDeCaracter & ( 1<<i ) ) > 0 ) ? \"1\" : \"0\" ) ;\n }\n return binario;\n }",
"static long flippingBits(long n) {\n\n String strBinary = String.format(\"%32s\", Long.toBinaryString(n)).replace(' ', '0');\n String strBinaryFlip = \"\";\n\n for (int i = 0; i < strBinary.length(); i++) {\n if (strBinary.charAt(i) == '0') {\n strBinaryFlip = strBinaryFlip + '1';\n } else {\n strBinaryFlip = strBinaryFlip + '0';\n }\n }\n\n String result = String.format(\"%32s\", strBinaryFlip).replace(' ', '0');\n long base10 = parseLong(result,2);\n return base10;\n }",
"public int decToBin(int input) {\r\n\t String Binary = Integer.toBinaryString(input);\t\r\n\t\treturn Integer.valueOf(Binary);\t\t\r\n\t}",
"@Test\n public void test2(){\n\n String s =\"1000000000000001\";\n //s = BinaryCalculate.BinaryArithmeticalRightShift(s,1);\n s = BinaryCalculate.BinaryLogicRightShift(s,1);\n int a = BitConversion.fromBinaryStringToInt(s);\n System.out.println(a);\n }",
"String getIndexBits();",
"public static int reverseBits(int n) {\n String binary = Integer.toBinaryString(n);\n while (binary.length() < 32) {\n binary = \"0\" + binary;\n }\n\n String reverse = \"\";\n for (int i = binary.length() - 1; i >= 0; i--) {\n reverse += binary.charAt(i);\n }\n\n return (int) Long.parseLong(reverse, 2);\n }",
"public static String decimalToBinary(int number)\r\n {\n String start = \"\";\r\n if (number < 0)\r\n {\r\n start = \"-\";\r\n number = -number;\r\n }\r\n \r\n String result = \"\";\r\n while(true)\r\n {\r\n int remainder = number % 2;\r\n String digit = Integer.toString(remainder);\r\n result = digit + result;\r\n number = number / 2;\r\n if (number == 0)\r\n {\r\n break;\r\n }\r\n }\r\n \r\n // if number is negative, put a minus sign in front of the result.\r\n result = start + result;\r\n return result;\r\n }",
"public String decimalToBinario(int numero) {\n\t\tSystem.out.print(\"Convirtiendo decimal (\" + numero + \") a binario >> \");\n\t\treturn Integer.toBinaryString(numero);\n\t}",
"public abstract String toString(String bin);",
"public static String toBinaryString0x(long addr, boolean LP64) {\n\tif (LP64)\n\t return \"0x\" +Long.toBinaryString(addr);//NOI18N\n\telse\n\t return \"0x\" +Integer.toBinaryString((int) addr); //NOI18N \n }",
"@Override\n\tpublic String convert2Binary(int num) {\n\t\treturn null;\n\t}",
"public int hexToBin(String input) {\r\n\t\treturn Integer.valueOf(new BigInteger(input, 16).toString(2));\t\t\r\n\t}",
"public String base10to2(int n) throws Exception {\r\n\r\n\t\t // int n = Integer.valueOf(base10);\r\n\t\t \r\n\t\t if (n < 0 || n > maxValue)\r\n\t\t\t throw new Exception (\"the input number exceeds the allowable limits\");\r\n\t \r\n\t\t String binaryStr = Integer.toBinaryString(n);\r\n\t \r\n\t //pad the above string to make it to 8 bits representation\r\n\t //if positive number, the most significant bit is 0, else 1\r\n\t if (n>0)\r\n\t \tbinaryStr= String.format(\"%8s\", binaryStr).replace(' ', '0');\r\n\t else{\r\n\t \tbinaryStr = Integer.toBinaryString((-1)*n);\r\n\t \t\r\n\t \tbinaryStr= String.format(\"%8s\", binaryStr).replace(' ', '0');\r\n\t \tbinaryStr = get2sComplement(binaryStr);\r\n\t }\r\n\t return binaryStr;\r\n\t }",
"static int isolateBit(int n){\n return n & (-n);\n }",
"public String negBase2(int n) throws Exception {\r\n\t\t String binaryStr=\"\";\r\n\r\n\t\t int minValue = -256;//allowed min decimal\r\n\t\t// donot allow positive numbers and make sure the \r\n\t\t// input number is > allowed min value for 8 bit representation\r\n\t\t if (n>0 || n < minValue) \r\n\t\t\t throw new Exception (\"the input number exceeds the allowable limits\");\r\n\t\t\t \r\n\t\t binaryStr = Integer.toBinaryString((-1)*n);\r\n\t \t\r\n\t \tbinaryStr= String.format(\"%8s\", binaryStr).replace(' ', '0');\r\n\t \tbinaryStr = get2sComplement(binaryStr);\r\n\t\t return binaryStr;\r\n\t }",
"public Binary( int n ) {\n\t_decNum = n;\n\t_binNum = decToBin(n);\n }",
"int getNibble(int num, int which)\n {\n return 0b1111 & num >> (which << 2);\n }",
"static StringBuilder convert_to_binary(String msg) {\n byte[] bytes = msg.getBytes();\r\n StringBuilder binary = new StringBuilder();\r\n for (byte b : bytes) {\r\n int val = b;\r\n for (int i = 0; i < 8; i++) {\r\n binary.append((val & 128) == 0 ? 0 : 1);\r\n val <<= 1;\r\n }\r\n binary.append(\"\");\r\n }\r\n return binary;\r\n }",
"public int reverseBits(int n) {\n /*\n StringBuilder ans = new StringBuilder();\n for(int i=0; i<32; i++)\n {\n int temp = n&1;\n ans.append(temp);\n n = n>>>1;\n }\n return Integer.parseInt(ans.toString(), 2);\n */\n \n int result = 0;\n for(int i=0; i<32; i++){\n result <<= 1;\n result += n&1;\n n >>>= 1;\n }\n \n return result;\n \n }",
"public java.lang.String getBin() {\r\n return bin;\r\n }",
"public static String toBinaryString(long addr, boolean LP64) {\n\tif (LP64)\n\t return Long.toBinaryString(addr);\n\telse\n\t return Integer.toBinaryString((int) addr); \n }",
"public static String getBits(long f, int size) {\n StringBuffer sb = new StringBuffer();\n sb = f < 0 ? sb.append(\"1\") : sb.append(\"0\");\n long mask = 1;\n for (int i = size; i >= 0; i--) {\n int x = (mask<<i & f) == 0 ? 0 : 1;\n sb.append(x);\n }\n return sb.toString();\n }",
"public static void main(String[] args) {\n\t\tBigInteger a = f(9999);\n\t\tString n = Integer.toBinaryString(a.intValue());\n\t\tSystem.out.println(a.bitLength());\n\t}",
"public char[] decimalToBinary(int value) {\n\t\t// TODO: Implement this method.\n\t\treturn null;\n\t}",
"private static String printBinary(double num){\n\t\tif(num >= 1 || num <= 0)\n\t\t\treturn \"ERROR\";\n\t\t\n\t\tStringBuilder binary = new StringBuilder();\n\t\tbinary.append(\"0.\");\n\t\tdouble r = 0.5;\n\t\twhile(num > 0){\n\t\t\tif(binary.length() >= 32)\n\t\t\t\treturn \"ERROR\";\n\t\t\t\n\t\t\tif(num >= r){\n\t\t\t\tbinary.append(1);\n\t\t\t\tnum -= r;\n\t\t\t}else\n\t\t\t\tbinary.append(0);\n\t\t\t\n\t\t\tr /= 2;\n\t\t}\n\t\treturn binary.toString();\n\t}",
"private static String getBinaryFromDecimal(int decimal)\n\t{\n\n\t\tif( decimal == 0 )\n\t\t{\n\t\t\treturn \"00000000\";\n\t\t}\n\n\t\tif( decimal == 1 )\n\t\t{\n\t\t\treturn \"00000001\";\n\t\t}\n\n\t\tchar[] binary = {'0', '0', '0', '0', '0', '0', '0', '0'};\n\t\tint exponent, value;\n\n\t\tdo\n\t\t{\n\t\t\texponent = getNearestPowerOfTwo(decimal);\n\t\t\tbinary[7-exponent] = '1';\n\t\t\tvalue = (int)Math.pow(2, exponent);\n\t\t\tdecimal = decimal - value;\n\t\t}\n\t\twhile( decimal > 0 );\n\n\t\treturn new String(binary);\n\t}",
"public void setParBin(int n) {\n parBin=Translate.decTobinN(n, 16);\n }",
"public String conformBinaryLength(int data, int length){\n String binaryParameter = Integer.toBinaryString(data);\n binaryParameter = (StringUtils.repeat('0', length) + binaryParameter).substring(binaryParameter.length());\n return binaryParameter;\n }",
"public static String toPaddedBinaryString(BigInteger data, int numBits) {\n String binStr = UnsignedBigIntUtils.toBinaryString(data);\n binStr = RegExp.replaceFirst(\"0b\", binStr, \"\");\n StringBuilder sb = new StringBuilder();\n\n if (RegExp.isMatch(\"^0b\", binStr) == false) {\n sb.append(\"0b\");\n }\n\n if (numBits > binStr.length()) {\n for (int ii = numBits - binStr.length(); ii > 0; ii--) {\n sb.append('0');\n }\n }\n sb.append(binStr);\n return (sb.toString());\n }",
"public static String writeBits(byte b) {\n\n StringBuffer stringBuffer = new StringBuffer();\n int bit = 0;\n\n for (int i = 7; i >= 0; i--) {\n\n bit = (b >>> i) & 0x01;\n stringBuffer.append(bit);\n\n }\n\n return stringBuffer.toString();\n\n }",
"public String toString()\n\t{\n\t\tString binary = \"\"; //string to store the binary number\n\t\t\n\t\t//loops through each of the bit positions\n\t\tfor (int i=binaryCode.length-1; i>=0; i--)\n\t\t{\n\t\t\t\n\t\t\t//checks the value of the bit\n\t\t\tif (binaryCode[i]==false)\n\t\t\t{\n\t\t\t\t//if the boolean is false, then the bit is a 0\n\t\t\t\tbinary+=\"0\";\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t//since there are only two states, if it is not 0, then it is 1\n\t\t\t\tbinary+=\"1\";\t\t\n\t\t\t}\n\t\t}\t\t\n\t\t//returns the binary number as a string\n\t\treturn binary;\n\t}",
"public static String toFormattedBinaryString(BigInteger data, int numBits) {\n //BigInteger.toString(radix) does not pad to full word sizes.\n String tmpStr = UnsignedBigIntUtils.toPaddedBinaryString(data, numBits);\n tmpStr = RegExp.replaceFirst(\"0b\", tmpStr, \"\");\n\n StringBuilder formattedBinaryString = new StringBuilder();\n\n if (RegExp.isMatch(\"^0b\", tmpStr) == false) {\n formattedBinaryString.append(\"0b\");\n }\n\n // If you modify anything in this loop, then you must modify tests.\n for (int ii = 0; ii < tmpStr.length(); ii++) {\n if (ii % 16 == 0 && ii != 0) {\n formattedBinaryString.append(\" | \");\n } else if (ii % 4 == 0 && ii != 0) {\n formattedBinaryString.append(\" \");\n }\n formattedBinaryString.append(tmpStr.charAt(ii));\n }\n\n tmpStr = formattedBinaryString.toString();\n\n return (tmpStr);\n }",
"BitField getLSBs(int digits);",
"private static byte[] getBytes(int val) {\n log.log(Level.FINEST, String.format(\"%d\", val));\n byte[] ret = new byte[NekoIOConstants.INT_LENGTH];\n for (int i = 0; i < NekoIOConstants.INT_LENGTH; i++) {\n if (NekoIOConstants.BIG_ENDIAN) {\n ret[NekoIOConstants.INT_LENGTH - 1 - i] = (byte) val;\n } else {\n ret[i] = (byte) val;\n }\n val >>= 8;\n }\n return ret;\n }",
"public static String findBinary(int decimalNumber) {\r\n\t\tint mod;\r\n\r\n\t\tString x = \"\";\r\n\t\tif (decimalNumber > 255) {\r\n\t\t\tSystem.out.println(\"Enter Number between 1 to 255\");\r\n\t\t} else {\r\n\r\n\t\t\twhile (decimalNumber > 0) {\r\n\t\t\t\tmod = decimalNumber % 2;\r\n\t\t\t\tx = mod + \"\" + x;\r\n\t\t\t\tdecimalNumber = decimalNumber / 2;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn x;\r\n\t}",
"private int getLowTenBitNumber(int num) {\n return num & 1023;\n }",
"public long bits() {\n\t\tlong x = n;\n\t\tif (x > 0) {\n\t\t\tlong msw = get(x - 1) & 0xffffffffL;\n\t\t\tx = (x - 1) * BPU;\n\t\t\tx = x & 0xffffffffL;\n\t\t\tlong w = BPU;\n\t\t\tdo {\n\t\t\t\tw >>= 1;\n\t\t\t\tif (msw >= ((1 << w) & 0xffffffffL)) {\n\t\t\t\t\tx += w;\n\t\t\t\t\tx = x & 0xffffffffL;\n\t\t\t\t\tmsw >>= w;\n\t\t\t\t}\n\t\t\t} while (w > 8);\n\t\t\tx += bittab[(int) msw];\n\t\t\tx = x & 0xffffffffL;\n\t\t}\n\t\treturn x;\n\t}",
"public static String getBits(int f, int size) {\n StringBuffer sb = new StringBuffer();\n sb = f < 0 ? sb.append(\"1\") : sb.append(\"0\");\n int mask = 1;\n for (int i = size; i >= 0; i--) {\n int x = (mask<<i & f) == 0 ? 0 : 1;\n sb.append(x);\n }\n return sb.toString();\n }",
"@Test\n public void encodeAsString()\n {\n int value = 3;\n BinaryEncoder encoder = new BinaryEncoder(16);\n String result = encoder.encodeAsString(value);\n if (IS_VERBOSE)\n {\n System.out.println(\"result = \" + result);\n }\n assertNotNull(result);\n assertEquals(\"0011\", result);\n\n value = 20; // > 16 outside range\n result = encoder.encodeAsString(value);\n if (IS_VERBOSE)\n {\n System.out.println(\"result = \" + result);\n }\n assertNotNull(result);\n assertEquals(\"0100\", result); // Best fit into 4 digits; ignores higher bits\n\n encoder = new BinaryEncoder(0.0, 360.0, 1.0);\n assertEquals(9, encoder.getLength());\n assertEquals(\"000000000\", encoder.encodeAsString(0.0));\n assertEquals(\"000000001\", encoder.encodeAsString(1.0));\n assertEquals(\"000101101\", encoder.encodeAsString(45.0));\n assertEquals(\"001011010\", encoder.encodeAsString(90.0));\n assertEquals(\"010110100\", encoder.encodeAsString(180.0));\n assertEquals(\"101101000\", encoder.encodeAsString(360.0));\n }",
"public static Binary integer_to_binary_1(Integer integer) {\n return new Binary(integer.toString().getBytes(ISO_8859_1));\n }",
"private void toHex(){\n\t\tStringBuilder sb = new StringBuilder();\n\t\tStringBuilder tempsb = new StringBuilder(binary);\n\t\t\n\t\t\tfor (int i = 0;i<binary.length();i+=4){//maps each nibble to its binary value\n\t\t\t\tif (tempsb.substring(i,i+4).equals(\"0000\")) \n\t\t\t\t\tsb.append('0');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"0001\"))\n\t\t\t\t\tsb.append('1');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"0010\"))\n\t\t\t\t\tsb.append('2');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"0011\"))\n\t\t\t\t\tsb.append('3');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"0100\"))\n\t\t\t\t\tsb.append('4');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"0101\"))\n\t\t\t\t\tsb.append('5');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"0110\"))\n\t\t\t\t\tsb.append('6');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"0111\"))\n\t\t\t\t\tsb.append('7');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1000\"))\n\t\t\t\t\tsb.append('8');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1001\"))\n\t\t\t\t\tsb.append('9');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1010\"))\n\t\t\t\t\tsb.append('A');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1011\"))\n\t\t\t\t\tsb.append('B');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1100\"))\n\t\t\t\t\tsb.append('C');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1101\"))\n\t\t\t\t\tsb.append('D');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1110\"))\n\t\t\t\t\tsb.append('E');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1111\"))\n\t\t\t\t\tsb.append('F');\n\t\t\t}\n\t\t\tsb.insert(0,\"0x\");\n\t\t\tbinary = sb.toString();\n\t}",
"int getBitAsInt(int index);",
"private static String getBinaryDigit(int iter, int seed)\r\n {\r\n if(iter == 0) {return \"\";}\r\n String result = seed % 2 == 0 ? \"0\" : \"1\";\r\n return result + getBinaryDigit(iter - 1, (int)Math.pow(seed,2) % (p * q));\r\n }",
"private StringBuilder binConversion(StringBuilder input) {\n\t\tStringBuilder finalres = new StringBuilder();\n\t\tString currentVal = \"\";\n\t\tchar tempVal = ' ';\n\t\t\n\t\tfor(int i = 0; i < input.length(); i++)\n\t\t{\n\t\t\t\n\t\t\ttempVal = input.charAt(i);\n\t\t\t\n\t\t\tif(isOperator(input.charAt(i)) == false)\n\t\t\t{\n\t\t\t\tcurrentVal = currentVal + Character.toString(tempVal);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tint val = Integer.parseInt(currentVal,2);\n\t\t\t\t\n\t\t\t\tfinalres.append(val + Character.toString(tempVal));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// converting the last currentVal\n\t\t\n\t\tint val = Integer.parseInt(currentVal,2);\n\t\t\n\t\tfinalres.append(val);\n\t\t\n\t\treturn finalres;\n\t}",
"public static int decimalToBinary(int s){\n\t\tString result=\"\";\n\t\tif (s<=0){\n\t\t\treturn 0;\n\t\t}\n\t\tfor (int i = 2; s> 0; s/=2){\n\t\t\tresult=result + s%2; \n\t\t}\n\t\tString p1= \"\";\n\t\tfor (int i=0; i<result.length(); i++){\n\t\t\tString l=result.substring(i, i+1);\n\t\t\tp1=p1+l;\n\t\t}\n\t\t\n\t\treturn lib.Change.StringToInt(p1, -1);\n\t\n\t}",
"public static byte getMybit(byte val, int pos){\n return (byte) ((val >> pos) & 1);\n }",
"public String binToHex(String input) {\r\n int decimal = Integer.parseInt(input,2);\t\r\n\t\treturn Integer.toString(decimal,16);\t\r\n\t}",
"int getHighBitLength();",
"private static String FloatToBinaryString(float data){\n int intData = Float.floatToIntBits(data);\n return String.format(\"%32s\", Integer.toBinaryString(intData)).replace(' ', '0');\n }",
"public static String toByteString(byte value) {\n String str = String.format(\"%x\", value);\n if (str.length() == 1)\n str = \"0\" + str;\n return str;\n }",
"public static String getBits(byte f, int size) {\n StringBuffer sb = new StringBuffer();\n sb = f < 0 ? sb.append(\"1\") : sb.append(\"0\");\n byte mask = 1;\n for (int i = size; i >= 0; i--) {\n int x = (mask<<i & f) == 0 ? 0 : 1;\n sb.append(x);\n }\n return sb.toString();\n }",
"public long encode(long value) {\n\n return value ^ (value >> 1);\n }",
"int getLowBitLength();",
"public String octaToBinario(int octal) {\n\t\tSystem.out.print(\"Convirtiendo octal (\" + octal + \") a Binario >> \");\n\t\tInteger numero = 0;\n\t\ttry{\n\t\t\tnumero = Integer.valueOf(String.valueOf(octal), 16);\n\t\t}catch (NumberFormatException e) {\n\t\t\tSystem.err.print(\"\\nERROR : El numero \" + octal +\" no es octal\");\n\t\t}\n\t\treturn Integer.toBinaryString(numero.intValue());\n\t}",
"private int getBit(int value, int k) {\r\n\t\treturn (value >> k) & 1;\r\n\t}",
"static int beautifulBinaryString(String b) {\n int index = b.indexOf(\"010\", 0) ;\n int change = 0;\n while (index != -1) {\n change++;\n index = b.indexOf(\"010\", index + 3) ;\n }\n return change;\n }",
"public static String binValue(byte[] bytes) {\n StringBuilder sb = new StringBuilder(8*bytes.length);\n for (int j = 0; j< bytes.length; j++){\n sb.append(binValue(bytes[j]));\n }\n return sb.toString();\n }",
"public String formatAs32BitString(int i) {\r\n\t\tString retVal = Integer.toBinaryString(i);\r\n\t\tif(i >= 0) {\r\n\t\t\tretVal = \"00000000000000000000000000000000\" + retVal;\r\n\t\t\tretVal = retVal.substring(retVal.length()-32);\r\n\t\t}\r\n\t\treturn retVal;\r\n\t}",
"public static String asBinary( Grid grid ) {\n StringBuilder string = new StringBuilder();\n for ( int x = 0; x < grid.getRows(); x++ ) {\n for ( int y = 0; y < grid.getColumns(); y++ ) {\n Cell currentCell = grid.getCell( x, y );\n boolean[] currentCellWalls = currentCell.getWallsArray();\n if ( currentCell.isHighlighted() ) {\n string.append(\"0001\");\n } else {\n string.append(\"0000\");\n }\n if (currentCellWalls[0]) {\n string.append(\"1\");\n } else {\n string.append(\"0\");\n }\n if (currentCellWalls[1]) {\n string.append(\"1\");\n } else {\n string.append(\"0\");\n }\n if (currentCellWalls[2]) {\n string.append(\"1\");\n } else {\n string.append(\"0\");\n }\n if (currentCellWalls[3]) {\n string.append(\"1\");\n } else {\n string.append(\"0\");\n }\n }\n if ( x!=grid.getRows()-1 ) {\n string.append(\"\\n\");\n }\n }\n return string.toString();\n }",
"public void binToHex(){\n\t\tthis.inputBin();\n\t\tif(checkValue()==true){\n\t\t\tthis.toHex();\n\t\t\tthis.outHex();\n\t\t}\n\t}",
"public static void main(String[]args){\n \r\n print_binary(15);//Print the integer in binary form using interations\r\n }",
"public static String getBits(short f, int size) {\n StringBuffer sb = new StringBuffer();\n sb = f < 0 ? sb.append(\"1\") : sb.append(\"0\");\n short mask = 1;\n for (int i = size; i >= 0; i--) {\n int x = (mask<<i & f) == 0 ? 0 : 1;\n sb.append(x);\n }\n return sb.toString();\n }",
"public static int binaryToGray(int num) { return (num >>> 1) ^ num; }",
"public static double bitsToBytes(double num) { return (num/8); }",
"public int reverseBits(int n) {\n int x = 0;\n for(int i=0;i<32;i++){\n x = x<<1 | (n&1);\n n=n>>1;\n }\n return x;\n }"
]
| [
"0.75196755",
"0.73145837",
"0.69966775",
"0.691914",
"0.68144095",
"0.6719433",
"0.669432",
"0.6645562",
"0.66158134",
"0.65980154",
"0.6576011",
"0.6570339",
"0.6560305",
"0.6552722",
"0.65292513",
"0.6483496",
"0.64752454",
"0.6440156",
"0.6353853",
"0.6339781",
"0.63097",
"0.6246204",
"0.62215674",
"0.62015027",
"0.6197822",
"0.6166048",
"0.6159172",
"0.6149863",
"0.61491853",
"0.612195",
"0.61211896",
"0.61052984",
"0.6071143",
"0.60666806",
"0.60529155",
"0.6015468",
"0.601293",
"0.60127234",
"0.60101527",
"0.5966509",
"0.59589124",
"0.5951913",
"0.5950517",
"0.5932824",
"0.59256834",
"0.5919281",
"0.5907984",
"0.59011304",
"0.58934563",
"0.58750516",
"0.5868171",
"0.58347845",
"0.5830476",
"0.5819807",
"0.5811922",
"0.5802835",
"0.5798462",
"0.57941973",
"0.57925147",
"0.57920337",
"0.5787231",
"0.5772722",
"0.57582146",
"0.57347685",
"0.5715514",
"0.5701205",
"0.56995624",
"0.5697839",
"0.56914276",
"0.568749",
"0.5686985",
"0.56791097",
"0.5677085",
"0.56660044",
"0.56645954",
"0.5663154",
"0.56592846",
"0.5658686",
"0.5653734",
"0.5637342",
"0.56345546",
"0.5610933",
"0.5610328",
"0.56088185",
"0.5602577",
"0.55902153",
"0.55899644",
"0.5587515",
"0.55842626",
"0.55766505",
"0.5574403",
"0.5571212",
"0.5559365",
"0.5556234",
"0.553359",
"0.55299115",
"0.55291456",
"0.5518626",
"0.5503802",
"0.5502732",
"0.5502249"
]
| 0.0 | -1 |
/ renamed from: a | public C13816g[] mo35218a() {
return this.f30692a;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }",
"public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }",
"interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}",
"interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }",
"interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }",
"public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}",
"public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }",
"public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }",
"public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}",
"public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }",
"interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }",
"public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }",
"public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }",
"private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }",
"protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }",
"public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }",
"private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }",
"public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }",
"public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}",
"public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}",
"public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }",
"public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }",
"public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }",
"public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }",
"public void a() {\n ((a) this.a).a();\n }",
"public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }",
"public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}",
"public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}",
"public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }",
"@Override\r\n\tpublic void a() {\n\t\t\r\n\t}",
"public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}",
"public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}",
"public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}",
"public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}",
"interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}",
"public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}",
"public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}",
"public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }",
"@Override\n\tpublic void a() {\n\t\t\n\t}",
"public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}",
"void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}",
"public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }",
"interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }",
"public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}",
"public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }",
"public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}",
"public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}",
"public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }",
"public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}",
"public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}",
"public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}",
"public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}",
"public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }",
"public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}",
"public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}",
"public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}",
"public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }",
"public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}",
"public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }",
"public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}",
"public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}",
"public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}",
"public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}",
"public void acionou(int a){\n\t\t\tb=a;\n\t\t}",
"public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}",
"public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }",
"public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}",
"public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }",
"public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }",
"public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }",
"public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }",
"public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }",
"public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}",
"public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}",
"public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }",
"public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }",
"public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }",
"public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}",
"protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }",
"public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }",
"public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }",
"public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }",
"public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }",
"public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}",
"public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }",
"public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }",
"public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}",
"public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}",
"public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}",
"public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }",
"public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }",
"interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }",
"public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}",
"public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }",
"private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }",
"interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}",
"public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }",
"public b[] a() {\n/* 95 */ return this.a;\n/* */ }",
"interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }"
]
| [
"0.62497115",
"0.6242887",
"0.61394435",
"0.61176854",
"0.6114027",
"0.60893",
"0.6046901",
"0.6024682",
"0.60201293",
"0.5975212",
"0.59482527",
"0.59121317",
"0.5883635",
"0.587841",
"0.58703005",
"0.5868436",
"0.5864884",
"0.5857492",
"0.58306104",
"0.5827752",
"0.58272064",
"0.5794689",
"0.57890314",
"0.57838726",
"0.5775679",
"0.57694733",
"0.5769128",
"0.57526815",
"0.56907034",
"0.5677874",
"0.5670547",
"0.56666386",
"0.56592244",
"0.5658682",
"0.56574154",
"0.5654324",
"0.5644676",
"0.56399715",
"0.5638734",
"0.5630582",
"0.56183887",
"0.5615435",
"0.56069666",
"0.5605207",
"0.56005067",
"0.559501",
"0.55910283",
"0.5590222",
"0.55736613",
"0.5556682",
"0.5554544",
"0.5550076",
"0.55493855",
"0.55446684",
"0.5538079",
"0.5529058",
"0.5528109",
"0.552641",
"0.5525864",
"0.552186",
"0.5519972",
"0.5509587",
"0.5507195",
"0.54881203",
"0.5485328",
"0.54826045",
"0.5482066",
"0.5481586",
"0.5479751",
"0.54776895",
"0.54671466",
"0.5463307",
"0.54505056",
"0.54436916",
"0.5440517",
"0.5439747",
"0.5431944",
"0.5422869",
"0.54217863",
"0.5417556",
"0.5403905",
"0.5400223",
"0.53998446",
"0.5394735",
"0.5388649",
"0.5388258",
"0.5374842",
"0.5368887",
"0.53591394",
"0.5357029",
"0.5355688",
"0.535506",
"0.5355034",
"0.53494394",
"0.5341044",
"0.5326166",
"0.53236824",
"0.53199095",
"0.53177035",
"0.53112453",
"0.5298229"
]
| 0.0 | -1 |
/ renamed from: b | public C13816g[] mo35220b() {
return this.f30693b;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void mo2508a(bxb bxb);",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n public void b() {\n }",
"public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }",
"@Override\n\tpublic void b2() {\n\t\t\n\t}",
"void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}",
"interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}",
"@Override\n\tpublic void b() {\n\n\t}",
"interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }",
"public bb b() {\n return a(this.a);\n }",
"@Override\n\tpublic void b1() {\n\t\t\n\t}",
"public void b() {\r\n }",
"@Override\n\tpublic void bbb() {\n\t\t\n\t}",
"public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }",
"public abstract void b(StringBuilder sb);",
"public void b() {\n }",
"public void b() {\n }",
"protected b(int mb) {\n/* 87 */ this.b = mb;\n/* */ }",
"public u(b paramb)\r\n/* 7: */ {\r\n/* 8: 9 */ this.a = paramb;\r\n/* 9: */ }",
"public interface b {\n void H_();\n\n void I_();\n\n void J_();\n\n void a(C0063d dVar);\n\n void a(byte[] bArr);\n\n void b(boolean z);\n }",
"public b[] a() {\n/* 95 */ return this.a;\n/* */ }",
"public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }",
"public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }",
"public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}",
"public void b() {\n ((a) this.a).b();\n }",
"public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }",
"b(a aVar) {\n super(0);\n this.this$0 = aVar;\n }",
"public t b() {\n return a(this.a);\n }",
"public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }",
"public static String a(int c) {\n/* 89 */ return b.a(c);\n/* */ }",
"private void m678b(byte b) {\n byte[] bArr = this.f523r;\n bArr[0] = b;\n this.f552g.mo502b(bArr);\n }",
"public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }",
"public abstract T zzm(B b);",
"public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }",
"public void b(World paramaqu, BlockPosition paramdt, Block parambec)\r\n/* 27: */ {\r\n/* 28: 47 */ bcm localbcm = paramaqu.s(paramdt);\r\n/* 29: 48 */ if ((localbcm instanceof bdv)) {\r\n/* 30: 49 */ ((bdv)localbcm).h();\r\n/* 31: */ } else {\r\n/* 32: 51 */ super.b(paramaqu, paramdt, parambec);\r\n/* 33: */ }\r\n/* 34: */ }",
"public abstract void zzc(B b, int i, int i2);",
"public interface b {\n}",
"public interface b {\n}",
"private void m10263b(byte b) throws cf {\r\n this.f6483r[0] = b;\r\n this.g.m10347b(this.f6483r);\r\n }",
"BSubstitution createBSubstitution();",
"public void b(ahd paramahd) {}",
"void b();",
"public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}",
"B database(S database);",
"public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}",
"public abstract C0631bt mo9227aB();",
"public an b() {\n return a(this.a);\n }",
"protected abstract void a(bru parambru);",
"static void go(Base b) {\n\t\tb.add(8);\n\t}",
"void mo46242a(bmc bmc);",
"public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }",
"public interface bca extends bbn {\n bca a();\n\n bca a(String str);\n\n bca b(String str);\n\n bca c(String str);\n}",
"public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }",
"public abstract BoundType b();",
"public void b(amj paramamj)\r\n/* 538: */ {\r\n/* 539:579 */ this.f = paramamj;\r\n/* 540: */ }",
"b(a aVar, com.bytedance.jedi.model.h.a aVar2) {\n super(aVar2);\n this.f21531a = aVar;\n this.f21532b = new com.bytedance.jedi.model.h.f(aVar);\n }",
"private void b(int paramInt)\r\n/* 193: */ {\r\n/* 194:203 */ this.h.a(a(paramInt));\r\n/* 195: */ }",
"public void b(ahb paramahb)\r\n/* 583: */ {\r\n/* 584:625 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 585:626 */ this.a[i] = amj.b(paramahb.a[i]);\r\n/* 586: */ }\r\n/* 587:628 */ for (i = 0; i < this.b.length; i++) {\r\n/* 588:629 */ this.b[i] = amj.b(paramahb.b[i]);\r\n/* 589: */ }\r\n/* 590:631 */ this.c = paramahb.c;\r\n/* 591: */ }",
"interface b {\n\n /* compiled from: CreditAccountContract */\n public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }\n\n /* compiled from: CreditAccountContract */\n public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }\n}",
"@Override\n\tpublic void visit(PartB partB) {\n\n\t}",
"public abstract void zzb(B b, int i, long j);",
"public abstract void zza(B b, int i, zzeh zzeh);",
"int metodo2(int a, int b) {\r\n\r\n\t\tthis.a += 5; // se modifica el campo del objeto, el uso de la palabra reservada this se utiliza para referenciar al campo.\r\n\t\tb += 7;\r\n\t\treturn a; // modifica en la asignaci\\u00f3n\r\n\t}",
"private void internalCopy(Board b) {\n for (int i = 0; i < SIDE * SIDE; i += 1) {\n set(i, b.get(i));\n }\n\n _directions = b._directions;\n _whoseMove = b._whoseMove;\n _history = b._history;\n }",
"public int b()\r\n/* 69: */ {\r\n/* 70:74 */ return this.b;\r\n/* 71: */ }",
"public void b(StringBuilder sb) {\n sb.append(this.a);\n sb.append(')');\n }",
"public void b() {\n e$a e$a;\n try {\n e$a = this.b;\n }\n catch (IOException iOException) {\n return;\n }\n Object object = this.c;\n e$a.b(object);\n }",
"public abstract void a(StringBuilder sb);",
"public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}",
"public abstract void zzf(Object obj, B b);",
"public interface bdp {\n\n /* renamed from: a */\n public static final bdp f3422a = new bdo();\n\n /* renamed from: a */\n bdm mo1784a(akh akh);\n}",
"@Override\n\tpublic void parse(Buffer b) {\n\t\t\n\t}",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"public abstract void a(b paramb, int paramInt1, int paramInt2);",
"public void mo1945a(byte b) throws cf {\r\n m10263b(b);\r\n }",
"void mo83703a(C32456b<T> bVar);",
"public void a(String str) {\n ((b.b) this.b).d(str);\n }",
"public void selectB() { }",
"BOperation createBOperation();",
"void metodo1(int a, int b) {\r\n\t\ta += 5;//par\\u00e1metro con el mismo nombre que el campo.\r\n\t\tb += 7;\r\n\t}",
"private static void m2196a(StringBuffer stringBuffer, byte b) {\n stringBuffer.append(\"0123456789ABCDEF\".charAt((b >> 4) & 15)).append(\"0123456789ABCDEF\".charAt(b & 15));\n }",
"public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }",
"public void b(fv paramfv)\r\n/* 408: */ {\r\n/* 409:423 */ this.a = new amj[36];\r\n/* 410:424 */ this.b = new amj[4];\r\n/* 411:425 */ for (int i = 0; i < paramfv.c(); i++)\r\n/* 412: */ {\r\n/* 413:426 */ fn localfn = paramfv.b(i);\r\n/* 414:427 */ int j = localfn.d(\"Slot\") & 0xFF;\r\n/* 415:428 */ amj localamj = amj.a(localfn);\r\n/* 416:429 */ if (localamj != null)\r\n/* 417: */ {\r\n/* 418:430 */ if ((j >= 0) && (j < this.a.length)) {\r\n/* 419:431 */ this.a[j] = localamj;\r\n/* 420: */ }\r\n/* 421:433 */ if ((j >= 100) && (j < this.b.length + 100)) {\r\n/* 422:434 */ this.b[(j - 100)] = localamj;\r\n/* 423: */ }\r\n/* 424: */ }\r\n/* 425: */ }\r\n/* 426: */ }",
"public void b(String str) {\n ((b.b) this.b).e(str);\n }",
"public String b()\r\n/* 35: */ {\r\n/* 36:179 */ return a();\r\n/* 37: */ }",
"public abstract void zza(B b, int i, T t);",
"public Item b(World paramaqu, BlockPosition paramdt)\r\n/* 189: */ {\r\n/* 190:220 */ return null;\r\n/* 191: */ }",
"public abstract void zza(B b, int i, long j);",
"public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}",
"private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }",
"public abstract void mo9798a(byte b);",
"public void mo9798a(byte b) {\n if (this.f9108f == this.f9107e) {\n mo9827i();\n }\n byte[] bArr = this.f9106d;\n int i = this.f9108f;\n this.f9108f = i + 1;\n bArr[i] = b;\n this.f9109g++;\n }",
"public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}",
"private void m676a(TField bkVar, byte b) {\n if (b == -1) {\n b = m687e(bkVar.f538b);\n }\n short s = bkVar.f539c;\n short s2 = this.f519n;\n if (s <= s2 || s - s2 > 15) {\n m678b(b);\n mo446a(bkVar.f539c);\n } else {\n m686d(b | ((s - s2) << 4));\n }\n this.f519n = bkVar.f539c;\n }",
"private static void m831a(C0741g<?> gVar, C0747b bVar) {\n gVar.mo9477a(C0743i.f718b, (C0739e<? super Object>) bVar);\n gVar.mo9476a(C0743i.f718b, (C0738d) bVar);\n gVar.mo9474a(C0743i.f718b, (C0736b) bVar);\n }",
"public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}",
"private void j()\n/* */ {\n/* 223 */ c localc = this.b;\n/* 224 */ this.b = this.c;\n/* 225 */ this.c = localc;\n/* 226 */ this.c.b();\n/* */ }",
"public lj ar(byte b) {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }",
"public interface AbstractC10485b {\n /* renamed from: a */\n void mo64153a(boolean z);\n }",
"public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }",
"interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }"
]
| [
"0.64558864",
"0.6283203",
"0.6252635",
"0.6250949",
"0.6244743",
"0.6216273",
"0.6194491",
"0.6193556",
"0.61641675",
"0.6140157",
"0.60993093",
"0.60974354",
"0.6077849",
"0.6001867",
"0.5997364",
"0.59737104",
"0.59737104",
"0.5905105",
"0.5904295",
"0.58908087",
"0.5886636",
"0.58828026",
"0.5855491",
"0.584618",
"0.5842517",
"0.5824137",
"0.5824071",
"0.58097327",
"0.5802052",
"0.58012927",
"0.579443",
"0.5792392",
"0.57902914",
"0.5785124",
"0.57718205",
"0.57589084",
"0.5735892",
"0.5735892",
"0.5734873",
"0.5727929",
"0.5720821",
"0.5712531",
"0.5706813",
"0.56896514",
"0.56543154",
"0.5651059",
"0.5649904",
"0.56496733",
"0.5647035",
"0.5640965",
"0.5640109",
"0.563993",
"0.5631903",
"0.5597427",
"0.55843794",
"0.5583287",
"0.557783",
"0.55734867",
"0.55733293",
"0.5572254",
"0.55683887",
"0.55624336",
"0.55540246",
"0.5553985",
"0.55480546",
"0.554261",
"0.5535739",
"0.5529958",
"0.5519634",
"0.5517503",
"0.55160624",
"0.5511545",
"0.5505353",
"0.5500533",
"0.5491741",
"0.5486198",
"0.5481978",
"0.547701",
"0.54725856",
"0.5471632",
"0.5463497",
"0.5460805",
"0.5454913",
"0.5454885",
"0.54519916",
"0.5441594",
"0.5436747",
"0.5432453",
"0.5425923",
"0.5424724",
"0.54189867",
"0.54162544",
"0.54051477",
"0.53998184",
"0.53945845",
"0.53887725",
"0.5388146",
"0.5387678",
"0.53858143",
"0.53850687",
"0.5384439"
]
| 0.0 | -1 |
/ renamed from: c | public C13816g mo35221c() {
return this.f30694c;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void mo5289a(C5102c c5102c);",
"public static void c0() {\n\t}",
"void mo57278c();",
"private static void cajas() {\n\t\t\n\t}",
"void mo5290b(C5102c c5102c);",
"void mo80457c();",
"void mo12638c();",
"void mo28717a(zzc zzc);",
"void mo21072c();",
"@Override\n\tpublic void ccc() {\n\t\t\n\t}",
"public void c() {\n }",
"void mo17012c();",
"C2451d mo3408a(C2457e c2457e);",
"void mo88524c();",
"void mo86a(C0163d c0163d);",
"void mo17021c();",
"public abstract void mo53562a(C18796a c18796a);",
"void mo4874b(C4718l c4718l);",
"void mo4873a(C4718l c4718l);",
"C12017a mo41088c();",
"public abstract void mo70702a(C30989b c30989b);",
"void mo72114c();",
"public void mo12628c() {\n }",
"C2841w mo7234g();",
"public interface C0335c {\n }",
"public void mo1403c() {\n }",
"public static void c3() {\n\t}",
"public static void c1() {\n\t}",
"void mo8712a(C9714a c9714a);",
"void mo67924c();",
"public void mo97906c() {\n }",
"public abstract void mo27385c();",
"String mo20731c();",
"public int c()\r\n/* 74: */ {\r\n/* 75:78 */ return this.c;\r\n/* 76: */ }",
"public interface C0939c {\n }",
"void mo1582a(String str, C1329do c1329do);",
"void mo304a(C0366h c0366h);",
"void mo1493c();",
"private String getString(byte c) {\n\t\treturn c==1? \"$ \": \" \";\n\t}",
"java.lang.String getC3();",
"C45321i mo90380a();",
"public interface C11910c {\n}",
"void mo57277b();",
"String mo38972c();",
"static int type_of_cnc(String passed){\n\t\treturn 1;\n\t}",
"public static void CC2_1() {\n\t}",
"static int type_of_cc(String passed){\n\t\treturn 1;\n\t}",
"public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }",
"public void mo56167c() {\n }",
"public interface C0136c {\n }",
"private void kk12() {\n\n\t}",
"abstract String mo1748c();",
"public abstract void mo70710a(String str, C24343db c24343db);",
"public interface C0303q extends C0291e {\n /* renamed from: a */\n void mo1747a(int i);\n\n /* renamed from: a */\n void mo1749a(C0288c cVar);\n\n /* renamed from: a */\n void mo1751a(byte[] bArr);\n\n /* renamed from: b */\n void mo1753b(int i);\n\n /* renamed from: c */\n void mo1754c(int i);\n\n /* renamed from: d */\n void mo1755d(int i);\n\n /* renamed from: e */\n int mo1756e(int i);\n\n /* renamed from: g */\n int mo1760g();\n\n /* renamed from: g */\n void mo1761g(int i);\n\n /* renamed from: h */\n void mo1763h(int i);\n}",
"C3577c mo19678C();",
"public abstract int c();",
"public abstract int c();",
"public final void mo11687c() {\n }",
"byte mo30283c();",
"private java.lang.String c(java.lang.String r7) {\n /*\n r6 = this;\n r2 = \"\";\n r0 = r6.e;\t Catch:{ FileNotFoundException -> 0x0052 }\n if (r0 == 0) goto L_0x0050;\n L_0x0006:\n r0 = new java.lang.StringBuilder;\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = java.lang.String.valueOf(r7);\t Catch:{ FileNotFoundException -> 0x0052 }\n r0.<init>(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = \".\";\n r0 = r0.append(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = r6.e;\t Catch:{ FileNotFoundException -> 0x0052 }\n r0 = r0.append(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r0 = r0.toString();\t Catch:{ FileNotFoundException -> 0x0052 }\n L_0x001f:\n r1 = r6.d;\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = r1.openFileInput(r0);\t Catch:{ FileNotFoundException -> 0x0052 }\n L_0x0025:\n r3 = new java.io.BufferedReader;\n r4 = new java.io.InputStreamReader;\n r0 = r1;\n r0 = (java.io.InputStream) r0;\n r5 = \"UTF-8\";\n r5 = java.nio.charset.Charset.forName(r5);\n r4.<init>(r0, r5);\n r3.<init>(r4);\n r0 = new java.lang.StringBuffer;\n r0.<init>();\n L_0x003d:\n r4 = r3.readLine();\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n if (r4 != 0) goto L_0x0061;\n L_0x0043:\n r0 = r0.toString();\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x007d }\n r1.close();\t Catch:{ IOException -> 0x007d }\n r3.close();\t Catch:{ IOException -> 0x007d }\n L_0x004f:\n return r0;\n L_0x0050:\n r0 = r7;\n goto L_0x001f;\n L_0x0052:\n r0 = move-exception;\n r0 = r6.d;\t Catch:{ IOException -> 0x005e }\n r0 = r0.getAssets();\t Catch:{ IOException -> 0x005e }\n r1 = r0.open(r7);\t Catch:{ IOException -> 0x005e }\n goto L_0x0025;\n L_0x005e:\n r0 = move-exception;\n r0 = r2;\n goto L_0x004f;\n L_0x0061:\n r0.append(r4);\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n goto L_0x003d;\n L_0x0065:\n r0 = move-exception;\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x0070 }\n r1.close();\t Catch:{ IOException -> 0x0070 }\n r3.close();\t Catch:{ IOException -> 0x0070 }\n r0 = r2;\n goto L_0x004f;\n L_0x0070:\n r0 = move-exception;\n r0 = r2;\n goto L_0x004f;\n L_0x0073:\n r0 = move-exception;\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x007f }\n r1.close();\t Catch:{ IOException -> 0x007f }\n r3.close();\t Catch:{ IOException -> 0x007f }\n L_0x007c:\n throw r0;\n L_0x007d:\n r1 = move-exception;\n goto L_0x004f;\n L_0x007f:\n r1 = move-exception;\n goto L_0x007c;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.a.b.b.c(java.lang.String):java.lang.String\");\n }",
"@Override\n\tpublic void compile(CodeBlock c, CompilerEnvironment environment) {\n\n\t}",
"public interface C3196it extends C3208jc {\n /* renamed from: a */\n void mo30275a(long j);\n\n /* renamed from: b */\n C3197iu mo30281b(long j);\n\n /* renamed from: b */\n boolean mo30282b();\n\n /* renamed from: c */\n byte mo30283c();\n\n /* renamed from: c */\n String mo30285c(long j);\n\n /* renamed from: d */\n void mo30290d(long j);\n\n /* renamed from: e */\n int mo30291e();\n\n /* renamed from: f */\n long mo30295f();\n}",
"public static void mmcc() {\n\t}",
"java.lang.String getCit();",
"public abstract C mo29734a();",
"C15430g mo56154a();",
"void mo41086b();",
"@Override\n public void func_104112_b() {\n \n }",
"public interface C9223b {\n }",
"public abstract String mo11611b();",
"void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);",
"String getCmt();",
"interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }",
"interface C2578d {\n}",
"public interface C1803l extends C1813t {\n /* renamed from: b */\n C1803l mo7382b(C2778au auVar);\n\n /* renamed from: f */\n List<C1700ar> mo7233f();\n\n /* renamed from: g */\n C2841w mo7234g();\n\n /* renamed from: q */\n C1800i mo7384q();\n}",
"double fFromC(double c) {\n return (c * 9 / 5) + 32;\n }",
"void mo72113b();",
"void mo1749a(C0288c cVar);",
"public interface C0764b {\n}",
"void mo41083a();",
"String[] mo1153c();",
"C1458cs mo7613iS();",
"public interface C0333a {\n }",
"public abstract int mo41077c();",
"public interface C8843g {\n}",
"public abstract void mo70709a(String str, C41018cm c41018cm);",
"void mo28307a(zzgd zzgd);",
"public static void mcdc() {\n\t}",
"public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}",
"C1435c mo1754a(C1433a c1433a, C1434b c1434b);",
"public interface C0389gj extends C0388gi {\n}",
"C5727e mo33224a();",
"C12000e mo41087c(String str);",
"public abstract String mo118046b();",
"public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }",
"public interface C0938b {\n }",
"void mo80455b();",
"public interface C0385a {\n }",
"public interface C5527c {\n /* renamed from: a */\n int mo4095a(int i);\n\n /* renamed from: b */\n C5537g mo4096b(int i);\n}",
"public interface C32231g {\n /* renamed from: a */\n void mo8280a(int i, int i2, C1207m c1207m);\n}",
"public interface C11994b {\n /* renamed from: a */\n C11996a mo41079a(String str);\n\n /* renamed from: a */\n C11996a mo41080a(String str, C11997b bVar, String... strArr);\n\n /* renamed from: a */\n C11998c mo41081a(String str, C11999d dVar, String... strArr);\n\n /* renamed from: a */\n C12000e mo41082a(String str, C12001f fVar, String... strArr);\n\n /* renamed from: a */\n void mo41083a();\n\n /* renamed from: a */\n void mo41084a(C12018b bVar, ConnectionState... connectionStateArr);\n\n /* renamed from: b */\n C11996a mo41085b(String str);\n\n /* renamed from: b */\n void mo41086b();\n\n /* renamed from: c */\n C12000e mo41087c(String str);\n\n /* renamed from: c */\n C12017a mo41088c();\n\n /* renamed from: d */\n void mo41089d(String str);\n\n /* renamed from: e */\n C11998c mo41090e(String str);\n\n /* renamed from: f */\n C12000e mo41091f(String str);\n\n /* renamed from: g */\n C11998c mo41092g(String str);\n}"
]
| [
"0.64592767",
"0.644052",
"0.6431582",
"0.6418656",
"0.64118475",
"0.6397491",
"0.6250796",
"0.62470585",
"0.6244832",
"0.6232792",
"0.618864",
"0.61662376",
"0.6152657",
"0.61496663",
"0.6138441",
"0.6137171",
"0.6131197",
"0.6103783",
"0.60983956",
"0.6077118",
"0.6061723",
"0.60513836",
"0.6049069",
"0.6030368",
"0.60263443",
"0.60089093",
"0.59970635",
"0.59756917",
"0.5956231",
"0.5949343",
"0.5937446",
"0.5911776",
"0.59034705",
"0.5901311",
"0.5883238",
"0.5871533",
"0.5865361",
"0.5851141",
"0.581793",
"0.5815705",
"0.58012",
"0.578891",
"0.57870495",
"0.5775621",
"0.57608724",
"0.5734331",
"0.5731584",
"0.5728505",
"0.57239383",
"0.57130504",
"0.57094604",
"0.570793",
"0.5697671",
"0.56975955",
"0.56911296",
"0.5684489",
"0.5684489",
"0.56768984",
"0.56749034",
"0.5659463",
"0.56589085",
"0.56573",
"0.56537443",
"0.5651912",
"0.5648272",
"0.5641736",
"0.5639226",
"0.5638583",
"0.56299245",
"0.56297386",
"0.56186295",
"0.5615729",
"0.56117755",
"0.5596015",
"0.55905765",
"0.55816257",
"0.55813104",
"0.55723965",
"0.5572061",
"0.55696625",
"0.5566985",
"0.55633485",
"0.555888",
"0.5555646",
"0.55525774",
"0.5549722",
"0.5548184",
"0.55460495",
"0.5539394",
"0.5535825",
"0.55300397",
"0.5527975",
"0.55183905",
"0.5517322",
"0.5517183",
"0.55152744",
"0.5514932",
"0.55128884",
"0.5509501",
"0.55044043",
"0.54984957"
]
| 0.0 | -1 |
/ renamed from: a | public void mo35217a(C13816g[] gVarArr) {
this.f30692a = gVarArr;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }",
"public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }",
"interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}",
"interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }",
"interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }",
"public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}",
"public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }",
"public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }",
"public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}",
"public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }",
"interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }",
"public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }",
"public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }",
"private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }",
"protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }",
"public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }",
"private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }",
"public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }",
"public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}",
"public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}",
"public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }",
"public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }",
"public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }",
"public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }",
"public void a() {\n ((a) this.a).a();\n }",
"public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }",
"public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}",
"public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}",
"public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }",
"@Override\r\n\tpublic void a() {\n\t\t\r\n\t}",
"public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}",
"public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}",
"public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}",
"public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}",
"interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}",
"public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}",
"public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}",
"public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }",
"@Override\n\tpublic void a() {\n\t\t\n\t}",
"public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}",
"void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}",
"public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }",
"interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }",
"public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}",
"public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }",
"public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}",
"public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}",
"public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }",
"public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}",
"public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}",
"public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}",
"public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}",
"public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }",
"public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}",
"public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}",
"public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}",
"public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }",
"public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}",
"public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }",
"public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}",
"public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}",
"public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}",
"public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}",
"public void acionou(int a){\n\t\t\tb=a;\n\t\t}",
"public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}",
"public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }",
"public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}",
"public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }",
"public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }",
"public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }",
"public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }",
"public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }",
"public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}",
"public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}",
"public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }",
"public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }",
"public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }",
"public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}",
"protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }",
"public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }",
"public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }",
"public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }",
"public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }",
"public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}",
"public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }",
"public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }",
"public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}",
"public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}",
"public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}",
"public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }",
"public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }",
"interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }",
"public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}",
"public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }",
"private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }",
"interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}",
"public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }",
"public b[] a() {\n/* 95 */ return this.a;\n/* */ }",
"interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }"
]
| [
"0.62497115",
"0.6242887",
"0.61394435",
"0.61176854",
"0.6114027",
"0.60893",
"0.6046901",
"0.6024682",
"0.60201293",
"0.5975212",
"0.59482527",
"0.59121317",
"0.5883635",
"0.587841",
"0.58703005",
"0.5868436",
"0.5864884",
"0.5857492",
"0.58306104",
"0.5827752",
"0.58272064",
"0.5794689",
"0.57890314",
"0.57838726",
"0.5775679",
"0.57694733",
"0.5769128",
"0.57526815",
"0.56907034",
"0.5677874",
"0.5670547",
"0.56666386",
"0.56592244",
"0.5658682",
"0.56574154",
"0.5654324",
"0.5644676",
"0.56399715",
"0.5638734",
"0.5630582",
"0.56183887",
"0.5615435",
"0.56069666",
"0.5605207",
"0.56005067",
"0.559501",
"0.55910283",
"0.5590222",
"0.55736613",
"0.5556682",
"0.5554544",
"0.5550076",
"0.55493855",
"0.55446684",
"0.5538079",
"0.5529058",
"0.5528109",
"0.552641",
"0.5525864",
"0.552186",
"0.5519972",
"0.5509587",
"0.5507195",
"0.54881203",
"0.5485328",
"0.54826045",
"0.5482066",
"0.5481586",
"0.5479751",
"0.54776895",
"0.54671466",
"0.5463307",
"0.54505056",
"0.54436916",
"0.5440517",
"0.5439747",
"0.5431944",
"0.5422869",
"0.54217863",
"0.5417556",
"0.5403905",
"0.5400223",
"0.53998446",
"0.5394735",
"0.5388649",
"0.5388258",
"0.5374842",
"0.5368887",
"0.53591394",
"0.5357029",
"0.5355688",
"0.535506",
"0.5355034",
"0.53494394",
"0.5341044",
"0.5326166",
"0.53236824",
"0.53199095",
"0.53177035",
"0.53112453",
"0.5298229"
]
| 0.0 | -1 |
/ renamed from: b | public void mo35219b(C13816g[] gVarArr) {
this.f30693b = gVarArr;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void mo2508a(bxb bxb);",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n public void b() {\n }",
"public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }",
"@Override\n\tpublic void b2() {\n\t\t\n\t}",
"void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}",
"interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}",
"@Override\n\tpublic void b() {\n\n\t}",
"interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }",
"public bb b() {\n return a(this.a);\n }",
"@Override\n\tpublic void b1() {\n\t\t\n\t}",
"public void b() {\r\n }",
"@Override\n\tpublic void bbb() {\n\t\t\n\t}",
"public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }",
"public abstract void b(StringBuilder sb);",
"public void b() {\n }",
"public void b() {\n }",
"protected b(int mb) {\n/* 87 */ this.b = mb;\n/* */ }",
"public u(b paramb)\r\n/* 7: */ {\r\n/* 8: 9 */ this.a = paramb;\r\n/* 9: */ }",
"public interface b {\n void H_();\n\n void I_();\n\n void J_();\n\n void a(C0063d dVar);\n\n void a(byte[] bArr);\n\n void b(boolean z);\n }",
"public b[] a() {\n/* 95 */ return this.a;\n/* */ }",
"public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }",
"public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }",
"public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}",
"public void b() {\n ((a) this.a).b();\n }",
"public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }",
"b(a aVar) {\n super(0);\n this.this$0 = aVar;\n }",
"public t b() {\n return a(this.a);\n }",
"public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }",
"public static String a(int c) {\n/* 89 */ return b.a(c);\n/* */ }",
"private void m678b(byte b) {\n byte[] bArr = this.f523r;\n bArr[0] = b;\n this.f552g.mo502b(bArr);\n }",
"public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }",
"public abstract T zzm(B b);",
"public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }",
"public void b(World paramaqu, BlockPosition paramdt, Block parambec)\r\n/* 27: */ {\r\n/* 28: 47 */ bcm localbcm = paramaqu.s(paramdt);\r\n/* 29: 48 */ if ((localbcm instanceof bdv)) {\r\n/* 30: 49 */ ((bdv)localbcm).h();\r\n/* 31: */ } else {\r\n/* 32: 51 */ super.b(paramaqu, paramdt, parambec);\r\n/* 33: */ }\r\n/* 34: */ }",
"public abstract void zzc(B b, int i, int i2);",
"public interface b {\n}",
"public interface b {\n}",
"private void m10263b(byte b) throws cf {\r\n this.f6483r[0] = b;\r\n this.g.m10347b(this.f6483r);\r\n }",
"BSubstitution createBSubstitution();",
"public void b(ahd paramahd) {}",
"void b();",
"public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}",
"B database(S database);",
"public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}",
"public abstract C0631bt mo9227aB();",
"public an b() {\n return a(this.a);\n }",
"protected abstract void a(bru parambru);",
"static void go(Base b) {\n\t\tb.add(8);\n\t}",
"void mo46242a(bmc bmc);",
"public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }",
"public interface bca extends bbn {\n bca a();\n\n bca a(String str);\n\n bca b(String str);\n\n bca c(String str);\n}",
"public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }",
"public abstract BoundType b();",
"public void b(amj paramamj)\r\n/* 538: */ {\r\n/* 539:579 */ this.f = paramamj;\r\n/* 540: */ }",
"b(a aVar, com.bytedance.jedi.model.h.a aVar2) {\n super(aVar2);\n this.f21531a = aVar;\n this.f21532b = new com.bytedance.jedi.model.h.f(aVar);\n }",
"private void b(int paramInt)\r\n/* 193: */ {\r\n/* 194:203 */ this.h.a(a(paramInt));\r\n/* 195: */ }",
"public void b(ahb paramahb)\r\n/* 583: */ {\r\n/* 584:625 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 585:626 */ this.a[i] = amj.b(paramahb.a[i]);\r\n/* 586: */ }\r\n/* 587:628 */ for (i = 0; i < this.b.length; i++) {\r\n/* 588:629 */ this.b[i] = amj.b(paramahb.b[i]);\r\n/* 589: */ }\r\n/* 590:631 */ this.c = paramahb.c;\r\n/* 591: */ }",
"interface b {\n\n /* compiled from: CreditAccountContract */\n public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }\n\n /* compiled from: CreditAccountContract */\n public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }\n}",
"@Override\n\tpublic void visit(PartB partB) {\n\n\t}",
"public abstract void zzb(B b, int i, long j);",
"public abstract void zza(B b, int i, zzeh zzeh);",
"int metodo2(int a, int b) {\r\n\r\n\t\tthis.a += 5; // se modifica el campo del objeto, el uso de la palabra reservada this se utiliza para referenciar al campo.\r\n\t\tb += 7;\r\n\t\treturn a; // modifica en la asignaci\\u00f3n\r\n\t}",
"private void internalCopy(Board b) {\n for (int i = 0; i < SIDE * SIDE; i += 1) {\n set(i, b.get(i));\n }\n\n _directions = b._directions;\n _whoseMove = b._whoseMove;\n _history = b._history;\n }",
"public int b()\r\n/* 69: */ {\r\n/* 70:74 */ return this.b;\r\n/* 71: */ }",
"public void b(StringBuilder sb) {\n sb.append(this.a);\n sb.append(')');\n }",
"public void b() {\n e$a e$a;\n try {\n e$a = this.b;\n }\n catch (IOException iOException) {\n return;\n }\n Object object = this.c;\n e$a.b(object);\n }",
"public abstract void a(StringBuilder sb);",
"public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}",
"public abstract void zzf(Object obj, B b);",
"public interface bdp {\n\n /* renamed from: a */\n public static final bdp f3422a = new bdo();\n\n /* renamed from: a */\n bdm mo1784a(akh akh);\n}",
"@Override\n\tpublic void parse(Buffer b) {\n\t\t\n\t}",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"public abstract void a(b paramb, int paramInt1, int paramInt2);",
"public void mo1945a(byte b) throws cf {\r\n m10263b(b);\r\n }",
"void mo83703a(C32456b<T> bVar);",
"public void a(String str) {\n ((b.b) this.b).d(str);\n }",
"public void selectB() { }",
"BOperation createBOperation();",
"void metodo1(int a, int b) {\r\n\t\ta += 5;//par\\u00e1metro con el mismo nombre que el campo.\r\n\t\tb += 7;\r\n\t}",
"private static void m2196a(StringBuffer stringBuffer, byte b) {\n stringBuffer.append(\"0123456789ABCDEF\".charAt((b >> 4) & 15)).append(\"0123456789ABCDEF\".charAt(b & 15));\n }",
"public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }",
"public void b(fv paramfv)\r\n/* 408: */ {\r\n/* 409:423 */ this.a = new amj[36];\r\n/* 410:424 */ this.b = new amj[4];\r\n/* 411:425 */ for (int i = 0; i < paramfv.c(); i++)\r\n/* 412: */ {\r\n/* 413:426 */ fn localfn = paramfv.b(i);\r\n/* 414:427 */ int j = localfn.d(\"Slot\") & 0xFF;\r\n/* 415:428 */ amj localamj = amj.a(localfn);\r\n/* 416:429 */ if (localamj != null)\r\n/* 417: */ {\r\n/* 418:430 */ if ((j >= 0) && (j < this.a.length)) {\r\n/* 419:431 */ this.a[j] = localamj;\r\n/* 420: */ }\r\n/* 421:433 */ if ((j >= 100) && (j < this.b.length + 100)) {\r\n/* 422:434 */ this.b[(j - 100)] = localamj;\r\n/* 423: */ }\r\n/* 424: */ }\r\n/* 425: */ }\r\n/* 426: */ }",
"public void b(String str) {\n ((b.b) this.b).e(str);\n }",
"public String b()\r\n/* 35: */ {\r\n/* 36:179 */ return a();\r\n/* 37: */ }",
"public abstract void zza(B b, int i, T t);",
"public Item b(World paramaqu, BlockPosition paramdt)\r\n/* 189: */ {\r\n/* 190:220 */ return null;\r\n/* 191: */ }",
"public abstract void zza(B b, int i, long j);",
"public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}",
"private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }",
"public abstract void mo9798a(byte b);",
"public void mo9798a(byte b) {\n if (this.f9108f == this.f9107e) {\n mo9827i();\n }\n byte[] bArr = this.f9106d;\n int i = this.f9108f;\n this.f9108f = i + 1;\n bArr[i] = b;\n this.f9109g++;\n }",
"public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}",
"private void m676a(TField bkVar, byte b) {\n if (b == -1) {\n b = m687e(bkVar.f538b);\n }\n short s = bkVar.f539c;\n short s2 = this.f519n;\n if (s <= s2 || s - s2 > 15) {\n m678b(b);\n mo446a(bkVar.f539c);\n } else {\n m686d(b | ((s - s2) << 4));\n }\n this.f519n = bkVar.f539c;\n }",
"private static void m831a(C0741g<?> gVar, C0747b bVar) {\n gVar.mo9477a(C0743i.f718b, (C0739e<? super Object>) bVar);\n gVar.mo9476a(C0743i.f718b, (C0738d) bVar);\n gVar.mo9474a(C0743i.f718b, (C0736b) bVar);\n }",
"public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}",
"private void j()\n/* */ {\n/* 223 */ c localc = this.b;\n/* 224 */ this.b = this.c;\n/* 225 */ this.c = localc;\n/* 226 */ this.c.b();\n/* */ }",
"public lj ar(byte b) {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }",
"public interface AbstractC10485b {\n /* renamed from: a */\n void mo64153a(boolean z);\n }",
"public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }",
"interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }"
]
| [
"0.64558864",
"0.6283203",
"0.6252635",
"0.6250949",
"0.6244743",
"0.6216273",
"0.6194491",
"0.6193556",
"0.61641675",
"0.6140157",
"0.60993093",
"0.60974354",
"0.6077849",
"0.6001867",
"0.5997364",
"0.59737104",
"0.59737104",
"0.5905105",
"0.5904295",
"0.58908087",
"0.5886636",
"0.58828026",
"0.5855491",
"0.584618",
"0.5842517",
"0.5824137",
"0.5824071",
"0.58097327",
"0.5802052",
"0.58012927",
"0.579443",
"0.5792392",
"0.57902914",
"0.5785124",
"0.57718205",
"0.57589084",
"0.5735892",
"0.5735892",
"0.5734873",
"0.5727929",
"0.5720821",
"0.5712531",
"0.5706813",
"0.56896514",
"0.56543154",
"0.5651059",
"0.5649904",
"0.56496733",
"0.5647035",
"0.5640965",
"0.5640109",
"0.563993",
"0.5631903",
"0.5597427",
"0.55843794",
"0.5583287",
"0.557783",
"0.55734867",
"0.55733293",
"0.5572254",
"0.55683887",
"0.55624336",
"0.55540246",
"0.5553985",
"0.55480546",
"0.554261",
"0.5535739",
"0.5529958",
"0.5519634",
"0.5517503",
"0.55160624",
"0.5511545",
"0.5505353",
"0.5500533",
"0.5491741",
"0.5486198",
"0.5481978",
"0.547701",
"0.54725856",
"0.5471632",
"0.5463497",
"0.5460805",
"0.5454913",
"0.5454885",
"0.54519916",
"0.5441594",
"0.5436747",
"0.5432453",
"0.5425923",
"0.5424724",
"0.54189867",
"0.54162544",
"0.54051477",
"0.53998184",
"0.53945845",
"0.53887725",
"0.5388146",
"0.5387678",
"0.53858143",
"0.53850687",
"0.5384439"
]
| 0.0 | -1 |
/ renamed from: a | public void mo35216a(C13816g gVar) {
this.f30694c = gVar;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }",
"public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }",
"interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}",
"interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }",
"interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }",
"public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}",
"public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }",
"public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }",
"public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}",
"public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }",
"interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }",
"public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }",
"public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }",
"private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }",
"protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }",
"public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }",
"private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }",
"public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }",
"public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}",
"public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}",
"public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }",
"public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }",
"public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }",
"public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }",
"public void a() {\n ((a) this.a).a();\n }",
"public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }",
"public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}",
"public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}",
"public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }",
"@Override\r\n\tpublic void a() {\n\t\t\r\n\t}",
"public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}",
"public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}",
"public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}",
"public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}",
"interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}",
"public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}",
"public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}",
"public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }",
"@Override\n\tpublic void a() {\n\t\t\n\t}",
"public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}",
"void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}",
"public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }",
"interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }",
"public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}",
"public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }",
"public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}",
"public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}",
"public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }",
"public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}",
"public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}",
"public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}",
"public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}",
"public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }",
"public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}",
"public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}",
"public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}",
"public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }",
"public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}",
"public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }",
"public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}",
"public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}",
"public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}",
"public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}",
"public void acionou(int a){\n\t\t\tb=a;\n\t\t}",
"public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}",
"public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }",
"public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}",
"public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }",
"public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }",
"public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }",
"public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }",
"public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }",
"public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}",
"public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}",
"public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }",
"public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }",
"public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }",
"public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}",
"protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }",
"public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }",
"public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }",
"public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }",
"public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }",
"public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}",
"public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }",
"public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }",
"public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}",
"public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}",
"public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}",
"public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }",
"public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }",
"interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }",
"public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}",
"public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }",
"private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }",
"interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}",
"public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }",
"public b[] a() {\n/* 95 */ return this.a;\n/* */ }",
"interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }"
]
| [
"0.62497115",
"0.6242887",
"0.61394435",
"0.61176854",
"0.6114027",
"0.60893",
"0.6046901",
"0.6024682",
"0.60201293",
"0.5975212",
"0.59482527",
"0.59121317",
"0.5883635",
"0.587841",
"0.58703005",
"0.5868436",
"0.5864884",
"0.5857492",
"0.58306104",
"0.5827752",
"0.58272064",
"0.5794689",
"0.57890314",
"0.57838726",
"0.5775679",
"0.57694733",
"0.5769128",
"0.57526815",
"0.56907034",
"0.5677874",
"0.5670547",
"0.56666386",
"0.56592244",
"0.5658682",
"0.56574154",
"0.5654324",
"0.5644676",
"0.56399715",
"0.5638734",
"0.5630582",
"0.56183887",
"0.5615435",
"0.56069666",
"0.5605207",
"0.56005067",
"0.559501",
"0.55910283",
"0.5590222",
"0.55736613",
"0.5556682",
"0.5554544",
"0.5550076",
"0.55493855",
"0.55446684",
"0.5538079",
"0.5529058",
"0.5528109",
"0.552641",
"0.5525864",
"0.552186",
"0.5519972",
"0.5509587",
"0.5507195",
"0.54881203",
"0.5485328",
"0.54826045",
"0.5482066",
"0.5481586",
"0.5479751",
"0.54776895",
"0.54671466",
"0.5463307",
"0.54505056",
"0.54436916",
"0.5440517",
"0.5439747",
"0.5431944",
"0.5422869",
"0.54217863",
"0.5417556",
"0.5403905",
"0.5400223",
"0.53998446",
"0.5394735",
"0.5388649",
"0.5388258",
"0.5374842",
"0.5368887",
"0.53591394",
"0.5357029",
"0.5355688",
"0.535506",
"0.5355034",
"0.53494394",
"0.5341044",
"0.5326166",
"0.53236824",
"0.53199095",
"0.53177035",
"0.53112453",
"0.5298229"
]
| 0.0 | -1 |
"pg_restore i h localhost p 5432 U postgres d mibase v " "/home/damian/backups/mibase.backup"; | public static boolean restaurar_archivo_backup_pg_win(String archivo,String usuario,String clave,String db,String host)
{
String objeto = "-i -h "+host+" -p "+Global.puerto_pg+" -U "+usuario+" -d "+db+" -v "+archivo;
boolean eje = false;
int res=0;
try {
Terminal.restaurar_backup_pg_win(host, "5432",usuario,clave, db, archivo);
} catch (Exception ex) {
System.out.println("Error " + ex.getMessage());
}
return eje;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Process backupIt(String fileAndPath) {\n try {\n //F olarak t verildi yani tar dosya biçimi\n final ProcessBuilder pb =\n new ProcessBuilder(commandPath + \"pg_dump.exe\", \"-f\", fileAndPath, \"-F\", \"t\", \"-v\", \"-h\", IP, \"-U\", user, dbase);\n pb.environment().put(\"PGPASSWORD\", password);\n pb.redirectErrorStream(true);\n return pb.start();\n } catch (IOException ex) {\n ex.getMessage();\n ex.printStackTrace();\n return null;\n }\n }",
"String restore(String request) throws RemoteException;",
"public static void backup3(String args[]) {\n\t\tRuntime runtime = Runtime.getRuntime();\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyyMMdd_HHmmss\");\n\t\tString currentTime = dateFormat.format(calendar.getTime());\n\t\tProcess p = null;\n\t\tPrintStream print = null;\n\t\tStringBuilder buf = new StringBuilder();\n\t\tfor (String a : args) {\n\t\t\tbuf.append(a);\n\t\t\tbuf.append(\" \");\n\t\t}\n\t\tString databases = buf.toString();\n\t\tSystem.out.println(databases);\n\t\ttry {\n\t\t\tp = runtime.exec(\"cmd /c mysqldump -uroot -p1234 -B \" + databases\n\t\t\t\t\t+ \">\" + currentTime + \".sql.bak\");\n\t\t} catch (IOException e) {\n\t\t\tif (p != null) {\n\t\t\t\tp.destroy();\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tprint = new PrintStream(currentTime + \"_backup_err.log\");\n\t\t\t\tdateFormat.applyPattern(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\tcurrentTime = dateFormat.format(calendar.getTime());\n\t\t\t\tprint.println(currentTime + \" backup failed.\");\n\t\t\t\te.printStackTrace(print);\n\t\t\t\tprint.flush();\n\t\t\t} catch (IOException e2) {\n\n\t\t\t} finally {\n\t\t\t\tif (print != null) {\n\t\t\t\t\tprint.close();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"String backup(String request) throws RemoteException;",
"public abstract void doBackup();",
"String backupENH(String request) throws RemoteException;",
"private void backUpDb() throws FileNotFoundException, IOException {\n backUpDb(Options.toString(Options.DATABASE));\n }",
"public static void main_revertBackup(){\n try {\n table = (HiringTable) tableClone.clone();\n System.out.println(\"Successfully reverted to the backup copy.\");\n } catch (CloneNotSupportedException ex){\n System.out.println(\"Clone not successful.\");\n main_menu();\n }\n }",
"public static boolean dumpDatabase() {\n Statement stm = null;\n try {\n stm = getConnection().createStatement();\n stm.executeUpdate(\"backup to db/backup.db\");\n }\n catch(Exception e) {\n e.printStackTrace();\n return false;\n }\n finally {\n try {\n stm.close();\n }\n catch (Exception e) { \n e.printStackTrace();\n }\n }\n return true;\n }",
"@Override\n\tpublic String Restore(String[] args) throws RemoteException {\n\t\tSystem.out.println(\"Trying to Restore with args: \" + args[2]);\n\t\treturn null;\n\t}",
"com.google.cloud.gkebackup.v1.Restore getRestore();",
"public static boolean aSu_RestoreBackup(IContext context)\n\t{\n\t\ttry\n\t\t{\n\t\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\t\treturn (Boolean)Core.execute(context, \"Lucene.ASu_RestoreBackup\", params);\n\t\t}\n\t\tcatch (CoreException e)\n\t\t{\n\t\t\tthrow new MendixRuntimeException(e);\n\t\t}\n\t}",
"@Override\n\tpublic String Backup(String[] args) throws RemoteException {\n\t\tSystem.out.println(\"Trying to backup with args: \" + args[2] + \" \" + args[3] );\n\t\t\n\t\treturn null;\n\t}",
"public void backup(String filename) throws IOException, RemoteException, Error;",
"public abstract void restore();",
"private void generateBackUpMysql() {\n Calendar c = Calendar.getInstance();//creamos una instancia de la clase calendar de java\n //java.util.Date fecha = new Date();\n String DiaHoy = Integer.toString(c.get(Calendar.DATE));\n String MesHoy = Integer.toString(c.get(Calendar.MONTH)+1);\n String AnioHoy = Integer.toString(c.get(Calendar.YEAR)); \n \n \n JFileChooser RealizarBackupMySQL = new JFileChooser();\n int resp;\n resp=RealizarBackupMySQL.showSaveDialog(this);//JFileChooser de nombre RealizarBackupMySQL\n if (resp==JFileChooser.APPROVE_OPTION) {//Si el usuario presiona aceptar; se genera el Backup\n try{\n Runtime runtime = Runtime.getRuntime();\n File backupFile = new File(String.valueOf(RealizarBackupMySQL.getSelectedFile().toString())+\" \"+DiaHoy +\"-\"+MesHoy+\"-\"+AnioHoy+\".sql\");\n FileWriter fw = new FileWriter(backupFile);\n \n Process child = runtime.exec(\"C:\\\\xampp\\\\mysql\\\\bin\\\\mysqldump --routines --opt --password= --user=root --databases utp2020-dental-system-dev\"); \n\n // Process child = runtime.exec(\"C:\\\\wamp\\\\bin\\\\mariadb\\\\mariadb10.4.10\\\\bin\\\\mysqldump --routines --opt --password= --user=root --databases utp2020-dental-system-dev\"); \n InputStreamReader irs = new InputStreamReader(child.getInputStream());\n BufferedReader br = new BufferedReader(irs);\n String line;\n while( (line=br.readLine()) != null ) {\n fw.write(line + \"\\n\");\n }\n fw.close();\n irs.close();\n br.close();\n JOptionPane.showMessageDialog(null, \"Archivo generado\",\"Verificar\",JOptionPane. INFORMATION_MESSAGE);\n }catch(Exception e){\n JOptionPane.showMessageDialog(null, \"Error no se genero el archivo por el siguiente motivo:\"+e.getMessage(), \"Verificar\",JOptionPane.ERROR_MESSAGE);\n } \n } else if (resp==JFileChooser.CANCEL_OPTION) {\n JOptionPane.showMessageDialog(null,\"Ha sido cancelada la generacion del Backup\");\n }\n }",
"void dump() throws RemoteException;",
"@Test(timeout = 4000)\n public void test004() throws Throwable {\n Recover recover0 = new Recover();\n recover0.openFile(\"databene\", (String) null, true);\n ErrorHandler errorHandler0 = ErrorHandler.getDefault();\n DBExecutionResult dBExecutionResult0 = DBUtil.runScript(\"databene\", (String) null, '<', (Connection) null, false, errorHandler0);\n assertNotNull(dBExecutionResult0);\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tRestoreBackup();\n\t\t\t}",
"public String restoreState(Database db) {\n if (db == null) {\n return \"There is no database present\";\n } else {\n try {\n lists.put(ItemType.DEVELOPER, db.restoreItems(ItemType.DEVELOPER));\n lists.put(ItemType.STORY, db.restoreItems(ItemType.STORY));\n lists.put(ItemType.PROJECT, db.restoreItems(ItemType.PROJECT));\n lists.put(ItemType.STORY_DEVELOPER, db.restoreItems(ItemType.STORY_DEVELOPER));\n db.restoreRelationships();\n db.restoreState();\n } catch (NameClashException nameClash) {\n nameClash.printStackTrace();\n }\n\n return db.getStorageDescription();\n }\n }",
"public void restoreDB(String databaseName) throws Exception {\n boolean isBackup = this.uFile.isFileExists(context, \"backup-\" + databaseName);\n if (isBackup) {\n // check if database exists\n boolean isDB = this.uFile.isFileExists(context, databaseName);\n if (isDB) {\n boolean retD = this.uFile.deleteFile(context, databaseName);\n if (!retD) {\n String msg = \"Error: restoreDB: delete file \";\n msg += databaseName;\n throw new Exception(msg);\n } else {\n boolean retC = this.uFile.copyFile(context, \"backup-\" + databaseName, databaseName);\n if (!retC) {\n String msg = \"Error: restoreDB: copyItem\";\n msg += \" failed\";\n throw new Exception(msg);\n }\n }\n }\n } else {\n String msg = \"Error: restoreDB: backup-\" + databaseName;\n msg += \" does not exist\";\n throw new Exception(msg);\n }\n }",
"public String createCommandLine(IngresVectorwiseLoaderMeta meta) throws KettleException\n {\n StringBuffer sb = new StringBuffer(300);\n \n if ( !Const.isEmpty(meta.getSqlPath()) )\n {\n try\n {\n FileObject fileObject = KettleVFS.getFileObject(environmentSubstitute(meta.getSqlPath()), getTransMeta());\n String sqlexec = Const.optionallyQuoteStringByOS(KettleVFS.getFilename(fileObject));\n sb.append(sqlexec);\n //sql @tc-dwh-test.timocom.net,tcp_ip,VW[ingres,pwd]::dwh\n }\n catch ( KettleFileException ex )\n {\n throw new KettleException(\"Error retrieving 'sql' command string\", ex);\n } \n }\n else\n {\n if(isDetailed()) logDetailed( \"sql defaults to system path\");\n sb.append(\"sql\");\n }\n\n DatabaseMeta dm = meta.getDatabaseMeta();\n if ( dm != null )\n {\n if(meta.isUseDynamicVNode()){\n //logical portname in JDBC use a 7\n String port = environmentSubstitute(Const.NVL(dm.getDatabasePortNumberString(), \"\")).replace(\"7\", \"\");\n String userName = environmentSubstitute(Const.NVL(dm.getDatabaseInterface().getUsername(), \"\"));\n String passWord = Encr.decryptPasswordOptionallyEncrypted(environmentSubstitute(Const.NVL(dm.getDatabaseInterface().getPassword(), \"\")));\n String hostName = environmentSubstitute(Const.NVL(dm.getDatabaseInterface().getHostname(), \"\"));\n String dnName = environmentSubstitute(Const.NVL(dm.getDatabaseName(), \"\"));\n \n sb.append(\" @\").append(hostName).append(\",\").append(port).append(\"[\").append(userName).append(\",\").append(passWord).append(\"]::\").append(dnName);\n }\n else{\n // Database Name\n // \n String dnName = environmentSubstitute(Const.NVL(dm.getDatabaseName(), \"\"));\n sb.append(\" \").append(dnName);\n }\n }\n else\n {\n throw new KettleException(\"No connection specified\");\n }\n\n return sb.toString(); \n }",
"String restoreENH(String request) throws RemoteException;",
"void rollback();",
"public static void main_backup(){\n try {\n tableClone = (HiringTable) table.clone();\n System.out.println(\"Successfully created backup.\");\n } catch (CloneNotSupportedException ex){\n System.out.println(\"Clone not successful.\");\n main_menu();\n }\n }",
"public void exportDB(){\n\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n\n\t\tprgUserData.setMessage(getResources().getText(R.string.please_wait_data_dump) );\n\t\tprgUserData.show();\n\n\t\tint myDeviceId = prefs.getInt(\"my_device_id\", 0);\n\t\t// String currentDateTimeString = DateFormat.getDateTimeInstance().format(\"dd-MM-yyyyhh:mm:ssa\");\n\t\tFile sd =new File(Environment.getExternalStorageDirectory().getPath() + \"/vkb_database\");\n\t\tsd.mkdirs();\n\t\tFile data = Environment.getDataDirectory();\n\t\tLog.d(\"dump1\",\"file sd:\"+sd);\n\t\tLog.d(\"dump1\",\"file data:\"+data);\n\t\tFileChannel source=null,sourceSess=null;\n\t\tFileChannel destination=null,destinationSess=null;\n\n\t\tString currentDBPath = \"/data/game.Typing/databases/UT_Marathi\";\n\t\tString currentDBSessPath = \"/data/game.Typing/databases/\"+ApplicationConstants.DATABASE_NAME;\n\n\t\tString backupDBPath = myDeviceId+\"_UT_Users\"+DateFormat.format(\"dd_MM_yyyy_hh_mm_ssa\",new Date(System.currentTimeMillis())).toString();\n\t\tString backupDBSessPath = myDeviceId+\"_UT_Sessions\"+DateFormat.format(\"dd_MM_yyyy_hh_mm_ssa\",new Date(System.currentTimeMillis())).toString();\n\n\t\tFile currentDB = new File(data, currentDBPath);\n\t\tFile currentSessDB = new File(data, currentDBSessPath);\n\n\t\tFile backupDB = new File(sd, backupDBPath);\n\t\tFile backupDBSess = new File(sd, backupDBSessPath);\n\n\t\ttry {\n\t\t\tsource = new FileInputStream(currentDB).getChannel();\n\t\t\tsourceSess = new FileInputStream(currentSessDB).getChannel();\n\n\t\t\tdestination = new FileOutputStream(backupDB).getChannel();\n\t\t\tdestinationSess = new FileOutputStream(backupDBSess).getChannel();\n\n\t\t\tdestination.transferFrom(source, 0, source.size());\n\t\t\tdestinationSess.transferFrom(sourceSess, 0, sourceSess.size());\n\n\t\t\tsource.close();\n\t\t\tsourceSess.close();\n\n\t\t\tdestination.close();\n\t\t\tdestinationSess.close();\n\n\t\t\tToast.makeText(this, \"DB Exported!\", Toast.LENGTH_LONG).show();\n\t\t} catch(IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tToast.makeText(this, \"DB Exception!\", Toast.LENGTH_LONG).show();\n\t\t}\n\t\ttry{\n\t\t\tprgUserData.hide();\n\n\t\t}catch(Exception ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t}",
"public boolean writePlicSnapshotToFile(File f, String dbSchema, String dataSource){\n try{\n //Obtener la conexion JDBC del proyecto\n InitialContext ctx = new InitialContext();\n DataSource ds = (DataSource) ctx.lookup(dataSource);\n Connection connection = ds.getConnection();\n\n\t String query = \"SELECT '\\\"'||REPLACE(COALESCE(globaluniqueidentifier,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(scientificname,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(institutioncode,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||COALESCE(to_char(datelastmodified,'YYYY-MM-DD HH24:MI:SS'),'')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(taxonrecordid,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(language,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(creators,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(distribution,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(abstract,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(kingdomtaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(phylumtaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(classtaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(ordertaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(familytaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(genustaxon,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(synonyms,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(authoryearofscientificname,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(speciespublicationreference,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(commonnames,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(typification,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(contributors,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||COALESCE(to_char(datecreated,'YYYY-MM-DD'),'')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(habit,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(lifecycle,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(reproduction,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(annualcycle,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(scientificdescription,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(briefdescription,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(feeding,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(behavior,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(interactions,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(chromosomicnumbern,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(moleculardata,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(populationbiology,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(threatstatus,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(legislation,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(habitat,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(territory,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(endemicity,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(theuses,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(themanagement,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(folklore,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(thereferences,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(unstructureddocumentation,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(otherinformationsources,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(papers,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(identificationkeys,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(migratorydata,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(ecologicalsignificance,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(unstructurednaturalhistory,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(invasivenessdata,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(targetaudiences,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(version,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(urlimage1,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(captionimage1,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(urlimage2,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(captionimage2,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(urlimage3,''),'\\r\\n', ' ')||'\\\"' || ','\"+\n\t\t\t \"|| '\\\"'||REPLACE(COALESCE(captionimage3,''),'\\r\\n', ' ')||'\\\"'\"+\n\t\t\t \" AS aux \"+\n\t\t\t \"FROM \"+dbSchema+\".plic_snapshot;\";\n\n System.out.println(query);\n\n\t\t\tStatement st = connection.createStatement();\n\t\t\tResultSet rs = st.executeQuery(query); \n\n //Imprimir los datos en el archivo\n BufferedWriter out = new BufferedWriter(new FileWriter(f));\n\t\t\twhile (rs.next()) {\n\t\t\t\tout.write(rs.getString(\"aux\")+\"\\n\");\n\t\t\t}\n out.close();\n\n //Cerrar el resultset y el statement\n rs.close();\n\t\t\tst.close();\n\n //Resultado\n return true;\n }\n catch(Exception e){\n e.printStackTrace();\n return false;}\n }",
"private void backupToFileButtonClicked(java.awt.event.ActionEvent evt) {\n\t\tbyte[][] colFamilys;\n\n\t\tList<List<HBaseRow>> tableRows;\n\n\t\tfinal JFileChooser fc = new JFileChooser();\n\t\tFile backupFile = null;\n\n\t\tfc.showSaveDialog(this);\n\n\t\tbackupFile = fc.getSelectedFile();\n\n\t\ttry {\n\t\t\tgetLabelFileOperationStatus().setText(\"Backup in progress\");\n\t\t\tfor (int i = 0; i < listSelectedTables.getModel().getSize(); i++) {\n\t\t\t\tString tblName = (String) listSelectedTables.getModel().getElementAt(i);// (String)listSelectedTables.\n\t\t\t\tlistSelectedTables.setSelectedValue(tblName, true);\n\t\t\t\tLogger.getLogger(HbaseDataBackupRestoreDialog.class.getName()).log(Level.INFO, \"Table name: \" + tblName);\n\t\t\t\tHBaseTableStructure tableStructure = new HBaseTableStructure();\n\t\t\t\ttableStructure.createWriteTableStructure(tblName);\n\n\t\t\t\tcolFamilys = tableStructure.getAllColoumnFamilies();\n\n\t\t\t\tResultScanner resultScan = HBaseTableManager.getAllDataInRangeOfFamily(\"0\", \"zz\", colFamilys, tblName);\n\n\t\t\t\ttableRows = this.getDataObjectList(resultScan, colFamilys);\n\n\t\t\t\tIterator<List<HBaseRow>> iterator = tableRows.iterator();\n\t\t\t\tList<HBaseRow> rowList;\n\t\t\t\tList<HbaseTableObject> tableObject = new ArrayList<HbaseTableObject>();\n\t\t\t\twhile (iterator.hasNext()) {\n\n\t\t\t\t\trowList = iterator.next();\n\t\t\t\t\tHbaseTableObject hbTable = new HbaseTableObject();\n\t\t\t\t\tHBaseTableData tableData = new HBaseTableData();\n\n\t\t\t\t\ttableData.setHbaseTableData(rowList);\n\t\t\t\t\thbTable.setTableData(tableData);\n\t\t\t\t\thbTable.setTableStructure(tableStructure);\n\t\t\t\t\thbTable.setLastObject(false);\n\t\t\t\t\thbTable.setLinkedFileAvailable(true);\n\n\t\t\t\t\tif (!iterator.hasNext()) {\n\t\t\t\t\t\thbTable.setLastObject(true);\n\t\t\t\t\t}\n\t\t\t\t\ttableObject.add(hbTable);\n\n\t\t\t\t}\n\n\t\t\t\tFile targetFile = new File(backupFile.getAbsolutePath().concat(\"_\").concat(tblName));\n\n\t\t\t\tBackupRestoreFileUtil fileUtil = new BackupRestoreFileUtil(targetFile);\n\t\t\t\tlong rows = (tableObject.size() - 1) * 20001 + tableObject.get(tableObject.size() - 1).getTableData().getHbaseTableData().size();\n\t\t\t\tthis.getLabelFileOperationStatus().setText(\"Backup Done: ~ \" + rows + \" backed-up\");\n\t\t\t\tfileUtil.backupToFiles(tableObject);\n\n\t\t\t\t// writeObjectFile.writeObject(hbTable);\n\t\t\t\tlistBackupSelectedModel.remove(0);\n\n\t\t\t} // write hbTable to file, object stream;\n\n\t\t\tJOptionPane.showMessageDialog(this, \"Backup Complete. \\n Backup File : \" + fc.getSelectedFile().getName());\n\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tJOptionPane.showMessageDialog(this, \"Backup Failed.\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\n\t\t}\n\n\t}",
"public void restoreInventory(String table, String ID, String type, String base, String bulb, int price, String manuId) {\r\n\t\tif(table.contentEquals(\"lamp\")) {\r\n\t\t\ttry {\r\n\t\t\t\tString query= \"INSERT INTO lamp(ID, Type, Base, Bulb, Price, ManuID) VALUES (?,?,?,?,?,?)\";\r\n\t \t\tPreparedStatement state= getDBConnect().prepareStatement(query);\r\n\t \t\t\r\n\t \t\tstate.setString(1, ID);\r\n\t \t\tstate.setString(2, type);\r\n\t \t\tstate.setString(3,base);\r\n\t \t\tstate.setString(4,bulb);\r\n\t \t\tstate.setInt(5, price);\r\n\t \t\tstate.setString(6, manuId);\r\n\t \t\t\r\n\t \t\tint rows= state.executeUpdate();\r\n\t \t\tSystem.out.println(\"Rows updated: \"+rows);\r\n\t \t\tstate.close();\r\n\t\t\t}\r\n\t\t\tcatch(SQLException e) {\r\n\t\t\t\t System.out.println(\"Error, unable to insert new item into table 'lamp' \");\r\n\t\t\t }\r\n\t\t}\r\n\t}",
"@Test(timeout=300000)\n public void test0() throws Throwable {\n PostgreSQLPlainTextBackuper postgreSQLPlainTextBackuper0 = new PostgreSQLPlainTextBackuper();\n String string0 = postgreSQLPlainTextBackuper0.getDumpFormat();\n assertEquals(\"PostgreSQL Plain Text Dump\", string0);\n }",
"public void backupAndRestore(Context ctx, SQLiteDatabase db) {\n\t\tif (backupAllTablesToCsv(ctx, db, null)) {\n\t\t\tdropAndCreate(db);\n\t\t\trestoreAllTablesFromCsv(ctx, db, null);\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"Backup of \" + getDatabaseName() + \" failed, aborting upgrade\");\n\t\t}\n\t}",
"public void backupCustom(String... tableName) throws Exception {\n // back up specific files\n QueryDataSet qds = new QueryDataSet(conn);\n for (String str : tableName) {\n\n qds.addTable(str);\n }\n FlatXmlDataSet.write(qds, new FileWriter(backupFile), \"UTF-8\");\n new XlsDataSetWriter().write(qds, new FileOutputStream(backupFile));\n }",
"public static void snapshotOp(String vmname,String op,ServiceInstance si) throws InvalidProperty, RuntimeFault, RemoteException, InterruptedException{\n\t\t\t\n\t\t\tString snapshotname = vmname + \"snapshot\";\n\t\t\tString desc = snapshotname + \"desc\";\n\t\t\tboolean removechild = true;\n\t\t\tVirtualMachine vm = vmbyName(vmname,si);\n\t\t if(\"create\".equalsIgnoreCase(op))\n\t\t {\n\t\t System.out.println(\"creating snapshot for \"+ vmname );\n\t\t Task task = vm.createSnapshot_Task(\n\t\t snapshotname, desc, false, false);\n\t\t if(task.waitForTask()==Task.SUCCESS)\n\t\t {\n\t\t System.out.println(\"Snapshot was created. \"+ vmname );\n\t\t System.out.println(\"====================================================================\");\n\t\t }\n\t\t }\n\t\t else if(\"list\".equalsIgnoreCase(op))\n\t\t {\n\t\t listSnapshots(vm);\n\t\t }\n\t\t else if(op.equalsIgnoreCase(\"revert\")) \n\t\t {\n\t\t VirtualMachineSnapshot vmsnap = getSnapshotInTree(\n\t\t vm, snapshotname);\n\t\t if(vmsnap!=null)\n\t\t {\n\t\t \tSystem.out.println(\"reverting snapshot for \"+ vmname );\n\t\t Task task = vmsnap.revertToSnapshot_Task(null);\n\t\t if(task.waitForTask()==Task.SUCCESS)\n\t\t {\n\t\t System.out.println(\"Reverted to snapshot:\" \n\t\t + snapshotname);\n\t\t }\n\t\t }\n\t\t }\n\t\t else if(op.equalsIgnoreCase(\"removeall\")) \n\t\t {\n\t\t Task task = vm.removeAllSnapshots_Task(); \n\t\t if(task.waitForTask()== Task.SUCCESS) \n\t\t {\n\t\t System.out.println(\"Removed all snapshots\");\n\t\t }\n\t\t }\n\t\t else if(op.equalsIgnoreCase(\"remove\")) \n\t\t {\n\t\t VirtualMachineSnapshot vmsnap = getSnapshotInTree(\n\t\t vm, snapshotname);\n\t\t if(vmsnap!=null)\n\t\t {\n\t\t Task task = vmsnap.removeSnapshot_Task(removechild);\n\t\t if(task.waitForTask()==Task.SUCCESS)\n\t\t {\n\t\t System.out.println(\"Removed snapshot:\" + snapshotname);\n\t\t }\n\t\t }\n\t\t }\n\t\t else \n\t\t {\n\t\t System.out.println(\"Invalid operation\");\n\t\t return;\n\t\t }\n\t\t }",
"java.lang.String getBackupId();",
"java.lang.String getBackupId();",
"java.lang.String getBackupId();",
"java.lang.String getBackupId();",
"public abstract ModuleBackups backups();",
"public static void main(String[] args) throws ClassNotFoundException, SQLException {\n Class.forName(\"org.postgresql.Driver\");\n\n // Connect to the \"bank\" database.\n Connection conn = DriverManager.getConnection(\"jdbc:postgresql://127.0.0.1:26257/?reWriteBatchedInserts=true&applicationanme=123&sslmode=disable\", \"root\", \"\");\n conn.setAutoCommit(false); // true and false do not make the difference\n // rewrite batch does not make the difference\n\n try {\n // Create the \"accounts\" table.\n conn.createStatement().execute(\"CREATE TABLE IF NOT EXISTS accounts (id serial PRIMARY KEY, balance INT)\");\n\n // Insert two rows into the \"accounts\" table.\n PreparedStatement st = conn.prepareStatement(\"INSERT INTO accounts (balance) VALUES (?), (?) returning id, balance\", \n ResultSet.TYPE_SCROLL_INSENSITIVE,\n ResultSet.CONCUR_UPDATABLE);\n st.setInt(1, 100); \n st.setInt(2, 200); \n\n ResultSet rs = st.executeQuery();\n\n st = conn.prepareStatement(\"select id1, id2, link_type, visibility, data, time, version from linkbench.linktable where id1 = 9307741 and link_type = 123456790 and time >= 0 and time <= 9223372036854775807 and visibility = 1 order by time desc limit 0 offset 10000\",\n ResultSet.TYPE_SCROLL_INSENSITIVE,\n ResultSet.CONCUR_UPDATABLE);\n rs = st.executeQuery();\n rs.last();\n int count = rs.getRow();\n rs.beforeFirst();\n System.out.printf(\"# of row in return set is %d\\n\", count);\n\n while (rs.next()) {\n System.out.printf(\"\\taccount %s: %s\\n\", rs.getLong(\"id\"), rs.getInt(\"balance\"));\n }\n } finally {\n // Close the database connection.\n conn.close();\n }\n }",
"public static void backupToFile(String filePath) throws DatabaseWrapperOperationException {\r\n \t\t// create temporary directory which includes backup files\r\n \t\tString tempDirName = java.util.UUID.randomUUID().toString();\r\n \t\tFile tempDir = new File(System.getProperty(\"user.home\") + File.separator, tempDirName);\r\n \t\tif (!tempDir.exists() && !tempDir.mkdir()) {\r\n \t\t\tLOGGER.error(\"Could not create temp directory\");\r\n \t\t}\r\n \t\r\n \t\t// backup home directory\r\n \t\tFile tempAppDataDir = new File(tempDir.getPath());\r\n \t\tFile sourceAppDataDir = new File(FileSystemLocations.getActiveHomeDir());\r\n \t\ttry {\r\n \t\t\tString excludeRegex = LOCK_FILE_REGEX + REGEX_OR + DATABASE_FILE_REGEX; \r\n \t\t\tFileSystemAccessWrapper.copyDirectory(sourceAppDataDir, tempAppDataDir, excludeRegex);\r\n \t\t} catch (IOException e) {\r\n \t\t\tthrow new DatabaseWrapperOperationException(DBErrorState.ERROR_DIRTY_STATE,e);\r\n \t\t}\r\n \t\r\n \t\t// backup database to file\r\n \t\ttry (Statement statement = ConnectionManager.getConnection().createStatement()){\t\t\t\t\r\n \t\t\tstatement.executeUpdate(BACKUP_TO + \"'\" + tempDir.getPath() + File.separatorChar + FileSystemLocations.DATABASE_TO_RESTORE_NAME + \"'\");\r\n \t\t} catch (SQLException e) {\r\n \t\t\tthrow new DatabaseWrapperOperationException(DBErrorState.ERROR_DIRTY_STATE,e);\r\n \t\t}\r\n \t\r\n \t\t// zip the whole temp folder\r\n \t\tFileSystemAccessWrapper.zipFolderToFile(tempDir.getPath(), filePath);\r\n \t\r\n \t\t// delete temp folder\r\n \t\tFileSystemAccessWrapper.deleteDirectoryRecursively(tempDir);\r\n \t}",
"String getVirtualDatabaseName() throws Exception;",
"public void restore(Object obj) throws HibException;",
"@Override\n public void restoreSnapshot(BlockSnapshot snapshot, Volume parentVolume, String taskId) {\n _log.info(String.format(\"Request to restore RP volume %s from snapshot %s.\",\n parentVolume.getId().toString(), snapshot.getId().toString()));\n super.restoreSnapshot(snapshot, parentVolume, taskId);\n }",
"private void Btn_exportar_bkupActionPerformed(java.awt.event.ActionEvent evt) {\n try {\n SimpleDateFormat d = new SimpleDateFormat(\"dd-MM-yyyy-HH-mm-ss\");\n Date date = new Date(); \n String respaldo= \"Respaldo_\"+d.format(date); \n respaldo=respaldo.toUpperCase();\n \n \n String cmd = \"expdp system/2015VC601 schemas=director directory=DIRECTORIO dumpfile=\"+respaldo+\".dmp logfile=\"+respaldo+\"_txt.log\"; //Comando \n Process exec = Runtime.getRuntime().exec(cmd); \n JOptionPane.showMessageDialog(rootPane, \"Generando respaldo, espere unos minutos.\");\n } catch (IOException | HeadlessException ioe) {\n System.out.println (ioe);\n }\n }",
"public void dumpBack(Printer pw, String prefix) {\n }",
"public static void main(String[] args) throws IOException {\n\n System.setProperty(\"ddl.migration.pendingDropsFor\", \"1.4\");\n\n// ObjectMapper objectMapper = new ObjectMapper();\n//\n\n HikariConfig config = new HikariConfig();\n config.setJdbcUrl(\"jdbc:mysql://127.0.0.1:3306/zk-springboot-demo\");\n config.setUsername(\"root\");\n config.setPassword(\"\");\n config.setDriverClassName(\"com.mysql.cj.jdbc.Driver\");\n\n DatabaseConfig databaseConfig = new DatabaseConfig();\n databaseConfig.setDataSource(new HikariDataSource(config));\n\n// databaseConfig.setObjectMapper(objectMapper);\n\n DbMigration dbMigration = DbMigration.create();\n dbMigration.setPlatform(Platform.MYSQL55);\n dbMigration.setStrictMode(false);\n// dbMigration.setPathToResources(path);\n dbMigration.setApplyPrefix(\"V\");\n dbMigration.setServerConfig(databaseConfig);\n dbMigration.generateMigration();\n\n }",
"public static void restoreFromFile(String filePath) throws DatabaseWrapperOperationException {\r\n \t\tFileSystemAccessWrapper.clearHomeDirectory();\r\n \t\tFileSystemAccessWrapper.unzipFileToFolder(filePath, FileSystemLocations.getActiveHomeDir());\r\n \t\r\n \t\ttry (Statement statement = ConnectionManager.getConnection().createStatement()) {\t\t\t\r\n \t\t\tstatement.executeUpdate(RESTORE_FROM + \" '\" + FileSystemLocations.getDatabaseRestoreFile() + \"'\");\r\n \t\t\ttry {\r\n \t\t\t\tDatabaseIntegrityManager.lastChangeTimeStampInMillis = DatabaseIntegrityManager.extractTimeStamp(new File(filePath));\r\n \t\t\t} catch (DatabaseWrapperOperationException e) {\r\n \t\t\t\tDatabaseIntegrityManager.lastChangeTimeStampInMillis = System.currentTimeMillis();\r\n \t\t\t}\r\n \t\t} catch (SQLException e) {\r\n \t\t\tthrow new DatabaseWrapperOperationException(DBErrorState.ERROR_DIRTY_STATE,e);\r\n \t\t}\r\n \t\r\n \t\tif (!FileSystemAccessWrapper.deleteDatabaseRestoreFile()) {\r\n \t\t\tthrow new DatabaseWrapperOperationException(DBErrorState.ERROR_DIRTY_STATE);\r\n \t\t}\r\n \t\r\n \t\tif (!FileSystemAccessWrapper.updateSammelboxFileStructure()) {\r\n \t\t\tthrow new DatabaseWrapperOperationException(DBErrorState.ERROR_DIRTY_STATE);\r\n \t\t}\r\n \t\r\n \t\tif (!FileSystemAccessWrapper.updateAlbumFileStructure(ConnectionManager.getConnection())) {\r\n \t\t\tthrow new DatabaseWrapperOperationException(DBErrorState.ERROR_DIRTY_STATE);\r\n \t\t}\r\n \t\t\r\n \t\t// Update timestamp\r\n \t\tDatabaseIntegrityManager.updateLastDatabaseChangeTimeStamp();\r\n \t}",
"public static void backupDatabase() throws IOException {\n\t\tString inFileName = \"/data/data/com.tip.mefgps/databases/MEF\";\n\t\tFile dbFile = new File(inFileName);\n\t\tFileInputStream fis = new FileInputStream(dbFile);\n\n\t\tString outFileName = Environment.getExternalStorageDirectory()+\"/MEF.sqlite3\";\n\t\t//Open the empty db as the output stream\n\t\tOutputStream output = new FileOutputStream(outFileName);\n\t\t//transfer bytes from the inputfile to the outputfile\n\t\tbyte[] buffer = new byte[1024];\n\t\tint length;\n\t\twhile ((length = fis.read(buffer))>0){\n\t\t\toutput.write(buffer, 0, length);\n\t\t}\n\t\t//Close the streams\n\t\toutput.flush();\n\t\toutput.close();\n\t\tfis.close();\n\t}",
"@Override\n public void ppgDer(int ppgDer, int timestamp) {\n }",
"B database(S database);",
"public void createIntegrationTestDatabase() throws SQLException {\n\n final Connection connection = DriverManager.getConnection(url + \"postgres\", databaseProperties);\n\n connection.prepareStatement(\"DROP DATABASE IF EXISTS test_disassembly\").execute();\n connection.prepareStatement(\"DROP DATABASE IF EXISTS test_import\").execute();\n connection.prepareStatement(\"DROP DATABASE IF EXISTS test_empty\").execute();\n\n connection.prepareStatement(\"CREATE DATABASE test_disassembly\").execute();\n connection.prepareStatement(\"CREATE DATABASE test_import\").execute();\n connection.prepareStatement(\"CREATE DATABASE test_empty\").execute();\n\n connection.close();\n\n createDatabase(TEST_IMPORT);\n createDatabase(TEST_DISASSEMBLY);\n }",
"edu.usfca.cs.dfs.StorageMessages.BackUp getBackup();",
"@Override\n\tpublic void onRestore(BackupDataInput data, int appVersionCode,\n\t ParcelFileDescriptor newState) throws IOException {\n\t synchronized (TravelLiteDBAdapter.sDataLock) {\n\t super.onRestore(data, appVersionCode, newState);\n\t }\n\t}",
"public void restoreFromDatabase() throws InitException {\r\n \t\r\n \tlong id = 0L;\r\n \twhile(true) {\r\n\t \tList<ServerJobInstanceMapping> mappingList = null;\r\n\t \ttry {\r\n\t\t\t\tmappingList = serverJobInstanceMappingAccess.loadByServer(serverConfig.getLocalAddress(), id);\r\n\t\t\t} catch (Throwable e) {\r\n\t\t\t\tthrow new InitException(\"[LivingTaskManager]: restoreFromDatabase error, localAddress:\" + serverConfig.getLocalAddress(), e);\r\n\t\t\t}\r\n\t \t\r\n\t \tif(CollectionUtils.isEmpty(mappingList)) {\r\n\t \t\tlogger.warn(\"[LivingTaskManager]: restoreFromDatabase mappingList is empty\");\r\n\t \t\treturn ;\r\n\t \t}\r\n\t \t\r\n\t \tid = ListUtil.acquireLastObject(mappingList).getId();\r\n\t \t\r\n\t \tinitAddJobInstance4IdMap(mappingList);\r\n \t}\r\n }",
"public void restore(DataInputStream dis) throws Exception;",
"public BackupRestore(String ip,String argUsername,String argPassword,String argEnPassword,String argDeviceType){\n\t this.repetitiveWork();\n\t log.info(\"Constructor of \"+log.getName()+ \" with 4 parameter was called\\n\");\n\t deviceIP=ip;\n\t log.info(\"deviceIp set to \"+deviceIP+\"\\n\");\n\t if(argDeviceType.toUpperCase().equals(\"CISCO\"))\n\t deviceType=RouterType.CISCO;\n\t else\n\t \t deviceType=RouterType.JUNIPER;\n\t log.info(\"deviceType set to \"+deviceType+\"\\n\");\n\t deviceName=argUsername;\n\t log.info(\"deviceName set to \"+deviceName+\"\\n\");\n\t devicePassword=argPassword;\n\t log.info(\"devicePassword set to \"+\"******\\n\");\n\t deviceEnPassword=argEnPassword;\n\t log.info(\"deviceEnablePassword set to\"+\"******\\n\");\n\t try{\n\t\t properties.load(new FileInputStream(defaultSettingsFile));\n\t\t log.info(\"File \"+DEFAULT_SETTINGS_FILE_LOCATION+\" opened successfully :)\\n\");\n\t\t /*Initializing parameter from the file defaultSettings.properties*/\n\t\t log.info(\"Initializing parameter from the file defaultSettings.properties\\n\");\n\t\t FETCHING_DATA_VIA_DATABASE=Boolean.parseBoolean(properties.getProperty(\"viaDatabase\").toLowerCase());\n\t\t if(FETCHING_DATA_VIA_DATABASE){\n\t\t log.info(\"Method of fetching data is via database\");\n\t\t this.connectToDb();\n\t\t log.info(\"Insering the new device data\");\n\t\t this.dbConnect.insertInto(properties.getProperty(\"deviceDetailsTable\"),deviceIP,deviceName,devicePassword,deviceEnPassword,deviceType);\n\t\t log.info(\"Successfully inserted the data\");\n\t\t this.dbConnector();\n\t\t }\n\t\t else{\n\t\t log.info(\"Method of fetching data is via files\");\n\t\t if(properties.getProperty(\"connectionType\").toUpperCase().equals(\"TELNET\"))\n\t\t\t connectionType=ConnectionType.TELNET;\n\t\t\t else\n\t\t\t\t\tconnectionType=ConnectionType.SSH;\n\t\t log.info(\"Setting the default connection type as \"+connectionType);\n\t\t backupServerName=properties.getProperty(\"backupServerName\");\n\t\t log.info(\"backupServerName set to its default value \"+backupServerName+\"\\n\");\n\t\t backupServerIP=properties.getProperty(\"backupServerIP\");\n\t\t log.info(\"backupServerIP set to its default value \"+backupServerIP+\"\\n\");\n\t\t backupServerPassword=properties.getProperty(\"backupServerPassword\");\n\t\t log.info(\"backupServerPassword set to its default value \"+\"******\"+\"\\n\");\n\t\t backupServerFolderLocation=properties.getProperty(\"backupServerFolderLocation\");\n\t\t log.info(\"backupServerFolderLoaction set to its default value \"+backupServerFolderLocation+\"\\n\");\n\t\t if(properties.getProperty(\"backupServerType\").toLowerCase().equals(\"scp\"))\n\t\t backupServerType=BackupServerType.scp;\n\t\t else\n\t\t \t backupServerType=BackupServerType.tftp;\n\t\t log.info(\"backupServerType set to its default value \"+backupServerType+\"\\n\");\n\t\t }\n\t }catch(Exception e){\n\t\t log.error(\"File \"+DEFAULT_SETTINGS_FILE_LOCATION+\" was not found!!\\n\");\n\t }\n }",
"public void restore(String spid) throws EVDBRuntimeException, EVDBAPIException {\n\t\t\n\t\tMap<String, String> params = new HashMap();\n\t\tparams.put(\"id\", spid);\n\n\t\tparams.put(\"user\", APIConfiguration.getEvdbUser());\n\t\tparams.put(\"password\", APIConfiguration.getEvdbPassword());\n\n\t\tInputStream is = serverCommunication.invokeMethod(PERFORMERS_RESTORE, params);\n\t\t\n\t\tunmarshallRequest(GenericResponse.class, is);\n\t}",
"@Override\n protected String doInBackground(Void... params) {\n copyDatabaseFromAsset();\n //insertValue();\n return \"\";\n }",
"public BackupRestore(String ip){\n\t backupFilename=dateFormat.format(date);\n\t this.repetitiveWork();\n\t log.info(\"Constructor of \"+log.getName()+ \" with only 1 parameter was called\\n\");\n\t deviceIP=ip;\n\t log.info(\"deviceIp set to \"+deviceIP+\"\\n\");\n\t log.info(\"Trying to open \"+DEFAULT_SETTINGS_FILE_LOCATION+\" file ...\\n\");\n\t try{\n\t\t properties.load(new FileInputStream(defaultSettingsFile));\n\t\t log.info(\"File \"+DEFAULT_SETTINGS_FILE_LOCATION+\" opened successfully :)\\n\");\n\t\t /*Initializing parameter from the file defaultSettings.properties*/\n\t\t log.info(\"Initializing parameter from the file defaultSettings.properties\\n\");\n\t\t FETCHING_DATA_VIA_DATABASE=Boolean.parseBoolean(properties.getProperty(\"viaDatabase\").toLowerCase());\n\t\t if(FETCHING_DATA_VIA_DATABASE){\n\t\t log.info(\"Method of fetching data is via database\");\n\t\t this.connectToDb();\n\t\t this.dbConnector();\n\t\t }\n\t\t else{\n\t\t\t log.info(\"Method of fetching data is via files\");\n\t\t\t if(properties.getProperty(\"connectionType\").toUpperCase().equals(\"TELNET\"))\n\t\t connectionType=ConnectionType.TELNET;\n\t\t\t else\n\t\t\t\tconnectionType=ConnectionType.SSH;\n\t\t log.info(\"Setting the default connection type as \"+connectionType);\n\t\t backupServerName=properties.getProperty(\"backupServerName\");\n\t\t log.info(\"backupServerName set to its default value \"+backupServerName+\"\\n\");\n\t\t backupServerIP=properties.getProperty(\"backupServerIP\");\n\t\t log.info(\"backupServerIP set to its default value \"+backupServerIP+\"\\n\");\n\t\t backupServerPassword=properties.getProperty(\"backupServerPassword\");\n\t\t log.info(\"backupServerPassword set to its default value \"+\"******\"+\"\\n\");\n\t\t backupServerFolderLocation=properties.getProperty(\"backupServerFolderLocation\");\n\t\t log.info(\"backupServerFolderLoaction set to its default value \"+backupServerFolderLocation+\"\\n\");\n\t\t if(properties.getProperty(\"backupServerType\").toLowerCase().equals(\"scp\"))\n\t\t backupServerType=BackupServerType.scp;\n\t\t else\n\t\t \t backupServerType=BackupServerType.tftp;\n\t\t log.info(\"backupServerType set to its default value \"+backupServerType+\"\\n\");\n\t\t if(properties.getProperty(\"deviceType\").toUpperCase().equals(\"CISCO\"))\n\t\t deviceType=RouterType.CISCO;\n\t\t else\n\t\t \t deviceType=RouterType.JUNIPER;\n\t\t log.info(\"deviceType set to its default value \"+deviceType+\"\\n\");\n\t\t deviceName=properties.getProperty(\"deviceUsername\");\n\t\t log.info(\"INFO:\"+dateFormat.format(date)+\"] \"+\"device user name set to its default value \"+deviceName+\"\\n\");\n\t\t devicePassword=properties.getProperty(\"devicePassword\"); \n\t\t log.info(\"devicePassword set to its default value \"+\"******\"+\"\\n\");\n\t\t deviceEnPassword=properties.getProperty(\"devieEnablePassword\");\n\t\t log.info(\"deviceEnablePassword set to its default value \"+\"******\"+\"\\n\");\n\t\t }\n\t }catch(Exception e){\n\t\t log.error(\"File \"+DEFAULT_SETTINGS_FILE_LOCATION+\" was not found!!\\n\");\n\t }\n }",
"private void restoreAndRelease() {\n try (Connection c = connection) {\n c.setAutoCommit(autoCommit);\n } catch (SQLException e) {\n throw new UncheckedSQLException(e);\n }\n }",
"public void schemaUpdated() throws SQLException, IOException {\n ResultSet resultSet = databaseStatement.executeQuery(\"select count(datname) from pg_database\");\n int uniqueID = 0;\n if(resultSet.next()) {\n uniqueID = resultSet.getInt(1);\n }\n String newDBName = \"OSM\"+uniqueID;\n ProcessBuilder processBuilder = new ProcessBuilder(\"src/main/resources/schema/schemaUploader.sh\", newDBName, password);\n Process process = processBuilder.start();\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream()));\n String line = null; // This is here for testing purposes\n while ((line = bufferedReader.readLine()) != null ) {\n System.out.println(line);\n }\n }",
"@RequestMapping(value=\"/admin/restore\", method = RequestMethod.GET)\r\n public String restore() throws JAXBException, IOException {\r\n return \"admin/restore\";\r\n }",
"public void rollback();",
"CopySnapshotResult copySnapshot(CopySnapshotRequest copySnapshotRequest);",
"public abstract void rollback() throws DetailException;",
"void rollBack();",
"@Override\n protected void handleSetBackup()\n {\n }",
"@Override\n public void restore() {\n }",
"public MasterBackUp_Restore() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"@Test\n public void shouldSequenceVdbGatewayVDBVdb() throws Exception {\n createNodeWithContentFromFile(\"vdb/GatewayVDB.vdb\", \"vdb/GatewayVDB.vdb\");\n Node outputNode = getOutputNode(this.rootNode, \"vdbs/GatewayVDB.vdb\");\n assertNotNull(outputNode);\n assertThat(outputNode.getPrimaryNodeType().getName(), is(VdbLexicon.Vdb.VIRTUAL_DATABASE));\n assertThat(outputNode.getNodes().getSize(), is(1L));\n\n // verify model and table nodes\n Node modelNode = outputNode.getNode(\"HSQLDB.xmi\");\n assertNotNull(modelNode);\n Node tableNode = modelNode.getNode(\"GATEWAY_TABLE\");\n assertNotNull(tableNode);\n }",
"public void copyDatabase(Context context) {\n try {\n AssetManager assetManager = context.getAssets();\n InputStream is = null;\n try {\n is = assetManager.open(DATABASE_NAME);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n //mo file de ghi\n String path = DATABASE_PATH + DATABASE_NAME;\n File f = new File(path);\n if (f.exists()) {\n return;\n } else {\n f.createNewFile();\n }\n FileOutputStream fos = new FileOutputStream(f);\n byte[] b = new byte[1024];\n int lenght = 0;\n\n while ((lenght = is.read(b)) != -1) {\n fos.write(b, 0, lenght);\n fos.flush();\n }\n is.close();\n fos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public abstract boolean restoreFromArchive(K id) throws ServiceException;",
"@Override\n public void run() {\n\n String filename = \"PurgeTable\";\n\n PreparedStatement stmt1 = null;\n try {\n stmt1 = conn.prepareStatement(\"delete from \" + filename);\n stmt1.executeUpdate();\n System.out.println(\"Deletion successful\");\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }",
"public static void restoreDatabase(Context context, String backupFileName) throws IOException {\n File from = new File(Environment.getExternalStorageDirectory(), BACKUP_DIR + backupFileName);\n File to = context.getDatabasePath(DatabaseHelper.DATABASE_NAME);\n FileUtils.copyFile(from, to);\n\n DatabaseHelper databaseHelper = DatabaseHelper.getInstance(context);\n SQLiteDatabase db = databaseHelper.getWritableDatabase();\n\n // Upgrade restored old DB if it needs\n int restoredVersion = db.getVersion();\n if (restoredVersion < DatabaseHelper.DATABASE_VERSION) {\n databaseHelper.onUpgrade(db, restoredVersion, DatabaseHelper.DATABASE_VERSION);\n }\n }",
"public void restoreInventory(String table, String ID, String type, String l, String arm, \r\n\t\t\tString seat, String cushion, int price, String manuId ) {\r\n\t\tif(table.equals(\"chair\")) {\r\n\t\t\ttry {\r\n\t\t\tString query= \"INSERT INTO chair(ID, Type, Legs, Arms, Seat, Cushion, Price, ManuID) VALUES (?,?,?,?,?,?,?,?)\";\r\n \t\tPreparedStatement state= getDBConnect().prepareStatement(query);\r\n \t\tstate.setString(1,ID);\r\n \t\tstate.setString(2, type);\r\n \t\tstate.setString(3,l);\r\n \t\tstate.setString(4,arm);\r\n \t\tstate.setString(5,seat);\r\n \t\tstate.setString(6, cushion);\r\n \t\tstate.setInt(7, price);\r\n \t\tstate.setString(8,manuId);\r\n \t\t\r\n \t\tint rows= state.executeUpdate();\r\n \t\tSystem.out.println(\"Rows updated: \"+rows);\r\n \t\tstate.close();\r\n\t\t}\r\n\t\tcatch(SQLException e) {\r\n\t\t\t System.out.println(\"Error, unable to insert new item into table 'Chair' \");\r\n\t\t }\r\n\t\t\t\r\n\t\t}\r\n\t}",
"public long loadDataBase() throws IOException {\n long startTime = Time.currentElapsedTime();\n long zxid = snapLog.restore(dataTree, sessionsWithTimeouts, commitProposalPlaybackListener);\n initialized = true;\n long loadTime = Time.currentElapsedTime() - startTime;\n ServerMetrics.getMetrics().DB_INIT_TIME.add(loadTime);\n LOG.info(\"Snapshot loaded in {} ms, highest zxid is 0x{}, digest is {}\",\n loadTime, Long.toHexString(zxid), dataTree.getTreeDigest());\n return zxid;\n }",
"@Override\n public void saveSnapshot(String path) {\n String command = \"adb shell screencap -p \" + path;\n// String command=\"adb shell screencap -p /sdcard/js_test.png\";\n// executeCommand(Lists.newArrayList(\n// \"adb\",\"shell\",\"screencap\",\"-p\",\"/sdcard/js_test.png\",\n// \"|\",\"sed\",\"'s/\\\\r$//'\",\">\",path\n//\n// ));\n// String command=\"adb shell screencap -p | sed 's/\\\\r$//' > screen.png\";\n executeCommand(command);\n }",
"private void copyDataBase() throws IOException {\n\n\t\tInputStream myInput = rssContext.getAssets().open(DATABASE_NAME);\n\t\tString outFileName = DATABASE_PATH + DATABASE_NAME;\n\t\tOutputStream myOutput = new FileOutputStream(outFileName);\n\t\tbyte[] buffer = new byte[1024];\n\t\tint length;\n\t\twhile ((length = myInput.read(buffer)) > 0) {\n\t\t\tmyOutput.write(buffer, 0, length);\n\t\t}\n\t\tmyOutput.flush();\n\t\tmyOutput.close();\n\t\tmyInput.close();\n\t}",
"@Override\n public void restoreState(Map<String, Object> state) {\n\n }",
"long createDatabase(long actor, String nameToDisplay, long proteinDBType, long sizeInBytes, boolean bPublic, boolean bReversed, ExperimentCategory category);",
"public void importDatabase (String name) throws IOException {\n // Closes all database connections to commit to mem\n databaseHandler.close();\n // Determines paths\n String inFileName = BACKUP_DB_PATH_DIR + name;\n\n File fromDB = new File(inFileName);\n File toDB = new File(CURRENT_DB_PATH);\n // Copy the database to the new location\n copyFile(new FileInputStream(fromDB), new FileOutputStream(toDB));\n Log.d(\"Import Database\", \"succeeded\");\n }",
"void dropDatabase();",
"public String getDatabaseName()\n {\n return \"assetdr\";\n }",
"private void backupTable(Path filePath, UUID uuid) throws IOException {\n long startTime = System.currentTimeMillis();\n BackupTableStats backupTableStats;\n\n try (FileOutputStream fileOutput = new FileOutputStream(filePath.toString())) {\n StreamOptions options = StreamOptions.builder()\n .ignoreTrimmed(false)\n .cacheEntries(false)\n .build();\n Stream<OpaqueEntry> stream = (new OpaqueStream(runtime.getStreamsView().get(uuid, options))).streamUpTo(timestamp);\n\n backupTableStats = writeTableToFile(fileOutput, stream, uuid);\n } catch (IOException e) {\n log.error(\"failed to back up table {} to file {}\", uuid, filePath);\n throw e;\n } catch (TrimmedException e) {\n log.error(\"failed to back up tables as log was trimmed after back up starts.\");\n throw e;\n }\n\n long elapsedTime = System.currentTimeMillis() - startTime;\n\n log.info(\"{} SMREntry (size: {} bytes, elapsed time: {} ms) saved to temp file {}\",\n backupTableStats.getNumOfEntries(), backupTableStats.getTableSize(), elapsedTime, filePath);\n }",
"public static void backupDatabase(Context context) throws IOException {\n String backupFileName = new SimpleDateFormat(\"yyyy-MM-dd-HH-mm-ss\")\n .format(System.currentTimeMillis()) + \".backup\";\n\n File from = context.getDatabasePath(DatabaseHelper.DATABASE_NAME);\n File to = new File(Environment.getExternalStorageDirectory(),\n BACKUP_DIR + backupFileName);\n\n // Create missing directories.\n if (!to.exists()) {\n to.getParentFile().mkdirs();\n to.createNewFile();\n }\n\n FileUtils.copyFile(from, to);\n }",
"com.google.cloud.gkebackup.v1.RestoreOrBuilder getRestoreOrBuilder();",
"public static void restoreTable(SQLiteDatabase database, String tableName,\n String[] columns, String where) {\n String query = \"INSERT INTO \" + tableName + \" (\" + buildColumnsString(columns) + \") \" +\n SQLiteQueryBuilder.buildQueryString(false, tableName + BACKUP_PREFIX, columns, where,\n null, null, null, null);\n\n database.execSQL(query);\n dropBackupTableIfExist(database, tableName);\n Log.v(DatabaseHelper.TAG, query);\n }",
"@Override\n public void rollbackTx() {\n \n }",
"private void processRollback() throws HsqlException {\n\n String token;\n boolean toSavepoint;\n\n token = tokenizer.getSimpleToken();\n toSavepoint = false;\n\n if (token.equals(Token.T_WORK)) {\n\n // do nothing\n } else if (token.equals(Token.T_TO)) {\n tokenizer.getThis(Token.T_SAVEPOINT);\n\n token = tokenizer.getSimpleName();\n toSavepoint = true;\n } else {\n tokenizer.back();\n }\n\n if (toSavepoint) {\n session.rollbackToSavepoint(token);\n } else {\n session.rollback();\n }\n }",
"byte[] getBinaryVDBResource(String resourcePath) throws Exception;",
"static void resetTestDatabase() {\n String URL = \"jdbc:mysql://localhost:3306/?serverTimezone=CET\";\n String USER = \"fourthingsplustest\";\n\n InputStream stream = UserStory1Test.class.getClassLoader().getResourceAsStream(\"init.sql\");\n if (stream == null) throw new RuntimeException(\"init.sql\");\n try (Connection conn = DriverManager.getConnection(URL, USER, null)) {\n conn.setAutoCommit(false);\n ScriptRunner runner = new ScriptRunner(conn);\n runner.setStopOnError(true);\n runner.runScript(new BufferedReader(new InputStreamReader(stream)));\n conn.commit();\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n System.out.println(\"Done running migration\");\n }",
"public void copyDatabaseFromAsset() {\n\n /** Just to calculate time How much it will take to copy database */\n //Utility t = new Utility();\n\n\t\t/* Insert Database */\n DBHelper db = new DBHelper(this);\n\n try {\n boolean dbExist = db.isDataBaseAvailable();\n\n if (!dbExist)\n db.copyDataBaseFromAsset();\n\n /* Force fully calling onCreate to create table of Favourite*/\n //db.onCreate(db.getWritableDatabase());\n\n } catch (Exception e) {\n AppLogger.writeLog(\"state \" + TAG + \" -- \" + e.toString());\n\n if (AppConstants.DEBUG)\n Log.e(\"\", e.toString());\n }\n }",
"public void setDbPgsqlAlfa(String database) {\n this.dbPgsqlAlfa = database;\n }",
"abstract public void _dump(Dump d);",
"public interface StoreRestoreI {\n}",
"void recoverBackupWorkspace(String projectId, String workspaceId, WorkspaceType workspaceType, boolean forceRecovery);",
"private void backupState(BPState curState, FileProcess fileState) {\n\n\t\tprogram.generageCFG(\"/asm/cfg/\" + program.getFileName() + \"_test\");\n\t\tprogram.getResultFileTemp().appendInLine(\n\t\t\t\tprogram.getDetailTechnique() + \" Nodes:\" + program.getBPCFG().getVertexCount() + \" Edges:\"\n\t\t\t\t\t\t+ program.getBPCFG().getEdgeCount() + \" \");\n\t\t//System.out.println();\n\t}",
"public IgniteInternalFuture<IgniteInternalTx> rollbackAsync();",
"public static void main(String[] args) {\n\t\tRestoreIPAddresses r=new RestoreIPAddresses();\n\t\tr.restoreIpAddresses(\"0000\");\n\t\tr.restoreIpAddresses(\"111111111111111111111111111\");\n\t\tr.restoreIpAddresses(\"010010\");\n\t\tr.restoreIpAddresses(\"00\");\n\t\t\n\t}",
"private void copyDataBase() throws IOException {\n\t\tInputStream mInput = mContext.getAssets().open(DATABASE_NAME);\r\n\t\tString outFileName = DATABASE_PATH + DATABASE_NAME;\r\n\t\tOutputStream mOutput = new FileOutputStream(outFileName);\r\n\r\n\t\t// transferer donnees de la db\r\n\t\tbyte[] buffer = new byte[1024];\r\n\t\tint length;\r\n\t\twhile ((length = mInput.read(buffer)) > 0) {\r\n\t\t\tmOutput.write(buffer, 0, length);\r\n\t\t}\r\n\t\t// fermeture\r\n\t\tmOutput.flush();\r\n\t\tmOutput.close();\r\n\t\tmInput.close();\r\n\t}"
]
| [
"0.5751458",
"0.5583478",
"0.5440568",
"0.537166",
"0.520644",
"0.516542",
"0.51586103",
"0.50812584",
"0.5044873",
"0.49997005",
"0.4996659",
"0.49557966",
"0.49046475",
"0.48571238",
"0.48430145",
"0.48199007",
"0.48091954",
"0.4775357",
"0.4659713",
"0.4659696",
"0.46554106",
"0.46520698",
"0.4622461",
"0.46181983",
"0.45978674",
"0.4543077",
"0.45322394",
"0.45172188",
"0.44948903",
"0.4485752",
"0.44551897",
"0.44468284",
"0.44208944",
"0.44173867",
"0.44173867",
"0.44173867",
"0.44173867",
"0.43923303",
"0.43775716",
"0.43773016",
"0.43662494",
"0.43494284",
"0.43445268",
"0.43428847",
"0.43364784",
"0.43317145",
"0.4329642",
"0.4311657",
"0.43100592",
"0.4301709",
"0.42832026",
"0.42667013",
"0.42604986",
"0.42563772",
"0.42517638",
"0.42421335",
"0.42405972",
"0.42405364",
"0.42341095",
"0.4231111",
"0.42264017",
"0.4224222",
"0.42132396",
"0.42123082",
"0.4207188",
"0.42030615",
"0.42029405",
"0.41903436",
"0.41865817",
"0.41845316",
"0.4172013",
"0.41677105",
"0.41658655",
"0.41562474",
"0.4144067",
"0.41430792",
"0.41259885",
"0.41240388",
"0.41217625",
"0.41203785",
"0.4119235",
"0.41072372",
"0.4105388",
"0.41008794",
"0.40967062",
"0.4088358",
"0.40841046",
"0.40818942",
"0.40817586",
"0.4076431",
"0.40760392",
"0.40719816",
"0.40718699",
"0.40707344",
"0.4068398",
"0.40664104",
"0.4061845",
"0.4058028",
"0.40544397",
"0.40503523"
]
| 0.56527156 | 1 |
Return the properties which are prefixed using the given key. | public <T> Map<String, T> getProperties(String prefix) {
Map<String, T> properties = new HashMap<>();
for (String key : getPropertyKeys()) {
if (key.startsWith(prefix)) {
properties.put(key, getProperty(key));
}
}
return properties;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract String getPropertyPrefix();",
"public String getPropertyPrefix();",
"java.lang.String getPropertiesOrThrow(\n java.lang.String key);",
"public Note[] getProperties(Object key);",
"public static Iterator getKeysMatching(String inKeyPrefix) {\r\n HashSet matchingKeys = new HashSet();\r\n for (Iterator i = getProperties().keySet().iterator(); i.hasNext(); ) {\r\n String key = (String) i.next();\r\n if (key.startsWith(inKeyPrefix)) {\r\n matchingKeys.add(key);\r\n }\r\n }\r\n return matchingKeys.iterator();\r\n }",
"public String[] getKeys(){\n int paddingCount = 1;\n List<String> result = new ArrayList<String>();\n String lastKey = null;\n for (Property x : this.getProperties()) {\n String newKey = new String(x.getKey());\n if (lastKey != null && lastKey.equalsIgnoreCase(newKey)){\n newKey = newKey + \"_\" + paddingCount++;\n }\n result.add(newKey);\n lastKey = newKey;\n }\n return result.toArray(new String[]{});\n }",
"public Iterable<String> getKeys(String keyPrefix);",
"public Iterable<Properties> getPropertiesSets(String key);",
"public Iterable<String> getPropertyKeys();",
"boolean containsProperties(\n java.lang.String key);",
"@Override\n public List<String> keysWithPrefix(String prefix) {\n List<String> results = new ArrayList<>();\n Node x = get(root, prefix, 0);\n collect(x, new StringBuilder(prefix), results);\n return results;\n }",
"String[] getPropertyKeys();",
"List<PropertyKeySetting> getPropertyKeySettings();",
"String getProperty(String key);",
"String getProperty(String key);",
"String getProperty(String key);",
"public final String getPrefix() {\n return properties.get(PREFIX_PROPERTY);\n }",
"public String[] getPropertyNames(final String inPrefix) {\n final String[] propertyNames = getPropertyNames();\n\n final String prefix = inPrefix.toLowerCase();\n\n final List<String> names = new ArrayList<>();\n for (final String propertyName : propertyNames) {\n if (propertyName.startsWith(prefix)) {\n names.add(propertyName);\n }\n }\n\n if (names.isEmpty()) {\n return null;\n }\n\n // Copy the strings from the List over to a String array.\n final String[] prefixNames = new String[names.size()];\n names.toArray(prefixNames);\n return prefixNames;\n }",
"public String getSubstitutionPropertyKey(String key)\n {\n return \"${\".concat(key).concat(\"}\");\n }",
"Object getClientProperty(Object key);",
"public static String getProp(PropertiesAllowedKeys key) {\n\t\ttry {\n\t\t\treturn (String) properties.get(key.toString());\n\t\t} catch (NullPointerException e) {\n\t\t\tSystem.err\n\t\t\t\t\t.println(\"You just found a bug in marabou. Marabou requested a config key from marabou.properties that is non existent.\\n\"\n\t\t\t\t\t\t\t+ \"Please file a bug report and include this messages and what you just did.\");\n\t\t\treturn \"\";\n\t\t}\n\t}",
"public Mono<PropertyKeys> addonPropertiesResourceGetAddonPropertiesGet(String addonKey) throws RestClientException {\n Object postBody = null;\n // verify the required parameter 'addonKey' is set\n if (addonKey == null) {\n throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, \"Missing the required parameter 'addonKey' when calling addonPropertiesResourceGetAddonPropertiesGet\");\n }\n // create path and map variables\n final Map<String, Object> pathParams = new HashMap<String, Object>();\n\n pathParams.put(\"addonKey\", addonKey);\n\n final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();\n final HttpHeaders headerParams = new HttpHeaders();\n final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<String, String>();\n final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();\n\n final String[] localVarAccepts = { \n \"application/json\"\n };\n final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n final String[] localVarContentTypes = { };\n final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n\n String[] localVarAuthNames = new String[] { };\n\n ParameterizedTypeReference<PropertyKeys> localVarReturnType = new ParameterizedTypeReference<PropertyKeys>() {};\n return apiClient.invokeAPI(\"/rest/atlassian-connect/1/addons/{addonKey}/properties\", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);\n }",
"@Override // android.media.MediaFormat.FilteredMappedKeySet\n public String mapKeyToItem(String key) {\n return key.substring(this.mPrefixLength);\n }",
"public String getPrefixKey() {\n return \"qa.journal.item.\" + key;\n }",
"public boolean hasProperty( String key );",
"boolean hasProperty(String key);",
"Object getProperty(String key);",
"@Override\n public String getProperty(String key) {\n if ((System.currentTimeMillis() - this.lastCheck) > this.CACHE_TIME) {\n update();\n }\n if (this.ignoreCase) {\n key = this.keyMap.getProperty(key.toLowerCase());\n if (key == null)\n return null;\n }\n return super.getProperty(key);\n }",
"public void setPropertyPrefix(String prefix);",
"public static List<LineItemDTO> getAllDFPPropertiesFromCache(String key) {\n\t \tList<LineItemDTO> propertiesDFPList = null;\n\t\t\tkey = ALL_PROPERTIES_DFP_KEY+\"-\"+key;\n\t \tif(memcache !=null && memcache.contains(key)){\n\t \t\tpropertiesDFPList = (List<LineItemDTO>) memcache.get(key);\n\t \t} \t\n\t \treturn propertiesDFPList;\n\t\t}",
"public static HashMap<String, String> getProperties(String keyGroup) {\r\n HashMap<String, String> hashmap = new HashMap<String, String>();\r\n if (oProperties == null) {\r\n oInstance.loadProperties();\r\n }\r\n Enumeration<Object> enumeration = oProperties.keys();\r\n while (enumeration.hasMoreElements()) {\r\n String tempKey = (String) enumeration.nextElement();\r\n if (tempKey.startsWith(keyGroup)) {\r\n hashmap.put(tempKey, (String) oProperties.get(tempKey));\r\n }\r\n }\r\n return hashmap;\r\n }",
"@Override\n\t\tpublic Iterable<String> getPropertyKeys() {\n\t\t\treturn null;\n\t\t}",
"public static String getPropertyName(String propertyPath) {\n\t\tint separatorIndex = propertyPath.indexOf(PropertyAccessor.PROPERTY_KEY_PREFIX_CHAR);\n\t\treturn (separatorIndex != -1 ? propertyPath.substring(0, separatorIndex) : propertyPath);\n\t}",
"public String getProp(String key) {\n\t\treturn prop.getProperty(key);\n\t}",
"public String getKeyPrefix() {\n\t\treturn keyPrefix;\n\t}",
"public String getKeyPrefix() {\n return keyPrefix;\n }",
"private static String getPropertyItem(String tradingPropertyKey, int offset)\n {\n String[] parsedKeys = BasicPropertyParser.parseArray(tradingPropertyKey);\n if(parsedKeys.length > offset)\n {\n return parsedKeys[offset];\n }\n else\n {\n return \"\";\n }\n }",
"@Override\n\t\tpublic boolean hasProperty(String key) {\n\t\t\treturn false;\n\t\t}",
"public static List<LineItemDTO> getDFPPropertiesFromCache(String key) {\n\t \tList<LineItemDTO> propertiesDFPList = null;\n\t\t\tkey = PROPERTIES_DFP_KEY+\"-\"+key;\n\t \tif(memcache !=null && memcache.contains(key)){\n\t \t\tpropertiesDFPList = (List<LineItemDTO>) memcache.get(key);\n\t \t} \t\n\t \treturn propertiesDFPList;\n\t\t}",
"public String getPropKey() {\n return propKey;\n }",
"public Iterable<String> keysWithPrefix(String prefix)\r\n {\r\n Queue<String> q = new Queue<String>();\r\n Node x;\r\n if (prefix.equals(\"\")) {\r\n if (null_str_val != null) q.enqueue(\"\");\r\n x = root;\r\n } else x = get(root, prefix, 0).mid;\r\n collect(x, prefix, q);\r\n return q;\r\n }",
"protected String getKey( String key, String prefix ){\n //sanity check\n if( !key.startsWith( prefix ) )\n return null;\n\n //if the key and prefix are same length\n if( key.length() == prefix.length() ){\n return this.TYPE_KEY;\n }\n\n //if prefix does not end in a dot add a dot\n if ( prefix.charAt(prefix.length()-1) != '.' ) {\n prefix = prefix + '.';\n }\n\n //for a valid subsetting operation there should be . at prefix.length() - 1\n //allows us to distinguish between lrc1.url and lrc1a.url for prefix\n //lrc1\n return ( key.charAt( prefix.length() - 1) != '.' )?\n null:\n key.substring( prefix.length() );\n }",
"@Override\n public List<String> keysWithPrefix(String prefix) {\n if (prefix == null || prefix.length() == 0 || root == null) {\n throw new NoSuchElementException();\n }\n List<String> result = new ArrayList<>();\n Node p = root;\n // Get to the branch with such a prefix\n for (int i = 0; i < prefix.length(); i++) {\n Node childNode = p.next.get((prefix.charAt(i)));\n if (childNode == null) {\n throw new NoSuchElementException();\n } else {\n p = childNode;\n }\n }\n // P is now at the branch, scan every branch of p to get the list of words\n if (p.isKey) {\n result.add(prefix);\n }\n for (Node i : p.next.values()) {\n if (i != null) {\n keysWithPrefix(result, prefix, i);\n }\n }\n return result;\n }",
"public String getProperty(Object obj, String key);",
"public Set<String> keySet() {\n return _properties.keySet();\n }",
"String getPrefix();",
"String getPrefix();",
"String getPrefix();",
"String getPrefix();",
"public String getProperty(Class type, String key);",
"public static String getProperty(String key) {\r\n\t\treturn prop.getProperty(key);\r\n\t}",
"public String getProperty( String key )\n {\n List<Props.Entry> props = this.props.getEntry();\n Props.Entry keyObj = new Props.Entry();\n keyObj.setKey( key );\n\n String value = null;\n int indx = props.indexOf( keyObj );\n if ( indx != -1 )\n {\n Props.Entry entry = props.get( props.indexOf( keyObj ) );\n value = entry.getValue();\n }\n\n return value;\n }",
"public List<String> get(Object key)\r\n/* 396: */ {\r\n/* 397:564 */ return (List)this.headers.get(key);\r\n/* 398: */ }",
"public String getPropertyKey() {\n\t\treturn propertyKey;\n\t}",
"public String getProperty(String key) {\n\t\treturn this.properties.getProperty(key);\n\t}",
"public String get(String key) {\n return this.properties.getProperty(key);\n }",
"public void setPropKey(String propKey) {\n this.propKey = propKey;\n }",
"public static String getProperty(String key) {\n\t\treturn properties.getProperty(key);\n\t}",
"@Override\n public String longestPrefixOf(String key) {\n throw new UnsupportedOperationException();\n }",
"@Override\r\n\tpublic String getProperty(String key) {\r\n\t\t\r\n\t\treturn Settings.getProperty(key);\r\n\t\t\r\n\t}",
"public String getPrefix();",
"public String getPrefix();",
"public Iterable<String> keysWithPrefix(String pre) {\n LinkedList<String> q = new LinkedList<String>();\n Node x = get(root, pre, 0);\n collect(x, pre, q);\n return q;\n }",
"@Override // android.media.MediaFormat.FilteredMappedKeySet\n public boolean keepKey(String key) {\n return key.startsWith(this.mPrefix);\n }",
"public String getPrefix() {\n return getAsString(\"prefix\");\n }",
"public String getProperty(String key) {\n\t\treturn this.properties.get(key);\n\t}",
"public Object getProperty(Object key) {\r\n\t\treturn properties.get(key);\r\n\t}",
"@Updatable\n public String getPrefix() {\n return prefix;\n }",
"String [] getPropertyNames(Long id) throws RemoteException;",
"private String getValueFromProperty(String key) {\n\t\treturn properties.getProperty(key);\n\n\t}",
"protected List<String> getStrings(String key) {\n Object result = properties.get(key);\n if (result == null) {\n return new ArrayList<>();\n } else if (result instanceof String) {\n return Collections.singletonList((String) result);\n } else if (result instanceof List) {\n return (List<String>) result;\n } else if (result instanceof String[]) {\n return Arrays.asList((String[]) result);\n } else if (result instanceof Object[]) {\n return Arrays.stream((Object[]) result)\n .map(o -> (String) o)\n .collect(Collectors.toList());\n } else {\n throw new UnexpectedException(this);\n }\n }",
"public static String getProperty(String key) {\n String valorPropiedad = null;\n\n valorPropiedad = getInstance().propert.getProperty(key);\n\n if (valorPropiedad != null) {\n valorPropiedad = valorPropiedad.trim();\n }\n\n return valorPropiedad;\n }",
"public ResourceProperties getSubProperties(String prefix) {\n if (prefix == null) {\n throw new NullPointerException(\"prefix\"); //$NON-NLS-1$\n }\n return new ResourceProperties(this, prefix);\n }",
"public\tHashMap\tgetPropertiesMap(String prefix)\n\t{\n\t\tHashMap props = new\tHashMap();\n\t\taddProperties(props,prefix);\n\t\t\n\t\treturn\tprops;\n\t}",
"public abstract String getPrefix();",
"@Override\n public String[] getPropertyNames() {\n final String[] names = new String[this.properties.size()];\n this.properties.keySet().toArray(names);\n return names;\n }",
"public String propKey() {\n return propKey;\n }",
"public Map<String, Property> keyValueMap(){\n int paddingCount = 1;\n Map<String, Property> result = new HashMap<String, Property>();\n String lastKey = null;\n for (Property parameter : this.getProperties()) {\n String newKey = new String(parameter.getKey());\n if (lastKey != null && lastKey.equalsIgnoreCase(newKey)){\n newKey = newKey + \"_\" + paddingCount++;\n }\n result.put(newKey, new Property(parameter));\n lastKey = newKey;\n }\n return result;\n }",
"private static Properties createLoaderProperties(String inPrefix) {\r\n Properties props = new Properties();\r\n props.setProperty(inPrefix + \"Property1\", \"Value1Prop\");\r\n props.setProperty(inPrefix + \"Property2\", \"Value2Prop\");\r\n return props;\r\n }",
"public void setKeyPrefix(String keyPrefix) {\n\t\tthis.keyPrefix = keyPrefix;\n\t}",
"public static List<String> getProcessorNamePropertyConfigNames(NifiProperty property) {\n\n return getConfigPropertyKeysForNiFi(property).stream().map(k -> \"nifi.\" + toPropertyName(StringUtils.substringAfterLast(property.getProcessorType(), \".\") + \"[\"+property.getProcessorName()+\"].\" + k)).collect(Collectors.toList());\n }",
"public interface Properties {\r\n\r\n\t/**\r\n\t * Returns the raw value of the key, or null if not found.\r\n\t */\r\n\tpublic Object getObject(String key);\r\n\t\r\n\t/**\r\n\t * Returns an untyped Iterable for iterating through the raw contents of an array. \r\n\t */\r\n\tpublic Iterable<Object> getObjects(String key);\r\n\r\n\t\r\n\t\r\n\t/**\r\n\t * Returns the value of the key as a string, or default value if not found.\r\n\t */\r\n\tpublic String getString(String key, String defaultValue);\r\n\t\r\n\t/**\r\n\t * Returns a string Iterable for iterating through a list of values. \r\n\t */\r\n\tpublic Iterable<String> getStrings(String key);\r\n\r\n\t\r\n\t\r\n\t/**\r\n\t * Returns the value of the key as a boolean, or default value if not found.\r\n\t */\r\n\tpublic Boolean getBoolean(String key, Boolean defaultValue);\r\n\t\r\n\t/**\r\n\t * Returns a boolean Iterable for iterating through a list of values. \r\n\t */\r\n\tpublic Iterable<Boolean> getBooleans(String key);\r\n\r\n\t\r\n\t\r\n\t/**\r\n\t * Returns the value of the key as an integer, or default value if not found.\r\n\t */\r\n\tpublic Integer getInteger(String key, Integer defaultValue);\r\n\t\r\n\t/**\r\n\t * Returns an integer Iterable for iterating through a list of values. \r\n\t */\r\n\tpublic Iterable<Integer> getIntegers(String key);\r\n\r\n\t\r\n\t\r\n\t/**\r\n\t * Returns the value of the key as a long, or default value if not found.\r\n\t */\r\n\tpublic Long getLong(String key, Long defaultValue);\r\n\r\n\t/**\r\n\t * Returns a long Iterable for iterating through a list of values. \r\n\t */\r\n\tpublic Iterable<Long> getLongs(String key);\r\n\r\n\t\r\n\t\r\n\t/**\r\n\t * Returns the value of the key as an float, or default value if not found.\r\n\t */\r\n\tpublic Float getFloat(String key, Float defaultValue);\r\n\t\r\n\t/**\r\n\t * Returns a float Iterable for iterating through a list of values. \r\n\t */\r\n\tpublic Iterable<Float> getFloats(String key);\r\n\r\n\t\r\n\t\r\n\t/**\r\n\t * Returns the value of the key as a double, or default value if not found.\r\n\t */\r\n\tpublic Double getDouble(String key, Double defaultValue);\r\n\r\n\t\r\n\t/**\r\n\t * Returns a double Iterable for iterating through a list of values. \r\n\t */\r\n\tpublic Iterable<Double> getDoubles(String key);\r\n\t\r\n\r\n\t\r\n\t/**\r\n\t * Returns a nested set of properties for the specified key, or default value if not found.\r\n\t */\r\n\tpublic Properties getPropertiesSet(String key, Properties defaultValue);\r\n\r\n\t/**\r\n\t * Returns a Properties Iterable for iterating through a list of values. \r\n\t */\r\n\tpublic Iterable<Properties> getPropertiesSets(String key);\r\n\t\r\n}",
"public static List<String> getAllPropNames(Provider propCat) {\n return PersistenceCfgProperties.getKeys(propCat);\n }",
"public String getProperty(String key) {\n if (this.ignoreCase) {\n key = key.toUpperCase();\n }\n\n return this.attributes.getProperty(key);\n }",
"public int getPropertyInt(String key);",
"public ArrayList<Pair> getAllProperties(String filePath2, Object keyResource) {\n\t\tModel model = ModelFactory.createDefaultModel();\n\t\tmodel.read(filePath2);\n\n\t\t/*\n\t\t * String queryString =\n\t\t * \"PREFIX : <http://extbi.lab.aau.dk/ontology/business/>\\r\\n\" +\n\t\t * \"PREFIX rdfs: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\\r\\n\" +\n\t\t * \"PREFIX afn: <http://jena.apache.org/ARQ/function#>\\r\\n\" +\n\t\t * \"SELECT ?v ?extrLabel ?o\\r\\n\" + \"WHERE\\r\\n\" +\n\t\t * \" {\t?v\ta\t:Municipality ;\\r\\n\" + \"\t?p\t?o\\r\\n\" +\n\t\t * \"\tBIND(afn:localname(?p) AS ?extrLabel)\\r\\n\" + \"}\";\n\t\t */\n\n\t\tString queryString = \"SELECT ?p ?o WHERE {?s ?p ?o. \" + \"FILTER regex(str(?s), '\" + keyResource.toString()\n\t\t\t\t+ \"')}\";\n\t\t\n\t\tQuery query = QueryFactory.create(queryString);\n\t\tQueryExecution qe = QueryExecutionFactory.create(query, model);\n\t\tResultSet results = ResultSetFactory.copyResults(qe.execSelect());\n\t\t\n\t\tArrayList<Pair> propertylist = new ArrayList<>();\n\t\t\n\t\twhile (results.hasNext()) {\n\t\t\tQuerySolution querySolution = (QuerySolution) results.next();\n\t\t\t\n\t\t\tRDFNode property = querySolution.get(\"p\");\n\t\t\tRDFNode value = querySolution.get(\"o\");\n\t\t\t\n\t\t\tString propertyString = property.toString();\n\t\t\tpropertyString = new StringBuilder(propertyString).reverse().toString();\n\t\t\t\n\t\t\tString regEx = \"(.*?)/(.*?)$\";\n\t\t\tPattern pattern = Pattern.compile(regEx);\n\t\t\tMatcher matcher = pattern.matcher(propertyString);\n\t\t\t\n\t\t\twhile (matcher.find()) {\n\t\t\t\tpropertyString = matcher.group(1);\n\t\t\t\tpropertyString = new StringBuilder(propertyString).reverse().toString();\n\t\t\t\t\n\t\t\t\tPair pair = new Pair();\n\t\t\t\tpair.setKey(propertyString);\n\t\t\t\tpair.setValue(value);\n\t\t\t\tpropertylist.add(pair);\n\t\t\t}\n\t\t}\n\t\t\n\t\tqe.close();\n\t\t\n\t\treturn propertylist;\n\t}",
"private static List<Token> tokenize(String key) {\n List<Token> tokens = new ArrayList<Token>();\n String[] components = key.split(IDataKey.SEPARATOR);\n for (String component : components) {\n String prefix, namespace, suffix;\n Matcher matcher = NAMESPACE_PREFIX_PATTERN.matcher(component);\n if (matcher.matches()) {\n prefix = matcher.group(2);\n namespace = matcher.group(3);\n suffix = matcher.group(4);\n } else {\n prefix = null;\n namespace = null;\n suffix = component;\n }\n tokens.add(new Token(prefix, namespace, suffix));\n }\n return tokens;\n }",
"@Override\n public String longestPrefixOf(String key) {\n if (key == null || key.length() == 0 || root == null) {\n throw new NoSuchElementException();\n }\n StringBuilder longestPrefix = new StringBuilder();\n Node p = root;\n for (int i = 0; i < key.length(); i++) {\n Node current = p.next.get(key.charAt(i));\n if (current != null) {\n longestPrefix.append(current.value);\n p = current;\n }\n }\n return longestPrefix.toString();\n }",
"public static String getProperty(String key) {\r\n\r\n\t\treturn getProperties(LanguageManagerUtil.getCurrentLanguage()).getString(key);\r\n\t}",
"@Override\n\tpublic void addProperty(String key, String value) {\n\n\t\tif (key.equals(key_delimiter) && value.length() == 1) {\n\t\t\tvalue = \"#\" + String.valueOf((int) value.charAt(0));\n\t\t}\n\t\tsuper.addProperty(key, value);\n\t}",
"public String get(String key) {\n return this.properties.getProperty(key);\n }",
"public String getPrefix() {\n return this.prefix;\n }",
"public Set getPropertyNames(){\n return this.vendorSpecificProperties;\n }",
"@java.lang.Override\n public boolean containsProperties(\n java.lang.String key) {\n if (key == null) {\n throw new NullPointerException(\"map key\");\n }\n return internalGetProperties().getMap().containsKey(key);\n }",
"public Config filterPrefix(String prefix);",
"public static String getProperty(String key) {\n if (prop == null) {\n return null;\n }\n return prop.getProperty(key);\n }",
"public String getProperty(String key) {\n String value = properties.getProperty(key);\n return value;\n }",
"public static final String getPropertyString(String key) {\n\t\tProperties props = new Properties();\n\t\tprops = loadProperties(propertyFileAddress);\n\t\treturn props.getProperty(key);\n\t}",
"public String[] getPropertyNames();",
"public DrillBuilder setPropertyKey(String propertyKey) {\n this.propertyKey = propertyKey;\n return this;\n }"
]
| [
"0.6499809",
"0.6404432",
"0.62548566",
"0.62385976",
"0.6192219",
"0.6070299",
"0.6040657",
"0.60290676",
"0.59963536",
"0.5975671",
"0.597148",
"0.5922117",
"0.5897673",
"0.5886328",
"0.5886328",
"0.5886328",
"0.57895136",
"0.5785989",
"0.57062876",
"0.56987816",
"0.56813",
"0.56228346",
"0.5590761",
"0.5565991",
"0.5513491",
"0.55061555",
"0.55050904",
"0.5498718",
"0.5488846",
"0.54514617",
"0.54467326",
"0.54455006",
"0.53948814",
"0.53809434",
"0.5368227",
"0.5364842",
"0.5356108",
"0.534406",
"0.530289",
"0.52984685",
"0.52818525",
"0.5257555",
"0.524984",
"0.5233485",
"0.52177787",
"0.52091753",
"0.52091753",
"0.52091753",
"0.52091753",
"0.51864",
"0.5185081",
"0.51838225",
"0.5181663",
"0.5174111",
"0.51510954",
"0.5150886",
"0.513784",
"0.51209074",
"0.5120226",
"0.51126426",
"0.5107103",
"0.5107103",
"0.5098665",
"0.50978863",
"0.5096094",
"0.5087383",
"0.507018",
"0.50461864",
"0.5032478",
"0.50157785",
"0.50078833",
"0.50058603",
"0.49946666",
"0.49881423",
"0.49861464",
"0.49826294",
"0.4981562",
"0.49806455",
"0.49793175",
"0.49754888",
"0.4975135",
"0.4970776",
"0.49682584",
"0.49647164",
"0.49600926",
"0.4957816",
"0.4950261",
"0.4942818",
"0.49427488",
"0.49378237",
"0.49339813",
"0.4930426",
"0.4926238",
"0.49040887",
"0.48983333",
"0.48982477",
"0.48982316",
"0.48971546",
"0.48963714",
"0.48958492"
]
| 0.6117009 | 5 |
Add a single link inbound link to the given vertex. Note that this method will remove all other links to other vertices for the given labels and only create a single edge between both vertices per label. | public void setSingleLinkInTo(VertexFrame vertex, String... labels) {
// Unlink all edges with the given label
unlinkIn(null, labels);
// Create a new edge with the given label
linkIn(vertex, labels);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setUniqueLinkInTo(VertexFrame vertex, String... labels) {\n\t\t// Unlink all edges between both objects with the given label\n\t\tunlinkIn(vertex, labels);\n\t\t// Create a new edge with the given label\n\t\tlinkIn(vertex, labels);\n\t}",
"public void setSingleLinkOutTo(VertexFrame vertex, String... labels) {\n\t\t// Unlink all edges with the given label\n\t\tunlinkOut(null, labels);\n\t\t// Create a new edge with the given label\n\t\tlinkOut(vertex, labels);\n\t}",
"public void addVertex(T vertLabel) {\n\t\tvertCount++;\n\t\tLinkedList[] tempList = new LinkedList[vertCount];\n\t\tLinkedList newVert = new LinkedList((String)vertLabel);\n\t\t\n\t\tif(verts.length==0){\n\t\t\ttempList[0] = newVert;\n\t\t}\n\t\t\n\t\telse{\n\t\t\tfor(int x=0; x<verts.length; x++){\n\t\t\t\t\ttempList[x] = verts[x];\n\t\t\t}\n\t\t\ttempList[verts.length] = newVert;\n\t\t}\n\tverts = tempList;\n }",
"public void addVertex(String vertLabel) {\n\n // Implement me!\n if (indexOf(vertLabel, vertices) != -1) {\n return;\n }\n vertices.put(vertLabel, vertices.size());\n if (weights.length == 0) {\n weights = new int[1][0];\n } else {\n weights = addOneRow(weights);\n }\n\n\n }",
"private void addEdgeWithLabel(NasmInst source, NasmLabel destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n\n if (systemCalls.contains(destination.toString()))\n return; // System call: iprintLF, readline or atoi. No edge needed\n\n NasmInst destinationInst = label2Inst.get(destination.toString());\n if (destinationInst == null)\n throw new FgException(\"ERROR: No instruction matching with the given label\");\n addEdgeWithInst(source, destinationInst);\n }",
"@Override\n\tpublic void setUniqueLinkOutTo(VertexFrame vertex, String... labels) {\n\t\tunlinkOut(vertex, labels);\n\t\t// Create a new edge with the given label\n\t\tlinkOut(vertex, labels);\n\t}",
"public void addLink(int vertexA, int vertexB) {\n\t\ttry {\n\t\t\t// Link from A to B\n\t\t\tArrayList<Integer> neighbors = this.adjListMap.get(vertexA);\n\t\t\tneighbors.add(vertexB);\n\t\t\tthis.adjListMap.put(vertexA, neighbors);\n\n\t\t\t// Link from B to A\n\t\t\tneighbors = this.adjListMap.get(vertexB);\n\t\t\tneighbors.add(vertexA);\n\t\t\tthis.adjListMap.put(vertexB, neighbors);\n\n\t\t\t// Update reachability matrix on every add link\n\t\t\tbuildReachabilityMatrix(this.adjListMap);\n\n\t\t} catch (NullPointerException e) {\n\t\t\tSystem.out.println(\"Vertices not in range!. It should be <\" + this.maxNumVertices);\n\t\t}\n\n\t}",
"@Override\r\n\tpublic void link(E src, E dst, int weight) {\r\n\t\tinsertVertex(src); //Inserts src if not currently in the graph\r\n\t\tinsertVertex(dst); //Inserts dst if not currently in the graph\r\n\t\tEdge<E> newedge1 = new Edge<>(src, dst, weight);\r\n\r\n\t\tArrayList<Edge<E>> sEdges = adjacencyLists.get(src);\r\n\t\tsEdges.remove(newedge1); //if the edge already exists remove it\r\n\t\tsEdges.add(newedge1);\r\n\t\tif(!isDirected) { //Add the additional edge if this graph is undirected\r\n\t\t\tEdge<E> newedge2 = new Edge<>(dst, src, weight);\r\n\r\n\t\t\tArrayList<Edge<E>> dEdges = adjacencyLists.get(dst);\r\n\t\t\tdEdges.remove(newedge2); //if the edge already exists remove it\r\n\t\t\tdEdges.add(newedge2); \r\n\t\t}\r\n\t}",
"public void AddIncomingLink(Link l) {\r\n\t\tif (l == null) {\r\n\t\t\tSystem.out.println(\"ERROR! Attempted to link a non-existant node!\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tincoming.addElement(l);\r\n\t\tSystem.out.println(\"Added incoming link to Node \" + id);\r\n\t}",
"void addEdge(int source, int destination, int weight);",
"public boolean addVertex(T vertexLabel);",
"void addVertex(Vertex v, ArrayList<Vertex> neighbors, ArrayList<Double> weights) throws VertexNotInGraphException;",
"public void addLink(int from, int weight) {\n if (from < 0 || from >= size() - 1)\n throw new IndexOutOfBoundsException(\"Attempt to link to same or forward neuron\");\n lastNeuron().addInput(() -> getValue(from), weight);\n }",
"public void addEdge(String srcLabel, String tarLabel, int weight) {\n // Implement me!\n\n String e = srcLabel + tarLabel;\n if (indexOf(e, edges) > -1) {\n return;\n }\n int sInt = indexOf(srcLabel, vertices);\n int tInt = indexOf(tarLabel, vertices);\n if (sInt < 0 ||tInt < 0) {\n return;\n }\n\n int eInt = edges.size();\n edges.put(e, eInt);\n weights = addOneCol(weights);\n weights[sInt][eInt] = weight;\n weights[tInt][eInt] = weight * (-1);\n\n\n }",
"public boolean addVertex(String label)\n\t{\n\t\tif(!hasVertex(label)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex v = new DSAGraphVertex(label, null);\n\t\t\tvertices.insertLast(v); //inserts into vertices list at end\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public void addEdge(Graph graph, int source, int destination, double weight){\r\n\r\n Node node = new Node(destination, weight);\r\n LinkedList<Node> list = null;\r\n\r\n //Add an adjacent Node for source\r\n list = adjacencyList.get((double)source);\r\n if (list == null){\r\n list = new LinkedList<Node>();\r\n }\r\n\r\n list.addFirst(node);\r\n adjacencyList.put((double)source, list);\r\n\r\n //Add adjacent node again since graph is undirected\r\n node = new Node(source, weight);\r\n\r\n list = null;\r\n\r\n list = adjacencyList.get((double)destination);\r\n\r\n if (list == null){\r\n list = new LinkedList<Node>();\r\n }\r\n\r\n list.addFirst(node);\r\n adjacencyList.put((double)destination, list);\r\n }",
"public void addEdge(Node source, Node destination, int weight) {\n nodes.add(source);\n nodes.add(destination);\n checkEdgeExistance(source, destination, weight);\n\n if (!directed && source != destination) {\n checkEdgeExistance(destination, source, weight);\n }\n }",
"public boolean addEdge(String label1, String label2)\n\t{\n\t\tif(!isAdjacent(label1, label2)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex vx1 = getVertex(label1), vx2 = getVertex(label2);\n\t\t\tvx1.addEdge(vx2);\n\t\t\tvx2.addEdge(vx1);\n\t\t\tedgeCount++;\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"private void addEdgeWithInst(NasmInst source, NasmInst destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n Node from = inst2Node.get(source);\n Node to = inst2Node.get(destination);\n if (from == null || to == null)\n throw new FgException(\"ERROR: No nodes matching with given Source or destination \");\n graph.addEdge(from, to);\n }",
"@Override\n public void addEdge(V source, V destination, double weight)\n {\n super.addEdge(source, destination, weight);\n super.addEdge(destination, source, weight);\n }",
"@Override\n\t\tpublic void addLabel(Label label) {\n\n\t\t}",
"public String addNode(PlainGraph graph, String nodeName, String label) {\n Map<String, PlainNode> nodeMap = graphNodeMap.get(graph);\n if (!nodeMap.containsKey(nodeName)) {\n PlainNode node = graph.addNode();\n\n // if a label is given add it as an edge\n if (label != null) {\n if (!label.contains(\":\")) {\n // if the label does not contain \":\" then 'type:' should be added\n label = String.format(\"%s:%s\", TYPE, label);\n }\n graph.addEdge(node, label, node);\n }\n\n nodeMap.put(nodeName, node);\n }\n return nodeName;\n }",
"public void addEdge(N startNode, N endNode, E label)\r\n/* 43: */ {\r\n/* 44: 89 */ assert (checkRep());\r\n/* 45: 90 */ if (!contains(startNode)) {\r\n/* 46: 90 */ addNode(startNode);\r\n/* 47: */ }\r\n/* 48: 91 */ if (!contains(endNode)) {\r\n/* 49: 91 */ addNode(endNode);\r\n/* 50: */ }\r\n/* 51: 92 */ ((Map)this.map.get(startNode)).put(endNode, label);\r\n/* 52: 93 */ ((Map)this.map.get(endNode)).put(startNode, label);\r\n/* 53: */ }",
"public void addEdge(Character sourceId, Character destinationId) {\n Node sourceNode = getNode(sourceId);\n Node destinationNode = getNode(destinationId);\n sourceNode.adjacent.add(destinationNode);\n }",
"public void addEdge(String inLabel, double inDistance, String inMode,\n int inTime, int inPeakTime, DSAGraphNode<E> inNode)\n {\n links.insertLast(inNode);\n DSAGraphEdge<E> edge = new DSAGraphEdge<E>(inLabel, inDistance, inMode,\n inTime, inPeakTime, this,\n inNode);\n edgeList.insertLast(edge);\n }",
"@Override\n\tpublic void addEdge(Location src, Location dest, Path edge) {\n\t\tint i = locations.indexOf(src);\n\t\tpaths.get(locations.indexOf(src)).add(edge);\n\t}",
"public Vertex(int label) {\r\n isVisited = false;\r\n this.label = label;\r\n }",
"private void attachLabel(Vertex v, String string) throws IOException\n {\n if (string == null || string.length() == 0)\n return;\n String label = string.trim();\n// String label = trimQuotes(string).trim();\n// if (label.length() == 0)\n// return;\n if (unique_labels)\n {\n try\n {\n StringLabeller sl = StringLabeller.getLabeller((Graph)v.getGraph(), LABEL);\n sl.setLabel(v, label);\n }\n catch (StringLabeller.UniqueLabelException slule)\n {\n throw new FatalException(\"Non-unique label found: \" + slule);\n }\n }\n else\n {\n v.addUserDatum(LABEL, label, UserData.SHARED);\n }\n }",
"public Vertex(T vertexLabel) {\r\n\t\tlabel = vertexLabel;\r\n\t\tedgeList = new LinkedList<Edge>();\r\n\t\tvisited = false;\r\n\t\tpreviousVertex = null;\r\n\t\tcost = 0;\r\n\t}",
"public boolean isLink(String label)\n {\n return true;\n }",
"public void addEdge(String source, String destination, double cost, boolean status) {\r\n\r\n\t\tboolean flag = false;\r\n\t\tVertex v = getVertex(source, status);\r\n\t\tVertex w = getVertex(destination, status);\r\n\t\tEdge edge = new Edge(v, w, cost, status);\r\n\t\tif (v.adjacent.size() == 0)\r\n\t\t\tv.adjacent.add(edge);\r\n\t\telse {\r\n\t\t\tfor (Iterator i = v.adjacent.iterator(); i.hasNext();) {\r\n\t\t\t\tEdge adj = (Edge) i.next();\r\n\t\t\t\tif (adj.getDestination().equals(destination)) {\r\n\t\t\t\t\tadj.setCost(cost);\r\n\t\t\t\t\tflag = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else\r\n\t\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (!flag)\r\n\t\t\t\tv.adjacent.add(edge);\r\n\t\t}\r\n\t}",
"void addEdge(Vertex u, Vertex v) {\r\n\t\tu.addNeighbor(v);\r\n\t}",
"public void addEdgeFrom(char v, int e) {\r\n\t\t// does an edge from v already exist?\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.inList.get(i);\r\n\t\t\tif (currentVertex.inList.get(i).vertex.label == v) {\r\n\t\t\t\tneighbor.edge = e; \r\n\t\t\t\tfindNeighbor(findVertex(v).outList, currentVertex.label).edge = e;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// add to current's inList\r\n\t\tNeighbor newNeighbor = new Neighbor(findVertex(v), e);\r\n\t\tcurrentVertex.inList.add(newNeighbor);\r\n\r\n\t\t// add to neighbor's outList\r\n\t\tNeighbor current = new Neighbor(currentVertex, e);\r\n\t\tnewNeighbor.vertex.outList.add(current);\r\n\r\n\t\tedges++;\r\n\t}",
"public Vertex(String label, int index){\n this.label = label;\n this.index = index;\n this.previous = null;\n visited = false;\n }",
"public void addEdge(int source, int destination, int roadCost)\n\t\t{\n\t\t\tEdge edge = new Edge(source, destination, roadCost);\n\t\t\tallEdges.add(edge);\n\t\t}",
"private void addConnection(Vertex v, Vertex v1, boolean twoway_road) {\n\t\tif(v == null || v1 == null) return;\r\n\t\tv1.addEdge(new Edge(v1, v));\r\n\t\tif (twoway_road)\r\n\t\t\tv1.addEdge(new Edge(v, v1));\r\n\t}",
"@Override\n\tpublic boolean add(L vertex) {\n\t\tIterator<Vertex<L>> vertexiter = verticelist.iterator();\n\t\twhile (vertexiter.hasNext()) {\n\t\t\tVertex<L> v = vertexiter.next();\n\t\t\tL lab = v.getlabel();\n\t\t\tif (lab.equals(vertex))\n\t\t\t\treturn false;\n\t\t}\n\t\tVertex<L> v = new Vertex<L>(vertex);\n\t\tverticelist.add(v);\n\t\treturn true;\n\t}",
"public IEdge addEdge(String from, String to, Double cost);",
"public void addEdge(int source, int destination) {\n adjacencyList.get(source).add(destination);\n adjMat[source][destination] = 1;\n //if graph is undirected graph, add u to v's adjacency list\n if (!isDirected) {\n adjacencyList.get(destination).add(source);\n adjMat[destination][source] = 1;\n }\n }",
"void addEdgeTo(char v, int e) {\r\n\t\t// does an edge to v already exist?\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\tneighbor.edge = e;\r\n\t\t\t\tfindNeighbor(findVertex(v).inList, currentVertex.label).edge = e;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// add to current's inList\r\n\t\tNeighbor newNeighbor = new Neighbor(findVertex(v), e);\r\n\t\tcurrentVertex.outList.add(newNeighbor);\r\n\r\n\t\t// add to neighbor's outList\r\n\t\tNeighbor current = new Neighbor(currentVertex, e);\r\n\t\tnewNeighbor.vertex.inList.add(current);\r\n\r\n\t\tedges++;\r\n\t}",
"ILinkDeleterActionBuilder<SOURCE_BEAN_TYPE, LINKED_BEAN_TYPE> setLinkedEntityLabelSingular(String label);",
"public void AddLink() {\n snake.add(tail + 1, new Pair(snake.get(tail).GetFirst(), snake.get(tail).GetSecond())); //Set the new link to the current tail link\n tail++;\n new_link = true;\n }",
"private void addEdge(AtomVertex v, AtomEdge... l) {\n for (AtomEdge e : l) {\n adjacencyMatrix.addEdge(v, e.getSinkVertex(), e.getWeight());\n }\n }",
"void addLabel(Object newLabel);",
"void addLabel(Object newLabel);",
"public void addUndirectedEdge(int vertexOne, int vertexTwo) {\n\t\tGraphNode first = nodeList.get(vertexOne - 1);\n\t\tGraphNode second = nodeList.get(vertexTwo - 1);\n\t\tfirst.getNeighbors().add(second);//Neighbour of first is second. Store it.\n\t\tsecond.getNeighbors().add(first);//Neighbour of second is first. Store it.\n\t\tSystem.out.println(first.getNeighbors());\n\t\tSystem.out.println(second.getNeighbors());\n\t}",
"public Edge<V> addEdge(V source, V target);",
"public void addLabel(LabelInfo label) {\n\t\talLabels.add(label);\n\t\tif (iMaxSegmentDepth < label.getSegmentLabelDepth()) {\n\t\t\tiMaxSegmentDepth = label.getSegmentLabelDepth();\n\t\t}\n\t}",
"public boolean addVertex(String label, Object value)\n\t{\n\t\tif(!hasVertex(label)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex v = new DSAGraphVertex(label, value);\n\t\t\tvertices.insertLast(v); //inserts into vertices list at end\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public void addConnection(Vertex v){\n if(v != this){\r\n if(!connections.contains(v)){\r\n connections.add(v);\r\n }\r\n if(!v.getConnections().contains(this)){\r\n v.addConnection(this);\r\n } \r\n }\r\n\r\n \r\n }",
"private void addVertex(Vertex vertex) {\n if (!this.verticesAndTheirEdges.containsKey(vertex)) {\n this.verticesAndTheirEdges.put(vertex, new LinkedList<>());\n } else {\n System.out.println(\"Vertex already exists in map.\");\n }\n }",
"public void addAndConnectSignal(Signal x, int op1_index, int op2_index) throws Exception\r\n\t{\r\n\t\tvertices.add(x);\r\n\t\tint newIndex = vertices.size() - 1;\r\n\t\tx.id = newIndex;\r\n\t\tleaves.add(newIndex);\r\n\t\tedges.add(new Pair(op1_index, newIndex));\r\n\t\tleaves.set(op1_index, 0);\r\n\t\tedges.add(new Pair(op2_index, newIndex));\r\n\t\tleaves.set(op2_index, 0);\r\n\t}",
"public void addAdjVertex(String currentVertex, String connection)\r\n\t{\r\n\t\tAdjVertex newAdjVertex = newAdjVertex(connection);\r\n\t\t// insert this new node to the linked list\r\n\t\tnewAdjVertex.next = myGraph[getId(currentVertex)].adjVertexHead;\r\n\t\tmyGraph[getId(currentVertex)].adjVertexHead = newAdjVertex;\r\n\t}",
"private void addEdge(int node1, int node2, int cost, int bandwidth) throws IllegalArgumentException {\n // We can't add edges between non-existent nodes\n int nodeCount = mGraph.getNodeCount();\n if (node1 >= nodeCount || node2 >= nodeCount) {\n throw new IllegalArgumentException();\n }\n\n // Add forward edge\n int edgeCount = mGraph.getEdgeCount() / 2;\n\n Edge forward = mGraph.addEdge(String.valueOf(edgeCount + \"f\"), node1, node2, true);\n forward.addAttribute(\"ui.label\", String.valueOf(edgeCount));\n forward.addAttribute(\"edge.cluster\", String.valueOf(edgeCount));\n forward.addAttribute(\"cost\", cost);\n\n // Add backward edge\n Edge backward = mGraph.addEdge(String.valueOf(edgeCount + \"b\"), node2, node1, true);\n backward.addAttribute(\"edge.cluster\", String.valueOf(edgeCount));\n backward.addAttribute(\"cost\", cost);\n\n // Add edge to the SimpleEdge list\n mEdgeList.add(new SimpleEdge(node1, node2, cost, bandwidth));\n }",
"public native static void jniaddLink(int srcId, int dstId, float cap, float reservedBw, float metric) throws AddDBException;",
"void addLink(BlockChainLink link);",
"void addEdge(SimpleVertex vertexOne, SimpleVertex vertexTwo, int weight) {\n\n\t\tSimpleEdge edge = new SimpleEdge(vertexOne, vertexTwo);\n\t\tedge.weight = weight;\n\t\t// edgeList.add(edge);\n\t\t// System.out.println(edge);\n\t\tvertexOne.neighborhood.add(edge);\n\n\t}",
"public void addEdge(int u, int v, int weight){\n this.edges.add(new DEdge(u,v,weight));\n }",
"public void addInterwikiLink(String interwikiLink) {\r\n\t\tif (!this.interwikiLinks.contains(interwikiLink)) {\r\n\t\t\tthis.interwikiLinks.add(interwikiLink);\r\n\t\t}\r\n\t}",
"LinkReader addLink(NodeReader source, NodeReader dest, boolean overwrite) throws NoNodeException, LinkAlreadyPresentException, ServiceException;",
"boolean addEdge(V v, V w, double weight);",
"@Override\n public void addVertex(V vertex)\n {\n if (vertex.equals(null)){\n throw new IllegalArgumentException();\n }\n ArrayList <V> edges = new ArrayList<>();\n\t graph.put(vertex, edges);\n\n }",
"void addEdge(Vertex v1, Vertex v2, Double w) throws VertexNotInGraphException;",
"public void AddOutgoingLink(Link l) {\r\n\t\tif (l == null) {\r\n\t\t\tSystem.out.println(\"ERROR! Attempted to link a non-existant node!\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\toutgoing.addElement(l);\r\n\t\tSystem.out.println(\"Added outgoing link to Node \" + id);\r\n\t}",
"public void addDirectedEdge(String startVertex, String endVertex, int cost)\r\n\t{\r\n\t\tif(!this.dataMap.containsKey(startVertex) || !this.dataMap.containsKey(endVertex))\r\n\t\t{\r\n\t\t\tthrow new IllegalArgumentException(\"Vertex does not exist in the graph!\");\r\n\t\t}\r\n\t\t\r\n\t\tthis.adjacencyMap.get(startVertex).put(endVertex, cost);\r\n\t}",
"public void addEdge(int start, int end, double weight);",
"public DSAGraphVertex(String inLabel, Object inValue)\n\t\t{\n\t\t\tlabel = inLabel;\n\t\t\tvalue = inValue;\n\t\t\tlinks = new DSALinkedList();\n\t\t\tvisited = false;\n\t\t}",
"public void addEdge (E vertex1, E vertex2, int edgeWeight) throws IllegalArgumentException\n {\n if(vertex1 == vertex2)\n return;\n \n int index1 = this.indexOf (vertex1);\n if (index1 < 0)\n throw new IllegalArgumentException (vertex1 + \" was not found!\");\n \n int index2 = this.indexOf (vertex2);\n if (index2 < 0)\n throw new IllegalArgumentException (vertex2 + \" was not found!\");\n\n\n if (this.hasEdge (vertex1, vertex2))\n {\n this.removeNode (index1, index2);\n this.removeNode (index2, index1);\n }\n \n Node node = new Node(index2, edgeWeight);\n this.addNode(node, index1);\n node = new Node(index1, edgeWeight);\n this.addNode(node, index2);\n }",
"public void drawUndirectedEdge(String label1, String label2) {\n }",
"public void addEdge(int u, int v) {\n if (u > nodes.size() || v > nodes.size() || u <= 0 || v <= 0) {\n throw new IllegalArgumentException(\"An invalid node was given\");\n }\n // note that we have to subtract 1 from each since node 1 is located in index 0\n nodes.get(u - 1).addEdge(nodes.get(v - 1));\n }",
"private void addIncomingEdges(Vertex v, Vertex obstacle, Set<Edge> result, Vector<Vertex> newVertexes) {\n \t// Vertexes in the top layer have no incoming edges\n \tif (v.getLayerID() == 0)\n \t\treturn;\n \t\n \t// Fetch the edges from the layer above\n \tint edgeLayerID = v.getLayerID() - 1;\n \tVector<Edge> es = edges.get(edgeLayerID);\n \t\n \tfor (Edge e : es) {\n \t\t// Finds an incoming edge of v\n \t\tif (e.getTail().equals(v.getLabel())) {\n \t\t\tVertex tmp = new Vertex(edgeLayerID, e.getHead());\n \t\t\t// If the incoming edge does not come from obstacle, add the edge and its head\n \t\t\tif (!tmp.theSameAs(obstacle)) {\n \t\t\t\tresult.add(e);\n \t\t\t\tnewVertexes.add(tmp);\n \t\t\t\t//System.out.println(\"TEMP is added: layerID:\" + tmp.layerID + \"\\tlabel:\" + tmp.label);\n \t\t\t}\n \t\t}\n \t}\t\n }",
"LinkedEntries.LinkNode add(NodeEntry cne, int index) {\n LinkedEntries.LinkNode ln = new LinkedEntries.LinkNode(cne, index);\n addNode(ln, getHeader());\n return ln;\n }",
"public void add(int index, PVector v, String label) {\n\t\tpoints.add(index, new GPoint(v, label));\n\t}",
"@Override\r\n public void addEdge(Vertex v1, Vertex v2) {\r\n adjacencyList.get(v1).add(v2); //put v2 into the LinkedList of key v1.\r\n adjacencyList.get(v2).add(v1); //put v1 into the LinkedList of key v2.\r\n }",
"void addVertex(Vertex v);",
"public void addVertex (T vertex){\n if (vertexIndex(vertex) > 0) return; // vertex already in graph, return.\n if (n == vertices.length){ // need to expand capacity of arrays\n expandCapacity();\n }\n \n vertices[n] = vertex;\n for (int i = 0; i < n; i++){ // populating new edges with -1\n edges[n][i] = -1;\n edges[i][n] = -1;\n }\n n++;\n }",
"public void add(int index, float x, float y, String label) {\n\t\tpoints.add(index, new GPoint(x, y, label));\n\t}",
"public void addUndirectedEdge(int v1, int v2, Object edgeInfo) {\r\n \tmyAdjLists[v1].add(new Edge(v1, v2, edgeInfo));\r\n \tmyAdjLists[v2].add(new Edge(v2, v1, edgeInfo));\r\n }",
"void addEdge(String origin, String destination, double weight){\n\t\tadjlist.get(origin).addEdge(adjlist.get(destination), weight);\n\t\tedges++;\n\t}",
"public void addEdges(V vertex, Set<V> edges) {\n if (vertex == null) throw new NullPointerException(\"Vertex cannot be null\");\n if (edges == null) edges = new HashSet<>();\n\n Set<V> filter = edges.stream().filter(e -> {\n boolean b = vertices.containsKey(e);\n if (b) return true;\n else throw new NullPointerException(\"The edge \" + e + \" that is being added is not exist\");\n }).collect(Collectors.toSet());\n\n if (this.vertices.containsKey(vertex)) this.vertices.get(vertex).addAll(filter);\n else this.vertices.put(vertex, filter);\n }",
"void addLink(byte start, byte end);",
"public void addNeighbour(final Vertex neighbour){\n\t\tneighbours.add(neighbour);\n\t}",
"public int addVertex(Model src, int vertexId) {\n\t\tint x = src.vertexX[vertexId];\n\t\tint y = src.vertexY[vertexId];\n\t\tint z = src.vertexZ[vertexId];\n\n\t\tint identical = -1;\n\t\tfor (int v = 0; v < vertexCount; v++) {\n\t\t\tif ((x == vertexX[v]) && (y == vertexY[v]) && (z == vertexZ[v])) {\n\t\t\t\tidentical = v;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// append new one if no matches were found\n\t\tif (identical == -1) {\n\t\t\tvertexX[vertexCount] = x;\n\t\t\tvertexY[vertexCount] = y;\n\t\t\tvertexZ[vertexCount] = z;\n\t\t\tif (src.vertexLabel != null) {\n\t\t\t\tvertexLabel[vertexCount] = src.vertexLabel[vertexId];\n\t\t\t}\n\t\t\tidentical = vertexCount++;\n\t\t}\n\n\t\treturn identical;\n\t}",
"void addEdge(int vertex1, int vertex2){\n adjList[vertex1].add(vertex2);\n adjList[vertex2].add(vertex1);\n }",
"public void addEdge(V vertex) {\n this.vertices.put(vertex, new HashSet<>());\n }",
"public void addEdge(int u, int v)\n {\n // Add v to u's list.\n adjList[u].add(v);\n }",
"public void addEdge(Node from, Node to);",
"public void addUndirectedEdge(int v1, int v2, Object edgeInfo) {\n //your code here\n \taddEdge(v1, v2, edgeInfo);\n \taddEdge(v2, v1, edgeInfo);\n \t\n }",
"void add(Vertex vertex);",
"EdgeNode(VertexNode correspondingVertex){\n setCorrespondingVertex(correspondingVertex);\n }",
"public void addLabel(int index)\r\n {\r\n if (index >= this.labels.size())\r\n {\r\n throw new IllegalArgumentException(\r\n \"UMLFragmentLabelFigure: No such index.\");\r\n }\r\n\r\n LabelFigure label = new LabelFigure();\r\n this.labels.add(index, label);\r\n add(label, index);\r\n }",
"protected void addLabel(AeIconLabel aLabel) {\r\n }",
"public void onClickAddLink(View v) {\n linkDefined = true;\n switch ((int) linkType.getSelectedItemId()) {\n case 0:\n linkTypeValue = \"link\";\n break;\n case 1:\n linkTypeValue = \"media\";\n break;\n default:\n break;\n }\n linkStringList += links.getText() + \"|\" + linkTypeValue + \";\";\n links.setText(\"\");\n }",
"public void addVertex (E vertex)\n {\n if (!this.containsVertex (vertex))\n {\n // Enlargen the graph if needed\n if (lastIndex == vertices.length - 1)\n this.enlarge ();\n\n lastIndex = lastIndex + 1;\n vertices[lastIndex] = vertex;\n }\n }",
"public void addLine(LabelLine labelLine) {\n\n\t\tfloat fLineHeight = labelLine.getHeight();\n\t\tfloat fLineWidth = labelLine.getWidth();\n\n\t\tif ((fLineWidth + 2.0f * CONTAINER_BOUNDARY_SPACING) > fWidth) {\n\t\t\tfWidth = fLineWidth + 2.0f * CONTAINER_BOUNDARY_SPACING;\n\t\t}\n\n\t\tfloat fXLinePosition = fXContainerLeft + CONTAINER_BOUNDARY_SPACING;\n\t\tfloat fYLinePosition;\n\n\t\tif (alLabelLines.size() == 0) {\n\t\t\tfHeight += 2.0f * CONTAINER_BOUNDARY_SPACING + fLineHeight;\n\t\t\tfYLinePosition = fYContainerCenter + (fHeight / 2.0f)\n\t\t\t\t\t- CONTAINER_BOUNDARY_SPACING - fLineHeight;\n\t\t} else {\n\t\t\tfHeight += CONTAINER_LINE_SPACING + fLineHeight;\n\t\t\tupdateLinePositions();\n\t\t\tLabelLine lastLine = alLabelLines.get(alLabelLines.size() - 1);\n\t\t\tfYLinePosition = lastLine.getPosition().y() - CONTAINER_LINE_SPACING\n\t\t\t\t\t- fLineHeight;\n\t\t}\n\n\t\tlabelLine.setPosition(fXLinePosition, fYLinePosition);\n\t\talLabelLines.add(labelLine);\n\t}",
"void addEdge(int x, int y);",
"public void addEdge(T source, T destination, Path length) {\n\t\tif (source == null || destination == null) {\n\t\t\tthrow new NullPointerException(\n\t\t\t\t\t\"Source and Destination, both should be non-null.\");\n\t\t}\n\t\tif (!graph.containsKey(source) || !graph.containsKey(destination)) {\n\t\t\tthrow new NoSuchElementException(\n\t\t\t\t\t\"Source and Destination, both should be part of graph\");\n\t\t}\n\t\t/* A node would always be added so no point returning true or false */\n\t\tgraph.get(source).put(destination, length);\n\t}",
"public Link add(Link link);",
"@Override\r\n public void addVertex(Vertex v) {\r\n adjacencyList.put(v, new ArrayList<>()); //putting v into key, a new LinkedList into value for later use\r\n }",
"private void addLinkesToGraph()\n\t{\n\t\tString from,to;\n\t\tshort sourcePort,destPort;\n\t\tMap<Long, Set<Link>> mapswitch= linkDiscover.getSwitchLinks();\n\n\t\tfor(Long switchId:mapswitch.keySet())\n\t\t{\n\t\t\tfor(Link l: mapswitch.get(switchId))\n\t\t\t{\n\t\t\t\tfrom = Long.toString(l.getSrc());\n\t\t\t\tto = Long.toString(l.getDst());\n\t\t\t\tsourcePort = l.getSrcPort();\n\t\t\t\tdestPort = l.getDstPort();\n\t\t\t\tm_graph.addEdge(from, to, Capacity ,sourcePort,destPort);\n\t\t\t} \n\t\t}\n\t\tSystem.out.println(m_graph);\n\t}"
]
| [
"0.6397375",
"0.6179619",
"0.60158205",
"0.5975274",
"0.5919637",
"0.58393675",
"0.56436235",
"0.56210357",
"0.55895907",
"0.5538394",
"0.5516341",
"0.53506184",
"0.5338249",
"0.5320516",
"0.5319764",
"0.5318573",
"0.53011554",
"0.52953315",
"0.52536386",
"0.5247244",
"0.51748824",
"0.5174577",
"0.51664615",
"0.51381654",
"0.51346225",
"0.51297283",
"0.5118851",
"0.5082965",
"0.5074564",
"0.50693685",
"0.50668454",
"0.50388074",
"0.5036997",
"0.50329316",
"0.5024101",
"0.50151634",
"0.50107825",
"0.49947795",
"0.49831033",
"0.4982984",
"0.497405",
"0.49737158",
"0.49629548",
"0.49431446",
"0.49431446",
"0.49342975",
"0.49275702",
"0.49242678",
"0.492168",
"0.49027273",
"0.49011534",
"0.48983112",
"0.4883188",
"0.48791927",
"0.48713332",
"0.4867895",
"0.48659176",
"0.48619708",
"0.48592585",
"0.48585886",
"0.48568913",
"0.48349184",
"0.4834416",
"0.48284352",
"0.4820931",
"0.4812643",
"0.48114368",
"0.48104304",
"0.47971097",
"0.47847226",
"0.4783818",
"0.47693166",
"0.47661382",
"0.4761738",
"0.47503376",
"0.4744855",
"0.4743056",
"0.47376424",
"0.4736275",
"0.47360423",
"0.47269362",
"0.47256818",
"0.47139636",
"0.4708889",
"0.47045434",
"0.46937937",
"0.46894607",
"0.46853483",
"0.4680691",
"0.46798715",
"0.46687686",
"0.46634537",
"0.46630466",
"0.46529594",
"0.4652948",
"0.46520865",
"0.4651487",
"0.46502283",
"0.46477425",
"0.46371105"
]
| 0.6996243 | 0 |
Add a unique inbound link to the given vertex for the given set of labels. Note that this method will effectively ensure that only one inbound link exists between the two vertices for each label. | public void setUniqueLinkInTo(VertexFrame vertex, String... labels) {
// Unlink all edges between both objects with the given label
unlinkIn(vertex, labels);
// Create a new edge with the given label
linkIn(vertex, labels);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setSingleLinkInTo(VertexFrame vertex, String... labels) {\n\t\t// Unlink all edges with the given label\n\t\tunlinkIn(null, labels);\n\t\t// Create a new edge with the given label\n\t\tlinkIn(vertex, labels);\n\t}",
"@Override\n\tpublic void setUniqueLinkOutTo(VertexFrame vertex, String... labels) {\n\t\tunlinkOut(vertex, labels);\n\t\t// Create a new edge with the given label\n\t\tlinkOut(vertex, labels);\n\t}",
"public void addVertex(String vertLabel) {\n\n // Implement me!\n if (indexOf(vertLabel, vertices) != -1) {\n return;\n }\n vertices.put(vertLabel, vertices.size());\n if (weights.length == 0) {\n weights = new int[1][0];\n } else {\n weights = addOneRow(weights);\n }\n\n\n }",
"public void addVertex(T vertLabel) {\n\t\tvertCount++;\n\t\tLinkedList[] tempList = new LinkedList[vertCount];\n\t\tLinkedList newVert = new LinkedList((String)vertLabel);\n\t\t\n\t\tif(verts.length==0){\n\t\t\ttempList[0] = newVert;\n\t\t}\n\t\t\n\t\telse{\n\t\t\tfor(int x=0; x<verts.length; x++){\n\t\t\t\t\ttempList[x] = verts[x];\n\t\t\t}\n\t\t\ttempList[verts.length] = newVert;\n\t\t}\n\tverts = tempList;\n }",
"private void addEdgeWithLabel(NasmInst source, NasmLabel destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n\n if (systemCalls.contains(destination.toString()))\n return; // System call: iprintLF, readline or atoi. No edge needed\n\n NasmInst destinationInst = label2Inst.get(destination.toString());\n if (destinationInst == null)\n throw new FgException(\"ERROR: No instruction matching with the given label\");\n addEdgeWithInst(source, destinationInst);\n }",
"public void setSingleLinkOutTo(VertexFrame vertex, String... labels) {\n\t\t// Unlink all edges with the given label\n\t\tunlinkOut(null, labels);\n\t\t// Create a new edge with the given label\n\t\tlinkOut(vertex, labels);\n\t}",
"public boolean addVertex(T vertexLabel);",
"public void addLink(int vertexA, int vertexB) {\n\t\ttry {\n\t\t\t// Link from A to B\n\t\t\tArrayList<Integer> neighbors = this.adjListMap.get(vertexA);\n\t\t\tneighbors.add(vertexB);\n\t\t\tthis.adjListMap.put(vertexA, neighbors);\n\n\t\t\t// Link from B to A\n\t\t\tneighbors = this.adjListMap.get(vertexB);\n\t\t\tneighbors.add(vertexA);\n\t\t\tthis.adjListMap.put(vertexB, neighbors);\n\n\t\t\t// Update reachability matrix on every add link\n\t\t\tbuildReachabilityMatrix(this.adjListMap);\n\n\t\t} catch (NullPointerException e) {\n\t\t\tSystem.out.println(\"Vertices not in range!. It should be <\" + this.maxNumVertices);\n\t\t}\n\n\t}",
"void addEdge(int source, int destination, int weight);",
"public void AddIncomingLink(Link l) {\r\n\t\tif (l == null) {\r\n\t\t\tSystem.out.println(\"ERROR! Attempted to link a non-existant node!\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tincoming.addElement(l);\r\n\t\tSystem.out.println(\"Added incoming link to Node \" + id);\r\n\t}",
"void addVertex(Vertex v, ArrayList<Vertex> neighbors, ArrayList<Double> weights) throws VertexNotInGraphException;",
"@Override\n\tpublic boolean add(L vertex) {\n\t\tIterator<Vertex<L>> vertexiter = verticelist.iterator();\n\t\twhile (vertexiter.hasNext()) {\n\t\t\tVertex<L> v = vertexiter.next();\n\t\t\tL lab = v.getlabel();\n\t\t\tif (lab.equals(vertex))\n\t\t\t\treturn false;\n\t\t}\n\t\tVertex<L> v = new Vertex<L>(vertex);\n\t\tverticelist.add(v);\n\t\treturn true;\n\t}",
"private void attachLabel(Vertex v, String string) throws IOException\n {\n if (string == null || string.length() == 0)\n return;\n String label = string.trim();\n// String label = trimQuotes(string).trim();\n// if (label.length() == 0)\n// return;\n if (unique_labels)\n {\n try\n {\n StringLabeller sl = StringLabeller.getLabeller((Graph)v.getGraph(), LABEL);\n sl.setLabel(v, label);\n }\n catch (StringLabeller.UniqueLabelException slule)\n {\n throw new FatalException(\"Non-unique label found: \" + slule);\n }\n }\n else\n {\n v.addUserDatum(LABEL, label, UserData.SHARED);\n }\n }",
"public boolean addVertex(String label)\n\t{\n\t\tif(!hasVertex(label)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex v = new DSAGraphVertex(label, null);\n\t\t\tvertices.insertLast(v); //inserts into vertices list at end\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean addEdge(String label1, String label2)\n\t{\n\t\tif(!isAdjacent(label1, label2)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex vx1 = getVertex(label1), vx2 = getVertex(label2);\n\t\t\tvx1.addEdge(vx2);\n\t\t\tvx2.addEdge(vx1);\n\t\t\tedgeCount++;\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"@Override\r\n\tpublic void link(E src, E dst, int weight) {\r\n\t\tinsertVertex(src); //Inserts src if not currently in the graph\r\n\t\tinsertVertex(dst); //Inserts dst if not currently in the graph\r\n\t\tEdge<E> newedge1 = new Edge<>(src, dst, weight);\r\n\r\n\t\tArrayList<Edge<E>> sEdges = adjacencyLists.get(src);\r\n\t\tsEdges.remove(newedge1); //if the edge already exists remove it\r\n\t\tsEdges.add(newedge1);\r\n\t\tif(!isDirected) { //Add the additional edge if this graph is undirected\r\n\t\t\tEdge<E> newedge2 = new Edge<>(dst, src, weight);\r\n\r\n\t\t\tArrayList<Edge<E>> dEdges = adjacencyLists.get(dst);\r\n\t\t\tdEdges.remove(newedge2); //if the edge already exists remove it\r\n\t\t\tdEdges.add(newedge2); \r\n\t\t}\r\n\t}",
"private void addEdgeWithInst(NasmInst source, NasmInst destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n Node from = inst2Node.get(source);\n Node to = inst2Node.get(destination);\n if (from == null || to == null)\n throw new FgException(\"ERROR: No nodes matching with given Source or destination \");\n graph.addEdge(from, to);\n }",
"public void addEdge(Node source, Node destination, int weight) {\n nodes.add(source);\n nodes.add(destination);\n checkEdgeExistance(source, destination, weight);\n\n if (!directed && source != destination) {\n checkEdgeExistance(destination, source, weight);\n }\n }",
"private void addVertex(Vertex vertex) {\n if (!this.verticesAndTheirEdges.containsKey(vertex)) {\n this.verticesAndTheirEdges.put(vertex, new LinkedList<>());\n } else {\n System.out.println(\"Vertex already exists in map.\");\n }\n }",
"public void addUndirectedEdge(int vertexOne, int vertexTwo) {\n\t\tGraphNode first = nodeList.get(vertexOne - 1);\n\t\tGraphNode second = nodeList.get(vertexTwo - 1);\n\t\tfirst.getNeighbors().add(second);//Neighbour of first is second. Store it.\n\t\tsecond.getNeighbors().add(first);//Neighbour of second is first. Store it.\n\t\tSystem.out.println(first.getNeighbors());\n\t\tSystem.out.println(second.getNeighbors());\n\t}",
"public void addAndConnectSignal(Signal x, int op1_index, int op2_index) throws Exception\r\n\t{\r\n\t\tvertices.add(x);\r\n\t\tint newIndex = vertices.size() - 1;\r\n\t\tx.id = newIndex;\r\n\t\tleaves.add(newIndex);\r\n\t\tedges.add(new Pair(op1_index, newIndex));\r\n\t\tleaves.set(op1_index, 0);\r\n\t\tedges.add(new Pair(op2_index, newIndex));\r\n\t\tleaves.set(op2_index, 0);\r\n\t}",
"@Override\n public void addEdge(V source, V destination, double weight)\n {\n super.addEdge(source, destination, weight);\n super.addEdge(destination, source, weight);\n }",
"@Override\n\tpublic void addEdge(Location src, Location dest, Path edge) {\n\t\tint i = locations.indexOf(src);\n\t\tpaths.get(locations.indexOf(src)).add(edge);\n\t}",
"public void addLink(int from, int weight) {\n if (from < 0 || from >= size() - 1)\n throw new IndexOutOfBoundsException(\"Attempt to link to same or forward neuron\");\n lastNeuron().addInput(() -> getValue(from), weight);\n }",
"private void addConnection(Vertex v, Vertex v1, boolean twoway_road) {\n\t\tif(v == null || v1 == null) return;\r\n\t\tv1.addEdge(new Edge(v1, v));\r\n\t\tif (twoway_road)\r\n\t\t\tv1.addEdge(new Edge(v, v1));\r\n\t}",
"public int addVertex(Model src, int vertexId) {\n\t\tint x = src.vertexX[vertexId];\n\t\tint y = src.vertexY[vertexId];\n\t\tint z = src.vertexZ[vertexId];\n\n\t\tint identical = -1;\n\t\tfor (int v = 0; v < vertexCount; v++) {\n\t\t\tif ((x == vertexX[v]) && (y == vertexY[v]) && (z == vertexZ[v])) {\n\t\t\t\tidentical = v;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// append new one if no matches were found\n\t\tif (identical == -1) {\n\t\t\tvertexX[vertexCount] = x;\n\t\t\tvertexY[vertexCount] = y;\n\t\t\tvertexZ[vertexCount] = z;\n\t\t\tif (src.vertexLabel != null) {\n\t\t\t\tvertexLabel[vertexCount] = src.vertexLabel[vertexId];\n\t\t\t}\n\t\t\tidentical = vertexCount++;\n\t\t}\n\n\t\treturn identical;\n\t}",
"public void addEdge(Character sourceId, Character destinationId) {\n Node sourceNode = getNode(sourceId);\n Node destinationNode = getNode(destinationId);\n sourceNode.adjacent.add(destinationNode);\n }",
"public void addEdge(N startNode, N endNode, E label)\r\n/* 43: */ {\r\n/* 44: 89 */ assert (checkRep());\r\n/* 45: 90 */ if (!contains(startNode)) {\r\n/* 46: 90 */ addNode(startNode);\r\n/* 47: */ }\r\n/* 48: 91 */ if (!contains(endNode)) {\r\n/* 49: 91 */ addNode(endNode);\r\n/* 50: */ }\r\n/* 51: 92 */ ((Map)this.map.get(startNode)).put(endNode, label);\r\n/* 52: 93 */ ((Map)this.map.get(endNode)).put(startNode, label);\r\n/* 53: */ }",
"public void addEdge(Graph graph, int source, int destination, double weight){\r\n\r\n Node node = new Node(destination, weight);\r\n LinkedList<Node> list = null;\r\n\r\n //Add an adjacent Node for source\r\n list = adjacencyList.get((double)source);\r\n if (list == null){\r\n list = new LinkedList<Node>();\r\n }\r\n\r\n list.addFirst(node);\r\n adjacencyList.put((double)source, list);\r\n\r\n //Add adjacent node again since graph is undirected\r\n node = new Node(source, weight);\r\n\r\n list = null;\r\n\r\n list = adjacencyList.get((double)destination);\r\n\r\n if (list == null){\r\n list = new LinkedList<Node>();\r\n }\r\n\r\n list.addFirst(node);\r\n adjacencyList.put((double)destination, list);\r\n }",
"public void addEdge(String srcLabel, String tarLabel, int weight) {\n // Implement me!\n\n String e = srcLabel + tarLabel;\n if (indexOf(e, edges) > -1) {\n return;\n }\n int sInt = indexOf(srcLabel, vertices);\n int tInt = indexOf(tarLabel, vertices);\n if (sInt < 0 ||tInt < 0) {\n return;\n }\n\n int eInt = edges.size();\n edges.put(e, eInt);\n weights = addOneCol(weights);\n weights[sInt][eInt] = weight;\n weights[tInt][eInt] = weight * (-1);\n\n\n }",
"public void addUndirectedEdge(int v1, int v2, Object edgeInfo) {\n//your code here\n Edge edge1 = new Edge(v1, v2, edgeInfo);\n Edge edge2 = new Edge(v2, v1, edgeInfo);\n if(!adjLists[v1].contains(edge1)){\n adjLists[v1].addLast(edge1);\n }\n if(!adjLists[v2].contains(edge2)){\n adjLists[v2].addLast(edge2);\n }\n }",
"public void addUndirectedEdge(int v1, int v2, Object edgeInfo) {\n //your code here\n \taddEdge(v1, v2, edgeInfo);\n \taddEdge(v2, v1, edgeInfo);\n \t\n }",
"@Override\n\t\tpublic void addLabel(Label label) {\n\n\t\t}",
"public void addUndirectedEdge(int v1, int v2, Object edgeInfo) {\r\n \tmyAdjLists[v1].add(new Edge(v1, v2, edgeInfo));\r\n \tmyAdjLists[v2].add(new Edge(v2, v1, edgeInfo));\r\n }",
"public void drawUndirectedEdge(String label1, String label2) {\n }",
"public void addConnection(Vertex v){\n if(v != this){\r\n if(!connections.contains(v)){\r\n connections.add(v);\r\n }\r\n if(!v.getConnections().contains(this)){\r\n v.addConnection(this);\r\n } \r\n }\r\n\r\n \r\n }",
"public Vertex(int label) {\r\n isVisited = false;\r\n this.label = label;\r\n }",
"ILinkDeleterActionBuilder<SOURCE_BEAN_TYPE, LINKED_BEAN_TYPE> setLinkedEntityLabelSingular(String label);",
"static void addEdge(List<ArrayList<Integer>> adj, int u, int v) {\n\t\tif (!adj.get(u).contains(v)) {\n\t\t\tadj.get(u).add(v);\n\t\t}\n\t\tif (!adj.get(v).contains(u)) {\n\t\t\tadj.get(v).add(u);\n\t\t}\n\t}",
"void addEdge(Vertex u, Vertex v) {\r\n\t\tu.addNeighbor(v);\r\n\t}",
"public void addEdge(int source, int destination) {\n adjacencyList.get(source).add(destination);\n adjMat[source][destination] = 1;\n //if graph is undirected graph, add u to v's adjacency list\n if (!isDirected) {\n adjacencyList.get(destination).add(source);\n adjMat[destination][source] = 1;\n }\n }",
"public native static void jniaddLink(int srcId, int dstId, float cap, float reservedBw, float metric) throws AddDBException;",
"public void addUndirectedEdge(int v1, int v2) {\r\n addUndirectedEdge(v1, v2, null);\r\n }",
"@Override\r\n public void addEdge(Vertex v1, Vertex v2) {\r\n adjacencyList.get(v1).add(v2); //put v2 into the LinkedList of key v1.\r\n adjacencyList.get(v2).add(v1); //put v1 into the LinkedList of key v2.\r\n }",
"public boolean addVertex(String label, Object value)\n\t{\n\t\tif(!hasVertex(label)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex v = new DSAGraphVertex(label, value);\n\t\t\tvertices.insertLast(v); //inserts into vertices list at end\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"void addLink(byte start, byte end);",
"private void addEdge(Vertex v1, Vertex v2) {\n LinkedList<Vertex> v1AdjacentVertices = verticesAndTheirEdges.get(v1);\n if (!v1AdjacentVertices.contains(v2)) {\n v1AdjacentVertices.add(v2);\n }\n }",
"public void addUndirectedEdge(int v1, int v2) {\n addUndirectedEdge(v1, v2, null);\n }",
"public void addUndirectedEdge(int v1, int v2) {\n addUndirectedEdge(v1, v2, null);\n }",
"private void addInclementLogicalLink(Connection conn, LogicalLink link, MultivaluedMap<String, SetFlowToOFC> augmentedFlows) throws SQLException, NoRouteException {\n\t\tPortData tx = link.getLink().get(0);\n\t\tPortData rx = link.getLink().get(1);\n\t\t/* get rid of txPort/rxPort */\n\t\tString txRid = null;\n\t\tString rxRid = null;\n\t\tString nwid = null;\n\n\t\t{\n\t\t\tMap<String, Object> txMap =\n\t\t\t\t\t(StringUtils.isBlank(tx.getPortName()))\n\t\t\t\t\t? dao.getNodeInfoFromDeviceName(conn, tx.getDeviceName())\n\t\t\t\t\t: dao.getPortInfoFromPortName(conn, tx.getDeviceName(), tx.getPortName());\n\t\t\tMap<String, Object> rxMap =\n\t\t\t\t\t(StringUtils.isBlank(rx.getPortName()))\n\t\t\t\t\t? dao.getNodeInfoFromDeviceName(conn, rx.getDeviceName())\n\t\t\t\t\t: dao.getPortInfoFromPortName(conn, rx.getDeviceName(), rx.getPortName());\n\t\t\ttxRid = (String)txMap.get(\"rid\");\n\t\t\trxRid = (String)rxMap.get(\"rid\");\n\t\t}\n\n\t\tMap<String, Object> txDeviceMap = dao.getNodeInfoFromDeviceName(conn, tx.getDeviceName());\n\t\tMap<String, Object> rxDeviceMap = dao.getNodeInfoFromDeviceName(conn, rx.getDeviceName());\n\n\t\t/* get shortest path */\n\t\tList<Map<String, Object>> path = dao.getShortestPath(conn, txRid, rxRid);\n\t\tString path_route = \"\";\n\t\tfor(int i=0;i<path.size();i++)\n\t\t{\n\t\t\tif(path.get(i).get(\"node_name\")!=null)\n\t\t\t{\n\t\t\t\tpath_route += path.get(i).get(\"node_name\")+\"(\"+path.get(i).get(\"name\")+\")\";\n\t\t\t\tif(i+1!=path.size())\n\t\t\t\t{\n\t\t\t\t\tpath_route += \"<->\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(path_route);\n\n\t\t//search interpoint route\n\t\tString before_rid = \"\";\n\t\tString in_spine_id = \"\";\n\t\tString out_spine_id = \"\";\n\t\tList<String> network = new ArrayList<String>();\n\n\t\tfor(int i=0;i<path.size();i++)\n\t\t{\n\t\t\tif(path.get(i).get(\"node_name\")!=null)\n\t\t\t{\n\t\t\t\tMap<String,Object> route = dao.getNodeInfoFromDeviceName(conn, path.get(i).get(\"node_name\").toString());\n\t\t\t\tif(!before_rid.equals(route.get(\"rid\").toString()))\n\t\t\t\t{\n\t\t\t\t\tif(route.get(\"type\").toString().equals(\"Spine\") && in_spine_id.equals(\"\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tin_spine_id = route.get(\"rid\").toString();\n\t\t\t\t\t}\n\t\t\t\t\tif(route.get(\"type\").toString().equals(\"Aggregate_Switch\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tMap<String, Object> search_network = dao.getPortInfoFromPortName(conn,path.get(i).get(\"node_name\").toString(),path.get(i).get(\"name\").toString());\n\t\t\t\t\t\tif(search_network.get(\"network\")!=null && !search_network.get(\"network\").equals(\"\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnetwork.add(search_network.get(\"network\").toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(route.get(\"type\").toString().equals(\"Spine\") && !network.isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\tout_spine_id = route.get(\"rid\").toString();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbefore_rid=route.get(\"rid\").toString();\n\t\t\t}\n\t\t}\n\n\t\t//catch of nwid. make use of spineID from outer_tag class\n\t\tif(!network.isEmpty())\n\t\t{\n\t\t\t//search of Vlanid from path.\n\t\t\tList<Map<String, Object>> nwid1 = dao.getNetworkidFromSpineid(conn, in_spine_id, out_spine_id,network.get(0).toString());\n\t\t\tList<Map<String, Object>> nwid2 = dao.getNetworkidFromSpineid(conn, out_spine_id, in_spine_id,network.get(0).toString());\n\n\t\t\t//not asigned to vlanid from estimate path, asigned to vlanid.\n\t\t\tif((nwid1.isEmpty() && nwid2.isEmpty()))\n\t\t\t{\n\t\t\t\t\tString a = network.get(0);\n\t\t\t\t\tnwid = dao.payoutNetworkid(conn, in_spine_id, out_spine_id,a);\n\t\t\t}\n\t\t\telse if(!nwid1.isEmpty())\n\t\t\t{\n\t\t\t\tMap<String, Object> networkid = nwid1.get(0);\n\t\t\t\tnwid = networkid.get(\"outer_tag\").toString();\n\t\t\t}\n\t\t\telse if(!nwid2.isEmpty())\n\t\t\t{\n\t\t\t\tMap<String, Object> networkid = nwid2.get(0);\n\t\t\t\tnwid = networkid.get(\"outer_tag\").toString();\n\t\t\t}\n\t\t}\n\n\t\t/* search first/last port */\n\t\tint txPortIndex = (StringUtils.isBlank(tx.getPortName()))? 1: 0;\n\t\tint rxPortIndex = (StringUtils.isBlank(rx.getPortName()))? path.size() - 2: path.size() - 1;\n\t\tMap<String, Object> txPort = path.get(txPortIndex);\n\t\tMap<String, Object> rxPort = path.get(rxPortIndex);\n\t\tMap<String, Object> txPortMap = dao.getPortInfoFromPortName(conn, (String)txPort.get(\"node_name\"), (String)txPort.get(\"name\"));\n\t\tMap<String, Object> rxPortMap = dao.getPortInfoFromPortName(conn, (String)rxPort.get(\"node_name\"), (String)rxPort.get(\"name\"));\n\n\t\t/* check patch wiring exist */\n\t\t{\n\t\t\tboolean isTxPatch = dao.isContainsLogicalLinkFromDeviceNamePortName(conn, (String)txPort.get(\"node_name\"), (String)txPort.get(\"name\"));\n\t\t\tboolean isRxPatch = dao.isContainsLogicalLinkFromDeviceNamePortName(conn, (String)rxPort.get(\"node_name\"), (String)rxPort.get(\"name\"));\n\t\t\tif (isTxPatch || isRxPatch) {\n\t\t\t\tthrow new NoRouteException(String.format(IS_NO_ROUTE, (String)txPort.get(\"node_name\") + \" \" + (String)txPort.get(\"name\"), (String)rxPort.get(\"node_name\") + \" \" + (String)rxPort.get(\"name\")));\n\t\t\t}\n\t\t}\n\n\t\t/* get band width of port info */\n\t\tMap<Map<String, Object>, Long> portBandMap = new HashMap<Map<String, Object>, Long>();\n\t\tfor (Map<String, Object> current : path) {\n\t\t\tif (StringUtils.equals((String)current.get(\"class\"), \"port\")) {\n\t\t\t\tlong band = this.getBandWidth(conn, (String)current.get(\"node_name\"), (String)current.get(\"name\"));\n\t\t\t\tportBandMap.put(current, band);\n\t\t\t}\n\t\t}\n\n\t\t/* conmute need band-width for patching */\n\t\tlong needBandOverHead = 0L;\n\t\tlong needBand = 0L;\n\t\t{\n\t\t\tlong txBand = portBandMap.get(txPort);\n\t\t\tlong rxBand = portBandMap.get(rxPort);\n\t\t\tlong txNextBand = portBandMap.get(path.get(txPortIndex + 1));\n\t\t\tlong rxNextBand = portBandMap.get(path.get(rxPortIndex - 1));\n\t\t\tneedBand = ( txBand < rxBand)? txBand: rxBand;\n\t\t\tneedBand = (needBand < txNextBand)? needBand: txNextBand;\n\t\t\tneedBand = (needBand < rxNextBand)? needBand: rxNextBand;\n\t\t\tneedBandOverHead = this.calcVlanTagOverhead(needBand);\n\t\t}\n\n\t\t/* Update links used value */\n\t\tfor (int i = 1; i < path.size(); i++) {\n\t\t\tMap<String, Object> nowV = path.get(i);\n\t\t\tMap<String, Object> prvV = path.get(i - 1);\n\t\t\tString nowClass = (String)nowV.get(\"class\");\n\t\t\tString prvClass = (String)prvV.get(\"class\");\n\t\t\tif (!StringUtils.equals(nowClass, \"port\") || !StringUtils.equals(prvClass, \"port\")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tString nowPortRid = (String)nowV.get(\"rid\");\n\t\t\tString nowVparentDevType = (String)nowV.get(\"type\");\n\t\t\tString prvVparentDevType = (String)prvV.get(\"type\");\n\n\t\t\tMap<String, Object> cableLink = dao.getCableLinkFromInPortRid(conn, nowPortRid);\n\t\t\tlong nowUsed = (Integer)cableLink.get(\"used\");\n\t\t\tlong inBand = portBandMap.get(nowV);\n\t\t\tlong outBand = portBandMap.get(prvV);\n\t\t\tlong maxBand = (inBand < outBand)? inBand: outBand;\n\t\t\tlong newUsed = 0;\n\n\t\t\tif((StringUtils.equals(nowVparentDevType, NODE_TYPE_LEAF) && StringUtils.equals(prvVparentDevType, NODE_TYPE_SPINE)) ||\n\t\t\t\t\t (StringUtils.equals(nowVparentDevType, NODE_TYPE_SPINE) && StringUtils.equals(prvVparentDevType, NODE_TYPE_LEAF))){\n\t\t\t\t//newUsed = nowUsed + needBand +needBandOverHead;\n\t\t\t\tnewUsed = nowUsed + needBand;\n\n\t\t\t\tif (newUsed > maxBand) {\n\t\t\t\t\tthrow new NoRouteException(String.format(NOT_FOUND, \"Path\"));\n\t\t\t\t}\n\t\t\t\tdao.updateCableLinkUsedFromPortRid(conn, nowPortRid, newUsed);\n\t\t\t //Add balancing to AG - Sites_SW. Balancing is Used weight only.(not check of maxBand)\n\t\t\t} else if((StringUtils.equals(nowVparentDevType, NODE_TYPE_SITES_SW) && StringUtils.equals(prvVparentDevType, NODE_TYPE_AGGREGATE_SW)) ||\n\t\t\t\t\t (StringUtils.equals(nowVparentDevType, NODE_TYPE_AGGREGATE_SW) && StringUtils.equals(prvVparentDevType, NODE_TYPE_SITES_SW))){\n\t\t\t\tnewUsed = nowUsed + needBand +needBandOverHead;\n\t\t\t}else {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\t/* Make ofpatch index list */\n\t\t/* MEMO: Don't integrate to the loop for the above for easy to read. */\n\t\tList<Integer> ofpIndexList = new ArrayList<Integer>();\n\t\tfor (int i = 1; i < path.size(); i++) {\n\t\t\tMap<String, Object> nowV = path.get(i);\n\t\t\tString nowClass = (String)nowV.get(\"class\");\n\t\t\tString devType = (String)nowV.get(\"type\");\n\t\t\tif (!StringUtils.equals(nowClass, \"node\")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!StringUtils.equals(devType, NODE_TYPE_LEAF) && !StringUtils.equals(devType, NODE_TYPE_SPINE) && !StringUtils.equals(devType, NODE_TYPE_AGGREGATE_SW)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tofpIndexList.add(new Integer(i));\n\t\t}\n\n\t\tString nw_instance_type = NETWORK_INSTANCE_TYPE;\n\t\tLong nw_instance_id = dao.getNwInstanceId(conn);\n\t\tif (nw_instance_id < 0) {\n\t\t\tthrow new NoRouteException(String.format(IS_FULL, \"network instance id\"));\n\t\t}\n\n\t\t/* insert logical link */\n\t\tdao.insertLogicalLink(conn,\n\t\t\t\t(String)txDeviceMap.get(\"rid\"),\n\t\t\t\t(String)txDeviceMap.get(\"name\"),\n\t\t\t\t(String)txPortMap.get(\"rid\"),\n\t\t\t\t(String)txPortMap.get(\"name\"),\n\t\t\t\t(String)rxDeviceMap.get(\"rid\"),\n\t\t\t\t(String)rxDeviceMap.get(\"name\"),\n\t\t\t\t(String)rxPortMap.get(\"rid\"),\n\t\t\t\t(String)rxPortMap.get(\"name\"),\n\t\t\t\tnw_instance_id,\n\t\t\t\tnw_instance_type);\n\n\t\tMap<String, Object> logicalLinkMap = dao.getLogicalLinkFromNodeNamePortName(conn, (String)txDeviceMap.get(\"name\"), (String)txPortMap.get(\"name\"));\n\n\t\tfor (int seq = 0; seq < ofpIndexList.size(); seq++) {\n\t\t\tint i = ofpIndexList.get(seq);\n\t\t\t/* insert frowarding patch wiring */\n\t\t\tMap<String, Object> inPortDataMap = path.get(i-1);\n\t\t\tMap<String, Object> ofpPortDataMap = path.get(i);\n\t\t\tMap<String, Object> outPortDataMap = path.get(i+1);\n\n\t\t\tdao.insertRoute(\n\t\t\t\t\tconn,\n\t\t\t\t\tseq + 1,\n\t\t\t\t\t(String)logicalLinkMap.get(\"rid\"),\n\t\t\t\t\t(String)ofpPortDataMap.get(\"rid\"),\n\t\t\t\t\t(String)ofpPortDataMap.get(\"name\"),\n\t\t\t\t\t(String)inPortDataMap.get(\"rid\"),\n\t\t\t\t\t(String)inPortDataMap.get(\"name\"),\n\t\t\t\t\t(Integer)inPortDataMap.get(\"number\"),\n\t\t\t\t\t(String)outPortDataMap.get(\"rid\"),\n\t\t\t\t\t(String)outPortDataMap.get(\"name\"),\n\t\t\t\t\t(Integer)outPortDataMap.get(\"number\"));\n\n\t\t}\n\n\t\t/* make SetFlowToOFC list for each ofcIp */\n\n\t\tOFCClient client = new OFCClientImpl();\n\n\t\t/* port to port patching */\n\t\tif (ofpIndexList.size() == 1) {\n\t\t\tint i = ofpIndexList.get(0);\n\t\t\tMap<String, Object> inPortDataMap = path.get(i - 1);\n\t\t\tMap<String, Object> ofpNodeData = path.get(i);\n\t\t\tMap<String, Object> ofpNodeDataMap = dao.getNodeInfoFromDeviceName(conn, (String)ofpNodeData.get(\"name\"));\n\t\t\tMap<String, Object> outPortDataMap = path.get(i + 1);\n\n\t\t\tString ofcIp = (String)ofpNodeDataMap.get(\"ip\") + \":\" + Integer.toString((Integer)ofpNodeDataMap.get(\"port\"));\n\t\t\tInteger inPortNumber = (Integer)inPortDataMap.get(\"number\");\n\t\t\tInteger outPortNumber = (Integer)outPortDataMap.get(\"number\");\n\n\t\t\tSetFlowToOFC requestData = client.createRequestData(Long.decode((String)ofpNodeDataMap.get(\"datapathId\")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);\n\t\t\tclient.createMatchForInPort(requestData, inPortNumber.longValue());\n\t\t\tclient.createActionsForOutputPort(requestData, outPortNumber.longValue());\n\t\t\taugmentedFlows.add(ofcIp, requestData);\n\n\t\t\trequestData = client.createRequestData(Long.decode((String)ofpNodeDataMap.get(\"datapathId\")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);\n\t\t\tclient.createMatchForInPort(requestData, outPortNumber.longValue());\n\t\t\tclient.createActionsForOutputPort(requestData, inPortNumber.longValue());\n\t\t\taugmentedFlows.add(ofcIp, requestData);\n\t\t\treturn;\n\t\t}\n\n\t\t/* the first ofps flow */\n\t\t{\n\t\t\tint i = ofpIndexList.get(0);\n\t\t\tMap<String, Object> inPortDataMap = path.get(i - 1);\n\t\t\tMap<String, Object> ofpNodeData = path.get(i);\n\t\t\tMap<String, Object> ofpNodeDataMap = dao.getNodeInfoFromDeviceName(conn, (String)ofpNodeData.get(\"name\"));\n\t\t\tMap<String, Object> outPortDataMap = path.get(i + 1);\n\n\t\t\tString ofcIp = (String)ofpNodeDataMap.get(\"ip\") + \":\" + Integer.toString((Integer)ofpNodeDataMap.get(\"port\"));\n\t\t\tInteger inPortNumber = (Integer)inPortDataMap.get(\"number\");\n\t\t\tInteger outPortNumber = (Integer)outPortDataMap.get(\"number\");\n\n\t\t\tSetFlowToOFC requestData = client.createRequestData(Long.decode((String)ofpNodeDataMap.get(\"datapathId\")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);\n\t\t\tclient.createMatchForInPort(requestData, inPortNumber.longValue());\n\t\t\tclient.createActionsForPushVlan(requestData, outPortNumber.longValue(), nw_instance_id);\n\t\t\taugmentedFlows.add(ofcIp, requestData);\n\n\t\t\trequestData = client.createRequestData(Long.decode((String)ofpNodeDataMap.get(\"datapathId\")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);\n\t\t\tclient.createMatchForInPortDlVlan(requestData, outPortNumber.longValue(), nw_instance_id);\n\t\t\tclient.createActionsForPopVlan(requestData, inPortNumber.longValue());\n\t\t\taugmentedFlows.add(ofcIp, requestData);\n\t\t}\n\t\tBoolean beforespinecheck = false;\n\t\t/* spine ofs flow */\n\t\tfor (int i = 1; i < ofpIndexList.size() - 1; i++) {\n\t\t\t/* insert frowarding patch wiring */\n\t\t\tint index = ofpIndexList.get(i);\n\t\t\tMap<String, Object> inPortDataMap = path.get(index-1);\n\t\t\tMap<String, Object> ofpNodeData = path.get(index);\n\t\t\tMap<String, Object> ofpNodeDataMap = dao.getNodeInfoFromDeviceName(conn, (String)ofpNodeData.get(\"name\"));\n\t\t\tMap<String, Object> outPortDataMap = path.get(index+1);\n\n\t\t\tif(ofpNodeDataMap.get(\"type\").equals(\"Spine\"))\n\t\t\t{\n\t\t\t\tString ofcIp = (String)ofpNodeDataMap.get(\"ip\") + \":\" + Integer.toString((Integer)ofpNodeDataMap.get(\"port\"));\n\t\t\t\tInteger inPortNumber = (Integer)inPortDataMap.get(\"number\");\n\t\t\t\tInteger outPortNumber = (Integer)outPortDataMap.get(\"number\");\n\n\t\t\t\tSetFlowToOFC requestData = client.createRequestData(Long.decode((String)ofpNodeDataMap.get(\"datapathId\")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);\n\t\t\t\tclient.createMatchForInPortDlVlan(requestData, inPortNumber.longValue(), nw_instance_id);\n\t\t\t\tclient.createActionsForOutputPort(requestData, outPortNumber.longValue());\n\t\t\t\taugmentedFlows.add(ofcIp, requestData);\n\n\t\t\t\trequestData = client.createRequestData(Long.decode((String)ofpNodeDataMap.get(\"datapathId\")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);\n\t\t\t\tclient.createMatchForInPortDlVlan(requestData, outPortNumber.longValue(), nw_instance_id);\n\t\t\t\tclient.createActionsForOutputPort(requestData, inPortNumber.longValue());\n\t\t\t\taugmentedFlows.add(ofcIp, requestData);\n\t\t\t\tbeforespinecheck = true;\n\t\t\t}\n\t\t\telse if(ofpNodeDataMap.get(\"type\").equals(\"Aggregate_Switch\"))\n\t\t\t{\n\t\t\t\tString ofcIp = (String)ofpNodeDataMap.get(\"ip\") + \":\" + Integer.toString((Integer)ofpNodeDataMap.get(\"port\"));\n\n\t\t\t\tInteger inPortNumber = (Integer)inPortDataMap.get(\"number\");\n\t\t\t\tInteger outPortNumber = (Integer)outPortDataMap.get(\"number\");\n\n\t\t\t\tSetFlowToOFC requestData = client.createRequestData(Long.decode((String)ofpNodeDataMap.get(\"datapathId\")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);\n\t\t\t\tif(beforespinecheck.equals(true))\n\t\t\t\t{\n\t\t\t\t\tclient.createMatchForInPortDlVlan(requestData, inPortNumber.longValue(),nw_instance_id);\n\t\t\t\t\tclient.createActionsForPushOuter_tag(requestData, outPortNumber.longValue(),Long.parseLong(nwid),nw_instance_id);\n\t\t\t\t\taugmentedFlows.add(ofcIp, requestData);\n\n\t\t\t\t\tdao.insertOutertag(conn,nw_instance_id.toString(),nwid,(String)ofpNodeDataMap.get(\"datapathId\"),inPortNumber.toString(),outPortNumber.toString(),\"push\",network.get(0).toString());\n\n\t\t\t\t\trequestData = client.createRequestData(Long.decode((String)ofpNodeDataMap.get(\"datapathId\")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);\n\t\t\t\t\tclient.createMatchForInPortDlVlan(requestData, outPortNumber.longValue(), Long.parseLong(nwid));\n\t\t\t\t\tclient.createActionsForPopOuter_tag(requestData, inPortNumber.longValue());\n\t\t\t\t\taugmentedFlows.add(ofcIp, requestData);\n\t\t\t\t\tbeforespinecheck = false;\n\n\t\t\t\t\tdao.insertOutertag(conn,nw_instance_id.toString(),nwid,(String)ofpNodeDataMap.get(\"datapathId\"),outPortNumber.toString(),inPortNumber.toString(),\"pop\",network.get(0).toString());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tclient.createMatchForInPortDlVlan(requestData, outPortNumber.longValue(),nw_instance_id);\n\t\t\t\t\tclient.createActionsForPushOuter_tag(requestData, inPortNumber.longValue(), Long.parseLong(nwid),nw_instance_id);\n\t\t\t\t\taugmentedFlows.add(ofcIp, requestData);\n\t\t\t\t\tdao.insertOutertag(conn,nw_instance_id.toString(),nwid,(String)ofpNodeDataMap.get(\"datapathId\"),outPortNumber.toString(),inPortNumber.toString(),\"push\",network.get(0).toString());\n\t\t\t\t\trequestData = client.createRequestData(Long.decode((String)ofpNodeDataMap.get(\"datapathId\")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);\n\t\t\t\t\tclient.createMatchForInPortDlVlan(requestData, inPortNumber.longValue(), Long.parseLong(nwid));\n\t\t\t\t\tclient.createActionsForPopOuter_tag(requestData, outPortNumber.longValue());\n\t\t\t\t\taugmentedFlows.add(ofcIp, requestData);\n\t\t\t\t\tdao.insertOutertag(conn,nw_instance_id.toString(),nwid,(String)ofpNodeDataMap.get(\"datapathId\"),inPortNumber.toString(),outPortNumber.toString(),\"pop\",network.get(0).toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/* the final ofps flow */\n\t\t{\n\t\t\tint i = ofpIndexList.get(ofpIndexList.size() - 1);\n\t\t\tMap<String, Object> inPortDataMap = path.get(i + 1);\n\t\t\tMap<String, Object> ofpNodeData = path.get(i);\n\t\t\tMap<String, Object> ofpNodeDataMap = dao.getNodeInfoFromDeviceName(conn, (String)ofpNodeData.get(\"name\"));\n\t\t\tMap<String, Object> outPortDataMap = path.get(i - 1);\n\t\t\tString ofcIp = (String)ofpNodeDataMap.get(\"ip\") + \":\" + Integer.toString((Integer)ofpNodeDataMap.get(\"port\"));\n\t\t\tInteger inPortNumber = (Integer)inPortDataMap.get(\"number\");\n\t\t\tInteger outPortNumber = (Integer)outPortDataMap.get(\"number\");\n\n\t\t\tSetFlowToOFC requestData = client.createRequestData(Long.decode((String)ofpNodeDataMap.get(\"datapathId\")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);\n\t\t\tclient.createMatchForInPort(requestData, inPortNumber.longValue());\n\t\t\tclient.createActionsForPushVlan(requestData, outPortNumber.longValue(), nw_instance_id);\n\t\t\taugmentedFlows.add(ofcIp, requestData);\n\n\t\t\trequestData = client.createRequestData(Long.decode((String)ofpNodeDataMap.get(\"datapathId\")), OPENFLOW_FLOWENTRY_PRIORITY_NORMAL, null, null);\n\t\t\tclient.createMatchForInPortDlVlan(requestData, outPortNumber.longValue(), nw_instance_id);\n\t\t\tclient.createActionsForPopVlan(requestData, inPortNumber.longValue());\n\t\t\taugmentedFlows.add(ofcIp, requestData);\n\t\t}\n\t\treturn;\n\t}",
"@Override\n public void addVertex(V vertex)\n {\n if (vertex.equals(null)){\n throw new IllegalArgumentException();\n }\n ArrayList <V> edges = new ArrayList<>();\n\t graph.put(vertex, edges);\n\n }",
"public void addEdge(int u, int v) {\n if (u > nodes.size() || v > nodes.size() || u <= 0 || v <= 0) {\n throw new IllegalArgumentException(\"An invalid node was given\");\n }\n // note that we have to subtract 1 from each since node 1 is located in index 0\n nodes.get(u - 1).addEdge(nodes.get(v - 1));\n }",
"private void addEdge(AtomVertex v, AtomEdge... l) {\n for (AtomEdge e : l) {\n adjacencyMatrix.addEdge(v, e.getSinkVertex(), e.getWeight());\n }\n }",
"void addEdge(int vertex1, int vertex2){\n adjList[vertex1].add(vertex2);\n adjList[vertex2].add(vertex1);\n }",
"boolean addNode(long idNum, String label);",
"void addLabel(Object newLabel);",
"void addLabel(Object newLabel);",
"public String addNode(PlainGraph graph, String nodeName, String label) {\n Map<String, PlainNode> nodeMap = graphNodeMap.get(graph);\n if (!nodeMap.containsKey(nodeName)) {\n PlainNode node = graph.addNode();\n\n // if a label is given add it as an edge\n if (label != null) {\n if (!label.contains(\":\")) {\n // if the label does not contain \":\" then 'type:' should be added\n label = String.format(\"%s:%s\", TYPE, label);\n }\n graph.addEdge(node, label, node);\n }\n\n nodeMap.put(nodeName, node);\n }\n return nodeName;\n }",
"public void addEdge(String v1, String v2) {\n if (v1.equals(v2))\n throw new IllegalArgumentException(\"Vertexes are same\");\n\n // get the indexes of v1 and v2\n int index1 = -1;\n int index2 = -1;\n for (int i = 0; i < vertexes.length; i++) {\n if (v1.equals(vertexes[i])) index1 = i;\n if (v2.equals(vertexes[i])) index2 = i;\n }\n\n if (index1 == -1 || index2 == -1)\n throw new IllegalArgumentException(\"Vertexes are not exist.\");\n\n // add to the linked lists\n heads[index1].add(index2);\n heads[index2].add(index1);\n }",
"@Override\r\n\tpublic void addVertex(Integer vertexID) {\r\n\t\tif (vertexIDs.size() > 0) {\r\n\t\t\tvertexIDs.set(0, vertexID);\r\n\t\t} else {\r\n\t\t\tvertexIDs.add(vertexID);\r\n\t\t}\r\n\t}",
"public void addInterwikiLink(String interwikiLink) {\r\n\t\tif (!this.interwikiLinks.contains(interwikiLink)) {\r\n\t\t\tthis.interwikiLinks.add(interwikiLink);\r\n\t\t}\r\n\t}",
"public void inAdjacentVertices() {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.inList.get(i).vertex.label + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"com.microsoft.schemas.xrm._2011.contracts.Label addNewLabel();",
"public void addVertex (){\t\t \n\t\tthis.graph.insert( new MyList<Integer>() );\n\t}",
"private void addUndirectedEdge(int i, int j) {\n\t\tNode first = nodeList.get(i-1);\r\n\t\tNode second = nodeList.get(j-1);\r\n//\t\tSystem.out.println(first.name);\r\n//\t\tSystem.out.println(second.name);\r\n\t\tfirst.getNeighbors().add(second);//Neighbour of first is second. Store it.\r\n\t\tsecond.getNeighbors().add(first);\r\n\t}",
"public void addVertex(Vertex v) {\n\t \tif (!this.vertexes.contains(v)) {\r\n\t \t\tthis.vertexes.add(v);\r\n\t \t}\r\n\t \t//otherwise just ignore, the Graph already has this vertex\r\n\t }",
"void addEdge(Vertex v1, Vertex v2, Double w) throws VertexNotInGraphException;",
"public void addVertex(int vertex) {\n if (!adjacencyMap.containsKey(vertex)) {\n adjacencyMap.put(vertex, new HashSet<>());\n }\n }",
"void addVertex(Vertex v);",
"boolean addEdge(V v, V w, double weight);",
"public void addEdge(int u, int v)\n {\n // Add v to u's list.\n adjList[u].add(v);\n }",
"public void addVertex (T vertex){\n if (vertexIndex(vertex) > 0) return; // vertex already in graph, return.\n if (n == vertices.length){ // need to expand capacity of arrays\n expandCapacity();\n }\n \n vertices[n] = vertex;\n for (int i = 0; i < n; i++){ // populating new edges with -1\n edges[n][i] = -1;\n edges[i][n] = -1;\n }\n n++;\n }",
"void addEdge(String origin, String destination, double weight){\n\t\tadjlist.get(origin).addEdge(adjlist.get(destination), weight);\n\t\tedges++;\n\t}",
"LinkReader addLink(NodeReader source, NodeReader dest, boolean overwrite) throws NoNodeException, LinkAlreadyPresentException, ServiceException;",
"public void addEdge(int start, int end, double weight);",
"@Override\r\n public void addVertex(Vertex v) {\r\n adjacencyList.put(v, new ArrayList<>()); //putting v into key, a new LinkedList into value for later use\r\n }",
"private void addIncomingEdges(Vertex v, Vertex obstacle, Set<Edge> result, Vector<Vertex> newVertexes) {\n \t// Vertexes in the top layer have no incoming edges\n \tif (v.getLayerID() == 0)\n \t\treturn;\n \t\n \t// Fetch the edges from the layer above\n \tint edgeLayerID = v.getLayerID() - 1;\n \tVector<Edge> es = edges.get(edgeLayerID);\n \t\n \tfor (Edge e : es) {\n \t\t// Finds an incoming edge of v\n \t\tif (e.getTail().equals(v.getLabel())) {\n \t\t\tVertex tmp = new Vertex(edgeLayerID, e.getHead());\n \t\t\t// If the incoming edge does not come from obstacle, add the edge and its head\n \t\t\tif (!tmp.theSameAs(obstacle)) {\n \t\t\t\tresult.add(e);\n \t\t\t\tnewVertexes.add(tmp);\n \t\t\t\t//System.out.println(\"TEMP is added: layerID:\" + tmp.layerID + \"\\tlabel:\" + tmp.label);\n \t\t\t}\n \t\t}\n \t}\t\n }",
"public Vertex(String label, int index){\n this.label = label;\n this.index = index;\n this.previous = null;\n visited = false;\n }",
"public void addEdge(int v1, int v2, Object edgeInfo) {\n//your code here\n Edge edge = new Edge(v1, v2, edgeInfo);\n if(adjLists[v1].contains(edge)){\n return;\n }\n adjLists[v1].addLast(edge);\n }",
"public void addEdge(K u, K v, int weight)\n {\n if (u.equals(v))\n {\n throw new IllegalArgumentException(\"adding self loop\");\n }\n\n\t// get u's adjacency list\n Map<K, Edge> adj = adjMaps.get(u);\n\n\t// check for edge already being there\n if (!adj.containsKey(v))\n {\n\t\t// edge is not already there -- add to both adjacency lists\n Edge e = new Edge(weight);\n adj.put(v, e);\n adjMaps.get(v).put(u, e);\n }\n }",
"public void pushrelabelFlow(Vertex u) {\n\t\tint minimalDistance = Integer.MAX_VALUE;\n\t\tfor(int i : g.getAdjacents(u.id)) {\n\t\t\tVertex v = g.getVertex(i);\n\t\t\tminimalDistance = Math.min(minimalDistance, v.h);\n\t\t\tif (u.h - 1 == v.h) { // If we can push the flow u -> v\n\t\t\t\tpushFlow(u, v, Math.min(u.e, g.getCapacity(u.id, v.id))); // We push!\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tu.h = minimalDistance + 1; // Relabel the distance\n\t}",
"public void AddLink() {\n snake.add(tail + 1, new Pair(snake.get(tail).GetFirst(), snake.get(tail).GetSecond())); //Set the new link to the current tail link\n tail++;\n new_link = true;\n }",
"public void addEdges(V vertex, Set<V> edges) {\n if (vertex == null) throw new NullPointerException(\"Vertex cannot be null\");\n if (edges == null) edges = new HashSet<>();\n\n Set<V> filter = edges.stream().filter(e -> {\n boolean b = vertices.containsKey(e);\n if (b) return true;\n else throw new NullPointerException(\"The edge \" + e + \" that is being added is not exist\");\n }).collect(Collectors.toSet());\n\n if (this.vertices.containsKey(vertex)) this.vertices.get(vertex).addAll(filter);\n else this.vertices.put(vertex, filter);\n }",
"void addEdge(int x, int y);",
"protected void mutateAddLink() {\n\t\t// Make sure network is not fully connected\n\n\t\t// Sum number of connections\n\t\tint totalconnections = numGenes();\n\n\t\t// Find number of each type of node\n\t\tint in = population.numInputs;\n\t\tint out = population.numOutputs;\n\t\tint hid = numNodes() - (in + out);\n\n\t\t// Find the number of possible connections.\n\t\t// Links cannot end with an input\n\t\tint fullyconnected = 0;\n\t\tfullyconnected = (in + out + hid) * (out + hid);\n\n\t\tif (totalconnections == fullyconnected)\n\t\t\treturn;\n\n\t\t// Pick 2 nodes for a new connection and submit it\n\t\tNNode randomstart;\n\t\tNNode randomend;\n\t\tdo {\n\t\t\trandomstart = getRandomNode();\n\t\t\trandomend = getRandomNode();\n\t\t} while (randomend.type == NNode.INPUT\n\t\t\t\t|| hasConnection(randomstart.ID, randomend.ID));\n\n\t\tint newgeneinno = population\n\t\t\t\t.getInnovation(randomstart.ID, randomend.ID);\n\t\tGene newgene = new Gene(newgeneinno, randomstart.ID, randomend.ID,\n\t\t\t\tBraincraft.randomWeight(), true);\n\t\tpopulation.registerGene(newgene);\n\t\tsubmitNewGene(newgene);\n\n\t\tif (Braincraft.gatherStats)\n\t\t\tBraincraft.genetics.add(\"link creation mutation \" + ID + \" \"\n\t\t\t\t\t+ newgene.innovation + \" \" + randomstart.ID + \" \"\n\t\t\t\t\t+ randomend.ID);\n\t}",
"public void addAdjVertex(String currentVertex, String connection)\r\n\t{\r\n\t\tAdjVertex newAdjVertex = newAdjVertex(connection);\r\n\t\t// insert this new node to the linked list\r\n\t\tnewAdjVertex.next = myGraph[getId(currentVertex)].adjVertexHead;\r\n\t\tmyGraph[getId(currentVertex)].adjVertexHead = newAdjVertex;\r\n\t}",
"public void addEdge (E vertex1, E vertex2, int edgeWeight) throws IllegalArgumentException\n {\n if(vertex1 == vertex2)\n return;\n \n int index1 = this.indexOf (vertex1);\n if (index1 < 0)\n throw new IllegalArgumentException (vertex1 + \" was not found!\");\n \n int index2 = this.indexOf (vertex2);\n if (index2 < 0)\n throw new IllegalArgumentException (vertex2 + \" was not found!\");\n\n\n if (this.hasEdge (vertex1, vertex2))\n {\n this.removeNode (index1, index2);\n this.removeNode (index2, index1);\n }\n \n Node node = new Node(index2, edgeWeight);\n this.addNode(node, index1);\n node = new Node(index1, edgeWeight);\n this.addNode(node, index2);\n }",
"void add(Vertex vertex);",
"@GuardedBy(\"sfg\")\n\tpublic boolean addEdge(StateVertex sourceVert, StateVertex targetVert, Eventable clickable) {\n\t\tsynchronized (sfg) {\n\t\t\tif (sfg.containsEdge(sourceVert, targetVert)\n\t\t\t && sfg.getAllEdges(sourceVert, targetVert).contains(clickable)) {\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\treturn sfg.addEdge(sourceVert, targetVert, clickable);\n\t\t\t}\n\t\t}\n\t}",
"public Edge<V> addEdge(V source, V target);",
"void addEdge(SimpleVertex vertexOne, SimpleVertex vertexTwo, int weight) {\n\n\t\tSimpleEdge edge = new SimpleEdge(vertexOne, vertexTwo);\n\t\tedge.weight = weight;\n\t\t// edgeList.add(edge);\n\t\t// System.out.println(edge);\n\t\tvertexOne.neighborhood.add(edge);\n\n\t}",
"public void addEdge(int u, int v, int weight){\n this.edges.add(new DEdge(u,v,weight));\n }",
"private boolean addRoad(\n String fromName, String toName, double roadDistance, String roadName\n ) {\n Vertex<String> from = addLocation(fromName);\n Vertex<String> to = addLocation(toName);\n\n // Add the road to the network - We assume all roads are two-way and\n // ignore if we've already added the road as a reverse of another\n try {\n\n Edge<String> road = graph.insert(from, to, roadName);\n Edge<String> backwardsRoad = graph.insert(to, from, roadName);\n\n // Label each road with it's weight\n graph.label(road, roadDistance);\n graph.label(backwardsRoad, roadDistance);\n\n } catch (InsertionException ignored) {\n return false;\n }\n\n return true;\n }",
"@Override public boolean add(L vertex) {\r\n \r\n \tif(vertices.contains(vertex)==false)\r\n \t{\r\n \tvertices.add(vertex);\r\n \tcheckRep();\r\n \treturn true;\r\n }\r\n else {\r\n \t\r\n \treturn false;\r\n }\r\n \t\r\n }",
"public IEdge addEdge(String from, String to, Double cost);",
"public void addFriendShip(String firstPerson, String secondPerson) {\n Integer fromIndex = this.vertexNames.get(firstPerson);\n if (fromIndex == null) {\n fromIndex = this.indexCounter;\n this.indexCounter++;\n this.vertexNames.put(firstPerson, fromIndex);\n }\n Integer toIndex = this.vertexNames.get(secondPerson);\n if (toIndex == null) {\n toIndex = this.indexCounter;\n this.indexCounter++;\n this.vertexNames.put(secondPerson, toIndex);\n }\n super.addEdge(fromIndex, toIndex, 1.0);\n }",
"public void addInlink(String url) {\r\n\t\tif (!inlinks.contains(url)) {\r\n\t\t\tinlinks.add(url);\r\n\t\t}\r\n\t}",
"private void link(DefaultDirectedGraph<FStream, IndexedEdge<FStream>> G, FStream node, FStream n) {\n\t\tif (!G.containsVertex(n)) {\n\t\t\tG.addVertex(n);\n\t\t}\n\t\t\n\t\tindex_counter += 1;\n\t\tIndexedEdge<FStream> e = new IndexedEdge<FStream>(node, n, index_counter);\n\t\tG.addEdge(node, n, e);\n\t}",
"boolean addEdge(V v, V w);",
"public void connect(int first, int second) {\n\t\tvertex.get(first).add(second);\n\t}"
]
| [
"0.652298",
"0.60695803",
"0.60062486",
"0.5991635",
"0.58648324",
"0.57938075",
"0.5715859",
"0.5591534",
"0.5533606",
"0.5510502",
"0.5471347",
"0.54553324",
"0.53995216",
"0.5396118",
"0.5395554",
"0.5390632",
"0.5294852",
"0.5288213",
"0.5286151",
"0.5267079",
"0.525164",
"0.5223106",
"0.5218016",
"0.51985353",
"0.51781934",
"0.51651543",
"0.51611525",
"0.51569134",
"0.51493084",
"0.51460665",
"0.51299477",
"0.5108287",
"0.509846",
"0.5097554",
"0.50858235",
"0.50741935",
"0.5008339",
"0.49990204",
"0.49989262",
"0.4997293",
"0.49970266",
"0.4984474",
"0.49711245",
"0.4961812",
"0.49606583",
"0.4959401",
"0.49536097",
"0.49492782",
"0.49492782",
"0.49477503",
"0.49472767",
"0.493366",
"0.49255902",
"0.4911348",
"0.48924726",
"0.48914787",
"0.48914787",
"0.48637956",
"0.48636717",
"0.48608744",
"0.48540333",
"0.48527622",
"0.48435098",
"0.4840398",
"0.48376513",
"0.4835404",
"0.4834843",
"0.48341691",
"0.48298866",
"0.48286647",
"0.48254246",
"0.48238772",
"0.4820895",
"0.48200756",
"0.48188198",
"0.4814707",
"0.4796602",
"0.47920617",
"0.47905815",
"0.4776816",
"0.47741103",
"0.47719237",
"0.47639847",
"0.47616822",
"0.47528195",
"0.47454345",
"0.47451967",
"0.47435713",
"0.47423118",
"0.47421274",
"0.47355622",
"0.47322294",
"0.47225124",
"0.47190255",
"0.4714024",
"0.47129625",
"0.47128585",
"0.47065768",
"0.4705193",
"0.4704939"
]
| 0.6708361 | 0 |
Remove all outbound edges with the given label from the current vertex and create a new new outbound edge between the current and given vertex using the specified label. Note that only a single outbound edge per label will be preserved. | public void setSingleLinkOutTo(VertexFrame vertex, String... labels) {
// Unlink all edges with the given label
unlinkOut(null, labels);
// Create a new edge with the given label
linkOut(vertex, labels);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void removeVertex(String vertLabel) {\n\n // Implement me!\n if (indexOf(vertLabel, vertices) <0) {\n return;\n }\n vertices.remove(vertLabel);\n Iterator<String> iterator = edges.keySet().iterator();\n while (iterator.hasNext()) {\n String k = iterator.next();\n if (k.contains(vertLabel)) {\n iterator.remove();\n edges.remove(k);\n }\n }\n }",
"private void addEdgeWithLabel(NasmInst source, NasmLabel destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n\n if (systemCalls.contains(destination.toString()))\n return; // System call: iprintLF, readline or atoi. No edge needed\n\n NasmInst destinationInst = label2Inst.get(destination.toString());\n if (destinationInst == null)\n throw new FgException(\"ERROR: No instruction matching with the given label\");\n addEdgeWithInst(source, destinationInst);\n }",
"@Override\n\tpublic void setUniqueLinkOutTo(VertexFrame vertex, String... labels) {\n\t\tunlinkOut(vertex, labels);\n\t\t// Create a new edge with the given label\n\t\tlinkOut(vertex, labels);\n\t}",
"public void removeEdgeTo(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\t// remove from neighbor's inList\r\n\t\t\t\tneighbor.vertex.inList.remove(findNeighbor(neighbor.vertex.inList, currentVertex.label)); \t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\tcurrentVertex.outList.remove(neighbor); // remove from current's outList\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Edge to \" + v + \" does not exist.\");\r\n\t}",
"public void removeEdgeFrom(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.inList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\t// remove from neighbor's outList\r\n\t\t\t\tneighbor.vertex.outList.remove(findNeighbor(neighbor.vertex.outList, currentVertex.label)); \t\t\r\n\t\t\t\tcurrentVertex.inList.remove(neighbor); // remove from current's inList\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Edge from \" + v + \" does not exist.\");\r\n\t}",
"public void drawUndirectedEdge(String label1, String label2) {\n }",
"protected GraphSubEdge (Object label)\n {\n this.label = label;\n mark = false;\n }",
"public static void mergeOutEdge(Vertex res, Vertex src) {\n res.outEdges.addAll(src.outEdges);\n }",
"@Override\n\t\tpublic void removeLabel(Label label) {\n\n\t\t}",
"public DotGraph createSubGraph(String label) {\n // file name is used as label of sub graph.\n DotGraph subgraph = new DotGraph(label);\n subgraph.isSubGraph = true;\n\n this.drawElements.add(subgraph);\n\n return subgraph;\n }",
"void setEdgeLabel(int edge, String label);",
"public boolean findInEdge(String label){\n\t\tfor(Entry<String, LinkedList<Edge>> s: vertices.entrySet()){\n\t\t\tfor(int i=0; i < vertices.get(s.getKey()).size();i++){\n\t\t\t\tif(vertices.get(s.getKey()).get(i).getDLabel().equals(label)){\n\t\t\t\t\tdelEdge(s.getKey(),label);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"public void addVertex(String vertLabel) {\n\n // Implement me!\n if (indexOf(vertLabel, vertices) != -1) {\n return;\n }\n vertices.put(vertLabel, vertices.size());\n if (weights.length == 0) {\n weights = new int[1][0];\n } else {\n weights = addOneRow(weights);\n }\n\n\n }",
"Edge createEdge(Vertex src, Vertex tgt, boolean directed);",
"void removeLabel(Object oldLabel);",
"void removeLabel(Object oldLabel);",
"public boolean removeEdge(String label1, String label2)\n\t{\n\t\tif(isAdjacent(label1, label2)) //if edge exists remove it\n\t\t{\n\t\t\tDSAGraphVertex vx1 = getVertex(label1), vx2 = getVertex(label2);\n\t\t\tvx1.removeEdge(vx2);\n\t\t\tvx2.removeEdge(vx1);\n\t\t\tedgeCount--;\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"void removeEdge(Vertex v1, Vertex v2) throws GraphException;",
"private void addOutgoingEdges(Vertex v, Vertex obstacle, Set<Edge> result, Vector<Vertex> newVertexes) {\n \tif (v.getLayerID() == layers.size() - 1)\n \t\treturn;\n \t\n \t// Fetch the edges from the layer of v\n \tint edgeLayerID = v.getLayerID();\n \tVector<Edge> es = edges.get(edgeLayerID);\n \t\n \tfor (Edge e : es) {\n \t\tif (e.getHead().equals(v.getLabel())) {\n \t\t\t// The tail vertex is at the layer below\n \t\t\tVertex tmp = new Vertex(edgeLayerID + 1, e.getTail());\n \t\t\t// Add the edge to result\n \t\t\tresult.add(e);\n \t\t\t// If the outgoing edge does not go to obstacle, add its tail\n \t\t\tif (!tmp.theSameAs(obstacle)) {\n \t\t\t\tnewVertexes.add(tmp);\n \t\t\t\t//System.out.println(\"TEMP is added: layerID:\" + tmp.layerID + \"\\tlabel:\" + tmp.label);\n \t\t\t}\n \t\t}\n \t}\n }",
"private GraphRemovalUndo removeAxiomEdgesOf(Graph<String, DefaultEdge> g,\n\t\t\tMap<DefaultEdge, Set<OWLAxiom>> createdByAxioms, Map<DefaultEdge, Set<OWLAxiom>> labels, DefaultEdge edge) {\n\n\t\tMap<OWLAxiom, Set<DefaultEdge>> axiomToEdges = getAxiomToEdges(createdByAxioms);\n\n\t\t// Instantiate a graphremoval class (which allows to undo the removal9\n\t\tGraphRemovalUndo remover = new GraphRemovalUndo(g);\n\n\t\t// For each axiom of the edge\n\t\tfor (OWLAxiom ax : createdByAxioms.get(edge)) {\n\t\t\t// For each edge that was created by this axiom\n\t\t\tfor (DefaultEdge e : axiomToEdges.get(ax)) {\n\t\t\t\t// remove the axiom from the label\n\t\t\t\tif (labels.containsKey(e)) {\n\t\t\t\t\tlabels.get(e).remove(ax);\n\t\t\t\t}\n\t\t\t\t// If this was the last axiom of the edge, remove it\n\t\t\t\tif (createdByAxioms.get(e).size() < 1) {\n\t\t\t\t\tcreatedByAxioms.remove(e);\n\t\t\t\t\tremover.removeEdge(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Remove all nested class expressions of the axiom\n\t\t\tax.nestedClassExpressions().forEach(nested -> {\n\t\t\t\tremover.removeVertex(OntologyDescriptor.getCleanNameOWLObj(nested));\n\t\t\t});\n\n\t\t\t// Remember which axioms where removed\n\t\t\tremover.saveAxiom(ax);\n\t\t}\n\n\t\treturn remover;\n\n\t}",
"public void addVertex(T vertLabel) {\n\t\tvertCount++;\n\t\tLinkedList[] tempList = new LinkedList[vertCount];\n\t\tLinkedList newVert = new LinkedList((String)vertLabel);\n\t\t\n\t\tif(verts.length==0){\n\t\t\ttempList[0] = newVert;\n\t\t}\n\t\t\n\t\telse{\n\t\t\tfor(int x=0; x<verts.length; x++){\n\t\t\t\t\ttempList[x] = verts[x];\n\t\t\t}\n\t\t\ttempList[verts.length] = newVert;\n\t\t}\n\tverts = tempList;\n }",
"public void setSingleLinkInTo(VertexFrame vertex, String... labels) {\n\t\t// Unlink all edges with the given label\n\t\tunlinkIn(null, labels);\n\t\t// Create a new edge with the given label\n\t\tlinkIn(vertex, labels);\n\t}",
"public void setUniqueLinkInTo(VertexFrame vertex, String... labels) {\n\t\t// Unlink all edges between both objects with the given label\n\t\tunlinkIn(vertex, labels);\n\t\t// Create a new edge with the given label\n\t\tlinkIn(vertex, labels);\n\t}",
"public Vertex(int label) {\r\n isVisited = false;\r\n this.label = label;\r\n }",
"void removeEdge(int x, int y);",
"public void updateWeightEdge(String srcLabel, String tarLabel, int weight) {\n // Implement me!\n\n String e = srcLabel + tarLabel;\n if (indexOf(e, edges) < 0) {\n return;\n }\n\n\n int srcInt = indexOf(srcLabel, vertices);\n int tarInt = indexOf(tarLabel, vertices);\n weights[srcInt][edges.get(e)] = weight;\n weights[tarInt][edges.get(e)] = weight * (-1);\n\n if (weight == 0) {\n edges.remove(e);\n return;\n }\n\n\n\n }",
"String removeLabel(String label);",
"public void addEdge(String srcLabel, String tarLabel, int weight) {\n // Implement me!\n\n String e = srcLabel + tarLabel;\n if (indexOf(e, edges) > -1) {\n return;\n }\n int sInt = indexOf(srcLabel, vertices);\n int tInt = indexOf(tarLabel, vertices);\n if (sInt < 0 ||tInt < 0) {\n return;\n }\n\n int eInt = edges.size();\n edges.put(e, eInt);\n weights = addOneCol(weights);\n weights[sInt][eInt] = weight;\n weights[tInt][eInt] = weight * (-1);\n\n\n }",
"public boolean removeVertex(String label)\n\t{\n\t\tif(hasVertex(label)) //if vertex in in list\n\t\t{\n\t\t\tvertices.removeAt(getVertex(label));\n\t\t\t//System.out.println(\"Deleted: \" + label); //debug\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"void remove(String label) throws IOException;",
"public boolean removeEdge(V source, V target);",
"void addEdgeTo(char v, int e) {\r\n\t\t// does an edge to v already exist?\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\tneighbor.edge = e;\r\n\t\t\t\tfindNeighbor(findVertex(v).inList, currentVertex.label).edge = e;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// add to current's inList\r\n\t\tNeighbor newNeighbor = new Neighbor(findVertex(v), e);\r\n\t\tcurrentVertex.outList.add(newNeighbor);\r\n\r\n\t\t// add to neighbor's outList\r\n\t\tNeighbor current = new Neighbor(currentVertex, e);\r\n\t\tnewNeighbor.vertex.inList.add(current);\r\n\r\n\t\tedges++;\r\n\t}",
"public abstract void removeEdge(int from, int to);",
"public Label newLabel(Label oldLabel) {\r\n NegraLabel result;\r\n if(oldLabel instanceof NegraLabel) {\r\n NegraLabel l = (NegraLabel) oldLabel;\r\n result = new NegraLabel(l.value(), l.getEdge(), new HashMap<String,String>());\r\n for (Map.Entry<String,String> e : l.features.entrySet()) {\r\n result.features.put(e.getKey(), e.getValue());\r\n }\r\n } else {\r\n result = new NegraLabel(oldLabel.value());\r\n }\r\n return result;\r\n }",
"void remove(Edge edge);",
"void addEdge(int source, int destination, int weight);",
"public Builder clearLabel() {\n \n label_ = getDefaultInstance().getLabel();\n onChanged();\n return this;\n }",
"private void addIncomingEdges(Vertex v, Vertex obstacle, Set<Edge> result, Vector<Vertex> newVertexes) {\n \t// Vertexes in the top layer have no incoming edges\n \tif (v.getLayerID() == 0)\n \t\treturn;\n \t\n \t// Fetch the edges from the layer above\n \tint edgeLayerID = v.getLayerID() - 1;\n \tVector<Edge> es = edges.get(edgeLayerID);\n \t\n \tfor (Edge e : es) {\n \t\t// Finds an incoming edge of v\n \t\tif (e.getTail().equals(v.getLabel())) {\n \t\t\tVertex tmp = new Vertex(edgeLayerID, e.getHead());\n \t\t\t// If the incoming edge does not come from obstacle, add the edge and its head\n \t\t\tif (!tmp.theSameAs(obstacle)) {\n \t\t\t\tresult.add(e);\n \t\t\t\tnewVertexes.add(tmp);\n \t\t\t\t//System.out.println(\"TEMP is added: layerID:\" + tmp.layerID + \"\\tlabel:\" + tmp.label);\n \t\t\t}\n \t\t}\n \t}\t\n }",
"static void bfs(String label) {\n\n /* Add a graph node to the queue. */\n queue.addLast(label);\n graphVisited.put(label, true);\n\n while (!queue.isEmpty()) {\n\n /* Take a node out of the queue and add it to the list of visited nodes. */\n if (!graphVisited.containsKey(queue.getFirst()))\n graphVisited.put(queue.getFirst(), true);\n\n String str = queue.removeFirst();\n\n /*\n For each unvisited vertex from the list of the adjacent vertices,\n add the vertex to the queue.\n */\n for (String lab : silhouette.get(str)) {\n if (!graphVisited.containsKey(lab) && lab != null && !queue.contains(lab))\n queue.addLast(lab);\n }\n }\n }",
"public void addUndirectedEdge(int v1, int v2, Object edgeInfo) {\n//your code here\n Edge edge1 = new Edge(v1, v2, edgeInfo);\n Edge edge2 = new Edge(v2, v1, edgeInfo);\n if(!adjLists[v1].contains(edge1)){\n adjLists[v1].addLast(edge1);\n }\n if(!adjLists[v2].contains(edge2)){\n adjLists[v2].addLast(edge2);\n }\n }",
"Edge inverse() {\n return bond.inverse().edge(u, v);\n }",
"public void removeEdges (E vertex) throws IllegalArgumentException\n {\n int index = this.indexOf (vertex);\n if (index < 0)\n throw new IllegalArgumentException (vertex + \" was not found!\");\n\n Node currentNode = adjacencySequences[index];\n while (currentNode != null)\n {\n this.removeNode (currentNode.neighbourIndex, index);\n currentNode = currentNode.nextNode;\n }\n\n adjacencySequences[index] = null;\n }",
"public Builder clearEdge() {\n if (edgeBuilder_ == null) {\n edge_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n } else {\n edgeBuilder_.clear();\n }\n return this;\n }",
"public LabeledSDGEdge(SDGNode source, SDGNode sink, Kind kind, String label) {\n\t\tsuper(source, sink);\n\t\tthis.kind = kind;\n\t\tthis.label = label;\n\t}",
"public void addEdge(N startNode, N endNode, E label)\r\n/* 43: */ {\r\n/* 44: 89 */ assert (checkRep());\r\n/* 45: 90 */ if (!contains(startNode)) {\r\n/* 46: 90 */ addNode(startNode);\r\n/* 47: */ }\r\n/* 48: 91 */ if (!contains(endNode)) {\r\n/* 49: 91 */ addNode(endNode);\r\n/* 50: */ }\r\n/* 51: 92 */ ((Map)this.map.get(startNode)).put(endNode, label);\r\n/* 52: 93 */ ((Map)this.map.get(endNode)).put(startNode, label);\r\n/* 53: */ }",
"public void addUndirectedEdge(int v1, int v2) {\r\n addUndirectedEdge(v1, v2, null);\r\n }",
"private Stmt labelFreeBreaks(Stmt body, final Id label) {\n return (Stmt) body.visit(new NodeVisitor(){\n @Override\n public Node override(Node node) { // these constructs capture free breaks\n if (node instanceof Loop) return node;\n if (node instanceof Switch) return node;\n return null;\n }\n @Override\n public Node leave(Node old, Node n, NodeVisitor v) {\n if (n instanceof Branch) {\n Branch b = (Branch) n;\n if (b.kind().equals(Branch.BREAK) && null == b.labelNode()) {\n return b.labelNode(label);\n }\n }\n return n;\n }\n });\n }",
"public DSALinkedList getAdjacent(String label)\n\t{\n\t\tDSAGraphVertex vx = getVertex(label);\n\t\treturn vx.getAdjacent();\n\t}",
"public void addEdgeFrom(char v, int e) {\r\n\t\t// does an edge from v already exist?\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.inList.get(i);\r\n\t\t\tif (currentVertex.inList.get(i).vertex.label == v) {\r\n\t\t\t\tneighbor.edge = e; \r\n\t\t\t\tfindNeighbor(findVertex(v).outList, currentVertex.label).edge = e;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// add to current's inList\r\n\t\tNeighbor newNeighbor = new Neighbor(findVertex(v), e);\r\n\t\tcurrentVertex.inList.add(newNeighbor);\r\n\r\n\t\t// add to neighbor's outList\r\n\t\tNeighbor current = new Neighbor(currentVertex, e);\r\n\t\tnewNeighbor.vertex.outList.add(current);\r\n\r\n\t\tedges++;\r\n\t}",
"public void addUndirectedEdge(int v1, int v2) {\n addUndirectedEdge(v1, v2, null);\n }",
"public void addUndirectedEdge(int v1, int v2) {\n addUndirectedEdge(v1, v2, null);\n }",
"public boolean addVertex(String label)\n\t{\n\t\tif(!hasVertex(label)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex v = new DSAGraphVertex(label, null);\n\t\t\tvertices.insertLast(v); //inserts into vertices list at end\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public Builder removeEdge(int index) {\n if (edgeBuilder_ == null) {\n ensureEdgeIsMutable();\n edge_.remove(index);\n onChanged();\n } else {\n edgeBuilder_.remove(index);\n }\n return this;\n }",
"public Vertex(T vertexLabel) {\r\n\t\tlabel = vertexLabel;\r\n\t\tedgeList = new LinkedList<Edge>();\r\n\t\tvisited = false;\r\n\t\tpreviousVertex = null;\r\n\t\tcost = 0;\r\n\t}",
"public void branchChainTo(Label label) {\n // do nothing by default\n }",
"public void removeEdge(String edgeTypeName, Node source, Node dest)\r\n {\r\n\tfinal EdgeTypeHolder eth = ethMap.get(edgeTypeName);\r\n\tif(eth!=null) eth.removeEdge(source, dest);\r\n\t// Invalidate the Edge array cache.\r\n\tedges = null;\r\n }",
"boolean addEdge(V v, V w, double weight);",
"public void addUndirectedEdge(int vertexOne, int vertexTwo) {\n\t\tGraphNode first = nodeList.get(vertexOne - 1);\n\t\tGraphNode second = nodeList.get(vertexTwo - 1);\n\t\tfirst.getNeighbors().add(second);//Neighbour of first is second. Store it.\n\t\tsecond.getNeighbors().add(first);//Neighbour of second is first. Store it.\n\t\tSystem.out.println(first.getNeighbors());\n\t\tSystem.out.println(second.getNeighbors());\n\t}",
"private Label removeLabel(Label l) {\n \t\tLabel ret = (Label) l.next;\n \t\tmLabels = (Label) mPool.release(mLabels, l);\n \n \t\treturn ret;\n \t}",
"public void addUndirectedEdge(int v1, int v2, Object edgeInfo) {\n //your code here\n \taddEdge(v1, v2, edgeInfo);\n \taddEdge(v2, v1, edgeInfo);\n \t\n }",
"public static de.hpi.msd.salsa.serde.avro.Edge.Builder newBuilder(de.hpi.msd.salsa.serde.avro.Edge other) {\n return new de.hpi.msd.salsa.serde.avro.Edge.Builder(other);\n }",
"public void branchChainTo(Label label) {\n\t\t if (this.statements != null) {\n\t\t \tthis.statements[statements.length - 1].branchChainTo(label);\n\t\t }\n\t}",
"void removeVertex(Vertex v) throws GraphException;",
"public void removeEdge(int start, int end);",
"public void findEdgeTo(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.outList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\tSystem.out.println(neighbor.edge);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"none\");\r\n\t}",
"private void addUndirectedEdge(int i, int j) {\n\t\tNode first = nodeList.get(i-1);\r\n\t\tNode second = nodeList.get(j-1);\r\n//\t\tSystem.out.println(first.name);\r\n//\t\tSystem.out.println(second.name);\r\n\t\tfirst.getNeighbors().add(second);//Neighbour of first is second. Store it.\r\n\t\tsecond.getNeighbors().add(first);\r\n\t}",
"public void addUndirectedEdge(int v1, int v2, Object edgeInfo) {\r\n \tmyAdjLists[v1].add(new Edge(v1, v2, edgeInfo));\r\n \tmyAdjLists[v2].add(new Edge(v2, v1, edgeInfo));\r\n }",
"private final void addEdge(int v1, int v2, float weight) {\n if (nEdges >= edgeWeights.length) {\n edgeWeights = Arrays.copyOf(edgeWeights, edgeWeights.length*2);\n }\n int edgeIndex = nEdges;\n\n // add edge to v1\n int v1Index;\n {\n v1Index = nOutgoingEdgess[v1];\n if (v1Index >= outgoingEdgess[v1].length) {\n int newLength = outgoingEdgess[v1].length*2;\n outgoingEdgess[v1] = Arrays.copyOf(outgoingEdgess[v1], newLength);\n outgoingEdgeIndexess[v1] = Arrays.copyOf(outgoingEdgeIndexess[v1], newLength);\n outgoingEdgeIsMarkeds[v1] = Arrays.copyOf(outgoingEdgeIsMarkeds[v1], newLength);\n outgoingEdgeOppositeIndexess[v1] = Arrays.copyOf(outgoingEdgeOppositeIndexess[v1], newLength);\n }\n outgoingEdgess[v1][v1Index] = v2;\n outgoingEdgeIndexess[v1][v1Index] = edgeIndex;\n nOutgoingEdgess[v1]++;\n }\n\n // add edge to v2\n int v2Index;\n {\n v2Index = nOutgoingEdgess[v2];\n if (v2Index >= outgoingEdgess[v2].length) {\n int newLength = outgoingEdgess[v2].length*2;\n outgoingEdgess[v2] = Arrays.copyOf(outgoingEdgess[v2], newLength);\n outgoingEdgeIndexess[v2] = Arrays.copyOf(outgoingEdgeIndexess[v2], newLength);\n outgoingEdgeIsMarkeds[v2] = Arrays.copyOf(outgoingEdgeIsMarkeds[v2], newLength);\n outgoingEdgeOppositeIndexess[v2] = Arrays.copyOf(outgoingEdgeOppositeIndexess[v2], newLength);\n }\n outgoingEdgess[v2][v2Index] = v1;\n outgoingEdgeIndexess[v2][v2Index] = edgeIndex;\n nOutgoingEdgess[v2]++;\n }\n\n outgoingEdgeOppositeIndexess[v1][v1Index] = v2Index;\n outgoingEdgeOppositeIndexess[v2][v2Index] = v1Index;\n \n edgeWeights[nEdges] = weight;\n ++nEdges;\n }",
"public void makeEdgeDown( String sourceName, String destName)\n {\n \tVertex v = vertexMap.get( sourceName );\n Vertex w = vertexMap.get( destName );\n if(v!=null && w!=null)\n \tv.adjEdge.get(w.name).isDown =true;\n else if(v==null){\n \tSystem.out.println(\"Invalid Source vertex\");\n }\n else if(w==null){\n \tSystem.out.println(\"Invalid dest vertex\");\n }\n // v.weightnext.put(w.name,(Double) distance);\n }",
"protected void saveBackwardEdge(Long eID, long vj, long vi) {\n\t\tInteger restCap_vi = getMarkedTuple(vi).getRestCap();\n\t\tint restCap = Math.min(f(eID), restCap_vi);\n\t\tmarkVertice(vj, new Tuple4(\"-\", vi, restCap, false));\n\t}",
"Node(long id, String label) {\n this.id = id;\n this.label = label;\n\n inEdges = new HashMap<>();\n outEdges = new HashMap<>();\n }",
"public Void visit(NasmJl inst){\n addEdgeWithLabel(inst, (NasmLabel) inst.address);\n addEdgeWithInst(inst, getNextInst(inst));\n return null;\n }",
"private void edgeDown(String source, String dest) {\r\n\t\tVertex v = vertexMap.get(source);\r\n\t\tfor (Iterator i = v.adjacent.iterator(); i.hasNext();) {\r\n\t\t\tEdge edge = (Edge) i.next();\r\n\t\t\tif (edge.getDestination().equals(dest))\r\n\t\t\t\tedge.setStatus(false);\r\n\t\t}\r\n\t}",
"@Test\n public void testWithUnknownLabel() throws Exception {\n LogicalGraph socialGraph = getSocialNetworkLoader().getLogicalGraph();\n LogicalGraph result = socialGraph\n .callForGraph(new VertexDeduplication<>(\"NotInTheGraph\", Arrays.asList(\"a\", \"b\")));\n collectAndAssertTrue(socialGraph.equalsByData(result));\n }",
"public void deleteEdge( String sourceName, String destName)\n {\n \tVertex v = vertexMap.get( sourceName );\n Vertex w = vertexMap.get( destName );\n if(v!=null && w!=null)\n \tv.adjEdge.remove(w.name);\n \n // v.weightnext.put(w.name,(Double) distance);\n }",
"private void deleteEdge(String source, String dest) {\r\n\t\tVertex v = vertexMap.get(source);\r\n\t\tfor (Iterator i = v.adjacent.iterator(); i.hasNext();) {\r\n\t\t\tEdge edge = (Edge) i.next();\r\n\t\t\tif (edge.getDestination().equals(dest)) {\r\n\t\t\t\tv.adjacent.remove(edge);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private BBlock makeEdge(Stmt pstmt, BBlock pblock) {\n //##53 Stmt nextStmt;\n\n // Fukuda 2005.07.07\n Stmt nextStmt;\n // Fukuda 2005.07.07\n Stmt nextStmt1;\n LabeledStmt lastStmt;\n Label l;\n IfStmt stmtIF;\n LoopStmt stmtLOOP;\n SwitchStmt stmtSWITCH;\n Stmt loopInitPart; //##53\n BBlock loopInitBlock; //##53\n BBlock currBlock;\n BBlock thenBlock;\n BBlock elseBlock;\n BBlock LabelBlock;\n BBlock bodyBlock;\n BBlock stepBlock;\n BBlock loopbackBlock;\n BBlock CondInitBlock;\n BBlock endBlock;\n BBlock defaultBlock;\n BBlock switchBlock;\n LabelBlock = null;\n BBlock lLoopStepBlock; //##70\n\n int lop;\n nextStmt = pstmt;\n currBlock = pblock;\n lGlobalNextStmt = nextStmt; //##70\n\n flow.dbg(5, \"\\nmakeEdge\", \"to stmt= \" + pstmt + \" from B\" + pblock); //##53\n\n while (nextStmt != null) {\n lop = nextStmt.getOperator();\n flow.dbg(5, \"\\nMakeEdge\", \"nextStmt = \" + nextStmt +\n \" nextToNext \" + ioRoot.toStringObject(nextStmt.getNextStmt())\n + \" lGlobalNextStmt \" + lGlobalNextStmt); //##53 //##70\n\n switch (lop) {\n case HIR.OP_IF:\n stmtIF = (IfStmt) nextStmt;\n thenBlock = makeEdge(stmtIF.getThenPart(), currBlock);\n elseBlock = makeEdge(stmtIF.getElsePart(), currBlock);\n LabelBlock = (BBlock) fResults.getBBlockForLabel(stmtIF.getEndLabel());\n\n //\t\t\t\tLabelBlock =stmtIF.getEndLabel().getBBlock();\n addEdge(thenBlock, LabelBlock);\n addEdge(elseBlock, LabelBlock);\n //##53 currBlock = LabelBlock;\n //##53 nextStmt = nextStmt.getNextStmt();\n //##53 BEGIN\n LabeledStmt lIfEnd = (LabeledStmt)stmtIF.getChild(4);\n flow.dbg(6, \" \", \"if-end \" + lIfEnd.toStringShort());\n if (lIfEnd.getStmt() != null)\n currBlock = makeEdge(lIfEnd.getStmt(), LabelBlock);\n else\n currBlock = LabelBlock;\n nextStmt = getNextStmtSeeingAncestor(stmtIF);\n flow.dbg(6, \" next-of-if \" + nextStmt+ \" lGlobalNextStmt \" + lGlobalNextStmt); //##70\n lGlobalNextStmt = nextStmt; //##70\n //##53 END\n\n break;\n\n case HIR.OP_LABELED_STMT:\n LabelBlock = (BBlock) fResults.getBBlockForLabel(((LabeledStmt) nextStmt).getLabel());\n addEdge(currBlock, LabelBlock);\n currBlock = LabelBlock;\n nextStmt1 = ((LabeledStmt) nextStmt).getStmt();\n\n if (nextStmt1 == null) {\n //##53 nextStmt = nextStmt.getNextStmt();\n nextStmt = getNextStmtSeeingAncestor(nextStmt); //##53\n flow.dbg(6, \" next-of-labeledSt \" + nextStmt+ \" lGlobalNextStmt \" + lGlobalNextStmt); //##70\n } else {\n nextStmt = nextStmt1;\n }\n lGlobalNextStmt = nextStmt; //##70\n\n break;\n\n case HIR.OP_SWITCH:\n\n int CaseCount;\n stmtSWITCH = (SwitchStmt) nextStmt;\n CaseCount = stmtSWITCH.getCaseCount();\n\n for (int i = 0; i < CaseCount; i++) {\n //\t\t\t\t\tLabelBlock=stmtSWITCH.getCaseLabel(i).getBBlock();\n LabelBlock = (BBlock) fResults.getBBlockForLabel(stmtSWITCH.getCaseLabel(\n i));\n addEdge(currBlock, LabelBlock);\n }\n\n //\t\t\t\tLabelBlock=stmtSWITCH.getDefaultLabel().getBBlock();\n defaultBlock = (BBlock) fResults.getBBlockForLabel(stmtSWITCH.getDefaultLabel());\n endBlock = (BBlock) fResults.getBBlockForLabel(stmtSWITCH.getEndLabel());\n if (defaultBlock == null)\n addEdge(currBlock, endBlock);\n else\n addEdge(currBlock, defaultBlock);\n bodyBlock = makeEdge(stmtSWITCH.getBodyStmt(), currBlock);\n\n //\t\t\t\tendBlock=stmtSWITCH.getEndLabel().getBBlock();\n addEdge(bodyBlock, endBlock);\n //##53 currBlock = endBlock;\n //##53 nextStmt = nextStmt.getNextStmt();\n //##53 BEGIN\n LabeledStmt lSwitchEnd = (LabeledStmt)stmtSWITCH.getChild(4);\n flow.dbg(6, \" \", \"switch-end \" + lSwitchEnd.toStringShort());\n if (lSwitchEnd.getStmt() != null)\n currBlock = makeEdge(lSwitchEnd.getStmt(), endBlock);\n else\n currBlock = endBlock;\n nextStmt = getNextStmtSeeingAncestor(stmtSWITCH);\n flow.dbg(6, \" next-of-switch \" + nextStmt+ \" lGlobalNextStmt \" + lGlobalNextStmt); //##70\n lGlobalNextStmt = nextStmt; //##70\n //##53 END\n\n break;\n\n case HIR.OP_WHILE:\n case HIR.OP_FOR:\n case HIR.OP_INDEXED_LOOP:\n case HIR.OP_UNTIL:\n stmtLOOP = (LoopStmt) nextStmt;\n l = stmtLOOP.getLoopBackLabel();\n\n //\t\t\t\tloopbackBlock = (BBlock)fResults.getBBlockForLabel( l);\n loopbackBlock = (BBlock) fResults.getBBlockForLabel(l);\n lLoopStepBlock = (BBlock) fResults.getBBlockForLabel(stmtLOOP.getLoopStepLabel()); //##70\n //\t\t\t\tendBlock = stmtLOOP.getLoopEndLabel().getBBlock();\n endBlock = (BBlock) fResults.getBBlockForLabel(stmtLOOP.getLoopEndLabel());\n flow.dbg(6, \"Loop\", \"backBlock \" + loopbackBlock + \" stepLabel \" +\n stmtLOOP.getLoopStepLabel() + \" stepBlock \" +\n lLoopStepBlock + \" endBlock \" + endBlock); //##70\n /* //##53\n CondInitBlock = makeEdge(stmtLOOP.getConditionalInitPart(),\n currBlock);\n\n if (CondInitBlock == currBlock) {\n addEdge(currBlock, loopbackBlock);\n bodyBlock = makeEdge(stmtLOOP.getLoopBodyPart(),\n loopbackBlock);\n\n //\t\t\t\t\t\tcurrBlock.getSuccEdge(loopbackBlock).flagBox().setFlag(Edge.LOOP_BACK_EDGE, true); //## Tan //##9\n } else {\n bodyBlock = makeEdge(stmtLOOP.getLoopBodyPart(),\n CondInitBlock);\n addEdge(CondInitBlock, endBlock);\n }\n */ //##53\n //##53 BEGIN\n loopInitPart = stmtLOOP.getLoopInitPart();\n // loopInitPart may contain jump-to-loopBodyPart to implement\n // conditional initiation.\n // Make edge from currBlock to LoopInitPart.\n flow.dbg(6, \" make-edge to loop-init part from \" + currBlock ); //##70\n loopInitBlock = makeEdge(loopInitPart, currBlock);\n // How about loopInitBlock to loopBackBlock ?\n // Add edge from currBlock to loopBackBlock ?\n flow.dbg(6, \" add-edge to loop-back block from \" + currBlock + \" initBlock \" + loopInitBlock); //##70\n addEdge(currBlock, loopbackBlock);\n // Make edge from loopbackBlock to loop-body part.\n flow.dbg(6, \" make-edge to loop-body part from loop-back block \" + loopbackBlock ); //##70\n bodyBlock = makeEdge(stmtLOOP.getLoopBodyPart(),\n loopbackBlock);\n //##53 END\n l = stmtLOOP.getLoopStepLabel();\n\n if (l != null) {\n stepBlock = (BBlock) fResults.getBBlockForLabel(l);\n\n //\t\t\t\t\t\taddEdge(bodyBlock,stepBlock);\n if (stepBlock != null) {\n // How about from bodyBlock to stepBlock ?\n // The label of step block is attached at the end of body block.\n if (bodyBlock != stepBlock) {\n flow.dbg(5, \" add edge\", \"from loop-body part \" + bodyBlock\n + \" to stepBlock \" + stepBlock); //##70\n addEdge(bodyBlock, stepBlock);\n }\n // Make edge from stepBlock to loopbackBlock.\n flow.dbg(5, \" add edge\", \"from loop-step block \" + stepBlock\n + \" to loop-back block \" + loopbackBlock); //##70\n addEdge(stepBlock, loopbackBlock);\n stepBlock.getSuccEdge(loopbackBlock).flagBox().setFlag(Edge.LOOP_BACK_EDGE,\n true); //## Tan //##9\n // Make edge from stepBlock to loop-step part.\n flow.dbg(5, \" make-edge to loop-step part from stepBlock \" + stepBlock); //##70\n BBlock lStepBlock2 = makeEdge(stmtLOOP.getLoopStepPart(),\n stepBlock); //##53\n } else {\n flow.dbg(4, \" stepBlock of \" + stmtLOOP + \" is null\"); //##70\n if (bodyBlock != null) { // no step part (or merged with the body)\n // Add edge from bodyBlock to loopbackBlock.\n flow.dbg(5, \" add edge from bodyBlock \" + bodyBlock + \" to loop-back block \" + loopbackBlock); //##70\n addEdge(bodyBlock, loopbackBlock);\n bodyBlock.getSuccEdge(loopbackBlock).flagBox().setFlag(Edge.\n LOOP_BACK_EDGE,\n true); //## Tan //##9\n }\n else {\n //System.out.println(\"Returned or Jumped\");//\n }\n }\n\n if (stmtLOOP.getLoopEndCondition() == (Exp) null) {\n // Add edge from loopbackBlock to endBlock.\n addEdge(loopbackBlock, endBlock);\n } else if (stepBlock != null) {\n // End condition is not null.\n // Add edge from stepBlock to endBlock.\n // How about stepBlock to end-condition part ?\n addEdge(stepBlock, endBlock);\n } else {\n // End condition is not null and\n // stepBlock is null.\n // Add edge from bodyBlock to endBlock.\n // How about bodyBlock to end-condition block ?\n addEdge(bodyBlock, endBlock);\n }\n } else {\n // No loop-step label.\n // Add edge from bodyBlock to loopbackBlock.\n addEdge(bodyBlock, loopbackBlock);\n // Add edge from loopbackBlock to endBlock.\n addEdge(loopbackBlock, endBlock);\n }\n\n //##53 currBlock = endBlock;\n //##53 nextStmt = nextStmt.getNextStmt();\n //##53 BEGIN\n LabeledStmt lLoopEnd = (LabeledStmt)stmtLOOP.getChild(7);\n flow.dbg(6, \" \", \"loop-end \" + lLoopEnd.toStringShort());\n if (lLoopEnd.getStmt() != null) {\n currBlock = makeEdge(lLoopEnd.getStmt(), endBlock);\n }else\n currBlock = endBlock;\n flow.dbg(5, \" get next statement\", \"of loop \" + stmtLOOP.toStringShort());\n nextStmt = getNextStmtSeeingAncestor(stmtLOOP);\n flow.dbg(6, \" next-of-loop \" + nextStmt+ \" lGlobalNextStmt \" + lGlobalNextStmt); //##70\n lGlobalNextStmt = nextStmt; //##70\n //##53 END\n\n break;\n\n case HIR.OP_RETURN:\n currBlock = null;\n //##53 nextStmt = nextStmt.getNextStmt();\n nextStmt = getNextStmtSeeingAncestor(nextStmt); //##53\n flow.dbg(6, \" next-of-return \" + nextStmt+ \" lGlobalNextStmt \" + lGlobalNextStmt); //##70\n lGlobalNextStmt = nextStmt; //##70\n break;\n\n case HIR.OP_JUMP:\n l = ((JumpStmt) nextStmt).getLabel();\n LabelBlock = (BBlock) fResults.getBBlockForLabel(l);\n addEdge(currBlock, LabelBlock);\n currBlock = null;\n //##53 nextStmt = nextStmt.getNextStmt();\n nextStmt = getNextStmtSeeingAncestor(nextStmt); //##53\n flow.dbg(6, \" next-of-jump \" + nextStmt+ \" lGlobalNextStmt \" + lGlobalNextStmt); //##70\n lGlobalNextStmt = nextStmt; //##70\n break;\n\n case HIR.OP_BLOCK:\n currBlock = makeEdge(((BlockStmt) nextStmt).getFirstStmt(),\n currBlock); //## Fukuda 020322\n //##53 nextStmt = ((BlockStmt) nextStmt).getNextStmt(); //## Fukuda 020322\n //global nextStmt ??\n //##70 nextStmt = getNextStmtSeeingAncestor(nextStmt); //##53\n nextStmt = getNextStmtSeeingAncestor(lGlobalNextStmt); //##70\n flow.dbg(6, \" next-of-block \" + nextStmt+ \" lGlobalNextStmt \" + lGlobalNextStmt); //##70\n lGlobalNextStmt = nextStmt; //##70\n break;\n\n default:\n // Non-control statement.\n //##53 nextStmt = nextStmt.getNextStmt();\n nextStmt = getNextStmtSeeingAncestor(nextStmt); //##53\n flow.dbg(6, \" next-of-default \" + nextStmt+ \" lGlobalNextStmt \" + lGlobalNextStmt); //##70\n lGlobalNextStmt = nextStmt; //##70\n }\n } // end of while\n flow.dbg(5, \" return \" + currBlock + \" for \" + pstmt+ \" lGlobalNextStmt \" + lGlobalNextStmt); //##70\n return currBlock;\n }",
"public static Message createLeaveEvent(long src_, long group_, int ifindex_)\r\n { return new Message(LEAVE, src_, -1, group_, ifindex_); }",
"public static Message createLeaveEvent(long src_, long srcmask_, long group_, int ifindex_)\r\n { return new Message(LEAVE, src_, srcmask_, group_, ifindex_); }",
"private void addEdgeWithInst(NasmInst source, NasmInst destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n Node from = inst2Node.get(source);\n Node to = inst2Node.get(destination);\n if (from == null || to == null)\n throw new FgException(\"ERROR: No nodes matching with given Source or destination \");\n graph.addEdge(from, to);\n }",
"@NonNull\n public BasketItemBuilder withLabel(String label) {\n this.label = label;\n return this;\n }",
"void setGraphLabel(String label);",
"public List<MyPair> outNearestNeighbours(int k, String vertLabel) {\n /* Return out nearest neighbours, search for the rowLength that contains vertLabel.\n And search for any weights that larger than 0 */\n\n\n List<MyPair> neighbours = new ArrayList<MyPair>();\n if (indexOf(vertLabel, vertices) < 0) {\n return neighbours;\n }\n int index = indexOf(vertLabel, vertices);\n\n for (int i = 0; i < weights[index].length; i++) {\n if (weights[index][i] > 0) {\n String label = \"\";\n for (Map.Entry<String, Integer> entry : edges.entrySet()) {\n int value = entry.getValue();\n if (value == i) {\n label = entry.getKey().substring(1, 2);\n }\n }\n if (!label.isEmpty())\n neighbours.add(new MyPair(label, weights[index][i]));\n }\n }\n\n return sortAndTrim(k, neighbours);\n\n\n }",
"public Edge<V> addEdge(V source, V target);",
"public Edge(T node_1, T node_2,S label) {\n\t\tparent = node_1;\n\t\tchild = node_2;\n\t\tl = label;\n\t\tcheckRep();\n\t}",
"boolean addEdge(V v, V w);",
"public static de.hpi.msd.salsa.serde.avro.Edge.Builder newBuilder(de.hpi.msd.salsa.serde.avro.Edge.Builder other) {\n return new de.hpi.msd.salsa.serde.avro.Edge.Builder(other);\n }",
"public void removeVertex (T vertex){\n int index = vertexIndex(vertex);\n \n if (index < 0) return; // vertex does not exist\n \n n--;\n // IF THIS DOESN'T WORK make separate loop for column moving\n for (int i = index; i < n; i++){\n vertices[i] = vertices[i + 1];\n for (int j = 0; j < n; j++){\n edges[j][i] = edges[j][i + 1]; // moving row up\n edges[i] = edges[i + 1]; // moving column over\n }\n }\n }",
"public void addEdge(String inLabel, double inDistance, String inMode,\n int inTime, int inPeakTime, DSAGraphNode<E> inNode)\n {\n links.insertLast(inNode);\n DSAGraphEdge<E> edge = new DSAGraphEdge<E>(inLabel, inDistance, inMode,\n inTime, inPeakTime, this,\n inNode);\n edgeList.insertLast(edge);\n }",
"public void removeEdge(Vertex other) {\n edges.remove(other);\n other.edges.remove(this);\n }",
"void deleteLabel(@Nonnull final Label label, @Nonnull final Telegraf telegraf);",
"public Void visit(NasmJne inst){\n addEdgeWithLabel(inst, (NasmLabel) inst.address);\n addEdgeWithInst(inst, getNextInst(inst));\n return null;\n }",
"public DSAGraphVertex getVertex(String label)\n\t{\n\t\tDSAGraphVertex temp, target = null;\n\t\tIterator<DSAGraphVertex> itr = vertices.iterator();\n\t\tif(vertices.isEmpty()) // case: list is empty\n\t\t{\n\t\t\tthrow new NoSuchElementException(\"Vertices list is empty.\");\n\t\t}\n\t\telse //searches for target\n\t\t{\n\t\t\twhile(itr.hasNext()) //iterates until target is found\n\t\t\t{\n\t\t\t\ttemp = itr.next();\n\t\t\t\tif(temp.getLabel().equals(label))\n\t\t\t\t{\n\t\t\t\t\ttarget = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(target == null) // case: not found\n\t\t{\n\t\t\tthrow new NoSuchElementException(\"Label |\" + label + \"| not found\");\n\t\t}\n\n\t\treturn target;\n\t}",
"public IEdge addEdge(String from, String to, Double cost);",
"public boolean addEdge(String label1, String label2)\n\t{\n\t\tif(!isAdjacent(label1, label2)) //if edge does not already exist add it\n\t\t{\n\t\t\tDSAGraphVertex vx1 = getVertex(label1), vx2 = getVertex(label2);\n\t\t\tvx1.addEdge(vx2);\n\t\t\tvx2.addEdge(vx1);\n\t\t\tedgeCount++;\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public void addLabel(LabelInfo label) {\n\t\talLabels.add(label);\n\t\tif (iMaxSegmentDepth < label.getSegmentLabelDepth()) {\n\t\t\tiMaxSegmentDepth = label.getSegmentLabelDepth();\n\t\t}\n\t}",
"private void removeFromEdgeMat(Vertex v) {\n int ind = _vertices.indexOf(v);\n for (int i = 0; i < _edges.size(); i++) {\n remove(_edges.get(i).get(ind));\n remove(_edges.get(ind).get(i));\n }\n _edges.remove(ind);\n for (int j = 0; j < _edges.size(); j++) {\n _edges.get(j).remove(ind);\n }\n _edgeMap.clear();\n for (int x = 0; x < _edges.size(); x++) {\n for (int y = 0; y < _edges.size(); y++) {\n if (!_edges.get(x).get(y).isNull()) {\n _edgeMap.put(_edges.get(x).get(y), new int[] {x, y});\n }\n }\n }\n }",
"public boolean addVertex(T vertexLabel);",
"void contractEdges(DynamicGraph G, Integer u, Integer v ){\n G.removeEdges(u, v);\n // for all vertices w adj to v\n for (Integer w: G.adjacent(v)){\n // addEdge(u, w);\n G.addEdge(u, w);\n }\n // removeVertex(v); decrement V.\n G.removeVertex(v);\n /*System.out.println(\"After contracting edge u: \"+ u +\" v: \"+ v);\n System.out.println(G);*/\n }",
"void downgradeLastEdge();"
]
| [
"0.5936442",
"0.58182675",
"0.5560557",
"0.55405164",
"0.5435884",
"0.5402416",
"0.5399396",
"0.5258433",
"0.524533",
"0.5176534",
"0.51458186",
"0.5085549",
"0.5070562",
"0.5018464",
"0.4983948",
"0.4983948",
"0.49812064",
"0.49663496",
"0.49148202",
"0.4903298",
"0.4896116",
"0.48839343",
"0.48270008",
"0.48127276",
"0.47833127",
"0.47781795",
"0.4775331",
"0.47451508",
"0.47255734",
"0.47036913",
"0.46743262",
"0.46590734",
"0.460362",
"0.45908543",
"0.45830002",
"0.45812955",
"0.45657206",
"0.4562721",
"0.45512038",
"0.4550289",
"0.45491946",
"0.45475975",
"0.45428327",
"0.45367497",
"0.44869813",
"0.44847602",
"0.44808108",
"0.44773838",
"0.44761506",
"0.44748116",
"0.44748116",
"0.4467189",
"0.4465735",
"0.44534746",
"0.44477376",
"0.44376266",
"0.4434536",
"0.44295093",
"0.44274795",
"0.44218037",
"0.4419744",
"0.44155052",
"0.43984753",
"0.43888673",
"0.43842506",
"0.43816912",
"0.43770808",
"0.43754554",
"0.4370555",
"0.43684652",
"0.43670794",
"0.43557656",
"0.4351863",
"0.43396497",
"0.43326285",
"0.43272883",
"0.43122137",
"0.42945182",
"0.42916486",
"0.4289889",
"0.42891997",
"0.42804492",
"0.42742229",
"0.4259703",
"0.42587376",
"0.4251299",
"0.42373824",
"0.42361736",
"0.42294675",
"0.42290255",
"0.42221007",
"0.42197943",
"0.4194421",
"0.41943812",
"0.41906255",
"0.418883",
"0.41878736",
"0.41843024",
"0.41838518",
"0.41814712"
]
| 0.56810457 | 2 |
Unlink all edges between both objects with the given label | @Override
public void setUniqueLinkOutTo(VertexFrame vertex, String... labels) {
unlinkOut(vertex, labels);
// Create a new edge with the given label
linkOut(vertex, labels);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void drawUndirectedEdge(String label1, String label2) {\n }",
"void removeLabel(Object oldLabel);",
"void removeLabel(Object oldLabel);",
"public void setUniqueLinkInTo(VertexFrame vertex, String... labels) {\n\t\t// Unlink all edges between both objects with the given label\n\t\tunlinkIn(vertex, labels);\n\t\t// Create a new edge with the given label\n\t\tlinkIn(vertex, labels);\n\t}",
"void unsetLabel();",
"@Override\n\t\tpublic void removeLabel(Label label) {\n\n\t\t}",
"public void setSingleLinkOutTo(VertexFrame vertex, String... labels) {\n\t\t// Unlink all edges with the given label\n\t\tunlinkOut(null, labels);\n\t\t// Create a new edge with the given label\n\t\tlinkOut(vertex, labels);\n\t}",
"public boolean removeEdge(String label1, String label2)\n\t{\n\t\tif(isAdjacent(label1, label2)) //if edge exists remove it\n\t\t{\n\t\t\tDSAGraphVertex vx1 = getVertex(label1), vx2 = getVertex(label2);\n\t\t\tvx1.removeEdge(vx2);\n\t\t\tvx2.removeEdge(vx1);\n\t\t\tedgeCount--;\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"void unsetFurtherRelations();",
"public void unassociate(Node otherNode, QName associationTypeQName, Directionality directionality);",
"void removeEdge(int x, int y);",
"@Override\n public void unhighlight() {\n\n // @tag ADJACENT : Removed highlight adjacent\n // boolean highlightedAdjacently = (highlighted == HIGHLIGHT_ADJACENT);\n if (highlighted == HIGHLIGHT_NONE) {\n return;\n }\n // @tag ADJACENT : Removed highlight adjacent\n /*\n * if (!highlightedAdjacently) { // IF we are highlighted as an adjacent\n * node, we don't need to deal // with our connections. if\n * (ZestStyles.checkStyle(getNodeStyle(),\n * ZestStyles.NODES_HIGHLIGHT_ADJACENT)) { // unhighlight the adjacent\n * edges for (Iterator iter = sourceConnections.iterator();\n * iter.hasNext();) { GraphConnection conn = (GraphConnection)\n * iter.next(); conn.unhighlight(); if (conn.getDestination() != this) {\n * conn.getDestination().unhighlight(); } } for (Iterator iter =\n * targetConnections.iterator(); iter.hasNext();) { GraphConnection conn\n * = (GraphConnection) iter.next(); conn.unhighlight(); if\n * (conn.getSource() != this) { conn.getSource().unhighlight(); } } } }\n */\n if (parent.getItemType() == GraphItem.CONTAINER) {\n ((GraphContainer) parent).unhighlightNode(this);\n } else {\n ((Graph) parent).unhighlightNode(this);\n }\n highlighted = HIGHLIGHT_NONE;\n updateFigureForModel(nodeFigure);\n\n }",
"@Test\n public void testWithUnknownLabel() throws Exception {\n LogicalGraph socialGraph = getSocialNetworkLoader().getLogicalGraph();\n LogicalGraph result = socialGraph\n .callForGraph(new VertexDeduplication<>(\"NotInTheGraph\", Arrays.asList(\"a\", \"b\")));\n collectAndAssertTrue(socialGraph.equalsByData(result));\n }",
"private Label removeLabel(Label l) {\n \t\tLabel ret = (Label) l.next;\n \t\tmLabels = (Label) mPool.release(mLabels, l);\n \n \t\treturn ret;\n \t}",
"void removeEdge(Vertex v1, Vertex v2) throws GraphException;",
"public void removeEdge(int start, int end);",
"private GraphRemovalUndo removeAxiomEdgesOf(Graph<String, DefaultEdge> g,\n\t\t\tMap<DefaultEdge, Set<OWLAxiom>> createdByAxioms, Map<DefaultEdge, Set<OWLAxiom>> labels, DefaultEdge edge) {\n\n\t\tMap<OWLAxiom, Set<DefaultEdge>> axiomToEdges = getAxiomToEdges(createdByAxioms);\n\n\t\t// Instantiate a graphremoval class (which allows to undo the removal9\n\t\tGraphRemovalUndo remover = new GraphRemovalUndo(g);\n\n\t\t// For each axiom of the edge\n\t\tfor (OWLAxiom ax : createdByAxioms.get(edge)) {\n\t\t\t// For each edge that was created by this axiom\n\t\t\tfor (DefaultEdge e : axiomToEdges.get(ax)) {\n\t\t\t\t// remove the axiom from the label\n\t\t\t\tif (labels.containsKey(e)) {\n\t\t\t\t\tlabels.get(e).remove(ax);\n\t\t\t\t}\n\t\t\t\t// If this was the last axiom of the edge, remove it\n\t\t\t\tif (createdByAxioms.get(e).size() < 1) {\n\t\t\t\t\tcreatedByAxioms.remove(e);\n\t\t\t\t\tremover.removeEdge(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Remove all nested class expressions of the axiom\n\t\t\tax.nestedClassExpressions().forEach(nested -> {\n\t\t\t\tremover.removeVertex(OntologyDescriptor.getCleanNameOWLObj(nested));\n\t\t\t});\n\n\t\t\t// Remember which axioms where removed\n\t\t\tremover.saveAxiom(ax);\n\t\t}\n\n\t\treturn remover;\n\n\t}",
"@Override\r\n\tpublic boolean unlink(E src, E dst) {\r\n\t\tVertex<E> s = vertices.get(src);\r\n\t\tVertex<E> d = vertices.get(dst);\r\n\t\tif(s != null && d != null) {\r\n\t\t\tadjacencyLists.get(src).remove(new Edge<E>(s.getElement(), d.getElement(), 1)); //remove edge (s,d)\r\n\t\t\tif(!isDirected) { //Remove the other edge if this graph is undirected\r\n\t\t\t\tadjacencyLists.get(dst).remove(new Edge<E>(d.getElement(), s.getElement(), 1));\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public void setSingleLinkInTo(VertexFrame vertex, String... labels) {\n\t\t// Unlink all edges with the given label\n\t\tunlinkIn(null, labels);\n\t\t// Create a new edge with the given label\n\t\tlinkIn(vertex, labels);\n\t}",
"protected GraphSubEdge (Object label)\n {\n this.label = label;\n mark = false;\n }",
"public void removeAllEdges() {\n }",
"public abstract void removeEdge(int from, int to);",
"void removeDirectedEdge(final Node first, final Node second)\n {\n if (first.connectedNodes.contains(second))\n first.connectedNodes.remove(second);\n\n }",
"ILinkDeleterActionBuilder<SOURCE_BEAN_TYPE, LINKED_BEAN_TYPE> setLinkedEntityLabelSingular(String label);",
"public void unlinkLR()\n {\n this.L.R = this.R;\n this.R.L = this.L;\n }",
"private static void stripTrivialCycles(CFG cfg) {\n\t\tCollection<SDGEdge> toRemove = new LinkedList<SDGEdge>();\n\t\tfor (SDGEdge e : cfg.edgeSet()) {\n\t\t\tif (e.getSource().equals(e.getTarget())) {\n\t\t\t\ttoRemove.add(e);\n\t\t\t}\n\t\t}\n\t\t\n\t\tcfg.removeAllEdges(toRemove);\n\t}",
"public void clearLabelRecs()\n {\n multiLabel = null;\n }",
"public void unassociate(Node targetNode, QName associationTypeQName);",
"String removeLabel(String label);",
"public boolean removeEdge(V source, V target);",
"public void delIncomingRelations();",
"@DisplayName(\"Delete undirected edges\")\n @Test\n public void testDeleteEdgeUndirected() {\n graph.deleteEdge(new Edge(0, 1));\n Assertions.assertEquals(1, graph.getNeighbours(0).size());\n Assertions.assertEquals(1, graph.getNeighbours(1).size());\n }",
"public void removeSemanticLink(IBusinessObject dest, LinkKind type)\n throws OculusException;",
"private void edgeDown(String source, String dest) {\r\n\t\tVertex v = vertexMap.get(source);\r\n\t\tfor (Iterator i = v.adjacent.iterator(); i.hasNext();) {\r\n\t\t\tEdge edge = (Edge) i.next();\r\n\t\t\tif (edge.getDestination().equals(dest))\r\n\t\t\t\tedge.setStatus(false);\r\n\t\t}\r\n\t}",
"private void clearEdgeLinks() {\n edges.clear();\n //keep whole tree to maintain its position when it is expanded (within scroll pane bounds)\n Node rootNode = nodes.get(0);\n VBox rootVBox = (VBox) rootNode.getContainerPane().getParent();\n rootVBox.layout();\n Bounds rootNodeChildrenVBoxBounds = rootNode.getChildrenVBox().getBoundsInLocal();\n rootVBox.setLayoutY(Math.abs(rootVBox.getLayoutY() - ((rootNodeChildrenVBoxBounds.getHeight()) - rootNode.getHeight()) / 2 + rootNode.getLayoutY()));\n rootVBox.layout();\n\n for (int i = 0; i < nodes.size(); i++) {\n Pane containerPane = nodes.get(i).getContainerPane();\n //reposition node to the center of its children\n ObservableList<javafx.scene.Node> genericNodes = nodes.get(i).getChildrenVBox().getChildren();\n if (!genericNodes.isEmpty()) {\n nodes.get(i).setLayoutY(((nodes.get(i).getChildrenVBox().getBoundsInLocal().getHeight()) - rootNode.getHeight()) / 2);\n }\n\n for (int j = 0; j < containerPane.getChildren().size(); j++) {\n if (containerPane.getChildren().get(j) instanceof Edge) {\n containerPane.getChildren().remove(j);\n j--;\n }\n }\n }\n redrawEdges(rootNode);\n }",
"public void unsetIntersectingRoadwayRef()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(INTERSECTINGROADWAYREF$20);\r\n }\r\n }",
"public void branchChainTo(Label label) {\n // do nothing by default\n }",
"public void unlinkUD()\n {\n this.U.D = this.D;\n this.D.U = this.U;\n }",
"private void removeEdgeJointPointSource(Vector<Edge> edges) {\n\t\tfor (Edge e: edges) {\n\t\t\tEdge currentEdge = e;\n\t\t\tremoveEdge(e);\n\t\t\twhile (shapes.contains(currentEdge.getSource()) && currentEdge.getSource() instanceof JoinPoint) {\n\t\t\t\tJoinPoint join = (JoinPoint) currentEdge.getSource();\n\t\t\t\tshapes.remove(join);\n\t\t\t\tcurrentEdge = (Edge) join.getSource();\n\t\t\t\tremoveEdge(currentEdge);\n\t\t\t}\n\t\t}\n\t}",
"public void removeVertex(String vertLabel) {\n\n // Implement me!\n if (indexOf(vertLabel, vertices) <0) {\n return;\n }\n vertices.remove(vertLabel);\n Iterator<String> iterator = edges.keySet().iterator();\n while (iterator.hasNext()) {\n String k = iterator.next();\n if (k.contains(vertLabel)) {\n iterator.remove();\n edges.remove(k);\n }\n }\n }",
"public void testRemoveEdgeObjectObject( ) {\n init( ); //TODO Implement removeEdge().\n }",
"private static void RemoveEdge(Point a, Point b)\n {\n //Here we use a lambda expression/predicate to express that we're looking for a match in list\n //Either if (n.A == a && n.B == b) or if (n.A == b && n.B == a)\n edges.removeIf(n -> n.A == a && n.B == b || n.B == a && n.A == b);\n }",
"void removeEdges(List<CyEdge> edges);",
"public void unCover() {\n linkLR();\n DataNode tmp = this.U;\n while (tmp != this) {\n //select each row and go through all the left nodes and link from respective columns.\n DataNode l = tmp.L;\n while (l!= tmp) {\n l.linkUD();\n l.C.count++;\n l = l.L;\n }\n tmp = tmp.U;\n }\n }",
"public boolean resetEdges();",
"void remove(Edge edge);",
"public void clearLabels() {\n\t\talLabels.clear();\n\t\talLeftContainers.clear();\n\t\talRightContainers.clear();\n\t\tiMaxSegmentDepth = 0;\n\t}",
"ILinkDeleterActionBuilder<SOURCE_BEAN_TYPE, LINKED_BEAN_TYPE> setLinkedEntityLabelPlural(String label);",
"private void deleteConnections() {\n for (int i = 0; !this.sourceConnections.isEmpty(); ) {\n LinkElement wire = (LinkElement) this.sourceConnections.get(i);\n wire.detachSource();\n wire.detachTarget();\n this.graphElement.removeEdge(wire.getEdgeId(), wire);\n }\n\n for (int i = 0; !this.targetConnections.isEmpty(); ) {\n LinkElement wire = (LinkElement) this.targetConnections.get(i);\n wire.detachSource();\n wire.detachTarget();\n this.graphElement.removeEdge(wire.getEdgeId(), wire);\n }\n }",
"void detachFromGraphView();",
"void setEdgeLabel(int edge, String label);",
"public void deletelink(Integer linkId);",
"private void deleteEdge(String source, String dest) {\r\n\t\tVertex v = vertexMap.get(source);\r\n\t\tfor (Iterator i = v.adjacent.iterator(); i.hasNext();) {\r\n\t\t\tEdge edge = (Edge) i.next();\r\n\t\t\tif (edge.getDestination().equals(dest)) {\r\n\t\t\t\tv.adjacent.remove(edge);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@PortedFrom(file = \"Taxonomy.h\", name = \"clearCheckedLabel\")\n protected void clearVisited() {\n visitedLabel++;\n }",
"void removeNeighbor(IsisNeighbor isisNeighbor);",
"public void relinkUD()\n {\n this.U.D = this.D.U = this;\n }",
"public void removeEdge(Vertex other) {\n edges.remove(other);\n other.edges.remove(this);\n }",
"public void removeConceptLabel(ConceptLabel lbl) {\n\t\tSystem.out.println(\"removing \"+lbl+\" ..\");\n\t\t\n\t\tlbl.setDeleted(true);\n\t\t// tokens.remove(lbl);\n\t\t// System.out.println(\"- \"+tokens);\n\t}",
"private void removeEdges()\r\n\t{\r\n\t final String edgeTypeName = edgeType.getName();\r\n\t for (final Edge e : eSet)\r\n\t\te.getSource().removeEdge(edgeTypeName, e.getDest());\r\n\t eSet.clear();\r\n\t}",
"void remove(String label) throws IOException;",
"private void removeEdgeJointPointDest(Vector<Edge> edges) {\n\t\tfor (Edge e: edges) {\n\t\t\t\tEdge currentEdge = e;\n\t\t\t\tremoveEdge(e);\n\t\t\t\twhile (shapes.contains(currentEdge.getDest()) && currentEdge.getDest() instanceof JoinPoint) {\n\t\t\t\t\tJoinPoint join = (JoinPoint) currentEdge.getDest();\n\t\t\t\t\tshapes.remove(join);\n\t\t\t\t\tcurrentEdge = (Edge) join.getDest();\n\t\t\t\t\tremoveEdge(currentEdge);\n\t\t\t\t}\n\t\t}\n\t}",
"public void removeEdge(String edgeTypeName, Node source, Node dest)\r\n {\r\n\tfinal EdgeTypeHolder eth = ethMap.get(edgeTypeName);\r\n\tif(eth!=null) eth.removeEdge(source, dest);\r\n\t// Invalidate the Edge array cache.\r\n\tedges = null;\r\n }",
"void deleteLabel(@Nonnull final Label label, @Nonnull final Telegraf telegraf);",
"@PortedFrom(file = \"Taxonomy.h\", name = \"deFinalise\")\n public void deFinalise() {\n boolean upDirection = true;\n TaxonomyVertex bot = getBottomVertex();\n for (TaxonomyVertex p : bot.neigh(upDirection)) {\n p.removeLink(!upDirection, bot);\n }\n bot.clearLinks(upDirection);\n willInsertIntoTaxonomy = true; // it's possible again to add entries\n }",
"void downgradeLastEdge();",
"public void filterToBidirectionalLinks() {\n RTGraphComponent.RenderContext myrc = (RTGraphComponent.RenderContext) getRTComponent().rc; if (myrc == null) return;\n\n // Get the visible links, extract the direction, create the reverse direction -- if that exists, add those records to keepers\n Iterator<String> it = myrc.graphedgeref_to_link.keySet().iterator(); Set<Bundle> to_keep = new HashSet<Bundle>();\n while (it.hasNext()) {\n String graph_edge_ref = it.next(); String line_ref = myrc.graphedgeref_to_link.get(graph_edge_ref);\n int fm_i = digraph.linkRefFm(graph_edge_ref);\n int to_i = digraph.linkRefTo(graph_edge_ref);\n String other_dir = digraph.getLinkRef(to_i,fm_i);\n if (myrc.graphedgeref_to_link.containsKey(other_dir)) { to_keep.addAll(myrc.link_counter_context.getBundles(line_ref)); }\n }\n\n // Add the no mapping set and push it to the RTParent\n to_keep.addAll(getRTComponent().getNoMappingSet()); getRTParent().push(getRTParent().getRootBundles().subset(to_keep));\n }",
"public void removeDups(Instance instance) {\n ArrayList<Instance> toRemove = backRelation.get(instance);\n if(toRemove == null)\n return;\n for (Instance remove : toRemove) {\n relatedInstances.get(remove).remove(instance);\n toLink.remove(remove.getId());\n }\n backRelation.remove(instance);\n\n }",
"public void removeEdge(Entity entityFirst, Entity entitySecond) {\n\t\tif(Processing.friendMap.containsKey(entityFirst.getEmail())) {\n\t\t\tif(Processing.friendMap.get(entityFirst.getEmail()).contains(entitySecond.getEmail())) {\n\t\t\t\tProcessing.friendMap.get(entityFirst.getEmail()).remove(entitySecond.getEmail());\n\t\t\t\tSystem.out.println(entitySecond.getEmail()+\" is removed from your Friend list\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(entitySecond.getEmail()+\" is not friend of you\");\n\t\t\t}\n\t\t\t\n\t\t}else {\n\t\t\tSystem.out.println(entityFirst.getEmail()+\" does not exist\");\n\t\t}\n\t}",
"StopLabel getLabel();",
"public void deleteEdge( String sourceName, String destName)\n {\n \tVertex v = vertexMap.get( sourceName );\n Vertex w = vertexMap.get( destName );\n if(v!=null && w!=null)\n \tv.adjEdge.remove(w.name);\n \n // v.weightnext.put(w.name,(Double) distance);\n }",
"public final void clearEdgeAnnotations() {\n for (GraphEdge<N, E> e : getEdges()) {\n e.setAnnotation(null);\n }\n }",
"public void uncover ()\n {\n for (DancingNode i=this.U; i!=this; i=i.U) // go up the column\n {\n for (DancingNode j=i.L; j!=i; j=j.L) // go left across the row \n {\n j.C.size++;\n j.relinkUD();\n }\n }\n this.relinkLR();\n }",
"public void subsetOneBundlePerEdge() {\n Set<Bundle> set = new HashSet<Bundle>();\n for (int ent_i=0;ent_i<digraph.getNumberOfEntities();ent_i++) {\n for (int i=0;i<digraph.getNumberOfNeighbors(ent_i);i++) {\n int nbor_i = digraph.getNeighbor(ent_i,i);\n\tIterator<Bundle> it = digraph.linkRefIterator(digraph.linkRef(ent_i,nbor_i));\n\tset.add(it.next());\n }\n }\n getRTParent().push(getRTParent().getRootBundles().subset(set));\n }",
"public boolean removeEdge(V tail, V head);",
"private void removeNoMoreExistingOriginalNodes() {\n for (Node mirrorNode : mirrorGraph.nodes()) {\n if (!isPartOfMirrorEdge(mirrorNode) && !originalGraph.has(mirrorNode)) {\n mirrorGraph.remove(mirrorNode);\n }\n }\n }",
"private void removeNoMoreExistingOriginalEdges() {\n for (MirrorEdge mirrorEdge : directEdgeMap.values()) {\n if (!originalGraph.has(mirrorEdge.original)) {\n for (Edge segment : mirrorEdge.segments) {\n mirrorGraph.forcedRemove(segment);\n reverseEdgeMap.remove(segment);\n }\n for (Node bend : mirrorEdge.bends) {\n mirrorGraph.forcedRemove(bend);\n reverseEdgeMap.remove(bend);\n }\n directEdgeMap.remove(mirrorEdge.original);\n }\n }\n }",
"@Test\n\tpublic void testRemoveLinkWithInverse() {\n\t\tAddress adr = new Address();\n\t\tadr.getType().setIdGenerator(new IdGeneratorNumeric());\n\t\tAssert.assertEquals(1, ((IdNumeric) adr.getId()).getNumber());\n\t\tPerson martin = new Person(\"\\\"Martin\\\" \\\"Bl�mel\\\" \\\"19641014\\\"\");\n\t\tPerson jojo = new Person(\"\\\"Johannes\\\" \\\"Bl�mel\\\" \\\"19641014\\\"\");\n\t\tadr.addInhabitant(martin);\n\t\tadr.addInhabitant(jojo);\n\n\t\tadr.removeInhabitant(jojo);\n\n\t\tAssert.assertEquals(1, adr.getInhabitants().size());\n\t\tIterator<?> iter = adr.getInhabitants().iterator();\n\t\tAssert.assertSame(martin, iter.next());\n\t\tAssert.assertSame(adr, martin.getAddress());\n\t\tAssert.assertNull(jojo.getAddress());\n\n\t\t// removing last link via remove link produces\n\t\t// an empty collection but no null value\n\t\tadr.removeInhabitant(martin);\n\n\t\tAssert.assertEquals(0, adr.getInhabitants().size());\n\t\tAssert.assertNull(jojo.getAddress());\n\t\tAssert.assertNull(martin.getAddress());\n\t}",
"public void setNodesToUnvisited(){\n for(GraphNode node: graphNode){\n if(node.visited){\n node.visited = false;\n }\n }\n }",
"public void onUnlink()\n {\n getTextArea().setFocus(true);\n// clientJupiter.generate(treeOperationFactory.createLink(clientJupiter.getSiteId(),\n// getTextArea().getDocument().getSelection().getRangeAt(0), linkConfig.getUrl()));\n Console.getInstance().log(\"RTP: onUnlink\");\n }",
"public abstract void removeEdge(Point p, Direction dir);",
"public boolean findInEdge(String label){\n\t\tfor(Entry<String, LinkedList<Edge>> s: vertices.entrySet()){\n\t\t\tfor(int i=0; i < vertices.get(s.getKey()).size();i++){\n\t\t\t\tif(vertices.get(s.getKey()).get(i).getDLabel().equals(label)){\n\t\t\t\t\tdelEdge(s.getKey(),label);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"private void addEdgeWithLabel(NasmInst source, NasmLabel destination) {\n if (source == null || destination == null)\n throw new FgException(\"ERROR: Can't create an edge without a source and a destination\");\n\n if (systemCalls.contains(destination.toString()))\n return; // System call: iprintLF, readline or atoi. No edge needed\n\n NasmInst destinationInst = label2Inst.get(destination.toString());\n if (destinationInst == null)\n throw new FgException(\"ERROR: No instruction matching with the given label\");\n addEdgeWithInst(source, destinationInst);\n }",
"public void setUnlabeledInstance(Instance inst){\n\t\tthis._unlabeledInstance = inst;\n\t}",
"public void removeEdgeFrom(char v) {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tNeighbor neighbor = currentVertex.inList.get(i);\r\n\t\t\tif (neighbor.vertex.label == v) {\r\n\t\t\t\t// remove from neighbor's outList\r\n\t\t\t\tneighbor.vertex.outList.remove(findNeighbor(neighbor.vertex.outList, currentVertex.label)); \t\t\r\n\t\t\t\tcurrentVertex.inList.remove(neighbor); // remove from current's inList\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Edge from \" + v + \" does not exist.\");\r\n\t}",
"private void removeEdge(Edge edge) {\n\t\tshapes.remove(edge);\n\t\tshapes.remove(edge.getEdgeLabel());\n\t\tremove(edge.getEdgeLabel());\n\t}",
"public static void mergeOutEdge(Vertex res, Vertex src) {\n res.outEdges.addAll(src.outEdges);\n }",
"public synchronized void remove(E object) {\n Node<E> temp = first;\n while (temp.next != null) {\n if (first.object.equals(object)) {\n first = first.next;\n } else if (temp.object.equals(object)) {\n Node<E> forChangeLinks = temp;\n temp.next.prev = temp.prev;\n temp.prev.next = temp.next;\n }\n temp = temp.next;\n }\n }",
"@DisplayName(\"Delete directed edges\")\n @Test\n public void testDeleteEdgeDirected() {\n boolean directed1 = true;\n graph = new Graph(edges, directed1, 0, 5, GraphType.RANDOM);\n graph.deleteEdge(new Edge(0, 1));\n Assertions.assertTrue(graph.getNeighbours(0).isEmpty());\n }",
"public void unpin();",
"public void unpin();",
"public void unlinkAll()\n // -end- 3D4FA2190370 head358A5F2B0354 \"unlinkAll\"\n // declare any checked exceptions\n // please fill in/modify the following section\n // -beg- preserve=no 3D4FA2190370 throws358A5F2B0354 \"unlinkAll\"\n\n // -end- 3D4FA2190370 throws358A5F2B0354 \"unlinkAll\"\n {\n // please fill in/modify the following section\n // -beg- preserve=no 3D4FA2190370 body358A5F2B0354 \"unlinkAll\"\n \n clearAttributeDef();\n super.unlinkAll();\n // -end- 3D4FA2190370 body358A5F2B0354 \"unlinkAll\"\n }",
"public void delRelations();",
"public Value joinObject(ObjectLabel objlabel) {\n checkNotPolymorphicOrUnknown();\n if (object_labels != null && object_labels.contains(objlabel))\n return this;\n Value r = new Value(this);\n if (r.object_labels == null)\n r.object_labels = newSet();\n else\n r.object_labels = newSet(r.object_labels);\n r.object_labels.add(objlabel);\n return canonicalize(r);\n }",
"public boolean removeEdge(V tail);",
"public void removeEdge(Node p_a, Node p_b) {\n\t\tEdge edge = makeEdge(p_a, p_b);\n\t\tedges.remove(edge);\n\t}",
"@Override\r\n public void disconnect(V start, V destination) {\r\n try {\r\n Iterator<Vertex> vertexIterator = map.values().iterator();\r\n Vertex a = null, b = null;\r\n while(vertexIterator.hasNext()) {\r\n Vertex v = vertexIterator.next();\r\n if(start.compareTo(v.vertexName) == 0)\r\n a = v;\r\n if(destination.compareTo(v.vertexName) == 0)\r\n b = v;\r\n }\r\n if(a == null || b == null)\r\n vertexIterator.next();\r\n a.removeDestinations(destination);\r\n\r\n } catch(NoSuchElementException e) {\r\n throw e;\r\n }\r\n }",
"public void markIpAddress2Delete() throws JNCException {\n markLeafDelete(\"ipAddress2\");\n }",
"public void markIpAddress2Delete() throws JNCException {\n markLeafDelete(\"ipAddress2\");\n }",
"protected void clearHyperEdgeMap() {\n\n for (String id : this.hyperEdgeMap.keySet()) {\n\n this.ids.remove(id);\n }\n this.hyperEdgeMap.clear();\n }",
"public void removeNeighbours(){\n\t\tgetNeighbours().removeAll(getNeighbours());\n\t}"
]
| [
"0.68854445",
"0.63555723",
"0.63555723",
"0.633745",
"0.6322778",
"0.6207593",
"0.6117543",
"0.60465825",
"0.6022015",
"0.6008137",
"0.60019183",
"0.5968632",
"0.5954932",
"0.58568305",
"0.58296925",
"0.5829602",
"0.579808",
"0.57924044",
"0.5776712",
"0.574593",
"0.57144463",
"0.57079905",
"0.56999415",
"0.56909394",
"0.56784105",
"0.5649945",
"0.5640205",
"0.56275517",
"0.56188107",
"0.5605933",
"0.5562351",
"0.5560438",
"0.55324656",
"0.55257046",
"0.55180585",
"0.5511646",
"0.5510781",
"0.55023474",
"0.5469891",
"0.54561037",
"0.5437701",
"0.5377461",
"0.5375",
"0.53701633",
"0.53644246",
"0.5357999",
"0.53529185",
"0.5351206",
"0.53503543",
"0.53398585",
"0.5327879",
"0.53064257",
"0.52544075",
"0.52467304",
"0.5240508",
"0.5240306",
"0.5224384",
"0.52229476",
"0.5221816",
"0.5218932",
"0.52136284",
"0.5203449",
"0.5200944",
"0.5200782",
"0.52006906",
"0.5190846",
"0.5174906",
"0.51499856",
"0.51363325",
"0.51220965",
"0.5117957",
"0.51151824",
"0.5111675",
"0.51115197",
"0.51092404",
"0.51064193",
"0.5098634",
"0.50975794",
"0.50844616",
"0.5079835",
"0.5077374",
"0.5074883",
"0.50727266",
"0.50693214",
"0.5057287",
"0.5053811",
"0.50535357",
"0.50430983",
"0.503943",
"0.503943",
"0.5035653",
"0.50348526",
"0.50184727",
"0.5016021",
"0.500749",
"0.50056434",
"0.49969754",
"0.49969754",
"0.49947503",
"0.49916676"
]
| 0.59907097 | 11 |
Return the locally stored uuid if possible. Otherwise load it from the graph. | public String getUuid() {
if (uuid == null) {
this.uuid = getProperty("uuid");
}
return uuid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getUUID();",
"UUID getUUID();",
"String getUuid();",
"public java.lang.String getUuid() {\n java.lang.Object ref = uuid_;\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 uuid_ = s;\n return s;\n }\n }",
"public java.lang.String getUuid() {\n java.lang.Object ref = uuid_;\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 uuid_ = s;\n return s;\n }\n }",
"UUID getId();",
"public abstract String getUuid();",
"public java.lang.String getUuid() {\n java.lang.Object ref = uuid_;\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 uuid_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getUuid() {\n java.lang.Object ref = uuid_;\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 uuid_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getLocalUuid() {\r\n return localUuid;\r\n }",
"public java.lang.String getUUID() {\n java.lang.Object ref = uUID_;\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 uUID_ = s;\n }\n return s;\n }\n }",
"UUID getUniqueId();",
"public String getUuid() {\n\t\t// lazy init of UUID\n\t\tif (uuid == null) {\n\t\t\tuuid = UUID.randomUUID().toString();\n\t\t}\n\t\treturn uuid;\n\t}",
"public java.lang.String getUUID() {\n java.lang.Object ref = uUID_;\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 uUID_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public UUID getUuid();",
"UUID id();",
"public java.lang.String getGuid() {\n return localGuid;\n }",
"public Guid getGuid() {\n return localGuid;\n }",
"@Override\n\tpublic String getUuid() {\n\t\treturn null;\n\t}",
"private String getUUID(final String filename) {\n \t\t\tString uuid = uuids.get(filename);\n \t\t\tif (uuid == null) {\n \t\t\t\tuuid = UUID.randomUUID().toString();\n \t\t\t\tuuids.put(filename, uuid);\n \t\t\t}\n \t\t\treturn uuid;\n \t\t}",
"public abstract UUID getId();",
"public com.google.protobuf.ByteString\n getUuidBytes() {\n java.lang.Object ref = uuid_;\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 uuid_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getUuidBytes() {\n java.lang.Object ref = uuid_;\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 uuid_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String uuid() {\n return this.innerProperties() == null ? null : this.innerProperties().uuid();\n }",
"UUID generateRandomUuid();",
"String getUniqueId();",
"public String getId(){\n\t\treturn uuid;\n\t}",
"@Override\n\tpublic UUID getUUID() {\n\t\treturn null;\n\t}",
"com.google.protobuf.ByteString\n getUUIDBytes();",
"UUID getMonarchId();",
"long getUID() throws UidGenerateException;",
"public com.google.protobuf.ByteString\n getUuidBytes() {\n java.lang.Object ref = uuid_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n uuid_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getUuidBytes() {\n java.lang.Object ref = uuid_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n uuid_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public final UUID getUUID(@NonNull String player, boolean expensiveLookups) {\n // If the player is online, give them their UUID.\n // Remember, local data > remote data.\n if (ProxyServer.getInstance().getPlayer(player) != null)\n return ProxyServer.getInstance().getPlayer(player).getUniqueId();\n\n // Check if it exists in the map\n CachedUUIDEntry cachedUUIDEntry = nameToUuidMap.get(player.toLowerCase());\n if (cachedUUIDEntry != null) {\n if (!cachedUUIDEntry.expired())\n return cachedUUIDEntry.getUuid();\n else\n nameToUuidMap.remove(player);\n }\n\n // Check if we can exit early\n if (UUID_PATTERN.matcher(player).find()) {\n return UUID.fromString(player);\n }\n\n if (MOJANGIAN_UUID_PATTERN.matcher(player).find()) {\n // Reconstruct the UUID\n return UUIDFetcher.getUUID(player);\n }\n\n // Let's try Redis.\n try (Jedis jedis = coreAPI.getRedisManager().getResource()) {\n String stored = jedis.hget(\"uuid-cache\", player.toLowerCase());\n if (stored != null) {\n // Found an entry value. Deserialize it.\n CachedUUIDEntry entry = coreAPI.getGson().fromJson(stored, CachedUUIDEntry.class);\n\n // Check for expiry:\n if (entry.expired()) {\n jedis.hdel(\"uuid-cache\", player.toLowerCase());\n // Doesn't hurt to also remove the UUID entry as well.\n jedis.hdel(\"uuid-cache\", entry.getUuid().toString());\n } else {\n nameToUuidMap.put(player.toLowerCase(), entry);\n uuidToNameMap.put(entry.getUuid(), entry);\n return entry.getUuid();\n }\n }\n\n // That didn't work. Let's ask Mojang.\n if (!expensiveLookups)\n return null;\n\n Map<String, UUID> uuidMap1;\n try {\n uuidMap1 = new UUIDFetcher(Collections.singletonList(player)).call();\n } catch (Exception e) {\n coreAPI.getLogger().log(Level.SEVERE, \"Unable to fetch UUID from Mojang for \" + player, e);\n return null;\n }\n for (Map.Entry<String, UUID> entry : uuidMap1.entrySet()) {\n if (entry.getKey().equalsIgnoreCase(player)) {\n persistInfo(entry.getKey(), entry.getValue(), jedis);\n return entry.getValue();\n }\n }\n } catch (JedisException e) {\n coreAPI.getLogger().log(Level.SEVERE, \"Unable to fetch UUID for \" + player, e);\n }\n\n return null; // Nope, game over!\n }",
"public static synchronized String getUID() throws UnknownHostException, SocketException {\r\n \r\n // Initialized MAC address if necessary.\r\n if (!initialized) {\r\n initialized = true;\r\n macAddress = UMROMACAddress.getMACAddress();\r\n macAddress = Math.abs(macAddress);\r\n }\r\n \r\n // Use standard class to get unique values.\r\n String guidText = new UID().toString();\r\n \r\n StringTokenizer st = new StringTokenizer(guidText, \":\");\r\n \r\n int unique = Math.abs(Integer.valueOf(st.nextToken(), 16).intValue());\r\n long time = Math.abs(Long.valueOf(st.nextToken(), 16).longValue());\r\n // why add 0x8000 ? because usually starts at -8000, which wastes 4 digits\r\n int count = Math\r\n .abs(Short.valueOf(st.nextToken(), 16).shortValue() + 0x8000);\r\n \r\n // concatenate values to make it into a DICOM GUID.\r\n String guid = UMRO_ROOT_GUID + macAddress + \".\" + unique + \".\" + time\r\n + \".\" + count;\r\n \r\n return guid;\r\n }",
"@java.lang.Override\n public java.lang.String getGuid() {\n java.lang.Object ref = guid_;\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 guid_ = s;\n return s;\n }\n }",
"String getRepositoryUUID();",
"public com.google.protobuf.ByteString\n getUUIDBytes() {\n java.lang.Object ref = uUID_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n uUID_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public static String safeCreateUUID() {\n synchronized (EventProcessorHost.uuidSynchronizer) {\n final UUID newUuid = UUID.randomUUID();\n return newUuid.toString();\n }\n }",
"public String getUuid()\n {\n return this.uuid;\n }",
"public String getUUID() {\n return uuid;\n }",
"public com.google.protobuf.ByteString\n getUUIDBytes() {\n java.lang.Object ref = uUID_;\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 uUID_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String getUuid() {\r\n return uuid;\r\n }",
"public String getUuid() {\r\n return uuid;\r\n }",
"public String getUuid() {\r\n return uuid;\r\n }",
"private String generateUniqueIdString() {\r\n return TimeBasedUUID.getUUIDAsString();\r\n }",
"public String getUuid() {\n return uuid;\n }",
"public String getUuid() {\n return uuid;\n }",
"public String getUuid() {\n return uuid;\n }",
"public String getUuid() {\n return uuid;\n }",
"public String getUuid() {\n return uuid;\n }",
"public String getUuid() {\n return uuid;\n }",
"public String getUuid() {\n return uuid;\n }",
"public String getUuid() {\n return uuid;\n }",
"public String getUuid() {\n return uuid;\n }",
"public String getUuid() {\n return uuid;\n }",
"public static String getDeviceUUID(){\n BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();\n String uuid = adapter.getAddress();\n return uuid;\n }",
"public java.lang.String getUuid() {\n return uuid;\n }",
"public String getUserUuid() throws SystemException;",
"public String getUserUuid() throws SystemException;",
"public String getUserUuid() throws SystemException;",
"public String getUserUuid() throws SystemException;",
"public Integer getUuid() {\n return uuid;\n }",
"public UUID getWalletId();",
"public java.lang.String getGuid() {\n java.lang.Object ref = guid_;\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 guid_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getUuid() {\n\t\treturn uuid;\n\t}",
"String generateUID();",
"public String getUuid() {\n return this.uuid;\n }",
"String getExistingId();",
"private String getGuid(Vertex vertex) {\n GraphTraversalSource g = graphFactory.getGraphTraversalSource();\n String guid = g.V(vertex.id()).elementMap(PROPERTY_KEY_ENTITY_GUID).toList().get(0).get(PROPERTY_KEY_ENTITY_GUID).toString();\n commitTransaction(g);\n return guid;\n }",
"String getUid();",
"@Override\n public long getUUID() {\n return endpointHandler.getUUID();\n }",
"public String myNodeId() {\n\t\tif (nodeId == null) {\n\t\t\tnodeId = UUID.randomUUID();\n\t\t\tLOG.debug(\"My node id=\" + nodeId.toString());\n\t\t}\n\n\t\treturn nodeId.toString();\n\t}",
"public long getUuid_() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readInt64(__io__address + 0);\n\t\t} else {\n\t\t\treturn __io__block.readInt64(__io__address + 0);\n\t\t}\n\t}",
"@PrePersist\n public void assignUUID() {\n this.uid = UUID.randomUUID();\n }",
"public String getUuid() {\n return _uuid;\n }",
"@NonNull\n public final synchronized String getId() {\n if (id == null) {\n id = UUID.randomUUID().toString();\n }\n return id;\n }",
"public static String getUUID() {\n\t\treturn UUID.randomUUID().toString().toUpperCase().replace(\"-\", \"\").substring(0, 5);\n\t}",
"public String RtoosGetID() \n\t{\n\t\treturn UUIDs.random().toString();\n\t}",
"@Override\n\tpublic java.lang.String getUuid() {\n\t\treturn _second.getUuid();\n\t}",
"java.lang.String getUid();",
"java.lang.String getUid();",
"UUID primaryFormat();",
"public static String getUniqueIdentifier() {\r\n UUID uuid = UUID.randomUUID();\r\n return uuid.toString();\r\n }",
"@Override\n\tpublic String getUuid() {\n\t\treturn model.getUuid();\n\t}",
"@Override\n\tpublic String getUuid() {\n\t\treturn model.getUuid();\n\t}",
"@Override\n\tpublic String getUuid() {\n\t\treturn model.getUuid();\n\t}",
"public String gerarUID() {\n //String id1 = UUID.randomUUID().toString().replace(\"-\", \"\");\n String id1 = UUID.randomUUID().toString();\n return id1;\n }",
"UUID getDeviceId();",
"public String getUUID () \n\t{\n\t\treturn (String)get_Value(COLUMNNAME_UUID);\n\t}",
"@Override\n\tpublic String getUserUuid();",
"@Override\n\tpublic String getUserUuid();",
"public String getLocalId() {\n\t\treturn null;\n\t}",
"public UUID getUuid() { return uuid; }",
"com.google.protobuf.ByteString getUidBytes();",
"V get(UniqueId uniqueId);",
"public static String getTempUniqueNode()\n\t{\n\t\treturn sTempUniqueNode;\n\t}",
"@Nullable\n\tprivate static String getStoredRegistrationId() {\n\t\tfinal String registrationId = readGcmRegistrationId();\n\t\tif (registrationId == null) {\n\t\t\tAppLog.i(TAG, \"Registration not found.\");\n\t\t\treturn null;\n\t\t}\n\n\t\t// Check if app was updated; if so, it must clear the registration ID\n\t\t// since the existing regID is not guaranteed to work with the new\n\t\t// app version.\n\t\tfinal int registeredVersionCode = Preferences.getInt(Prefkey.gcm_last_app_version_code, Integer.MIN_VALUE);\n\t\tfinal int currentVersionCode = App.getVersionCode();\n\t\tif (registeredVersionCode != currentVersionCode) {\n\t\t\tAppLog.i(TAG, \"App version changed from \" + registeredVersionCode + \" to \" + currentVersionCode);\n\t\t\treturn null;\n\t\t}\n\n\t\treturn registrationId;\n\t}",
"public interface UuidHolder {\n String getUuid();\n void setUuid(String uuid);\n}",
"public UUID nodeId();"
]
| [
"0.6474726",
"0.6455711",
"0.63765955",
"0.6289469",
"0.6289469",
"0.6203792",
"0.6196748",
"0.61810493",
"0.61810493",
"0.6165563",
"0.6100952",
"0.60975456",
"0.6089303",
"0.6067552",
"0.60237163",
"0.591044",
"0.5814143",
"0.57995343",
"0.57964885",
"0.5796414",
"0.5786154",
"0.5733662",
"0.5733662",
"0.57070315",
"0.5696673",
"0.568711",
"0.56762266",
"0.56469554",
"0.5643131",
"0.56421846",
"0.5624139",
"0.561169",
"0.561169",
"0.56113774",
"0.5609052",
"0.5607771",
"0.5582007",
"0.5549791",
"0.5538403",
"0.5536035",
"0.5520234",
"0.55132395",
"0.55096763",
"0.55096763",
"0.55096763",
"0.55085933",
"0.5507384",
"0.5507384",
"0.5507384",
"0.5507384",
"0.5507384",
"0.5507384",
"0.5507384",
"0.5507384",
"0.5507384",
"0.5507384",
"0.5502098",
"0.54964495",
"0.5492802",
"0.5492802",
"0.5492802",
"0.5492802",
"0.54832774",
"0.54801255",
"0.54690987",
"0.54619163",
"0.5450746",
"0.5441522",
"0.54404473",
"0.5438917",
"0.54373425",
"0.5436292",
"0.5431512",
"0.54189414",
"0.5418514",
"0.54175264",
"0.5415269",
"0.54132015",
"0.5411848",
"0.54100966",
"0.540835",
"0.540835",
"0.5391162",
"0.53883547",
"0.5360219",
"0.5360219",
"0.5360219",
"0.5358025",
"0.5353192",
"0.5321586",
"0.5319673",
"0.5319673",
"0.53136265",
"0.5312733",
"0.53108907",
"0.53094",
"0.5306212",
"0.53039205",
"0.52859515",
"0.5268468"
]
| 0.5925405 | 15 |
TODO FIXME We should store the element reference in a thread local map that is bound to the transaction. The references should be removed once the transaction finishes | @Override
public Vertex getElement() {
FramedGraph fg = Tx.getActive().getGraph();
if (fg == null) {
throw new RuntimeException(
"Could not find thread local graph. The code is most likely not being executed in the scope of a transaction.");
}
Vertex vertexForId = fg.getVertex(id);
if (vertexForId == null) {
throw new RuntimeException("No vertex for Id {" + id + "} could be found within the graph");
}
Element vertex = ((WrappedVertex) vertexForId).getBaseElement();
// Unwrap wrapped vertex
if (vertex instanceof WrappedElement) {
vertex = (Vertex) ((WrappedElement) vertex).getBaseElement();
}
return (Vertex) vertex;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public TransactionalElement<E> commit();",
"@Test\n public void existingTransaction() {\n Transaction t1 = startTransaction();\n IntRef intValue = new IntRef(10);\n t1.commit();\n\n Transaction t2 = startTransaction();\n assertEquals(10, intValue.get());\n\n intValue.inc();\n assertEquals(11, intValue.get());\n t2.commit();\n }",
"CollectionReferenceElement createCollectionReferenceElement();",
"@Override\n\t\tpublic WebElementFacade getUniqueElementInPage() {\n\t\t\treturn null;\n\t\t}",
"public TransactionProcessor(AtomicReference<Store> ref){\r\n this.storeRef = ref;\r\n }",
"public void addToPolicyTransactions(entity.AppCritPolicyTransaction element);",
"@Override\r\n\t@Transactional\r\n\tpublic Transactions getTransaction() {\r\n\r\n\t\tArrayList<Transactions> closedTransactions=null;\r\n\t\tif(closedTransactions == null)\r\n\t\t{\r\n\t\tclosedTransactions = new ArrayList<Transactions>();\r\n\t\tclosedTransactions = this.getClosedTransactions();\r\n\t\t}\r\n\r\n\r\n\t\tif (index < closedTransactions.size()) {\r\n\t\t\tTransactions transaction = closedTransactions.get(index++);\r\n\t\t\treturn transaction;\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void joinTransaction() {\n\t\t\n\t}",
"protected abstract Object getTransactionObject() throws TransactionInfrastructureException;",
"@Test\n public void test126() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"e\");\n xmlEntityRef0._clear();\n assertEquals(\"e\", xmlEntityRef0.getComponentId());\n }",
"Transaction getCurrentTransaction();",
"Transaction getTransaction() { \r\n return tx;\r\n }",
"public AtomicReference<LocatableInquiry> getReferenceGroundItemInquiry();",
"protected void sequence_ElementList_Expression_KeyedElement(ISerializationContext context, Expression semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}",
"@Override\n\tpublic EntityTransaction getTransaction() {\n\t\treturn null;\n\t}",
"private TaskTransaction tx() {\n if (this.taskTx == null) {\n /*\n * NOTE: don't synchronized(this) due to scheduler thread hold\n * this lock through scheduleTasks(), then query tasks and wait\n * for db-worker thread after call(), the tx may not be initialized\n * but can't catch this lock, then cause dead lock.\n * We just use this.eventListener as a monitor here\n */\n synchronized (this.eventListener) {\n if (this.taskTx == null) {\n BackendStore store = this.graph.loadSystemStore();\n TaskTransaction tx = new TaskTransaction(this.graph, store);\n assert this.taskTx == null; // may be reentrant?\n this.taskTx = tx;\n }\n }\n }\n assert this.taskTx != null;\n return this.taskTx;\n }",
"public <T extends IDBEntities> void delete(T element) {\n\t\tif (element == null)\n\t\t\treturn;\n\t\tEntityManager em = getEM();\n\t\ttry {\n\t\t\tem.getTransaction().begin();\n\t\t\t// Entity must be attached\n\t\t\tif (!em.contains(element))\n\t\t\t\telement = em.merge(element);\n\t\t\tem.remove(element);\n\t\t\tem.getTransaction().commit();\n\t\t} catch (Exception ex) {\n\t\t\tem.getTransaction().rollback();\n\t\t} finally {\n\t\t\tem.close();\n\t\t}\n\t}",
"@Override\r\n\tpublic V getElement(K key) {\n\t\tif (hashMap.containsKey(key)){\r\n\t\t\tque.remove(key);\r\n\t\t\tque.add(key);\r\n\t\t\treturn hashMap.get(key);\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"void processTransaction(String[] transaction) {\n\t\titemsetSets.get(itemsetSets.size() - 1).processTransaction(transaction);\n\t}",
"protected abstract B getElement(Long id);",
"public org.apache.xmlbeans.XmlQName xgetReference()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlQName target = null;\n target = (org.apache.xmlbeans.XmlQName)get_store().find_element_user(REFERENCE$0, 0);\n return target;\n }\n }",
"public java.lang.String getTransactionReference() {\n return transactionReference;\n }",
"private DbElement completeElement(DbElement e) throws MapsException {\n\n Connection conn = createConnection();\n String sqlQuery = null;\n try {\n if (e.getType().equals(MapsConstants.MAP_TYPE)) {\n sqlQuery = \"SELECT mapname FROM \" + mapTable\n + \" WHERE mapId = ?\";\n } else {\n sqlQuery = \"SELECT nodelabel,nodesysoid FROM node WHERE nodeid = ?\";\n }\n PreparedStatement statement = conn.prepareStatement(sqlQuery);\n statement.setInt(1, e.getId());\n ResultSet rs = statement.executeQuery();\n if (rs.next()) {\n e.setLabel(getLabel(rs.getString(1)));\n if (e.getType().equals(MapsConstants.NODE_TYPE)) {\n if (rs.getString(2) != null) {\n log.debug(\"DBManager: sysoid = \" + rs.getString(2));\n e.setSysoid(rs.getString(2));\n }\n }\n }\n rs.close();\n statement.close();\n\n } catch (Throwable e1) {\n log.error(\"Error while completing element (\" + e.getId()\n + \") with label and icon \", e1);\n throw new MapsException(e1);\n } finally {\n releaseConnection(conn);\n }\n\n return e;\n }",
"public TagChainElement() {\n\t\tthis.db = TagDatabaseManager.getInstance();\n\t}",
"public void addToIntegrityChecks(entity.LoadIntegrityCheck element);",
"public Element referenceElement(final String nom) {\n return(cacheDefElement.get(nom));\n }",
"private Deque<JooqTransaction> transactions() {\n Deque<JooqTransaction> result = transactionDeques.get();\n\n if (result == null) {\n result = new ArrayDeque<>();\n transactionDeques.set(result);\n }\n\n return result;\n }",
"public void removeFromCallbacks(entity.LoadCallback element);",
"public ElementSerializer() {\n _lock = new Object();\n }",
"public void removeFromPolicyTransactions(entity.AppCritPolicyTransaction element);",
"public IDReferences()\n {\n idReferences = new Hashtable();\n idValidation = new Hashtable();\n }",
"Element getElement() {\n\t\tElement result = element.clone();\n\t\tresult.setName(table.getName());\n\t\treturn result;\n\t}",
"public Object elGetReference(Object bean);",
"private Node generateCritRefElementRef(Node outboundRelElem, Node elementRefNode, XmlProcessor hqmfXmlProcessor)\n\t\t\tthrows XPathExpressionException {\n\t\tString ext = getElementRefExt(elementRefNode, measureExport.getSimpleXMLProcessor());\n\t\tString root = elementRefNode.getAttributes().getNamedItem(ID).getNodeValue();\n\t\tNode idNodeQDM = hqmfXmlProcessor.findNode(hqmfXmlProcessor.getOriginalDoc(),\n\t\t\t\t\"//entry/*/id[@root=\\\"\" + root + \"\\\"][@extension=\\\"\" + ext + \"\\\"]\");\n\t\tif (idNodeQDM != null) {\n\t\t\tNode parent = idNodeQDM.getParentNode();\n\t\t\tif (parent != null) {\n\t\t\t\tNamedNodeMap attribMap = parent.getAttributes();\n\t\t\t\tString classCode = attribMap.getNamedItem(CLASS_CODE).getNodeValue();\n\t\t\t\tString moodCode = attribMap.getNamedItem(MOOD_CODE).getNodeValue();\n\n\t\t\t\t// create criteriaRef\n\t\t\t\tElement criteriaReference = hqmfXmlProcessor.getOriginalDoc().createElement(CRITERIA_REFERENCE);\n\t\t\t\tcriteriaReference.setAttribute(CLASS_CODE, classCode);\n\t\t\t\tcriteriaReference.setAttribute(MOOD_CODE, moodCode);\n\n\t\t\t\tElement id = hqmfXmlProcessor.getOriginalDoc().createElement(ID);\n\t\t\t\tid.setAttribute(ROOT, root);\n\t\t\t\tid.setAttribute(EXTENSION, ext);\n\n\t\t\t\tcriteriaReference.appendChild(id);\n\t\t\t\toutboundRelElem.appendChild(criteriaReference);\n\t\t\t\t// return <entry> element\n\t\t\t\treturn parent.getParentNode();\n\t\t\t}\n\t\t} else {\n\t\t\t// check if this is a measurement period\n\t\t\tString displayName = elementRefNode.getAttributes().getNamedItem(DISPLAY_NAME).getNodeValue();\n\t\t\tif (\"Measurement Period : Timing Element\".equals(displayName)) {\n\t\t\t\t// create criteriaRef\n\t\t\t\tElement criteriaReference = hqmfXmlProcessor.getOriginalDoc().createElement(CRITERIA_REFERENCE);\n\t\t\t\tcriteriaReference.setAttribute(CLASS_CODE, \"OBS\");\n\t\t\t\tcriteriaReference.setAttribute(MOOD_CODE, \"EVN\");\n\n\t\t\t\tElement id = hqmfXmlProcessor.getOriginalDoc().createElement(ID);\n\t\t\t\tid.setAttribute(ROOT, elementRefNode.getAttributes().getNamedItem(ID).getNodeValue());\n\t\t\t\tid.setAttribute(EXTENSION, \"measureperiod\");\n\n\t\t\t\tcriteriaReference.appendChild(id);\n\t\t\t\toutboundRelElem.appendChild(criteriaReference);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public INamedReference<IEntity> getEntityRef();",
"SoftLockID createSoftLockID(TransactionID transactionID, Object key, Element newElement, Element oldElement, boolean pinned);",
"@Override\n\tpublic Transaction update(Transaction transaction) {\n\t\treturn null;\n\t}",
"public RTWElementRef getAsElement(int i);",
"public Transaction(){\n\t\t\n\t\ttransactions = new HashMap<String, ArrayList<Products>>();\n\t}",
"public Transaction getTransaction()\n {\n return transaction;\n }",
"public Transaction currentTransaction() {\r\n\t\treturn threadTransaction.get();\r\n\t}",
"void remove(ThreadLocal<?> key) {\n cleanUp();\n\n for (int index = key.hash & mask;; index = next(index)) {\n Object reference = table[index];\n\n if (reference == key.reference) {\n // Success!\n table[index] = TOMBSTONE;\n table[index + 1] = null;\n tombstones++;\n size--;\n return;\n }\n\n if (reference == null) {\n // No entry found.\n return;\n }\n }\n }",
"void setRef(int index, Ref value) throws SQLException;",
"private void setElement(int index, E element) {\n// if (getElement(index) != null) {\n// setContents.remove(getElement(index));\n// }\n while (index >= contents.size()) {\n contents.add(null);\n }\n contents.set(index, element);\n// contents.put(index, element);\n backwards.put(element, index);\n\n// if (element != null) {\n// setContents.add(getElement(index));\n// }\n }",
"public void refer(int page){\n\n if(!hashSet.contains(page)){\n\n if(deque.size() == Cache_Size){\n int last = deque.removeLast();\n hashSet.remove(last);\n }\n }\n else{\n /* The found page may not be always the last element, even if it's an\n intermediate element that needs to be removed and added to the start\n of the Queue */\n deque.remove(page);\n }\n deque.push(page);\n hashSet.add(page);\n }",
"public javax.xml.namespace.QName getReference()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REFERENCE$0, 0);\n if (target == null)\n {\n return null;\n }\n return target.getQNameValue();\n }\n }",
"public Transaction getTransaction() {\n\t\treturn null;\n\t}",
"List<PsdReferenceEntity> wrapReferenceEntity(List<CDSReferenceEntity> xmlReferEntitiesList);",
"private Element getElementByKeyRef(Node node) {\n\t\tElement ref ;\n\t\t\t\n\t\tString refType = getDocumentXpath(node);\n\t\tSystem.out.println(\"search ref for : \"+refType);\n\t\t/* get ref attribute */\n\t\tString refId = node.getTextContent();\n\t\tif (refId == null || refId.equals(\"\")){ \n\t\t\tfor (int i = 0; i< node.getAttributes().getLength(); i++) {\n//\t\t\t\tSystem.out.println(node.getAttributes().item(i).getNodeName()+\" :: \"+node.getAttributes().item(i).getTextContent());\n\t\t\t\tif (node.getAttributes().item(i).getNodeName().equals(refAttribute)){\n\t\t\t\t\t\trefId = node.getAttributes().item(i).getNodeValue();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tString referedType = (String) refType2referedType.get(refType)\t;\t\n\t\t\n\t\tref = (Element) xsKeyNodes.get(referedType+\"#\"+refId);\t\t\n\t\treturn ref;\n\t}",
"interface ReferenceEntry<K, V> {\n\n\n ValueReference<K, V> getValueReference();\n void setValueReference(ValueReference<K, V> valueReference);\n ReferenceEntry<K, V> getNext();\n int getHash();\n K getKey();\n\n long getAccessTime();\n void setAccessTime(long time);\n\n long getWriteTime();\n void setWriteTime(long time);\n\n ReferenceEntry<K, V> getNextInWriteQueue();\n void setNextInWriteQueue(ReferenceEntry<K, V> next);\n ReferenceEntry<K, V> getPreviousInWriteQueue();\n void setPreviousInWriteQueue(ReferenceEntry<K, V> previous);\n\n ReferenceEntry<K, V> getNextInAccessQueue();\n void setNextInAccessQueue(ReferenceEntry<K, V> next);\n ReferenceEntry<K, V> getPreviousInAccessQueue();\n void setPreviousInAccessQueue(ReferenceEntry<K, V> previous);\n\n abstract class AbstractReferenceEntry<K, V> implements ReferenceEntry<K, V> {\n @Override\n public ValueReference<K, V> getValueReference() {\n return null;\n }\n\n @Override\n public void setValueReference(ValueReference<K, V> valueReference) {\n\n }\n\n @Override\n public ReferenceEntry<K, V> getNext() {\n return null;\n }\n\n @Override\n public int getHash() {\n return 0;\n }\n\n @Override\n public K getKey() {\n return null;\n }\n\n @Override\n public long getAccessTime() {\n return 0;\n }\n\n @Override\n public void setAccessTime(long time) {\n }\n\n @Override\n public long getWriteTime() {\n return 0;\n }\n\n @Override\n public void setWriteTime(long time) {\n\n }\n\n @Override\n public ReferenceEntry<K, V> getNextInWriteQueue() {\n return this;\n }\n\n @Override\n public void setNextInWriteQueue(ReferenceEntry<K, V> next) {\n\n }\n\n @Override\n public ReferenceEntry<K, V> getPreviousInWriteQueue() {\n return this;\n }\n\n @Override\n public void setPreviousInWriteQueue(ReferenceEntry<K, V> previous) {\n\n }\n\n @Override\n public ReferenceEntry<K, V> getNextInAccessQueue() {\n return this;\n }\n\n @Override\n public void setNextInAccessQueue(ReferenceEntry<K, V> next) {\n\n }\n\n @Override\n public ReferenceEntry<K, V> getPreviousInAccessQueue() {\n return this;\n }\n\n @Override\n public void setPreviousInAccessQueue(ReferenceEntry<K, V> previous) {\n\n }\n }\n\n class StrongEntry<K, V> extends AbstractReferenceEntry<K, V> {\n final K key;\n final int hash;\n final ReferenceEntry<K, V> next;\n volatile ValueReference<K, V> valueReference = (ValueReference<K, V>) ValueReference.UNSET;\n\n public StrongEntry(K key, int hash, ReferenceEntry<K, V> next) {\n this.key = key;\n this.hash = hash;\n this.next = next;\n }\n\n @Override\n public K getKey() {\n return key;\n }\n\n @Override\n public ValueReference<K, V> getValueReference() {\n return valueReference;\n }\n\n @Override\n public int getHash() {\n return hash;\n }\n\n @Override\n public ReferenceEntry<K, V> getNext() {\n return next;\n }\n\n @Override\n public void setValueReference(ValueReference<K, V> valueReference) {\n this.valueReference = valueReference;\n }\n }\n\n class StrongAccessEntry<K, V> extends StrongEntry<K, V> {\n volatile long accessTime = Long.MAX_VALUE;\n StrongAccessEntry(K key, int hash, ReferenceEntry<K, V> next) {\n super(key, hash, next);\n }\n\n @Override\n public long getAccessTime() {\n return accessTime;\n }\n\n @Override\n public void setAccessTime(long accessTime) {\n this.accessTime = accessTime;\n }\n\n ReferenceEntry<K, V> nextAccess = (ReferenceEntry<K, V>) NullEntry.INTANCE;\n\n @Override\n public ReferenceEntry<K, V> getNextInAccessQueue() {\n return nextAccess;\n }\n\n @Override\n public void setNextInAccessQueue(ReferenceEntry<K, V> next) {\n this.nextAccess = next;\n }\n\n ReferenceEntry<K, V> previousAccess = (ReferenceEntry<K, V>) NullEntry.INTANCE;\n\n @Override\n public ReferenceEntry<K, V> getPreviousInAccessQueue() {\n return previousAccess;\n }\n\n @Override\n public void setPreviousInAccessQueue(ReferenceEntry<K, V> previous) {\n this.previousAccess = previous;\n }\n }\n\n final class StrongWriteEntry<K, V> extends StrongEntry<K, V> {\n volatile long writeTime = Long.MAX_VALUE;\n StrongWriteEntry(K key, int hash, ReferenceEntry<K, V> next) {\n super(key, hash, next);\n }\n @Override\n public long getWriteTime() {\n return writeTime;\n }\n\n @Override\n public void setWriteTime(long time) {\n this.writeTime = time;\n }\n\n // Guarded By Segment.this\n ReferenceEntry<K, V> nextWrite = (ReferenceEntry<K, V>) NullEntry.INTANCE;\n\n @Override\n public ReferenceEntry<K, V> getNextInWriteQueue() {\n return nextWrite;\n }\n\n @Override\n public void setNextInWriteQueue(ReferenceEntry<K, V> next) {\n this.nextWrite = next;\n }\n\n // Guarded By Segment.this\n ReferenceEntry<K, V> previousWrite = (ReferenceEntry<K, V>) NullEntry.INTANCE;\n\n @Override\n public ReferenceEntry<K, V> getPreviousInWriteQueue() {\n return previousWrite;\n }\n\n @Override\n public void setPreviousInWriteQueue(ReferenceEntry<K, V> previous) {\n this.previousWrite = previous;\n }\n }\n\n final class StrongAccessWriteEntry<K, V> extends StrongEntry<K, V> {\n StrongAccessWriteEntry(K key, int hash, ReferenceEntry<K, V> next) {\n super(key, hash, next);\n }\n\n // The code below is exactly the same for each access entry type.\n\n volatile long accessTime = Long.MAX_VALUE;\n\n @Override\n public long getAccessTime() {\n return accessTime;\n }\n\n @Override\n public void setAccessTime(long time) {\n this.accessTime = time;\n }\n\n // Guarded By Segment.this\n ReferenceEntry<K, V> nextAccess = (ReferenceEntry<K, V>) NullEntry.INTANCE;\n\n @Override\n public ReferenceEntry<K, V> getNextInAccessQueue() {\n return nextAccess;\n }\n\n @Override\n public void setNextInAccessQueue(ReferenceEntry<K, V> next) {\n this.nextAccess = next;\n }\n\n // Guarded By Segment.this\n ReferenceEntry<K, V> previousAccess = (ReferenceEntry<K, V>) NullEntry.INTANCE;\n\n @Override\n public ReferenceEntry<K, V> getPreviousInAccessQueue() {\n return previousAccess;\n }\n\n @Override\n public void setPreviousInAccessQueue(ReferenceEntry<K, V> previous) {\n this.previousAccess = previous;\n }\n\n // The code below is exactly the same for each write entry type.\n\n volatile long writeTime = Long.MAX_VALUE;\n\n @Override\n public long getWriteTime() {\n return writeTime;\n }\n\n @Override\n public void setWriteTime(long time) {\n this.writeTime = time;\n }\n\n // Guarded By Segment.this\n ReferenceEntry<K, V> nextWrite = (ReferenceEntry<K, V>) NullEntry.INTANCE;\n @Override\n public ReferenceEntry<K, V> getNextInWriteQueue() {\n return nextWrite;\n }\n\n @Override\n public void setNextInWriteQueue(ReferenceEntry<K, V> next) {\n this.nextWrite = next;\n }\n\n // Guarded By Segment.this\n ReferenceEntry<K, V> previousWrite = (ReferenceEntry<K, V>) NullEntry.INTANCE;\n\n @Override\n public ReferenceEntry<K, V> getPreviousInWriteQueue() {\n return previousWrite;\n }\n\n @Override\n public void setPreviousInWriteQueue(ReferenceEntry<K, V> previous) {\n this.previousWrite = previous;\n }\n }\n\n class NullEntry extends AbstractReferenceEntry<Object, Object> {\n static final NullEntry INTANCE = new NullEntry();\n\n private NullEntry() {\n\n }\n }\n}",
"Map retrievePreparedTransactions();",
"protected void writeReference(long offset, Object reference) {\n assert referenceMessageSize != 0 : \"References are not in use\";\n // Is there a way to compute the element offset once and just\n // arithmetic?\n UnsafeRefArrayAccess.spRefElement(references, UnsafeRefArrayAccess.calcRefElementOffset(offset), reference);\n }",
"@Override\r\n protected void processUpdate(final ICacheElement<K, V> ce)\r\n {\r\n if (!isAlive())\r\n {\r\n log.error(\"{0}: No longer alive; aborting put of key = {1}\",\r\n () -> logCacheName, ce::getKey);\r\n return;\r\n }\r\n\r\n log.debug(\"{0}: Storing element on disk, key: {1}\",\r\n () -> logCacheName, ce::getKey);\r\n\r\n // old element with same key\r\n IndexedDiskElementDescriptor old = null;\r\n\r\n try\r\n {\r\n IndexedDiskElementDescriptor ded = null;\r\n final byte[] data = getElementSerializer().serialize(ce);\r\n\r\n // make sure this only locks for one particular cache region\r\n storageLock.writeLock().lock();\r\n try\r\n {\r\n old = keyHash.get(ce.getKey());\r\n\r\n // Item with the same key already exists in file.\r\n // Try to reuse the location if possible.\r\n if (old != null && data.length <= old.len)\r\n {\r\n // Reuse the old ded. The defrag relies on ded updates by reference, not\r\n // replacement.\r\n ded = old;\r\n ded.len = data.length;\r\n }\r\n else\r\n {\r\n // we need this to compare in the recycle bin\r\n ded = new IndexedDiskElementDescriptor(dataFile.length(), data.length);\r\n\r\n if (doRecycle)\r\n {\r\n final IndexedDiskElementDescriptor rep = recycle.ceiling(ded);\r\n if (rep != null)\r\n {\r\n // remove element from recycle bin\r\n recycle.remove(rep);\r\n ded = rep;\r\n ded.len = data.length;\r\n recycleCnt++;\r\n this.adjustBytesFree(ded, false);\r\n log.debug(\"{0}: using recycled ded {1} rep.len = {2} ded.len = {3}\",\r\n logCacheName, ded.pos, rep.len, ded.len);\r\n }\r\n }\r\n\r\n // Put it in the map\r\n keyHash.put(ce.getKey(), ded);\r\n\r\n if (queueInput)\r\n {\r\n queuedPutList.add(ded);\r\n log.debug(\"{0}: added to queued put list. {1}\",\r\n () -> logCacheName, queuedPutList::size);\r\n }\r\n\r\n // add the old slot to the recycle bin\r\n if (old != null)\r\n {\r\n addToRecycleBin(old);\r\n }\r\n }\r\n\r\n dataFile.write(ded, data);\r\n }\r\n finally\r\n {\r\n storageLock.writeLock().unlock();\r\n }\r\n\r\n log.debug(\"{0}: Put to file: {1}, key: {2}, position: {3}, size: {4}\",\r\n logCacheName, fileName, ce.getKey(), ded.pos, ded.len);\r\n }\r\n catch (final IOException e)\r\n {\r\n log.error(\"{0}: Failure updating element, key: {1} old: {2}\",\r\n logCacheName, ce.getKey(), old, e);\r\n }\r\n }",
"public void entityReference(String name);",
"public void addToEncryptTables(entity.LoadEncryptTable element);",
"public Element referenceElement(final Element el) {\n final String nom;\n if (el.getPrefix() == null)\n nom = el.getNodeName();\n else\n nom = el.getLocalName();\n return(referenceElement(nom));\n }",
"E getElement() throws IllegalStateException;",
"public E getReferenceId() {\n return referenceId;\n }",
"@Override\n\tpublic Transaction update(Transaction item) {\n\t\treturn null;\n\t}",
"protected void removeReference()\n {\n }",
"public ArrayList<Products> getTransaction(String transID){\n\t\t\n\t\tArrayList<Products> transaction = transactions.get(transID);\n\t\ttransactions.remove(transID); \n\t\treturn transaction;\n\t\t\n\t}",
"@Override\n public T update(T element) {\n return manager.merge(element);\n }",
"protected void sequence_ElementList_KeyedElement(ISerializationContext context, KeyedElement semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}",
"private void addToWaitMap(ITransaction tx, ITransactionOperation txOp){\r\n\t\tQueue<ITransactionOperation> waitingTxOps = waitMap.get(tx);\r\n\t\tif(waitingTxOps == null){\r\n\t\t\twaitingTxOps = new LinkedList<>();\r\n\t\t}\r\n\t\t\r\n\t\twaitingTxOps.add(txOp);\r\n\t\twaitMap.put(tx, waitingTxOps);\r\n\t}",
"public void completeOrderTransaction(Transaction trans){\n }",
"public interface IEmigOclElementMapping<ReferenceType> extends it.univaq.coevolution.emfmigrate.EmigOcl.resource.EmigOcl.IEmigOclReferenceMapping<ReferenceType> {\n\t\n\t/**\n\t * Returns the target object the identifier is mapped to.\n\t */\n\tpublic ReferenceType getTargetElement();\n}",
"public void updateTransaction(Transaction trans);",
"SequencedQueueEntry(E element) {\n if (element == null)\n throw new IllegalArgumentException(\"Element may not be set to 'null'\");\n this.element = element;\n }",
"public String getElementReferenceIdentifier() {\n return this.toString();\n }",
"Table getReferences();",
"public Transaction getTransaction() {\n return transaction;\n }",
"protected abstract Object handleElement(Element aElement) throws AeXMLDBException;",
"private boolean isTransactionAlreadySeen(Transaction tx){\n return allTransactions.contains(tx);\n }",
"protected abstract void commitIndividualTrx();",
"public ReferenceType getTargetElement();",
"@Test(timeout = 4000)\n public void test081() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"&``$\");\n // Undeclared exception!\n try { \n xmlEntityRef0.remove(\"MKsGx6sCTImJ\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n }\n }",
"private boolean checkPreviousRefs(String ref) {\n\t\t// Prevent stack overflow, when an unlock happens from inside here:\n\t\tList<String> checked = (List<String>) threadLocalManager.get(TwoFactorAuthenticationImpl.class.getName());\n\t\tif (checked == null) {\n\t\t\tchecked = new ArrayList<String>();\n\t\t\tthreadLocalManager.set(TwoFactorAuthenticationImpl.class.getName(), checked);\n\t\t}\n\t\tif (checked.contains(ref)) {\n\t\t\treturn false; // This allows the required entity to load.\n\t\t}\n\t\ttry {\n\t\t\tchecked.add(ref);\n\t\t\treturn findSiteId(ref);\n\t\t} finally {\n\t\t\tif(!checked.isEmpty()) {\n\t\t\t\tchecked.remove(checked.size()-1);\n\t\t\t}\n\t\t}\n\t}",
"public RTWElementRef lastAsElement();",
"public void addToCallbacks(entity.LoadCallback element);",
"public GlobalTransaction remove(Transaction tx)\n {\n if (tx == null)\n {\n return null;\n }\n return tx2gtxMap.remove(tx);\n }",
"@Override\n public void commitTx() {\n \n }",
"public int getUniqueReference ()\n\t{\n\t\treturn uniqueReference;\n\t}",
"@Override\n public void abortTx() {\n \tfor (VBox vbox : overwrittenAncestorWriteSet) {\n \t // revert the in-place entry that had overwritten\n \t vbox.inplace = vbox.inplace.next;\n \t}\n \n this.orec.version = OwnershipRecord.ABORTED;\n for (OwnershipRecord mergedLinear : linearNestedOrecs) {\n mergedLinear.version = OwnershipRecord.ABORTED;\n }\n \tfor (ParallelNestedTransaction mergedTx : mergedTxs) {\n \t mergedTx.orec.version = OwnershipRecord.ABORTED;\n \t}\n \t\n\t// give the read set arrays, which were used exclusively by this nested or its children, back to the thread pool\n\tCons<VBox[]> parentArrays = this.getRWParent().bodiesRead;\n\tCons<VBox[]> myArrays = this.bodiesRead;\n\twhile (myArrays != parentArrays) {\n\t returnToPool(myArrays.first());\n\t myArrays = myArrays.rest();\n\t}\n\t\n \tbodiesRead = null;\n \tboxesWritten = null;\n \tboxesWrittenInPlace = null;\n \tperTxValues = null;\n \toverwrittenAncestorWriteSet = null;\n \tmergedTxs = null;\n \tlinearNestedOrecs = null;\n \tcurrent.set(this.getParent());\n }",
"private Node getRefTo(T item){\n Node n = first;\n while(n != null && !n.value.equals(item))\n n = n.next;\n return n;\n }",
"E remove(E element) {\n\t\t\tshort index = (short)((element.hashCode() >> 24) & 0x000000FF);\n\t\t\tE obj = nodes[index].remove(this, element.hashCode(), (byte) 1);\n\t\t\tif (obj != null) {\n\t\t\t\tsize--;\n\t\t\t}\n\t\t\treturn obj;\n\t\t}",
"public org.apache.xmlbeans.XmlString xgetRefID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(REFID$4, 0);\n return target;\n }\n }",
"void commit() {\r\n tx.commit();\r\n tx = new Transaction();\r\n }",
"@Override\r\n\tpublic Transaction getTranWhere(Transaction transaction) throws Exception {\n\t\treturn null;\r\n\t}",
"public Vector getItemIdrefs()\n {\n return mItemIdrefs;\n }",
"public void removeFromIntegrityChecks(entity.LoadIntegrityCheck element);",
"public void setTransactionReference(java.lang.String transactionReference) {\n this.transactionReference = transactionReference;\n }",
"public Hashtable getElementHashEntry() {\n\t\treturn (element);\n\t}",
"public <T extends IDBEntities> void saveChanges(T element) {\n\t\t// No transient records allowed\n\t\tif (element == null)\n\t\t\treturn;\n\t\tEntityManager em = getEM();\n\t\ttry {\n\t\t\tem.getTransaction().begin();\n\t\t\ttry {\n\t\t\t\t// If ID is set, this is an existing element\n\t\t\t\tif (element.getID() != null)\n\t\t\t\t\tem.merge(element);\n\t\t\t} catch (NullPointerException ex) {\n\t\t\t\tem.persist(element);\n\t\t\t}\n\t\t\tem.getTransaction().commit();\n\t\t} catch (Exception ex) {\n\t\t\tem.getTransaction().rollback();\n\t\t\tem.close();\n\t\t} finally {\n\t\t\tem.close();\n\t\t}\n\t}",
"public void transactionComplete(TransactionId tid, boolean commit)\n throws IOException {\n // some code goes here\n // not necessary for proj1\n\n \t\n \t//commit, flush the pages\n \tif(commit){\n \t\tfor(PageId pageId : bufferedPages.keySet()){\n \t\t\tPage page = bufferedPages.get(pageId).page;\n \t\t\t//dirty page\n \t\t\tif(page.isDirty() != null && tid.equals(page.isDirty())){\n \t\t\t\tflushPage(pageId);\n \t\t\t\tpage.setBeforeImage();\n \t\t\t}\n\n if (page.isDirty() == null) {\n page.setBeforeImage();\n }\n \t\t\t\n \t\t}\n \t}\n \telse{\n \t\tfor(PageId pageId : bufferedPages.keySet()){\n \t\t\tPage page = bufferedPages.get(pageId).page;\n \t\t\t//dirty page, revert changes\n \t\t\tif(page.isDirty() != null && tid.equals(page.isDirty())){\n \t\t\t\tNode n = bufferedPages.get(pageId);\n \t\t\t\tn.page = page.getBeforeImage();\n \t\t\t\tbufferedPages.put(pageId, n);\n // updateLruWithNewNode(pageId, page.getBeforeImage());\n \t\t\t}\n \t\t\t\n \t\t}\n \t}\n \t\n \t//release the lock\n \tlockManager.releaseAllTransactionLocks(tid);\n \tcurrentTransactions.remove(tid);\n \t\n }",
"public <T extends DbObject> void remove(T elm, EntityManager em, boolean closeConnection) throws Exception\n\t{\n\t\tEntityTransaction et = em.getTransaction();\n\t\t\n\t\ttry \n\t\t{\n\t\t\tet.begin();\n\t\t\t\n\t\t\tif(elm.getId()!=0)\n\t\t\t\tem.remove(elm);\n\t\t\t\n\t\t\tet.commit();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t\n\t\t\tet.rollback();\n\t\t\tthrow e;\n\t\t\t\n\t\t} finally {\n\t\t\tif(closeConnection)\n\t\t\t\tem.close();\n\t\t}\n\t}",
"StoreResponse set(CACHE_ELEMENT e);",
"public TransID beginTransaction()\n {\n\t //TransID tid = new TransID();\n\t Transaction collect_trans = new Transaction(this);\n\t atranslist.put(collect_trans);\n\t return collect_trans.getTid();\n }",
"public abstract void setupReferences() throws SQLException;",
"@Override\n public String getElementId()\n {\n return null;\n }",
"Collection<Feature> getReference();"
]
| [
"0.5716376",
"0.5441842",
"0.52630013",
"0.52300423",
"0.5205879",
"0.5203556",
"0.51436335",
"0.51241577",
"0.51045847",
"0.5072751",
"0.50525737",
"0.5024752",
"0.5013491",
"0.49850282",
"0.49848044",
"0.49530792",
"0.4921375",
"0.49157253",
"0.49127662",
"0.489144",
"0.48893914",
"0.48853987",
"0.48646593",
"0.48604244",
"0.4840493",
"0.48398405",
"0.48275357",
"0.48259765",
"0.4814806",
"0.48121914",
"0.4808363",
"0.48029667",
"0.47961637",
"0.47946742",
"0.47903192",
"0.47893858",
"0.47854307",
"0.4781845",
"0.4778679",
"0.47784495",
"0.4774557",
"0.4762232",
"0.47367382",
"0.47310033",
"0.47193557",
"0.47164893",
"0.47120857",
"0.47115704",
"0.47061762",
"0.4705588",
"0.4698615",
"0.46958613",
"0.4695467",
"0.46933013",
"0.46919864",
"0.46860045",
"0.4680491",
"0.46771732",
"0.4667881",
"0.4656824",
"0.46343675",
"0.46319467",
"0.46307743",
"0.46288657",
"0.46222818",
"0.46188667",
"0.4618203",
"0.46173707",
"0.46166977",
"0.46129856",
"0.4606273",
"0.46060053",
"0.46057013",
"0.46053728",
"0.4602133",
"0.46002093",
"0.46001467",
"0.4599651",
"0.45987102",
"0.45976737",
"0.45964608",
"0.45933214",
"0.45904148",
"0.4589789",
"0.45882535",
"0.4576619",
"0.45746994",
"0.4571912",
"0.45685977",
"0.45640266",
"0.4560058",
"0.45598775",
"0.45596406",
"0.45534205",
"0.45461932",
"0.45341423",
"0.45316505",
"0.45259893",
"0.452576",
"0.452415"
]
| 0.45521563 | 94 |
Instantiates a new To dos. | public ToDos(String description) {
super(description);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DoCommand(String toDo) {\n this.toDo = toDo;\n this.tracker = new MarkTaskUtil();\n }",
"public ToDos(String description) {\n super(description);\n this.type = 'T';\n }",
"public Telefone() {\n\t}",
"public Telefone() {\n\t\t\n\t}",
"public VehicleTypeTO()\r\n {\r\n }",
"public Transportista() {\n }",
"public ToDo build() {\n return new ToDo(this);\n }",
"public Troco() {\n }",
"private ToDo(ToDoBuilder builder) {\n this.text = builder.text;\n this.completed = builder.completed;\n this.due = builder.due;\n this.priority = builder.priority;\n this.category = builder.category;\n }",
"public Corso() {\n\n }",
"public ToDoCreate(User user) {\n\t\tthis.user = user;\n\t\tinit();\n\t}",
"public Os() {\n osBO = new OsBO();\n }",
"public Todo(String task) {\n super(task);\n }",
"public void crearAutomovil(){\r\n automovil = new Vehiculo();\r\n automovil.setMarca(\"BMW\");\r\n automovil.setModelo(2010);\r\n automovil.setPlaca(\"TWS435\");\r\n }",
"public Dto() {\n \t\n }",
"public Nodo(datos libro)\n {\n this.libro=libro;//LA VARIABLE LIBRO TENDRA LOS DATOS DE LA CLASE LIBRO\n }",
"public Caso_de_uso () {\n }",
"public abstract Anuncio creaAnuncioTematico();",
"Concierto createConcierto();",
"public MorteSubita() {\n }",
"public Todo(String description) {\n super(description);\n }",
"public Todo(String description) {\n super(description);\n }",
"public Todo(String description) {\n super(description);\n }",
"public Domicilio() {\n }",
"public CrearQuedadaVista() {\n }",
"public Cargo(){\n super(\"Cargo\");\n intake = new WPI_TalonSRX(RobotMap.cargoIntake);\n shoot = new WPI_TalonSRX(RobotMap.cargoShoot);\n }",
"public ToDoCommand(String description) {\n ToDoCommand.description = description;\n }",
"public Lotto2(){\n\t\t\n\t}",
"public ToDoCommand(String desc) {\n this.desc = desc;\n }",
"public void create(){}",
"public Documento() {\n\n\t}",
"public SiacDMovgestTsDetTipo() {\n\t}",
"public TcUnidadEdoDTO() {\n }",
"public DatatypeDto instantiateDto(Datatype poso) {\n\t\tDatatypeDto dto = DatatypeDto.String;\n\t\treturn dto;\n\t}",
"public ToDo(String description) {\n super(description);\n }",
"public DarAyudaAcceso() {\r\n }",
"public Odontologo() {\n }",
"public Datos(){\n }",
"public TCubico(){}",
"Documento createDocumento();",
"public ProdutoDTO()\n {\n super();\n }",
"public n501070324_PedidosAssistencia() {\n super(\"Pedidos.txt\");\n }",
"Commands createCommands();",
"private DTOFactory() {\r\n \t}",
"public Busca(){\n }",
"public org.oep.cmon.dao.dvc.model.ThuTuc2GiayTo create(long id);",
"OperacionColeccion createOperacionColeccion();",
"public void createTask() {\n \tSystem.out.println(\"Inside createTask()\");\n \tTask task = Helper.inputTask(\"Please enter task details\");\n \t\n \ttoDoList.add(task);\n \tSystem.out.println(toDoList);\n }",
"public TipoDocumentoMB() {\n tipoDoc = new TipoDocPersona();\n }",
"public BasicDriveTeleOp() {\n\n }",
"public Venda() {\n }",
"public ToDoList2AL()\n {\n\tcompleted = new ArrayList<Task>();\n\ttoDo = new ArrayList<Task>();\n }",
"public Contato() {\n }",
"public CuentaDeposito() {\n super();\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 Commande() {\n }",
"@Override\n\tpublic DAOPedido crearDAOPedidoAlmacen() {\n\t\treturn new DAOPedido();\n\t}",
"public Nodo() {\n\t\tthis(null, null);\n\t}",
"public CrearPedidos() {\n initComponents();\n }",
"public CorreoElectronico() {\n }",
"public TTau() {}",
"public Servos() {\n\n }",
"Operacion createOperacion();",
"public TranscribedNote()\r\n {\r\n\r\n }",
"public Principal() {\n initComponents();\n empresaControlador = new EmpresaControlador();\n clienteControlador = new ClienteControlador();\n vehiculoControlador = new VehiculoControlador();\n servicioControlador = new ServicioControlador();\n archivoObjeto = new ArchivoObjeto(\"/home/diego/UPS/56/ProgramacionAplicada/Parqueadero/src/archivo/ClienteArchivo.obj\");// Ruta Absolojuta\n archivosBinarios = new ArchivosBinarios();\n archivosBinariosAleatorio = new ArchivosBinariosAleatorio(\"ServicioArchivo.dat\");//Ruta relativa\n }",
"public JogadorTradutor() {\n this.nome= \"Sem Registro\";\n this.pontuacao = pontuacao;\n id = id;\n \n geradorDesafioItaliano = new GerarPalavra(); // primeira palavra ja é gerada para o cliente\n }",
"public CampLease( ) {}",
"public prueba()\r\n {\r\n }",
"public DCrearDisco( InterfazDiscotienda id ){\r\n super( id, true );\r\n principal = id;\r\n\r\n panelDatos = new PanelCrearDisco( );\r\n panelBotones = new PanelBotonesDisco( this );\r\n\r\n getContentPane( ).add( panelDatos, BorderLayout.CENTER );\r\n getContentPane( ).add( panelBotones, BorderLayout.SOUTH );\r\n\r\n setTitle( \"Crear Disco\" );\r\n pack();\r\n }",
"public FiltroMicrorregiao() {\r\n }",
"public PedidoRecord() {\n super(Pedido.PEDIDO);\n }",
"private void crearObjetos() {\n // crea los botones\n this.btnOK = new CCButton(this.OK);\n this.btnOK.setActionCommand(\"ok\");\n this.btnOK.setToolTipText(\"Confirmar la Operación\");\n \n this.btnCancel = new CCButton(this.CANCEL);\n this.btnCancel.setActionCommand(\"cancel\");\n this.btnCancel.setToolTipText(\"Cancelar la Operación\");\n \n // Agregar los eventos a los botones\n this.btnOK.addActionListener(this);\n this.btnCancel.addActionListener(this);\n }",
"public CCuenta()\n {\n }",
"public MovimientoControl() {\n }",
"public MailCommand() {\n this(\"\");\n }",
"public Gasto() {\r\n\t}",
"public TelDirectory(String name, String number) { //Creates the object \"TelDirectory\" which contains the name and number\n this.name = name; //When a new object is created, it will assign the specified name\n this.number = number; // & number to the \"name\" and \"number\" variables\n }",
"public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }",
"public Program7()\n { \n _tc = new TravelingCreature( 200, 200 );\n }",
"public Trening() {\n }",
"public ATM() {\n usuarioAutenticado = false; // al principio, el usuario no está autenticado\n numeroCuentaActual = 0; // al principio, no hay número de cuenta\n pantalla = new Pantalla(); // crea la pantalla\n teclado = new Teclado(); // crea el teclado\n dispensadorEfectivo = new DispensadorEfectivo(); // crea el dispensador de efectivo\n ranuraDeposito = new RanuraDeposito(); // crea la ranura de depósito\n baseDatosBanco = new BaseDatosBanco(); // crea la base de datos de información de cuentas\n }",
"public Movimiento(int idCuenta, String operacion, double cantidad, Date fecha) {\r\n\t\tsuper();\r\n\t\tthis.idCuenta = idCuenta;\r\n\t\tthis.operacion = operacion;\r\n\t\tthis.cantidad = cantidad;\r\n\t\tthis.fecha = fecha;\r\n\t}",
"public Poem(){}",
"public InventarioFile(){\r\n \r\n }",
"public ToDoCommand(String fullCommand) throws NoDescriptionException {\n if (fullCommand.equals(\"todo\")) {\n throw new NoDescriptionException(\"The description of a todo cannot be empty.\");\n }\n String[] splitCommand = fullCommand.split(\" \", 2);\n String desc = splitCommand[1];\n taskToAdd = new ToDo(desc);\n }",
"public Pila(Fabrica<TNodo> creadorDeNodos) {\n\t\tsuper(creadorDeNodos);\n\t}",
"public ToDo(String title, String description, double price, String contact,\n ArrayList<String> supplies) {\n this.title = title;\n this.description = description;\n this.price = price;\n this.contact = contact;\n this.supplies = supplies;\n }",
"public OriDestEOImpl() {\n }",
"public CambioComplementariosDTO() { }",
"public Laboratorio() {}",
"public MPaciente() {\r\n\t}",
"public ToDoCreate(User user, ToDoData data, Date date) {\n\t\tthis.user = user;\n\t\ttxtTodo = data.getTextField();\n\t\tcheck = data.getCheckBox();\n\t\t\n\t\tcreateSubjectField();\n\t\tcreateButton();\n\t\tsetupSubjectPanel();\n\t\tsetupToDoPanel();\n\t\t\n\t\ttxtSubject.setText(data.getSubject());\n\t\ttxtSubject.setEditable(false);\n\t\ttxtDate.setDate(date);\n\t\tlblDate.setVisible(false);\n\t\ttxtDate.setVisible(false);\n\t\t\n\t\tsetBorder(BorderFactory.createTitledBorder(\"To Do List\"));\n\t\tsetLayout(new BorderLayout());\n\t\tadd(pnlSubject, BorderLayout.NORTH);\n\t\tadd(scroll, BorderLayout.CENTER);\n\t\tadd(pnlButton, BorderLayout.SOUTH);\n\t}",
"public Nino(int id, int edad, Paso paso, Tobogan tobogan, Columpios columpios, Tiovivo tiovivo) {\n this.id = id; //se asignan todos los datos\n this.edad = edad;\n this.paso = paso;\n this.tobogan = tobogan;\n this.columpios = columpios;\n this.tiovivo = tiovivo;\n start(); //strat de los hilos\n }",
"public ToDo(String title, String description, double price, String contact, ArrayList<String> supplies) {\n super();\n this.title = title;\n this.description = description;\n this.price = price;\n this.contact = contact;\n this.supplies = supplies;\n }",
"public void create() {\n\t\t\n\t}",
"public org.oep.cmon.dao.tlct.model.DanhMucGiayTo create(long id);",
"public Todo create(long todoId);",
"public Generateur() {\n }",
"public TipoInformazioniController() {\n\n\t}",
"public Trabajador() {\n\t\tsuper();\n\t}"
]
| [
"0.629842",
"0.62033653",
"0.608916",
"0.6076091",
"0.596202",
"0.59418803",
"0.5878408",
"0.5863834",
"0.580167",
"0.57931906",
"0.5770638",
"0.57657176",
"0.5751001",
"0.57494545",
"0.5742009",
"0.5726825",
"0.5709375",
"0.56532437",
"0.5647856",
"0.5638771",
"0.56351346",
"0.56351346",
"0.56351346",
"0.56291485",
"0.56276596",
"0.5625135",
"0.56251115",
"0.55928326",
"0.55884755",
"0.55762905",
"0.5575114",
"0.5569536",
"0.55688995",
"0.5560368",
"0.5559192",
"0.5558098",
"0.55488235",
"0.5544094",
"0.55433154",
"0.55338883",
"0.5522933",
"0.55085206",
"0.548435",
"0.5484107",
"0.54804164",
"0.54722047",
"0.5469711",
"0.54674685",
"0.5463481",
"0.54556334",
"0.5451808",
"0.54450166",
"0.5443856",
"0.5431138",
"0.5427968",
"0.5422776",
"0.54193974",
"0.5410321",
"0.54097706",
"0.5400066",
"0.53955716",
"0.5389209",
"0.538679",
"0.53837913",
"0.53820544",
"0.53792",
"0.5378136",
"0.536489",
"0.53629357",
"0.53620577",
"0.5353867",
"0.53484106",
"0.5337494",
"0.53363067",
"0.53289926",
"0.53277844",
"0.53262895",
"0.532542",
"0.5319679",
"0.5318462",
"0.531768",
"0.5317279",
"0.53166497",
"0.5316613",
"0.53116626",
"0.5305972",
"0.5304204",
"0.5303317",
"0.5299287",
"0.5297651",
"0.52960426",
"0.5292235",
"0.5290828",
"0.5290513",
"0.528549",
"0.52854246",
"0.52842385",
"0.52799594",
"0.5277431",
"0.5271389"
]
| 0.6138176 | 2 |
for business request call. in this example dataName might be "productData" and this call will return product data rows in a string format | @RequestMapping(value = "getData/{dataName}", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
public String getHierarchy(@PathVariable final String dataName){
logger.info("Entered NeoJSON_getHier Request Mapping");
StatementResult result = NeoBolt.getResults_multiple(dataName);
List<JSONObject> ljo = new ArrayList<JSONObject>();
while(result.hasNext()){
Record record = result.next();
JSONObject jsonObject = new JSONObject();
jsonObject.put(record.get(0).toString(),record.asMap().toString());
ljo.add(jsonObject);
}
return ljo.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void getData(String dataName){\r\n this.mData.get(dataName);\r\n }",
"@POST\n public String SendQueryResult(String data) throws JsonProcessingException {\n ObjectMapper objectMapper = new ObjectMapper();\n InputQueryData inputQueryData = new ObjectMapper().readValue(data, InputQueryData.class);\n// System.out.println(inputQueryData.getTableName());\n// System.out.println(inputQueryData.getSelectedColumns());\n// System.out.println(inputQueryData.getWhereConditionSelectedColumns());\n// System.out.println(inputQueryData.getWhereConditionSelectedValues());\n\n\n ManageFact manageFact = new ManageFact();\n\n String resultQuery = manageFact.QueryGenerator(inputQueryData.getTableName(), inputQueryData.getSelectedColumns(), inputQueryData.getWhereConditionSelectedColumns(), inputQueryData.getWhereConditionSelectedValues(),inputQueryData.getGroupByColumns());\n\n\n\n\n return objectMapper.writeValueAsString(resultQuery);\n }",
"java.lang.String getData();",
"public String get_sql(OperationType name, HashMap<String,String> data) throws ConnectorConfigException{\n\t\treturn \"\";\n\t}",
"public String getData(){\n try{\n \n String query = \"SELECT * from student\";\n rs = st.executeQuery(query);\n rs.next();\n String name = rs.getString(\"studentName\");\n return dName = name;\n \n }catch(Exception ex){\n System.out.println(ex);\n return null;\n }\n \n }",
"String getBarcharDataQuery();",
"@Override\n public String getName() {\n return _data.getName();\n }",
"java.lang.String getDataItemFilter();",
"@Override\r\n\tpublic List<PayedProduct> getAllInfoProduct(String pname) {\n\t\tList<PayedProduct> list=null;\r\n\t\ttry {\r\n\t\t\tString sql=\"SELECT * FROM payedproduct WHERE payedproduct_name LIKE CONCAT('%',?,'%')\";\r\n\t\t\treturn qr.query(sql, new BeanListHandler<PayedProduct>(PayedProduct.class),pname);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn list;\r\n\t}",
"java.lang.String getDataId();",
"java.lang.String getDataId();",
"@Override\r\n\tpublic String[] getData(String[] sql) {\n\t\treturn null;\r\n\t}",
"public List<productmodel> getproductbyname(String name);",
"@Override\n\tpublic HashMap<String, String> getData() {\n\t\treturn dataSourceApi.getData();\n\t}",
"private String getResponse(Object responseData, String shortName) {\n\t\tArrayList<String> result = new ArrayList<String>();\n\n\t\ttry {\n\t\t\tString responseCode = responseData.getClass().getMethod(\"getResponseCode\").invoke(responseData).toString();\n\n\t\t\tString msg = Constants.getResponseMessage(responseCode);\n\t\t\tString response = \"\";\n\t\t\tif (responseCode.equals(\"00\"))\n\t\t\t\tresponse = getResultSet(responseData, \"NESingleResponse\");\n\n\t\t\tresult.add(msg);\n\t\t\tresult.add(response);\n\n\t\t\tSystem.out.println(responseCode);\n\t\t\tSystem.out.println(result.get(0));\n\t\t\tSystem.out.println(result.get(1));\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\n\t\treturn gson.toJson(result);\n\t}",
"public String getDataString() {\r\n return formatoData.format(data);\r\n }",
"public String dataResult() {\r\n\r\n final String theRows = this.getParam(\"rows\");\r\n final String thePage = this.getParam(\"page\");\r\n final String theSortBy = this.getParam(\"sidx\");\r\n final String theSortType = this.getParam(\"sord\");\r\n\r\n this.extractItems();\r\n\r\n // Remove all items update and add the update version.\r\n if (this.addAdded()) {\r\n Set < String > keySet = this.updatedGroups.keySet();\r\n List < Sortable > sortables = this.storedData.getListOfSortable();\r\n for (String key : keySet) {\r\n Iterator < Sortable > itSortable = sortables.iterator();\r\n boolean findItem = false;\r\n while (itSortable.hasNext() && !findItem) {\r\n Subject aSubject = (Subject) itSortable.next();\r\n if (aSubject.getId().equals(key)) {\r\n this.storedData.delRowDataResult(aSubject);\r\n this.storedData.addRowDataResult(this.updatedGroups.get(key));\r\n findItem = true;\r\n }\r\n }\r\n }\r\n }\r\n\r\n this.storedData.setIsExistingAddedItem(this.getIsExistAddedItems());\r\n this.storedData.setNbResultDisplay(theRows);\r\n this.storedData.setCurrentPage(thePage);\r\n\r\n TableData tableData = TableDataFactory.populate(this.storedData, this.sortableRowDataWrapper, theSortBy,\r\n theSortType);\r\n\r\n return this.xmlProducerWrapper.wrap(TableDataFactory.getProducer(tableData));\r\n }",
"public String getData() throws SQLException {\n\t\tString[] columns = new String[] { KEY_ROWID, KEY_NAME, KEY_HOTNESS };\n\t\tCursor c = ourDatabase.query(DATABASE_TABLE, columns, null, null, null,\n\t\t\t\tnull, null);\n\t\tString result = \"\";\n\t\tint iRow = c.getColumnIndex(KEY_ROWID);\n\t\tint iName = c.getColumnIndex(KEY_NAME);\n\t\tint iHotness = c.getColumnIndex(KEY_HOTNESS);\n\n\t\tfor (c.moveToFirst(); !c.isAfterLast(); c.moveToNext()) {\n\t\t\tresult += c.getString(iRow) + \" \" + c.getString(iName) + \" \"\n\t\t\t\t\t+ c.getString(iHotness) + \"\\n\";\n\t\t}\n\n\t\treturn result;\n\t}",
"@DataProvider\r\n\t\t public Object[][] getTestData()\r\n\t\t\t{\r\n\t\t\t \r\n\t\t\t\treturn TestUtil.getData(suiteProductDescPageXls,this.getClass().getSimpleName());\r\n\t\t\t}",
"public String getTestData(String colName, String rowName)\n\t\t\tthrows BiffException, IOException {\n\t\ttestData.customizedTestDataDriver(root + \"//test-data//DataInput.xls\",\n\t\t\t\t\"TestData\");\n\t\t// load the Excel Sheet Columns in to Dictionary for Further use in our\n\t\t// Test cases.\n\t\ttestData.ColumnDictionary();\n\t\t// load the Excel Sheet Rows in to Dictionary for Further use in our\n\t\t// Test cases.\n\t\ttestData.RowDictionary();\n\t\tString testDataValue = (testData.ReadCell(testData.GetCol(colName),\n\t\t\t\ttestData.GetRow(rowName)));\n\t\treturn testDataValue;\n\t}",
"public String getTestData(RequestTestDataType testData) {\n return testDataMap.get(testData);\n }",
"public static JSONObject getKitchenDeliveryBoys(String kitchenName) throws JSONException{\n\t\tJSONArray kitchenDeliveryBoyArray = new JSONArray();\n\t\tJSONObject jsonKitchenDeliveryBoys = new JSONObject();\n\t\ttry {\n\t\t\tSQL:{\n\t\t\tConnection connection = DBConnection.createConnection();\n\t\t\tPreparedStatement preparedStatement = null;\n\t\t\tResultSet resultSet = null;\n\t\t\tString sql = \"SELECT * FROM vw_delivery_boy_data WHERE \"\n\t\t\t\t\t+ \" kitchen_name = ?\";\n\t\t\ttry {\n\t\t\t\tpreparedStatement = connection.prepareStatement(sql);\n\t\t\t\tpreparedStatement.setString(1, kitchenName);\n\t\t\t\tresultSet = preparedStatement.executeQuery();\n\t\t\t\twhile(resultSet.next()){\n\t\t\t\t\tJSONObject boys = new JSONObject();\n\t\t\t\t\tif(resultSet.getString(\"delivery_boy_name\")!=null){\n\t\t\t\t\t\tboys.put(\"name\",resultSet.getString(\"delivery_boy_name\") );\n\t\t\t\t\t}else{\n\t\t\t\t\t\tboys.put(\"name\", \" \");\n\t\t\t\t\t}\n\t\t\t\t\tif( resultSet.getString(\"delivery_boy_phn_number\")!=null){\n\t\t\t\t\t\tboys.put(\"mobileno\",resultSet.getString(\"delivery_boy_phn_number\"));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tboys.put(\"mobileno\", \" \");\n\t\t\t\t\t}\n\t\t\t\t\t/*if( resultSet.getString(\"delivery_boy_vehicle_reg_no\")!=null){\n\t\t\t\t\t\t\t\tboys.put(\"vehicleno\",resultSet.getString(\"delivery_boy_vehicle_reg_no\") );\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tboys.put(\"vehicleno\", \" \");\n\t\t\t\t\t\t\t}*/\n\t\t\t\t\tif(resultSet.getString(\"delivery_boy_id\")!=null){\n\t\t\t\t\t\tboys.put(\"boyid\", resultSet.getString(\"delivery_boy_id\"));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tboys.put(\"boyid\", \" \");\n\t\t\t\t\t}\n\t\t\t\t\tkitchenDeliveryBoyArray.put(boys);\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} finally{\n\t\t\t\tif(connection!=null){\n\t\t\t\t\tconnection.close();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\tSystem.out.println(\"deliveryboys web service is end here..\"+kitchenDeliveryBoyArray.length());\n\t\tjsonKitchenDeliveryBoys.put(\"boylist\", kitchenDeliveryBoyArray);\n\t\treturn jsonKitchenDeliveryBoys;\n\t}",
"public final String getDataName() {\n if (dataName == null) {\n return this.getClass().getName();\n }\n return dataName;\n }",
"private void requestData() {\n Jc11x5Factory.getInstance().getJobPriceList(mHandler);\n }",
"String getData();",
"protected abstract Map<String, Map<String, Object>> getData(String columnFamilyName);",
"public String getData() {\n\t\treturn countryName + \" (\" + countryID + \")\";\n\t}",
"private Contact getEmployeePayrollData(String name) {\n\t\treturn this.employeePayrollList.stream().filter(contactItem -> contactItem.name.equals(name)).findFirst()\n\t\t\t\t.orElse(null);\n\t}",
"public String name_data(String name)\r\n/* 14: */ {\r\n/* 15:27 */ if (name == \"gr_id\") {\r\n/* 16:27 */ return this.config.id.name;\r\n/* 17: */ }\r\n/* 18:28 */ String[] parts = name.split(\"c\");\r\n/* 19: */ try\r\n/* 20: */ {\r\n/* 21:32 */ if (parts[0].equals(\"\"))\r\n/* 22: */ {\r\n/* 23:33 */ int index = Integer.parseInt(parts[1]);\r\n/* 24:34 */ return ((ConnectorField)this.config.text.get(index)).name;\r\n/* 25: */ }\r\n/* 26: */ }\r\n/* 27: */ catch (NumberFormatException localNumberFormatException) {}\r\n/* 28:38 */ return name;\r\n/* 29: */ }",
"@Override\n\tpublic List<Map<String, String>> getData() throws Exception{\n\t\tqueryForList(\"\", null);\n\t\treturn null;\n\t}",
"public String getData() {\r\n return Data;\r\n }",
"public String getData() {\r\n return Data;\r\n }",
"String[] getData();",
"public void getData(Connection connection, StoreData data){\n\t\t//This first set of code prepares a statement to get the data from the database\n\t\tPreparedStatement preStmt=null;\n\t\tStoreData theData = data;\n\t\t//This code prepares some date formats to convert what is typed in\n\t\tSimpleDateFormat displayDate = new SimpleDateFormat(\"MM-dd-yyyy\");\n\t\tSimpleDateFormat dbDate = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tString formatSDate = null;\n\t\tString formatEDate = null;\n\t\t//The following is the actual sql statement to be used\n\t\tString stmt = \"SELECT * FROM Event WHERE Name= ?\";\n\t\t\n\t\t//The following try catch block gets all of the events that have the same name as the name typed in\n\t\t//It loops through a result set that is returned from the database storing the data in store data objects\n\t\ttry {\n\t\t\tpreStmt = (PreparedStatement) connection.prepareStatement(stmt);\n\t\t\tpreStmt.setString(1, data.getName());\n\t\t\tResultSet rs = preStmt.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tString description = rs.getString(\"Description\");\n\t\t\t\tString location = rs.getString(\"Location\");\n\t\t\t\tString date = rs.getString(\"Start_Date\");\n\t\t\t\tString endDate = rs.getString(\"End_Date\");\n\t\t\t\t//This try catch block deals with formatting the date correctly \n\t\t\t\ttry {\n\n\t\t\t\t\tformatSDate = displayDate.format(dbDate.parse(date));\n\t\t\t\t\tformatEDate = displayDate.format(dbDate.parse(endDate));\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tString sTime = rs.getString(\"Start_Time\");\n\t\t\t\tString eTime = rs.getString(\"End_Time\");\n\t\t\t\tdata.setDescription(description);\n\t\t\t\tdata.setLocation(location);\n\t\t\t\tdata.setDate(formatSDate);\n\t\t\t\tdata.setEndDate(formatEDate);\n\t\t\t\tdata.setSTime(sTime);\n\t\t\t\tdata.setETime(eTime);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"Row(String name) {\r\n\t\tthis.name = name;\r\n\t\t//this.price = price;\r\n\t\t//this.type = type;\r\n\t}",
"public Set<ProductData> getAllProductData() {\n\t\tSet<ProductData> data = new HashSet<>();\n\n\t\t//Read ERP.txt file\n\t\ttry (Scanner reader = new Scanner(SupplierIntegrator.class.getResourceAsStream(\"ERP.txt\"))) {\n\t\t\twhile (reader.hasNextLine()) {\n\t\t\t\t//Read each line. Skip it, if it begins with the comment symbol '#'\n\t\t\t\tString line = reader.nextLine();\n\t\t\t\tif (line.startsWith(\"#\")) continue;\n\n\t\t\t\t//Read the information from the line using a new scanner with ':' as its delimiter\n\t\t\t\tScanner lineReader = new Scanner(line);\n\t\t\t\tlineReader.useDelimiter(\":\");\n\t\t\t\tint id = lineReader.nextInt();\n\t\t\t\tString name = lineReader.next();\n\t\t\t\tdouble price = lineReader.nextDouble();\n\n\t\t\t\t//Add product data\n\t\t\t\tdata.add(new ProductData(id, name, price));\n\t\t\t}\n\t\t}\n\n\t\treturn data;\n\t}",
"private void callForRecords() throws SQLException, NumberFormatException, ClassNotFoundException{\n\t\tResultSet rs;\n\t\toutputTA.setText(\"PURCHASE ID\"\n\t\t\t\t+\"\\t\"+\"| CUSTOMER\"\n\t\t\t\t+\"\\t\\t\"+\"| NO. OF ITEMS\"\n\t\t\t\t+\"\\t\"+\"| AMOUNT\"\n\t\t\t\t+\"\\t\"+\"| MODE OF PAYMENT\"\n\t\t\t\t+\"\\t\"+\"| TIME OF PURCHASE\"\n\t\t\t\t+\"\\n\");\n\t\tif(custTypeCB.getSelectedIndex() == 3)\n\t\t\trs = dBConnection.getRecords(Integer.parseInt(custIdTF.getText()));\n\t\telse\n\t\t\trs = dBConnection.getRecords(custTypeCB.getSelectedIndex());\n\t\t\n\t\twhile(rs.next()){\n\t\t\tString name = rs.getString(2);\n\t\t\t\n\t\t\t//trick to make all name length same so that they line up correctly in output textarea.\n\t\t\tif(name.length()<20){\n\t\t\t\tint spacesRequired = 20 - name.length();\n\t\t\t\tfor(int i = 0; i< spacesRequired; i++)\n\t\t\t\t\tname.concat(\" \");\n\t\t\t}\n\t\t\t\n\t\t\toutputTA.append(\"_________________________________________________________________\"\n\t\t\t\t\t+ \"___________________________________________\\n\");\n\t\t\toutputTA.append(rs.getString(1)\n\t\t\t\t\t+\"\\t \"+name\n\t\t\t\t\t+\"\\t\\t \"+rs.getString(3)\n\t\t\t\t\t+\"\\t \"+rs.getString(4)\n\t\t\t\t\t+\"\\t \"+rs.getString(5)\n\t\t\t\t\t+\"\\t\\t \"+rs.getString(6)+\"\\n\");\n\t\t}\n\t\tdBConnection.disconnect();\n\t}",
"public String getData(String rawData){\n\t\treturn \"1\";\n\t}",
"public static void getPartNumberDetails(ArrayList<String> data, String table, String partNumber)\n {\n PreparedStatement stmt = null;\n ResultSet myRst = null;\n\n try\n {\n String pstmt = \"SELECT * FROM \" + table + \" WHERE \" + table + \"_Part_Number\" + \" = ?\";\n\n stmt = DBConnectionManager.con.prepareStatement(pstmt);\n stmt.setString(1,partNumber);\n\n\n myRst = stmt.executeQuery();\n ResultSetMetaData rsmd = myRst.getMetaData();\n\n //move the cursor to the first position\n myRst.next();\n\n //size is the number of columns present in the specified product category table\n //we are looking through. This loop just goes through the entry we just got and\n //inputs them into the 'data' array in order\n int size = rsmd.getColumnCount();\n\n for(int j=1; j<=size; j++)\n {\n data.add(myRst.getString(j));\n }\n\n } catch (SQLException e)\n {\n e.printStackTrace();\n }\n finally\n {\n try { if (myRst != null) myRst.close(); } catch (Exception ignored) {}\n try { if (stmt != null) stmt.close(); } catch (Exception ignored) {}\n }\n }",
"public String getName() {\n\t\treturn this.data.getName();\n\t}",
"@RequiresIdFrom(type = Governor.class)\n\t@Override\n\tpublic String dataRow()\n\t{\n\t\treturn String.format(\"%d,%s\", first, second.getSqlId());\n\t}",
"public void getData(fyiReporting.RDL.Report rpt, String xmlData, Fields flds, Filters f) throws Exception {\n Rows uData = this.getMyUserData(rpt);\n if (uData != null)\n {\n this.setMyData(rpt,uData);\n return ;\n }\n \n int fieldCount = flds.getItems().Count;\n XmlDocument doc = new XmlDocument();\n doc.PreserveWhitespace = false;\n doc.LoadXml(xmlData);\n XmlNode xNode = new XmlNode();\n xNode = doc.LastChild;\n if (xNode == null || !(StringSupport.equals(xNode.Name, \"Rows\") || StringSupport.equals(xNode.Name, \"fyi:Rows\")))\n {\n throw new Exception(\"Error: XML Data must contain top level rows.\");\n }\n \n Rows _Data = new Rows(rpt,null,null,null);\n List<Row> ar = new List<Row>();\n _Data.setData(ar);\n int rowCount = 0;\n for (Object __dummyForeachVar4 : xNode.ChildNodes)\n {\n XmlNode xNodeRow = (XmlNode)__dummyForeachVar4;\n if (xNodeRow.NodeType != XmlNodeType.Element)\n continue;\n \n if (!StringSupport.equals(xNodeRow.Name, \"Row\"))\n continue;\n \n Row or = new Row(_Data,fieldCount);\n for (Object __dummyForeachVar3 : xNodeRow.ChildNodes)\n {\n XmlNode xNodeColumn = (XmlNode)__dummyForeachVar3;\n Field fld = (Field)(flds.getItems()[xNodeColumn.Name]);\n // Find the column\n if (fld == null)\n continue;\n \n // Extraneous data is ignored\n TypeCode tc = fld.getqColumn() != null ? fld.getqColumn().getcolType() : fld.getType();\n if (xNodeColumn.InnerText == null || xNodeColumn.InnerText.Length == 0)\n or.getData()[fld.getColumnNumber()] = null;\n else if (tc == TypeCode.String)\n or.getData()[fld.getColumnNumber()] = xNodeColumn.InnerText;\n else\n {\n try\n {\n or.getData()[fld.getColumnNumber()] = Convert.ChangeType(xNodeColumn.InnerText, tc, NumberFormatInfo.InvariantInfo);\n }\n catch (Exception __dummyCatchVar2)\n {\n // all conversion errors result in a null value\n or.getData()[fld.getColumnNumber()] = null;\n }\n \n } \n }\n // Apply the filters\n if (f == null || f.apply(rpt,or))\n {\n or.setRowNumber(rowCount);\n //\n rowCount++;\n ar.Add(or);\n }\n \n }\n ar.TrimExcess();\n // free up any extraneous space; can be sizeable for large # rows\n if (f != null)\n f.applyFinalFilters(rpt,_Data,false);\n \n setMyData(rpt,_Data);\n }",
"public String fetchData(String tableName, int id, String columnName) throws SQLException {\n\n\t\ttry {\n\t\t\tSystem.out.println(\"Id of the Products is \" + id);\n\n\t\t\tSystem.out.println(\"select \" + columnName + \" from \" + tableName + \" where \"\n\t\t\t\t\t+ getPrimaryKeyColumnName(tableName) + \" = \" + id);\n\n\t\t\trs = stmt.executeQuery(\"select \" + columnName + \" from \" + tableName + \" where \"\n\t\t\t\t\t+ getPrimaryKeyColumnName(tableName) + \" = \" + id);\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tSystem.out.println(rs.getString(1));\n\t\t\t\treturn rs.getString(1);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Sorry! wrong Input\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn rs.getString(1);\n\t}",
"@Override\n\tpublic String getData(ResponseDTO responseDto) {\n\n\t\tif (responseDto != null) {\n\t\t\tif (responseDto.getDataSourceName() != \"\") {\n\n\t\t\t\tdataSourceName = new DataSourceName();\n\t\t\t\tdataSourceName = dataSourceNameRepository.findByName(responseDto.getDataSourceName());\n\t\t\t\t// data_source_name\n\t\t\t\tif (dataSourceName == null) {\t\t\t\t\t\n\t\t\t\t\tdataSourceName.setName(responseDto.getDataSourceName());\n\n\t\t\t\t\tdataSourceName = dataSourceNameRepository.save(dataSourceName);\n\t\t\t\t}\n\n\t\t\t\t// data_source_file\n\t\t\t\tdataSourceFile = new DataSourceFile();\n\t\t\t\tdataSourceFile.setDataSourceName(dataSourceName);\n\t\t\t\tdataSourceFile.setFileName(responseDto.getFileName());\n\t\t\t\tdataSourceFile.setYear(responseDto.getYear());\n\t\t\t\tdataSourceFile.setPercentage(responseDto.isPercentage());\n\t\t\t\tdataSourceFile.setSubmitAction(responseDto.getSubmitAction());\n\t\t\t\tdataSourceFile.setStatisticType(responseDto.getStatisticType());\n\t\t\t\tdataSourceFile.setS3KeyName(responseDto.getS3KeyName());\n\n\t\t\t\tdataSourceFile = dataSourceFileRepository.save(dataSourceFile);\n\t\t\t} else {\n\t\t\t\treturn \"DataSourceName is null\";\n\t\t\t}\n\n\t\t\t// index\n\t\t\tif (responseDto.getListIndex() != null) {\n\t\t\t\tfor (IndexDTO indexDto : responseDto.getListIndex()) {\n\t\t\t\t\tIndex index = new Index();\n\t\t\t\t\tindex.setDisplayName(indexDto.getDisplayName());\n\t\t\t\t\tindex.setIndexName(indexDto.getIndexName());\n\t\t\t\t\tindex.setCreatedAt(new Date());\n\t\t\t\t\tindex.setUpdatedAt(new Date());\n\n\t\t\t\t\tindex = indexRepository.save(index);\n\n\t\t\t\t\t// data_source_index\n\t\t\t\t\t// Check(data_source_name)?\n\t\t\t\t\tDataSourceIndex dataSourceIndex = new DataSourceIndex();\n\t\t\t\t\tdataSourceIndex.setDataSourceName(dataSourceName);\n\t\t\t\t\tdataSourceIndex.setIndex(index);\n\n\t\t\t\t\tdataSourceIndexRepository.save(dataSourceIndex);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn \"ListIndex is null\";\n\t\t\t}\n\n\t\t\t// geo_level_lookup\n\t\t\tif (responseDto.getListSheetData() != null) {\n\t\t\t\tfor (SheetDataDTO sheetDataDto : responseDto.getListSheetData()) {\n\t\t\t\t\tif (sheetDataDto.getGeoLevel() != \"\") {\n\t\t\t\t\t\tif (geoLevelLookupRepository.findByName(sheetDataDto.getGeoLevel()) != null) {\n\t\t\t\t\t\t\tgeoLevelLookup = geoLevelLookupRepository.findByName(sheetDataDto.getGeoLevel());\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tgeoLevelLookup = new GeoLevelLookup();\n\t\t\t\t\t\t\tgeoLevelLookup.setGeoName(sheetDataDto.getGeoLevel());\n\n\t\t\t\t\t\t\tgeoLevelLookup = geoLevelLookupRepository.save(geoLevelLookup);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// data_source_geo_level\n\t\t\t\t\t\t// Check(data_source_file)?\n\t\t\t\t\t\tDataSourceGeoLevel dataSourceGeoLevel = new DataSourceGeoLevel();\n\t\t\t\t\t\tdataSourceGeoLevel.setDataSourceFile(dataSourceFile);\n\t\t\t\t\t\tdataSourceGeoLevel.setGeoLevelLookup(geoLevelLookup);\n\n\t\t\t\t\t\tdataSourceGeoLevel = dataSourceGeoLevelRepository.save(dataSourceGeoLevel);\n\n\t\t\t\t\t\t// data_source_column_definition\n\t\t\t\t\t\tif (dataSourceName != null) {\n\t\t\t\t\t\t\tList<String> stringList = Arrays.asList(\"OVERALL\", \"BE_EXCLUDED\", \"GEO\");\n\t\t\t\t\t\t\tif (sheetDataDto.getListHeaderData() != null) {\n\t\t\t\t\t\t\t\tfor (int i = 2; i < sheetDataDto.getListHeaderData().size(); i++) {\n\t\t\t\t\t\t\t\t\tif (sheetDataDto.getListHeaderData().get(i).getCategory().equals(\"OVERALL\")) {\n\t\t\t\t\t\t\t\t\t\t// CheckListRowData(?)\n\t\t\t\t\t\t\t\t\t\tfor (List<String> rowData : sheetDataDto.getListRowData()) {\n\t\t\t\t\t\t\t\t\t\t\taggregatedData = new AggregatedData();\n\t\t\t\t\t\t\t\t\t\t\taggregatedData.setGeoLevelState(rowData.get(0));\n\t\t\t\t\t\t\t\t\t\t\taggregatedData.setGeoLevelName(rowData.get(1));\n\t\t\t\t\t\t\t\t\t\t\taggregatedData.setDataSourceGeoLevel(dataSourceGeoLevel); // Check(?)\n\t\t\t\t\t\t\t\t\t\t\taggregatedData\n\t\t\t\t\t\t\t\t\t\t\t\t\t.setOverall(Double.parseDouble(rowData.get(i)));\n\n\t\t\t\t\t\t\t\t\t\t\taggregatedData = aggregatedDataRepository.save(aggregatedData);\n\t\t\t\t\t\t\t\t\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\n\t\t\t\t\t\t\t\tfor (int i = 0; i < sheetDataDto.getListHeaderData().size(); i++) {\n\t\t\t\t\t\t\t\t\tDataSourceColumnDefinition dataSourceColumnDefinition = new DataSourceColumnDefinition();\n\t\t\t\t\t\t\t\t\tdataSourceColumnDefinition\n\t\t\t\t\t\t\t\t\t\t\t.setCategory(sheetDataDto.getListHeaderData().get(i).getCategory());\n\t\t\t\t\t\t\t\t\tdataSourceColumnDefinition\n\t\t\t\t\t\t\t\t\t\t\t.setName(sheetDataDto.getListHeaderData().get(i).getNameInExcelFile());\n\t\t\t\t\t\t\t\t\tdataSourceColumnDefinition\n\t\t\t\t\t\t\t\t\t\t\t.setUiName(sheetDataDto.getListHeaderData().get(i).getNameForUI());\n\t\t\t\t\t\t\t\t\tdataSourceColumnDefinition.setDataSourceName(dataSourceName);\n\n\t\t\t\t\t\t\t\t\tdataSourceColumnDefinition = dataSourceColumnDefinitionRepository\n\t\t\t\t\t\t\t\t\t\t\t.save(dataSourceColumnDefinition);\n\n\t\t\t\t\t\t\t\t\tif (sheetDataDto.getListRowData() != null) {\n\t\t\t\t\t\t\t\t\t\tif (!stringList\n\t\t\t\t\t\t\t\t\t\t\t\t.contains(sheetDataDto.getListHeaderData().get(i).getCategory())) {\n\t\t\t\t\t\t\t\t\t\t\taggregatedDataCategory = new AggregatedDataCategory();\n\t\t\t\t\t\t\t\t\t\t\taggregatedDataCategory\n\t\t\t\t\t\t\t\t\t\t\t\t\t.setDataSourceColumnDefinition(dataSourceColumnDefinition);\n\t\t\t\t\t\t\t\t\t\t\taggregatedDataCategory.setAggregatedData(aggregatedData);\n\t\t\t\t\t\t\t\t\t\t\tfor (List<String> rowData : sheetDataDto.getListRowData()) {\n\t\t\t\t\t\t\t\t\t\t\t\taggregatedDataCategory.setDataValue(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDouble.parseDouble(rowData.get(i)));\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\taggregatedDataCategoryRepository.save(aggregatedDataCategory);\n\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\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\treturn \"ListRowData is null\";\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} else {\n\t\t\t\t\t\t\t\treturn \"ListHeaderData is null\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn \"GeoLevel is null\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn \"ListSheetData is null\";\n\t\t\t}\n\t\t} else {\n\t\t\treturn \"responseDto is null\";\n\t\t}\n\t\treturn \"Save!\";\n\t}",
"@Override\n public FlotillaData getData() {\n FlotillaData data = new FlotillaData();\n data.setName(name);\n data.setLocation(reference);\n data.setBoats(getBoatNames(boats));\n\n return data;\n }",
"public String getData()\n {\n return data;\n }",
"private void loadData()\r\n\t{\r\n\t\taddProduct(\"Area\", \"Education\");\r\n\t\taddProduct(\"Area\", \"Environment\");\r\n\t\taddProduct(\"Area\", \"Health\");\r\n\r\n\t\taddProduct(\"Domain\", \"Documentation\");\r\n\t\taddProduct(\"Domain\", \"Project Activity\");\r\n\t\taddProduct(\"Domain\", \"Technology\");\r\n\r\n\t\taddProduct(\"City\", \"Bangalore\");\r\n\t\taddProduct(\"City\", \"Hyderabad\");\r\n\t\taddProduct(\"City\", \"Lucknow\");\r\n\r\n\t\taddProduct(\"Activity_Type\", \"Onsite\");\r\n\t\taddProduct(\"Activity_Type\", \"Offsite\");\r\n\r\n\t}",
"private JSONObject getGSTR3B_Section_4_A_1_Data(JSONObject params, String companyId, JSONArray dataJArr) throws JSONException, ServiceException {\n JSONObject reqParams = new JSONObject(params, JSONObject.getNames(params));\n reqParams.put(\"GST3B\", !params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false));\n reqParams.put(\"isServiceProduct\", false);\n reqParams.put(\"CustomerType\", Constants.CUSTVENTYPE_Import);\n reqParams.put(GSTRConstants.ADD_LANDEDCOST_JOIN_FOR_IMPORT_INVOICES, true);\n reqParams.put(\"excludetaxClassType\", true);\n reqParams.put(\"registrationType\", Constants.GSTRegType_Unregistered);\n reqParams.put(\"typeofjoinisleft\", true);\n// reqParams.put(\"interstate\", true);\n reqParams.put(\"taxClassType\", FieldComboData.TaxClass_Percenatge);\n reqParams.put(\"itctype\", Constants.GST_ITCTYPE_DEFAULT+\",\"+Constants.GST_ITCTYPE_REVERSED);\n JSONObject jSONObject = new JSONObject();\n if ((reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) || (!StringUtil.isNullOrEmpty(params.optString(\"transactionType\", null)) && (params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_INVOICE || params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_ALL))) {\n /**\n * For GSTR3B-Detail View.\n */\n jSONObject = getGoodsReceiptForGSTR3BTaxable(reqParams);\n }\n if (!(reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) && params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n JSONArray tempArr = jSONObject.optJSONArray(\"data\");\n if (tempArr != null && tempArr.length() > 0) {\n dataJArr = StringUtil.concatJSONArray(dataJArr, tempArr);\n }\n }\n\n /**\n * Vendor DN \n */\n reqParams = new JSONObject(params, JSONObject.getNames(params));\n reqParams.put(\"GST3B\", !params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false));\n reqParams.put(\"isServiceProduct\", false);\n reqParams.put(\"CustomerType\", Constants.CUSTVENTYPE_Import);\n reqParams.put(\"registrationType\", Constants.GSTRegType_Unregistered);\n reqParams.put(\"typeofjoinisleft\", true);\n reqParams.put(\"taxClassType\", FieldComboData.TaxClass_Percenatge);\n reqParams.remove(\"cnentityValue\");\n JSONObject temp = new JSONObject();\n if ((reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) || (!StringUtil.isNullOrEmpty(params.optString(\"transactionType\", null)) && (params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_NOTE || params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_ALL))) {\n /**\n * For GSTR3B-Detail View.\n */\n temp = getDNForGSTR3BTaxable(reqParams);\n }\n if (!(reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) && params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n JSONArray tempArr = temp.optJSONArray(\"data\");\n if (tempArr != null && tempArr.length() > 0) {\n dataJArr = StringUtil.concatJSONArray(dataJArr, tempArr);\n }\n } else {\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount((jSONObject.optDouble(\"taxableamt\", 0.0) + temp.optDouble(\"taxableamt\", 0.0)), companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount((jSONObject.optDouble(\"igst\", 0.0) + temp.optDouble(\"igst\", 0.0)), companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount((jSONObject.optDouble(\"cgst\", 0.0) + temp.optDouble(\"cgst\", 0.0)), companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount((jSONObject.optDouble(\"sgst\", 0.0) + temp.optDouble(\"sgst\", 0.0)), companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount((jSONObject.optDouble(\"csgst\", 0.0) + temp.optDouble(\"csgst\", 0.0)), companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount((jSONObject.optDouble(\"totaltax\", 0.0) + temp.optDouble(\"totaltax\", 0.0)), companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount((jSONObject.optDouble(\"totalamount\", 0.0) + temp.optDouble(\"totalamount\", 0.0)), companyId));\n\n }\n\n /**\n * Vendor CN\n */\n reqParams = new JSONObject(params, JSONObject.getNames(params));\n reqParams.put(\"GST3B\", !params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false));\n reqParams.put(\"isServiceProduct\", false);\n reqParams.put(\"CustomerType\", Constants.CUSTVENTYPE_Import);\n reqParams.put(\"registrationType\", Constants.GSTRegType_Unregistered);\n reqParams.put(\"typeofjoinisleft\", true);\n reqParams.put(\"taxClassType\", FieldComboData.TaxClass_Percenatge);\n reqParams.put(\"onlycnagainstvendor\", true);\n temp = new JSONObject();\n if ((reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) || (!StringUtil.isNullOrEmpty(params.optString(\"transactionType\", null)) && (params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_NOTE || params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_ALL))) {\n /**\n * For GSTR3B-Detail View.\n */\n temp = getDNForGSTR3BTaxable(reqParams);\n }\n if (!(reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) && params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n JSONArray tempArr = temp.optJSONArray(\"data\");\n if (tempArr != null && tempArr.length() > 0) {\n dataJArr = StringUtil.concatJSONArray(dataJArr, tempArr);\n }\n } else {\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount((jSONObject.optDouble(\"taxableamt\", 0.0) + temp.optDouble(\"taxableamt\", 0.0)), companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount((jSONObject.optDouble(\"igst\", 0.0) + temp.optDouble(\"igst\", 0.0)), companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount((jSONObject.optDouble(\"cgst\", 0.0) + temp.optDouble(\"cgst\", 0.0)), companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount((jSONObject.optDouble(\"sgst\", 0.0) + temp.optDouble(\"sgst\", 0.0)), companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount((jSONObject.optDouble(\"csgst\", 0.0) + temp.optDouble(\"csgst\", 0.0)), companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount((jSONObject.optDouble(\"totaltax\", 0.0) + temp.optDouble(\"totaltax\", 0.0)), companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount((jSONObject.optDouble(\"totalamount\", 0.0) + temp.optDouble(\"totalamount\", 0.0)), companyId));\n jSONObject.put(\"tableno\", \"\");\n jSONObject.put(\"particulars\", GSTRConstants.GSTR3B_SECTION_4_A_1);\n jSONObject.put(\"fmt\", \"B\");\n jSONObject.put(\"enableViewDetail\", true);\n dataJArr.put(jSONObject);\n }\n return jSONObject;\n }",
"public Object[] getData() {\n return rowData;\n }",
"public static void getCategoryDetailsPartial(ArrayList<String> dataNames, String table)\n {\n PreparedStatement stmt = null;\n ResultSet myRst = null;\n\n try\n {\n String pstmt = \"SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = ? AND COLUMN_KEY != 'PRI';\";\n\n stmt = DBConnectionManager.con.prepareStatement(pstmt);\n stmt.setString(1,table);\n myRst = stmt.executeQuery();\n\n //Since this will always be a table with 1 column\n //we can just hard code 1 into the column index\n //and move row by row down the table\n while(myRst.next())\n {\n dataNames.add(myRst.getString(1));\n }\n\n } catch (SQLException e)\n {\n e.printStackTrace();\n }\n finally\n {\n try { if (myRst != null) myRst.close(); } catch (Exception ignored) {}\n try { if (stmt != null) stmt.close(); } catch (Exception ignored) {}\n }\n\n }",
"public void getData() {\n if ( jobEntry.getName() != null ) {\n wName.setText( jobEntry.getName() );\n }\n wIncType.setText(jobEntry.getIncType());\n wIncField.setText(jobEntry.getIncField());\n wDataFormat.setText(jobEntry.getDataFormat());\n wStartValue.setText(jobEntry.getStartValue());\n wEndValue.setText(jobEntry.getEndValue());\n\n wName.selectAll();\n wName.setFocus();\n }",
"@SuppressWarnings(\"finally\")\n\t@Override\n\tpublic Response showName() {\n\t\tBaseResponse<NotifyTemplate> br = new BaseResponse<NotifyTemplate>();\n\t\ttry\n\t\t{\n\t\tList<NotifyTemplate> nameList;\n\t\tjdbcTemplate.setDataSource(dataSourceProvider.getDataSource(FiinfraConstants.BU_DEFAULT));\n\t\tnameList=jdbcTemplate.query(FiinfraConstants.SP_GET_NAME,new Object[]{} ,new BeanPropertyRowMapper<NotifyTemplate>(NotifyTemplate.class));\n\t\tbr.setResponseListObject(nameList);\n\t\tresponse=FiinfraResponseBuilder.getSuccessResponse(br, null);\n\t\t} \n\t\tcatch (DataAccessException e) {\n\t\t\tresponse = FiinfraResponseBuilder.getErrorResponse(e.getMessage().toString());\n\t\t} \n\t\tfinally\n\t\t{ \n\t\t\treturn response;\n\t\t\t\t} \n\t}",
"public ArrayList<String> getSellers(String productName);",
"public java.lang.String getData() {\r\n return data;\r\n }",
"@DataProvider(name = \"empdataprovider\")\n\tString[][] getRegData() throws IOException {\n\t\tString path = System.getProperty(\"user.dir\") + \"/tradeBeaExcell/TradeBeaApiTest.xlsx\";\n\n\t\tint rownum = XLUtils.getRowCount(path, \"Registration\");\n\t\tint colcount = XLUtils.getCellCount(path, \"Registration\", 1);\n\n\t\tString empdata[][] = new String[rownum][colcount];\n\t\tfor (int i = 1; i <= rownum; i++) {\n\t\t\tfor (int j = 0; j < colcount; j++) {\n\t\t\t\tempdata[i - 1][j] = XLUtils.getCellData(path, \"Registration\", i, j);\n\t\t\t}\n\t\t}\n\n\t\treturn (empdata);\n\t}",
"public String getTableData() {\r\n return tableData;\r\n }",
"public String toString()\n\t{\n\t\treturn _RowData.toString();\n\t}",
"public Object getByName(String name)\n {\n if (name.equals(\"NewsletterId\"))\n {\n return new Integer(getNewsletterId());\n }\n if (name.equals(\"NewsletterCode\"))\n {\n return getNewsletterCode();\n }\n if (name.equals(\"Status\"))\n {\n return new Integer(getStatus());\n }\n if (name.equals(\"Priority\"))\n {\n return new Integer(getPriority());\n }\n if (name.equals(\"IssuedDate\"))\n {\n return getIssuedDate();\n }\n if (name.equals(\"ClosedDate\"))\n {\n return getClosedDate();\n }\n if (name.equals(\"SentTime\"))\n {\n return getSentTime();\n }\n if (name.equals(\"EmailFormat\"))\n {\n return new Integer(getEmailFormat());\n }\n if (name.equals(\"LanguageId\"))\n {\n return new Integer(getLanguageId());\n }\n if (name.equals(\"CustomerCatId\"))\n {\n return new Integer(getCustomerCatId());\n }\n if (name.equals(\"CustomerType\"))\n {\n return new Integer(getCustomerType());\n }\n if (name.equals(\"CustLanguageId\"))\n {\n return new Integer(getCustLanguageId());\n }\n if (name.equals(\"CustCountryId\"))\n {\n return new Integer(getCustCountryId());\n }\n if (name.equals(\"RelDocument\"))\n {\n return new Integer(getRelDocument());\n }\n if (name.equals(\"RelDocStatus\"))\n {\n return new Integer(getRelDocStatus());\n }\n if (name.equals(\"RelProjectId\"))\n {\n return new Integer(getRelProjectId());\n }\n if (name.equals(\"RelProductId\"))\n {\n return new Integer(getRelProductId());\n }\n if (name.equals(\"ProjectId\"))\n {\n return new Integer(getProjectId());\n }\n if (name.equals(\"ProductId\"))\n {\n return new Integer(getProductId());\n }\n if (name.equals(\"Subject\"))\n {\n return getSubject();\n }\n if (name.equals(\"Body\"))\n {\n return getBody();\n }\n if (name.equals(\"Notes\"))\n {\n return getNotes();\n }\n if (name.equals(\"Created\"))\n {\n return getCreated();\n }\n if (name.equals(\"Modified\"))\n {\n return getModified();\n }\n if (name.equals(\"CreatedBy\"))\n {\n return getCreatedBy();\n }\n if (name.equals(\"ModifiedBy\"))\n {\n return getModifiedBy();\n }\n return null;\n }",
"public String getData() {\r\n\t\t\treturn data;\r\n\t\t}",
"protected String extractProductName(String record) {\n var payload = new JSONObject(record);\n if (payload.has(\"payload\")) {\n payload = payload.getJSONObject(\"payload\");\n }\n JSONArray array1 = payload.getJSONArray(\"files\");\n logger.info(\"Product name:\");\n for (int j = 0; j < array1.length(); j++) {\n JSONObject obj2 = array1.getJSONObject(j);\n //System.out.println(obj2);\n if (obj2.has(\"productName\")){\n String productName = obj2.getString(\"productName\");\n System.out.println(productName);\n return productName;\n }\n }\n System.out.println(\"Product name not retrieved.\");\n return null;\n }",
"public JsonArray getHomeHeatingFuelOrdersBySaleName(String saleName) {\r\n\t\tJsonArray homeHeatingFuelOrders = new JsonArray();\r\n\t\tString query = \"\";\r\n\t\tStatement stmt = null;\r\n\t\ttry {\r\n\t\t\tif (DBConnector.conn != null) {\r\n\r\n\t\t\t\tquery = \"SELECT customerID, count(orderID) as sumOfPurchase ,sum(totalPrice) as amountOfPayment FROM home_heating_fuel_orders \"\r\n\t\t\t\t\t\t+ \"WHERE saleTemplateName='\" + saleName + \"' group by customerID;\";\r\n\t\t\t\tstmt = DBConnector.conn.createStatement();\r\n\t\t\t\tResultSet rs = stmt.executeQuery(query);\r\n\t\t\t\twhile (rs.next()) {\r\n\t\t\t\t\tJsonObject order = new JsonObject();\r\n\t\t\t\t\torder.addProperty(\"customerID\", rs.getString(\"customerID\"));\r\n\t\t\t\t\torder.addProperty(\"sumOfPurchase\", rs.getString(\"sumOfPurchase\"));\r\n\t\t\t\t\torder.addProperty(\"amountOfPayment\", rs.getString(\"amountOfPayment\"));\r\n\t\t\t\t\thomeHeatingFuelOrders.add(order);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Conn is null\");\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn homeHeatingFuelOrders;\r\n\r\n\t}",
"public void getSpecificData(Connection connection, StoreData data, int bool){\n\t\t//This code is used to prepare a statement to send to the database based on the start date\n\t\tPreparedStatement preStmt=null;\n\t\tString stmt = \"SELECT * FROM Event WHERE Start_Date = (?)\";\n\t\tString formatSDate = null;\n\t\tString formatEDate = null;\n\t\tStoreData extra = new StoreData();\n\t\t\n\t\t//This try catch block is used to format the date to be sent to the database\n\t\t//The command is then sent to get the correct events\n\t\ttry{\n\t\t\tpreStmt = (PreparedStatement) connection.prepareStatement(stmt);\n\t\t\tSimpleDateFormat displayDate = new SimpleDateFormat(\"MM-dd-yyyy\");\n\t\t\tSimpleDateFormat dbDate = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\t//formats the date to match the database\n\t\t\ttry {\n\n\t\t\t\tformatSDate = dbDate.format(displayDate.parse(data.getDate()));\n\t\t\t} catch (ParseException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t//System.out.println(formatSDate);\n\t\t\tpreStmt.setString(1, formatSDate);\n\t\t\tResultSet rs = preStmt.executeQuery();\n\t\t\t//re-adds the correct events back to the storedata object to be used later\n\t\t\tfor(int i = 0; i < data.getMultiDay().size();i++){\n\t\t\t\tdata.addName(data.getMultiDay().get(i).getName());\n\t\t\t}\n\t\t\t//loops through the result set returned by the database call\n\t\t\twhile(rs.next()){\n\t\t\t\tString description = rs.getString(\"Description\");\n\t\t\t\tString location = rs.getString(\"Location\");\n\t\t\t\tString name = rs.getString(\"Name\");\n\t\t\t\tString endDate = rs.getString(\"End_Date\");\n\t\t\t\tString sTime = rs.getString(\"Start_Time\");\n\t\t\t\tString eTime = rs.getString(\"End_Time\");\n\t\t\t\t//This try catch is used to format the date correctly\n\t\t\t\ttry {\n\t\t\t\t\tformatEDate = displayDate.format(dbDate.parse(endDate));\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t//System.out.println(formatEDate);\n\t\t\t\tdata.setEndDate(formatEDate);\n\t\t\t\tdata.setName(name);\n\t\t\t\t\n\t\t\t\tdata.addName(name);\n\t\t\t\tdata.setDescription(description);\n\t\t\t\tdata.setLocation(location);\n\t\t\t\tdata.setSTime(sTime);\n\t\t\t\tdata.setETime(eTime);\n\n\t\t\t\textra.setEndDate(formatEDate);\n\t\t\t\textra.setName(name);\n\t\t\t\textra.setDescription(description);\n\t\t\t\textra.setLocation(location);\n\t\t\t\textra.setSTime(sTime);\n\t\t\t\textra.setETime(eTime);\n\t\t\t\t//adds the event to the multi-day arraylist to be used later\n\t\t\t\tif(!data.getDate().equals(data.getEndDate())){\n\t\t\t\t\tdata.addEvent(extra);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}catch(SQLException e){\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"protected String buildDataQuery() {\n StringBuilder sql = new StringBuilder(\"select\");\n String delim = \" \";\n for (String vname : getColumnNames()) {\n sql.append(delim).append(vname);\n delim = \", \";\n }\n \n Element ncElement = getNetcdfElement();\n \n String table = ncElement.getAttributeValue(\"dbTable\");\n if (table == null) {\n String msg = \"No database table defined. Must set 'dbTable' attribute.\";\n _logger.error(msg);\n throw new TSSException(msg);\n }\n sql.append(\" from \" + table);\n \n String predicate = ncElement.getAttributeValue(\"predicate\");\n if (predicate != null) sql.append(\" where \" + predicate);\n \n //Order by time.\n String tname = getTimeVarName();\n sql.append(\" order by \"+tname+\" ASC\");\n \n return sql.toString();\n }",
"private JSONObject getGSTR3B_Section_4_A_2_Data(JSONObject params, String companyId, JSONArray dataJArr) throws JSONException, ServiceException {\n JSONObject reqParams = new JSONObject(params, JSONObject.getNames(params));\n reqParams.put(\"GST3B\", !params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false));\n reqParams.put(\"isServiceProduct\", true);\n// reqParams.put(\"isRCMApplicable\", false);\n reqParams.put(\"CustomerType\", Constants.CUSTVENTYPE_Import);\n reqParams.put(GSTRConstants.ADD_LANDEDCOST_JOIN_FOR_IMPORT_INVOICES, true);\n reqParams.put(\"registrationType\", Constants.GSTRegType_Unregistered);\n reqParams.put(\"typeofjoinisleft\", true);\n// reqParams.put(\"interstate\", true);\n reqParams.put(\"taxClassType\", FieldComboData.TaxClass_Percenatge);\n reqParams.put(\"itctype\", Constants.GST_ITCTYPE_DEFAULT+\",\"+Constants.GST_ITCTYPE_REVERSED);\n JSONObject jSONObject = new JSONObject();\n if ((reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) || (!StringUtil.isNullOrEmpty(params.optString(\"transactionType\", null)) && (params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_INVOICE || params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_ALL))) {\n /**\n * For GSTR3B-Detail View.\n */\n jSONObject = getGoodsReceiptForGSTR3BTaxable(reqParams);\n }\n if (!(reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) && params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n JSONArray tempArr = jSONObject.optJSONArray(\"data\");\n if (tempArr != null && tempArr.length() > 0) {\n dataJArr = StringUtil.concatJSONArray(dataJArr, tempArr);\n }\n }\n \n /**\n * Vendor DN\n */\n reqParams = new JSONObject(params, JSONObject.getNames(params));\n reqParams.put(\"GST3B\", !params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false));\n reqParams.put(\"isServiceProduct\", true);\n reqParams.put(\"CustomerType\", Constants.CUSTVENTYPE_Import);\n reqParams.put(\"registrationType\", Constants.GSTRegType_Unregistered);\n reqParams.put(\"typeofjoinisleft\", true);\n reqParams.put(\"taxClassType\", FieldComboData.TaxClass_Percenatge);\n reqParams.remove(\"cnentityValue\");\n JSONObject temp = new JSONObject();\n if ((reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) || (!StringUtil.isNullOrEmpty(params.optString(\"transactionType\", null)) && (params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_NOTE || params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_ALL))) {\n /**\n * For GSTR3B-Detail View.\n */\n temp = getDNForGSTR3BTaxable(reqParams);\n }\n if (!(reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) && params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n JSONArray tempArr = temp.optJSONArray(\"data\");\n if (tempArr != null && tempArr.length() > 0) {\n dataJArr = StringUtil.concatJSONArray(dataJArr, tempArr);\n }\n } else {\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount((jSONObject.optDouble(\"taxableamt\", 0.0) + temp.optDouble(\"taxableamt\", 0.0)), companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount((jSONObject.optDouble(\"igst\", 0.0) + temp.optDouble(\"igst\", 0.0)), companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount((jSONObject.optDouble(\"cgst\", 0.0) + temp.optDouble(\"cgst\", 0.0)), companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount((jSONObject.optDouble(\"sgst\", 0.0) + temp.optDouble(\"sgst\", 0.0)), companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount((jSONObject.optDouble(\"csgst\", 0.0) + temp.optDouble(\"csgst\", 0.0)), companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount((jSONObject.optDouble(\"totaltax\", 0.0) + temp.optDouble(\"totaltax\", 0.0)), companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount((jSONObject.optDouble(\"totalamount\", 0.0) + temp.optDouble(\"totalamount\", 0.0)), companyId));\n }\n /**\n * Vendor CN\n */\n\n reqParams = new JSONObject(params, JSONObject.getNames(params));\n reqParams.put(\"GST3B\", !params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false));\n reqParams.put(\"isServiceProduct\", true);\n reqParams.put(\"CustomerType\", Constants.CUSTVENTYPE_Import);\n reqParams.put(\"registrationType\", Constants.GSTRegType_Unregistered);\n reqParams.put(\"typeofjoinisleft\", true);\n reqParams.put(\"taxClassType\", FieldComboData.TaxClass_Percenatge);\n reqParams.put(\"onlycnagainstvendor\", true);\n temp = new JSONObject();\n if ((reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) || (!StringUtil.isNullOrEmpty(params.optString(\"transactionType\", null)) && (params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_NOTE || params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_ALL))) {\n /**\n * For GSTR3B-Detail View.\n */\n temp = getDNForGSTR3BTaxable(reqParams);\n }\n if (!(reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) && params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n JSONArray tempArr = temp.optJSONArray(\"data\");\n if (tempArr != null && tempArr.length() > 0) {\n dataJArr = StringUtil.concatJSONArray(dataJArr, tempArr);\n }\n } else {\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount((jSONObject.optDouble(\"taxableamt\", 0.0) + temp.optDouble(\"taxableamt\", 0.0)), companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount((jSONObject.optDouble(\"igst\", 0.0) + temp.optDouble(\"igst\", 0.0)), companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount((jSONObject.optDouble(\"cgst\", 0.0) + temp.optDouble(\"cgst\", 0.0)), companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount((jSONObject.optDouble(\"sgst\", 0.0) + temp.optDouble(\"sgst\", 0.0)), companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount((jSONObject.optDouble(\"csgst\", 0.0) + temp.optDouble(\"csgst\", 0.0)), companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount((jSONObject.optDouble(\"totaltax\", 0.0) + temp.optDouble(\"totaltax\", 0.0)), companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount((jSONObject.optDouble(\"totalamount\", 0.0) + temp.optDouble(\"totalamount\", 0.0)), companyId));\n jSONObject.put(\"tableno\", \"\");\n jSONObject.put(\"particulars\", GSTRConstants.GSTR3B_SECTION_4_A_2);\n jSONObject.put(\"fmt\", \"B\");\n jSONObject.put(\"enableViewDetail\", true);\n dataJArr.put(jSONObject);\n }\n return jSONObject;\n }",
"@DataProvider(name = \"getRandomData\")\r\n\r\n\tpublic Object[][] getData() {\r\n\r\n\t\tString workingdirectory = System.getProperty(\"user.dir\");\r\n\r\n\t\tLinkedHashMap<String, Integer> colNameToLocation = new LinkedHashMap<String, Integer>();\r\n\r\n\t\tString s[][] = utility.getDataFromCSV(workingdirectory + \"\\\\products.csv\", colNameToLocation);// from\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\t\t// utility\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\t\t// file\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\t\t// it\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\t\t// get\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\t\t// the\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\t\t// total\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\t\t// no\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\t\t// of\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\t\t// data\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\t\t// through\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\t\t// the\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\t\t// object\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\t\t// and\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\t\t// store\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\t\t// it\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\t\t// in\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\t\t// s\r\n\r\n\t\tString random[][] = null;\r\n\r\n\t\tif (isTotalCount) // this is the boolean value declared in the basetest\r\n\r\n\t\t\trandom = utility.getRandomNoFromCSV(s, s.length, colNameToLocation);\r\n\r\n\t\telse\r\n\r\n\t\t\trandom = utility.getRandomNoFromCSV(s, count, colNameToLocation);\r\n\r\n\t\treturn random;// here it stores the no of input from the testsuite file\r\n\t\t\t\t\t\t// i.e the user input\r\n\r\n\t}",
"public JSONObject getGSTR2Summary(JSONObject params) throws ServiceException, JSONException {\n JSONObject object = new JSONObject();\n JSONObject jMeta = new JSONObject();\n JSONArray jarrColumns = new JSONArray();\n JSONArray jarrRecords = new JSONArray();\n JSONArray dataJArr = new JSONArray();\n JSONArray array = new JSONArray();\n JSONArray array1 = new JSONArray();\n String start = params.optString(\"start\");\n String limit = params.optString(\"limit\");\n String companyId = params.optString(\"companyid\");\n Company company = null;\n KwlReturnObject companyResult = null;\n if (params.optBoolean(\"isforstore\", false)) {\n /**\n * If request for Section combo box\n */\n return object = getGSTR2ReportSectionCombo();\n }\n companyResult = accountingHandlerDAOobj.getObject(Company.class.getName(), companyId);\n company = (Company) companyResult.getEntityList().get(0);\n params.put(\"isPurchase\", true);\n JSONObject reqParams = params;\n /* * before starting sectional data need to get column no for Product Tax\n * Class (HSN)\n */\n int colnum = 0;\n HashMap fieldparams = new HashMap<>();\n fieldparams.put(Constants.filter_names, Arrays.asList(Constants.companyid, Constants.moduleid, \"fieldname\"));\n fieldparams.put(Constants.filter_values, Arrays.asList(companyId, Constants.Acc_Product_Master_ModuleId, \"Custom_\" + Constants.HSN_SACCODE));\n KwlReturnObject kwlReturnObjectGstCust = fieldManagerDAOobj.getFieldParams(fieldparams);\n List<FieldParams> fieldParamses = kwlReturnObjectGstCust.getEntityList();\n for (FieldParams fieldParams : fieldParamses) {\n colnum = fieldParams.getColnum();\n }\n reqParams.put(\"hsncolnum\", colnum);\n fieldparams.put(Constants.filter_names, Arrays.asList(Constants.companyid, Constants.moduleid, \"fieldname\"));\n fieldparams.put(Constants.filter_values, Arrays.asList(companyId, Constants.Acc_Product_Master_ModuleId, \"Custom_\" + Constants.GSTProdCategory));\n kwlReturnObjectGstCust = fieldManagerDAOobj.getFieldParams(fieldparams);\n fieldParamses = kwlReturnObjectGstCust.getEntityList();\n for (FieldParams fieldParams : fieldParamses) {\n colnum = fieldParams.getColnum();\n }\n params.put(\"taxclasscolnum\", colnum);\n /**\n * get State column no for Invoice module\n */\n int colnumforstate = fieldManagerDAOobj.getColumnFromFieldParams(Constants.STATE, companyId, Constants.Acc_Vendor_Invoice_ModuleId, 0);\n params.put(\"statecolnum\", colnumforstate);\n /**\n * Get Local state Value\n */\n String entityId = params.optString(\"entityid\");\n params.put(\"companyid\", companyId);\n params.put(\"entityid\", entityId);\n String localState = fieldManagerDAOobj.getStateForEntity(params);\n params.put(\"localState\", localState);\n params.put(\"entityState\", localState);\n /**\n * Get Entity Value and its column no for invoice\n */\n fieldparams.put(Constants.filter_names, Arrays.asList(Constants.companyid, Constants.moduleid, \"fieldname\"));\n fieldparams.put(Constants.filter_values, Arrays.asList(companyId, Constants.Acc_Vendor_Invoice_ModuleId, \"Custom_\" + Constants.ENTITY));\n String fieldid = \"\";\n kwlReturnObjectGstCust = fieldManagerDAOobj.getFieldParams(fieldparams);\n fieldParamses = kwlReturnObjectGstCust.getEntityList();\n for (FieldParams fieldParams : fieldParamses) {\n colnum = fieldParams.getColnum();\n fieldid = fieldParams.getId();\n }\n String entityValue = params.optString(\"entity\");\n String ids = fieldManagerDAOobj.getIdsUsingParamsValueWithoutInsert(fieldid, entityValue);\n reqParams.put(\"invoiceentitycolnum\", colnum);\n reqParams.put(\"invoiceentityValue\", ids);\n fieldparams.put(Constants.filter_names, Arrays.asList(Constants.companyid, Constants.moduleid, \"fieldname\"));\n fieldparams.put(Constants.filter_values, Arrays.asList(companyId, Constants.Acc_Make_Payment_ModuleId, \"Custom_\" + Constants.ENTITY));\n kwlReturnObjectGstCust = fieldManagerDAOobj.getFieldParams(fieldparams);\n fieldParamses = kwlReturnObjectGstCust.getEntityList();\n for (FieldParams fieldParams : fieldParamses) {\n colnum = fieldParams.getColnum();\n fieldid = fieldParams.getId();\n }\n ids = fieldManagerDAOobj.getIdsUsingParamsValueWithoutInsert(fieldid, entityValue);\n reqParams.put(\"paymententitycolnum\", colnum);\n reqParams.put(\"paymententityValue\", ids);\n fieldparams.put(Constants.filter_names, Arrays.asList(Constants.companyid, Constants.moduleid, \"fieldname\"));\n fieldparams.put(Constants.filter_values, Arrays.asList(companyId, Constants.Acc_Debit_Note_ModuleId, \"Custom_\" + Constants.ENTITY));\n kwlReturnObjectGstCust = fieldManagerDAOobj.getFieldParams(fieldparams);\n fieldParamses = kwlReturnObjectGstCust.getEntityList();\n for (FieldParams fieldParams : fieldParamses) {\n colnum = fieldParams.getColnum();\n fieldid = fieldParams.getId();\n }\n ids = fieldManagerDAOobj.getIdsUsingParamsValueWithoutInsert(fieldid, entityValue);\n reqParams.put(\"cnentitycolnum\", colnum);\n reqParams.put(\"cnentityValue\", ids);\n\n fieldparams.put(Constants.filter_names, Arrays.asList(Constants.companyid, Constants.moduleid, \"fieldname\"));\n fieldparams.put(Constants.filter_values, Arrays.asList(companyId, Constants.Acc_GENERAL_LEDGER_ModuleId, \"Custom_\" + Constants.ENTITY));\n kwlReturnObjectGstCust = fieldManagerDAOobj.getFieldParams(fieldparams);\n fieldParamses = kwlReturnObjectGstCust.getEntityList();\n for (FieldParams fieldParams : fieldParamses) {\n colnum = fieldParams.getColnum();\n fieldid = fieldParams.getId();\n }\n ids = fieldManagerDAOobj.getIdsUsingParamsValueWithoutInsert(fieldid, entityValue);\n reqParams.put(\"jeentitycolnum\", colnum);\n reqParams.put(\"jeentityValue\", ids);\n \n fieldparams.put(Constants.filter_names, Arrays.asList(Constants.companyid, Constants.moduleid, \"fieldname\"));\n fieldparams.put(Constants.filter_values, Arrays.asList(companyId, Constants.Acc_Credit_Note_ModuleId, \"Custom_\" + Constants.ENTITY));\n kwlReturnObjectGstCust = fieldManagerDAOobj.getFieldParams(fieldparams);\n fieldParamses = kwlReturnObjectGstCust.getEntityList();\n for (FieldParams fieldParams : fieldParamses) {\n colnum = fieldParams.getColnum();\n fieldid = fieldParams.getId();\n }\n ids = fieldManagerDAOobj.getIdsUsingParamsValue(fieldid, entityValue);\n reqParams.put(\"cnentitycolnum\", colnum);\n reqParams.put(\"cnentityValue\", ids);\n reqParams.put(\"Report_type\",\"gstr2\");\n reqParams.put(\"isGSTR1\",false);\n try {\n /**\n * Put Asset Disposal/ Acquire Invoice Dimension column number\n * details\n */\n putAssetInvoiceDimensionColumnDetails(params, reqParams);\n /**\n * Put Lease Sales Invoice Dimension column number details\n */\n putLeaseInvoiceDimensionColumnDetails(params, reqParams);\n getColumnModelForGSTSummary(jarrRecords, jarrColumns, params);\n \n JSONObject header= new JSONObject();\n header.put(\"typeofinvoice\", \"<b>\" + GSTRConstants.GSTR2_ToBeReconciledWithTheGSTPortal + \"</b>\");\n params.put(\"isViewRenderer\", false);\n dataJArr.put(header);\n \n reqParams.put(\"entitycolnum\", reqParams.optString(\"invoiceentitycolnum\"));\n reqParams.put(\"entityValue\", reqParams.optString(\"invoiceentityValue\"));\n /**\n * Add Additional parameter to reqParams\n */\n params = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n params.put(\"registrationType\", Constants.GSTRegType_Regular + \",\" + Constants.GSTRegType_Regular_ECommerce);\n params.put(\"CustomerType\", Constants.CUSTVENTYPE_NA + \",\" + Constants.CUSTVENTYPE_DEEMED_EXPORT + \",\" + Constants.CUSTVENTYPE_SEZ+ \",\" + Constants.CUSTVENTYPE_SEZWOPAY);\n params.put(\"taxClassType\", FieldComboData.TaxClass_Percenatge);\n// params.put(\"zerorated\", false);\n params.put(\"typeofjoinisleft\", true);\n params.put(\"typeofinvoice\", GSTRConstants.GSTR2_B2B);\n JSONObject b2bobj = getB2BInvoiceDetails(params, null);\n JSONObject B2B = new JSONObject();\n B2B = b2bobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(B2B);\n \n /**\n * CDN Invoices\n */\n params = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n params.put(\"entitycolnum\", reqParams.optString(\"cnentitycolnum\"));\n params.put(\"registrationType\",Constants.GSTRegType_Regular+\",\"+Constants.GSTRegType_Regular_ECommerce);\n params.put(\"entityValue\", reqParams.optString(\"cnentityValue\"));\n params.put(\"typeofinvoice\", GSTRConstants.GSTR2_CDN);\n JSONObject cdnrobj = getCDNRInvoiceDetails(params, null);\n JSONObject CDNR = new JSONObject();\n CDNR = cdnrobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(CDNR);\n\n \n JSONObject header1= new JSONObject();\n header1.put(\"typeofinvoice\", \"<b>\" + GSTRConstants.GSTR2_ToBeUploadedOnTheGSTPortal + \"</b>\");\n dataJArr.put(header1); \n /**\n * B2B Unregistered Invoice\n */\n params = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n params.put(\"registrationType\",Constants.GSTRegType_Unregistered);\n params.put(\"CustomerType\", Constants.CUSTVENTYPE_NA + \",\" + Constants.CUSTVENTYPE_DEEMED_EXPORT + \",\" + Constants.CUSTVENTYPE_SEZ+ \",\" + Constants.CUSTVENTYPE_SEZWOPAY);\n params.put(\"taxClassType\", FieldComboData.TaxClass_Percenatge);\n// params.put(\"zerorated\", false);\n params.put(\"typeofjoinisleft\", true);\n params.put(\"typeofinvoice\", GSTRConstants.GSTR2_B2B_unregister);\n b2bobj = getB2BInvoiceDetails(params, null);\n B2B = new JSONObject();\n B2B = b2bobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(B2B);\n /**\n * Import of Services\n */\n params = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n params.put(\"CustomerType\", Constants.CUSTVENTYPE_Import);\n// params.put(\"taxClassType\", FieldComboData.TaxClass_Percenatge);\n params.put(\"isServiceProduct\", true);\n params.put(\"typeofinvoice\", GSTRConstants.GSTR2_ImpServices);\n params.put(GSTRConstants.ADD_LANDEDCOST_JOIN_FOR_IMPORT_INVOICES, true);\n params.put(\"excludetaxClassType\", true);\n params.put(\"typeofjoinisleft\", true);\n JSONObject exportobj = getB2BInvoiceDetails(params, null);\n JSONObject EXPORT = new JSONObject();\n EXPORT = exportobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(EXPORT);\n /**\n * Import of Goods\n */\n params = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n params.put(\"CustomerType\", Constants.CUSTVENTYPE_Import);\n// params.put(\"taxClassType\", FieldComboData.TaxClass_Percenatge);\n params.put(\"isServiceProduct\", false);\n params.put(\"typeofinvoice\", GSTRConstants.GSTR2_ImpGoods);\n params.put(GSTRConstants.ADD_LANDEDCOST_JOIN_FOR_IMPORT_INVOICES, true);\n params.put(\"typeofjoinisleft\", true);\n params.put(\"excludetaxClassType\", true);\n exportobj = getB2BInvoiceDetails(params, null);\n EXPORT = new JSONObject();\n EXPORT = exportobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(EXPORT);\n \n\n /**\n * CDN Unregistered\n */\n JSONObject CDNUR = new JSONObject();\n params = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n params.put(\"entitycolnum\", reqParams.optString(\"cnentitycolnum\"));\n params.put(\"registrationType\", Constants.GSTRegType_Unregistered);\n params.put(\"entityValue\", reqParams.optString(\"cnentityValue\"));\n params.put(\"typeofinvoice\", GSTRConstants.GSTR2_CDN_unregister);\n JSONObject cdnurobj = getCDNRInvoiceDetails(params, null);\n CDNUR = new JSONObject();\n CDNUR = cdnurobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(CDNUR);\n\n /**\n * NIL Rated\n */\n \n params = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n params.put(\"goodsreceiptentitycolnum\", reqParams.optString(\"invoiceentitycolnum\"));\n params.put(\"goodsreceiptentityValue\", reqParams.optString(\"invoiceentityValue\"));\n params.put(\"entitycolnum\", reqParams.optString(\"invoiceentitycolnum\"));\n params.put(\"entityValue\", reqParams.optString(\"invoiceentityValue\"));\n params.put(\"typeofinvoice\", GSTRConstants.GSTR2_nilRated);\n params.put(\"registrationType\", Constants.GSTRegType_Composition);\n params.put(\"typeofjoinisleft\", true);\n JSONObject exemptComposition = getExemptPurchaseInvoiceDetails(params);\n JSONObject exempComp = exemptComposition.getJSONArray(\"summaryArr\").getJSONObject(0);\n double sumTaxableAmt= 0.0,sumTotalAmt=0.0;\n int noOfInvoices=0;\n sumTaxableAmt = exempComp.optDouble(\"sumTaxableAmt\");\n sumTotalAmt = exempComp.optDouble(\"sumTotalAmt\");\n noOfInvoices=exempComp.optInt(\"numberofinvoices\");\n params.remove(\"registrationType\");\n params.put(\"taxClassType\", FieldComboData.TaxClass_Exempted + \",\" + FieldComboData.TaxClass_Non_GST_Product);\n params.put(\"typeofjoinisleft\", true);\n exportobj = getExemptPurchaseInvoiceDetails(params);\n JSONObject EXEMPT = new JSONObject();\n EXEMPT = exportobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n sumTaxableAmt += EXEMPT.optDouble(\"sumTaxableAmt\");\n sumTotalAmt += EXEMPT.optDouble(\"sumTotalAmt\");\n noOfInvoices += EXEMPT.optInt(\"numberofinvoices\");\n /**\n * For Product Tax Class 0%\n */\n params.put(\"taxClassType\", FieldComboData.TaxClass_ZeroPercenatge);\n params.put(\"typeofjoinisleft\", true);\n params.put(GSTRConstants.IS_PRODUCT_TAX_ZERO, true);\n exportobj = getExemptPurchaseInvoiceDetails(params);\n params.remove(GSTRConstants.IS_PRODUCT_TAX_ZERO);\n EXEMPT = new JSONObject();\n EXEMPT = exportobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n sumTaxableAmt += EXEMPT.optDouble(\"sumTaxableAmt\");\n sumTotalAmt += EXEMPT.optDouble(\"sumTotalAmt\");\n noOfInvoices += EXEMPT.optInt(\"numberofinvoices\");\n \n EXEMPT.put(\"sumTaxableAmt\", sumTaxableAmt);\n EXEMPT.put(\"sumTotalAmt\",sumTotalAmt);\n EXEMPT.put(\"numberofinvoices\", noOfInvoices);\n dataJArr.put(EXEMPT);\n\n// JSONObject summaryObj = new JSONObject();\n// summaryObj.put(\"numberofinvoices\", 0);\n// summaryObj.put(\"typeofinvoice\", \"ISD Credit\");\n// summaryObj.put(\"sumTaxableAmt\", 0);\n// summaryObj.put(\"sumTaxAmt\", 0);\n// summaryObj.put(\"sumTotalAmt\", 0);\n// dataJArr.put(summaryObj);\n\n params = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n params.put(\"entitycolnum\", reqParams.optString(\"paymententitycolnum\"));\n params.put(\"entityValue\", reqParams.optString(\"paymententityValue\"));\n params.put(\"typeofinvoice\", GSTRConstants.GSTR2_AdvancePaid);\n JSONObject atobj = getTaxLiabilityOnAdvance(params);\n JSONObject AT = new JSONObject();\n AT = atobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(AT);\n params.put(\"typeofinvoice\", GSTRConstants.GSTR2_AdvanceAdjust);\n JSONObject atadjobj = getAdjustedAdvance(params);\n JSONObject ATADJ = new JSONObject();\n ATADJ = atadjobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n dataJArr.put(ATADJ);\n//\n// summaryObj = new JSONObject();\n// summaryObj.put(\"numberofinvoices\", 0);\n// summaryObj.put(\"typeofinvoice\", \"ITC Reversal\");\n// summaryObj.put(\"sumTaxableAmt\", 0);\n// summaryObj.put(\"sumTaxAmt\", 0);\n// summaryObj.put(\"sumTotalAmt\", 0);\n// dataJArr.put(summaryObj);\n// /**\n// * HSN summary of Inward supplies\n// */\n// params = new JSONObject(reqParams, JSONObject.getNames(reqParams));\n// params.put(\"entitycolnum\", reqParams.optString(\"invoiceentitycolnum\"));\n// params.put(\"entityValue\", reqParams.optString(\"invoiceentityValue\"));\n// params.put(\"typeofinvoice\", \"HSN summary of Inward supplies\");\n// exportobj = getHSNSummarydetails(params);\n// EXPORT = new JSONObject();\n// EXPORT = exportobj.getJSONArray(\"summaryArr\").getJSONObject(0);\n// dataJArr.put(EXPORT);\n\n JSONArray pagedJson = new JSONArray();\n pagedJson = dataJArr;\n if (!StringUtil.isNullOrEmpty(start) && !StringUtil.isNullOrEmpty(limit)) {\n pagedJson = StringUtil.getPagedJSON(pagedJson, Integer.parseInt(start), Integer.parseInt(limit));\n }\n object.put(\"totalCount\", dataJArr.length());\n object.put(\"columns\", jarrColumns);\n object.put(\"coldata\", pagedJson);\n jMeta.put(\"totalProperty\", \"totalCount\");\n jMeta.put(\"root\", \"coldata\");\n jMeta.put(\"fields\", jarrRecords);\n object.put(\"metaData\", jMeta);\n if (params.optBoolean(\"isExport\")) {\n object.put(\"data\", dataJArr);\n object.put(\"columns\", jarrColumns);\n }\n } catch (JSONException ex) {\n throw ServiceException.FAILURE(ex.getMessage(), ex);\n }\n return object;\n }",
"@DataProvider\n public Object[][] getData()\n {\n\t Object[][] data=new Object[1][6];\n\t //0th row\n\t data[0][0]=\"Arun Raja\";\n\t data[0][1]=\"A\";\n\t data[0][2]=\"[email protected]\";\n\t data[0][3]=\"Test Lead\";\n\t data[0][4]=\"8971970444\";\n\t data[0][5]=\"Attra\";\n\t return data;\n }",
"@RequestMapping(value = \"getProductNames\", method = RequestMethod.GET)\n\t@ResponseBody\n\tpublic void getProductNames(HttpServletRequest request, ModelMap m,\n\t\t\tHttpServletResponse response) throws IOException {\n\n\t\tString brandCode = request.getParameter(\"dataString\");\n\t\tString typeCode = request.getParameter(\"typeString\");\n\t\tPrintWriter out = response.getWriter();\n\t\tresponse.setContentType(\"text/html\");\n\t\tList<ProductMedia> leftcontentlist = new ArrayList<ProductMedia>();\n\t\tList<Product> midcontentlist = new ArrayList<Product>();\n\t\tleftcontentlist = sc.searchRelatedProduct(brandCode);\n\t\tout.println(\"<div align=\\\"center\\\">\");\n\t\tout.println(\"<table border=\\\"1\\\" bgcolor=\\\"skyblue\\\"><tr><th>SORT BY SELECTION</th></tr>\");\n\t\tout.println(\"<tr><td bgcolor=\\\"cyan\\\">\");\n\t\tout.println(\"<select value=\"+brandCode+\" name=\"+brandCode+\" id=\"+brandCode+\" class=\\\"types11\\\"<br>\");\n\t\tout.println(\"<option value=\\\"\\\">Select Account ID</option>\");\t \n\t\tout.println(\"<option value=\\\"hl\\\" id=\"+brandCode+\">Higher to lower</option>\");\t\t \n\t\tout.println(\"<option value=\\\"lh\\\">Lower to higher</option>\");\n\t\tout.println(\"<option value=\\\"br\\\">Best On Rating</option>\");\n\t\tout.println(\"</select>\");\n\t\tout.println(\"</tr></td>\");\n\t\tout.println(\"</table>\");\n\t\tout.println(\"</div>\");\n\t\tfor (ProductMedia p : leftcontentlist) {\n\t\t\tout.print(\"<img src=\\\"\"+ipaddress+p.getM().getMediaPath()+\"\\\">\");\t\t\t\n\t\t\tout.println(\"<input type=\\\"checkbox\\\" value=\"+p.getP().getProductName()+\"/>\"+\"<a href=\\\"prod?prod_id=\"+p.getP().getProductId()+\"\\\">\"+p.getP().getProductName()+\"</a>\"+\"<br>\"+p.getP().getProductBrand()+\"<br>\"+p.getP().getProductCost()+\"<br>\");\n\t\t}\n\n\t}",
"public String getData()\n\t{\n\t\treturn data;\n\t}",
"private String getDataAttributes() {\n StringBuilder sb = new StringBuilder();\n\n dataAttribute.forEach((key, value) -> {\n sb.append(key).append(\"='\").append(value).append(\"' \");\n });\n\n return sb.toString().trim();\n }",
"protected String getDataSet(String tagName) {\n\t\tString result = \"\";\n\t\tString testModuleName = new Throwable().getStackTrace()[1].getClassName().replace(\".\", \"/\").split(\"/\")[1];\n\t\tresult = Common.getCommon().getDataSet(testModuleName, tagName);\n\t\treturn result;\n\t}",
"public List<TblRetur>getAllDataRetur();",
"public String getDetailData(String metric_categ, String service_group_name, String country, String metric_name,\r\n\t\t\tString date1, String date2)throws SQLException {\n\t\tArrayList responseArray = new ArrayList();\r\n\t\tString jsonResult=\"\";\r\n\t\tConnection conn = null;\r\n\t\ttry {\r\n\t\tconn = DBConnection.getConnection();\r\n\t\tStatement stmt = null;\r\n\t\t\r\n\t\tstmt = conn.createStatement();\r\n\t\tGson gson = new GsonBuilder().create();\r\n\t\tString measure_type=\"measure_amt\";\r\n\t\tif(metric_categ.equals(\"DQKPI\")){\r\n\t\t\tmeasure_type=\"measure_amt\";\r\n\r\n\r\n\t\t}else{\r\n\r\n\t\t\tmeasure_type=\"measure_cnt\";\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tString queryString=\"SELECT DISTINCT f.country_shortname, f.fact_row_no,f.fact_col_no,f.\"+measure_type+\" as Average_amt,dim2.validation_rule_name,f.measure_fact_date, dim2.quality_metric_type_comment,dim2.quality_metric_categ_shortname,dim1.service_main_group_name,dim2.quality_metric_type_name FROM mesa.PL_MEASURE_FACT_PRT f \"\r\n\t\t\t\t+\"INNER JOIN mesa.PL_SERVICE_PRT dim1 ON (f.validation_service_shortname = dim1.Service_Component_ShortName) \"\r\n\t\t\t\t+\"INNER JOIN mesa.PL_VALIDATION_RULE_EXT dim2 ON (f.Validation_Rule_Id = dim2.Validation_Rule_Id) WHERE f.\"+measure_type+\"<=99 AND f.country_shortname='\"+country+\"'\"\r\n\t\t\t\t+\"AND dim2.quality_metric_categ_shortname='\"+metric_categ+\"' AND dim1.service_main_group_name='\"+service_group_name+\"' AND dim2.quality_metric_type_name='\"+metric_name+\"' AND f.measure_fact_date BETWEEN '\"+date1+\"' and'\"+date2+\"'\";\r\n\r\n\t\tString queryTestString=\"SELECT DISTINCT f.fact_row_no,f.fact_col_no,f.country_shortname,f.measure_amt as Average_amt,dim2.validation_rule_name,f.measure_fact_date, dim2.quality_metric_type_comment,dim2.quality_metric_categ_shortname,dim1.service_main_group_name,dim2.quality_metric_type_name FROM mesa.PL_MEASURE_FACT_PRT f INNER JOIN mesa.PL_SERVICE_PRT dim1 ON (f.validation_service_shortname = dim1.Service_Component_ShortName) INNER JOIN mesa.PL_VALIDATION_RULE_EXT dim2 ON (f.Validation_Rule_Id = dim2.Validation_Rule_Id) WHERE f.measure_amt<=99 AND dim2.quality_metric_type_name='FORMAT CONFORMANCY' AND f.country_shortname='EE'AND dim2.quality_metric_categ_shortname='DQKPI' AND dim1.service_main_group_name='BB Data Warehouse' AND f.measure_fact_date BETWEEN '2017-01-21' and'2017-04-21'\";\r\n\t\t\r\n\t\tSystem.out.println(\"IS HERE\");\r\n\t\tSystem.out.println(queryString);\r\n\t\tResultSet rs = stmt.executeQuery(queryString);\r\n\t\twhile(rs.next()) {\r\n\r\n\r\n\t\t\tQualityModel model=new QualityModel();\r\n\t\t\tmodel.setMeasureAmt(rs.getInt(\"average_amt\"));\r\n\t\t\tmodel.setServiceMainGroupName(rs.getString(\"service_main_group_name\"));\r\n\t\t\tmodel.setDate(rs.getString(\"measure_fact_date\"));\r\n\t\t\tmodel.setQualityMetricTypeComment(rs.getString(\"validation_rule_name\").replaceAll(\"(.{50})\", \"$1<br>\"));\r\n model.setFactCol(rs.getInt(\"fact_col_no\"));\r\n model.setFactRow(rs.getInt(\"fact_row_no\"));\r\n model.setCountry(rs.getString(\"country_shortname\"));\r\n\r\n\t\t\tresponseArray.add(model);\r\n\t\t}\r\n\t\tjsonResult = gson.toJson(responseArray);\r\n\t\tSystem.out.println(jsonResult);\r\n\t\trs.close();\r\n\t\tstmt.close();\r\n\t}catch (SQLException e) {\r\n\t\te.printStackTrace();\r\n\t\tthrow new RuntimeException(e);\r\n\t} finally {\r\n\t\tDBConnection.close(conn);\r\n\t}\r\n\t\treturn jsonResult;\r\n\t\t\r\n\t\t\r\n\t\r\n\t}",
"@DataProvider\n\tpublic String[][] getData() {\n\t\treturn readExcel.getExcelData(\"Sheet1\");\n\t}",
"private JSONObject getGSTR3B_Section_5_4_Data(JSONObject params, String companyId, JSONArray dataJArr) throws JSONException, ServiceException {\n JSONObject reqParams = new JSONObject(params, JSONObject.getNames(params));\n reqParams.put(\"GST3B\", !params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false));\n reqParams.put(\"isGSTINnull\", false);\n reqParams.put(\"registrationType\", Constants.GSTRegType_Composition);\n reqParams.put(\"CustomerType\", Constants.CUSTVENTYPE_NA);\n reqParams.put(\"typeofjoinisleft\", true);\n reqParams.put(\"itctype\", Constants.GST_ITCTYPE_DEFAULT+\",\"+Constants.GST_ITCTYPE_REVERSED);\n// reqParams.put(\"taxClassType\", FieldComboData.TaxClass_Percenatge);\n reqParams.put(\"excludetaxClassType\", true);\n JSONObject jSONObject = new JSONObject();\n if ((reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) || (!StringUtil.isNullOrEmpty(params.optString(\"transactionType\", null)) && (params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_INVOICE || params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_ALL))) {\n /**\n * For GSTR3B-Detail View.\n */\n jSONObject = getGoodsReceiptForGSTR3BTaxable(reqParams);\n }\n if (!(reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) && params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n JSONArray tempArr = jSONObject.optJSONArray(\"data\");\n if (tempArr != null && tempArr.length() > 0) {\n dataJArr = StringUtil.concatJSONArray(dataJArr, tempArr);\n }\n }\n\n /**\n * Vendor DN\n */\n reqParams = new JSONObject(params, JSONObject.getNames(params));\n reqParams.put(\"GST3B\", !params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false));\n reqParams.put(\"isGSTINnull\", false);\n reqParams.put(\"registrationType\", Constants.GSTRegType_Composition);\n reqParams.put(\"CustomerType\", Constants.CUSTVENTYPE_NA);\n reqParams.put(\"typeofjoinisleft\", true);\n reqParams.remove(\"cnentityValue\");\n JSONObject temp = new JSONObject();\n if ((reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) || (!StringUtil.isNullOrEmpty(params.optString(\"transactionType\", null)) && (params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_NOTE || params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_ALL))) {\n /**\n * For GSTR3B-Detail View.\n */\n temp = getDNForGSTR3BTaxable(reqParams);\n }\n if (!(reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) && params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n JSONArray tempArr = temp.optJSONArray(\"data\");\n if (tempArr != null && tempArr.length() > 0) {\n dataJArr = StringUtil.concatJSONArray(dataJArr, tempArr);\n }\n } else {\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount((jSONObject.optDouble(\"taxableamt\", 0.0) + temp.optDouble(\"taxableamt\", 0.0)), companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount((jSONObject.optDouble(\"igst\", 0.0) + temp.optDouble(\"igst\", 0.0)), companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount((jSONObject.optDouble(\"cgst\", 0.0) + temp.optDouble(\"cgst\", 0.0)), companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount((jSONObject.optDouble(\"sgst\", 0.0) + temp.optDouble(\"sgst\", 0.0)), companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount((jSONObject.optDouble(\"csgst\", 0.0) + temp.optDouble(\"csgst\", 0.0)), companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount((jSONObject.optDouble(\"totaltax\", 0.0) + temp.optDouble(\"totaltax\", 0.0)), companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount((jSONObject.optDouble(\"totalamount\", 0.0) + temp.optDouble(\"totalamount\", 0.0)), companyId));\n\n }\n\n /**\n * Vendor CN\n *\n */\n reqParams = new JSONObject(params, JSONObject.getNames(params));\n reqParams.put(\"GST3B\", !params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false));\n reqParams.put(\"isGSTINnull\", false);\n reqParams.put(\"registrationType\", Constants.GSTRegType_Composition);\n reqParams.put(\"CustomerType\", Constants.CUSTVENTYPE_NA);\n reqParams.put(\"typeofjoinisleft\", true);\n reqParams.put(\"onlycnagainstvendor\", true);\n temp = new JSONObject();\n if ((reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) || (!StringUtil.isNullOrEmpty(params.optString(\"transactionType\", null)) && (params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_NOTE || params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_ALL))) {\n /**\n * For GSTR3B-Detail View.\n */\n temp = getDNForGSTR3BTaxable(reqParams);\n }\n if (!(reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) && params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n JSONArray tempArr = temp.optJSONArray(\"data\");\n if (tempArr != null && tempArr.length() > 0) {\n dataJArr = StringUtil.concatJSONArray(dataJArr, tempArr);\n }\n } else {\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount((jSONObject.optDouble(\"taxableamt\", 0.0) + temp.optDouble(\"taxableamt\", 0.0)), companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount((jSONObject.optDouble(\"igst\", 0.0) + temp.optDouble(\"igst\", 0.0)), companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount((jSONObject.optDouble(\"cgst\", 0.0) + temp.optDouble(\"cgst\", 0.0)), companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount((jSONObject.optDouble(\"sgst\", 0.0) + temp.optDouble(\"sgst\", 0.0)), companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount((jSONObject.optDouble(\"csgst\", 0.0) + temp.optDouble(\"csgst\", 0.0)), companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount((jSONObject.optDouble(\"totaltax\", 0.0) + temp.optDouble(\"totaltax\", 0.0)), companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount((jSONObject.optDouble(\"totalamount\", 0.0) + temp.optDouble(\"totalamount\", 0.0)), companyId));\n jSONObject.put(\"tableno\", \"\");\n jSONObject.put(\"particulars\", GSTRConstants.GSTR3B_SECTION_5_4);\n jSONObject.put(\"fmt\", \"B\");\n jSONObject.put(\"enableViewDetail\", true);\n dataJArr.put(jSONObject);\n }\n return jSONObject;\n }",
"public List<String> getAllData(){\n\t}",
"private JSONObject getGSTR3B_Section_5_1_Data(JSONObject params, String companyId, JSONArray dataJArr) throws JSONException, ServiceException {\n JSONObject reqParams = new JSONObject(params, JSONObject.getNames(params));\n reqParams.put(\"taxClassType\", FieldComboData.TaxClass_Exempted);\n reqParams.put(\"registrationType\", Constants.GSTRegType_Regular + \",\" + Constants.GSTRegType_Unregistered);\n reqParams.put(\"CustomerType\", Constants.CUSTVENTYPE_NA + \",\" + Constants.CUSTVENTYPE_SEZ + \",\" + Constants.CUSTVENTYPE_SEZWOPAY + \",\" + Constants.CUSTVENTYPE_Import);\n reqParams.put(\"itctype\", Constants.GST_ITCTYPE_DEFAULT+\",\"+Constants.GST_ITCTYPE_REVERSED);\n JSONObject jSONObject = new JSONObject();\n if ((reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) || (!StringUtil.isNullOrEmpty(params.optString(\"transactionType\", null)) && (params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_INVOICE || params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_ALL))) {\n /**\n * For GSTR3B-Detail View.\n */\n jSONObject = getGoodsReceiptForGSTR3BNonGST(reqParams);\n }\n if (!(reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) && params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n JSONArray tempArr = jSONObject.optJSONArray(\"data\");\n if (tempArr != null && tempArr.length() > 0) {\n dataJArr = StringUtil.concatJSONArray(dataJArr, tempArr);\n }\n }\n /**\n * Vendor DN\n */\n reqParams = new JSONObject(params, JSONObject.getNames(params));\n reqParams.put(\"GST3B\", !params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false));\n reqParams.put(\"isRCMApplicable\", false);\n reqParams.put(\"typeofjoinisleft\", true);\n reqParams.put(\"taxClassType\", FieldComboData.TaxClass_Exempted);\n reqParams.put(\"registrationType\", Constants.GSTRegType_Regular + \",\" + Constants.GSTRegType_Unregistered);\n reqParams.put(\"CustomerType\", Constants.CUSTVENTYPE_NA + \",\" + Constants.CUSTVENTYPE_SEZ + \",\" + Constants.CUSTVENTYPE_SEZWOPAY + \",\" + Constants.CUSTVENTYPE_Import);\n reqParams.remove(\"cnentityValue\");\n JSONObject temp = new JSONObject();\n if ((reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) || (!StringUtil.isNullOrEmpty(params.optString(\"transactionType\", null)) && (params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_NOTE || params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_ALL))) {\n /**\n * For GSTR3B-Detail View.\n */\n temp = getDNForGSTR3BTaxable(reqParams);\n }\n if (!(reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) && params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n JSONArray tempArr = temp.optJSONArray(\"data\");\n if (tempArr != null && tempArr.length() > 0) {\n dataJArr = StringUtil.concatJSONArray(dataJArr, tempArr);\n }\n } else {\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount((jSONObject.optDouble(\"taxableamt\", 0.0) + temp.optDouble(\"taxableamt\", 0.0)), companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount((jSONObject.optDouble(\"igst\", 0.0) + temp.optDouble(\"igst\", 0.0)), companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount((jSONObject.optDouble(\"cgst\", 0.0) + temp.optDouble(\"cgst\", 0.0)), companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount((jSONObject.optDouble(\"sgst\", 0.0) + temp.optDouble(\"sgst\", 0.0)), companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount((jSONObject.optDouble(\"csgst\", 0.0) + temp.optDouble(\"csgst\", 0.0)), companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount((jSONObject.optDouble(\"totaltax\", 0.0) + temp.optDouble(\"totaltax\", 0.0)), companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount((jSONObject.optDouble(\"totalamount\", 0.0) + temp.optDouble(\"totalamount\", 0.0)), companyId));\n }\n /**\n * Vendor CN\n */\n reqParams = new JSONObject(params, JSONObject.getNames(params));\n reqParams.put(\"GST3B\", !params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false));\n reqParams.put(\"isRCMApplicable\", false);\n reqParams.put(\"typeofjoinisleft\", true);\n reqParams.put(\"taxClassType\", FieldComboData.TaxClass_Exempted);\n reqParams.put(\"registrationType\", Constants.GSTRegType_Regular + \",\" + Constants.GSTRegType_Unregistered);\n reqParams.put(\"CustomerType\", Constants.CUSTVENTYPE_NA + \",\" + Constants.CUSTVENTYPE_SEZ + \",\" + Constants.CUSTVENTYPE_SEZWOPAY + \",\" + Constants.CUSTVENTYPE_Import);\n reqParams.put(\"onlycnagainstvendor\", true);\n temp = new JSONObject();\n if ((reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) || (!StringUtil.isNullOrEmpty(params.optString(\"transactionType\", null)) && (params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_NOTE || params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_ALL))) {\n /**\n * For GSTR3B-Detail View.\n */\n temp = getDNForGSTR3BTaxable(reqParams);\n }\n if (!(reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) && params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n JSONArray tempArr = temp.optJSONArray(\"data\");\n if (tempArr != null && tempArr.length() > 0) {\n dataJArr = StringUtil.concatJSONArray(dataJArr, tempArr);\n }\n } else {\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount((jSONObject.optDouble(\"taxableamt\", 0.0) + temp.optDouble(\"taxableamt\", 0.0)), companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount((jSONObject.optDouble(\"igst\", 0.0) + temp.optDouble(\"igst\", 0.0)), companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount((jSONObject.optDouble(\"cgst\", 0.0) + temp.optDouble(\"cgst\", 0.0)), companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount((jSONObject.optDouble(\"sgst\", 0.0) + temp.optDouble(\"sgst\", 0.0)), companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount((jSONObject.optDouble(\"csgst\", 0.0) + temp.optDouble(\"csgst\", 0.0)), companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount((jSONObject.optDouble(\"totaltax\", 0.0) + temp.optDouble(\"totaltax\", 0.0)), companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount((jSONObject.optDouble(\"totalamount\", 0.0) + temp.optDouble(\"totalamount\", 0.0)), companyId));\n jSONObject.put(\"tableno\", \"\");\n jSONObject.put(\"particulars\", GSTRConstants.GSTR3B_SECTION_5_1);\n jSONObject.put(\"fmt\", \"B\");\n jSONObject.put(\"enableViewDetail\", true); \n }\n /**\n * Purchase Invoice- REGTYPE:Unregistered.CUSTTYPE:NA. ERP-40740\n * Interstate/Intrastate: Both. RCM : FALSE.\n */\n reqParams = new JSONObject(params, JSONObject.getNames(params));\n reqParams.put(\"GST3B\", !params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false));\n reqParams.put(\"isGSTINnull\", true);\n reqParams.put(\"isRCMApplicable\", false);\n reqParams.put(\"registrationType\", Constants.GSTRegType_Unregistered);\n reqParams.put(\"CustomerType\", Constants.CUSTVENTYPE_NA);\n reqParams.put(\"typeofjoinisleft\", true);\n reqParams.put(\"taxClassType\", FieldComboData.TaxClass_Percenatge);\n temp = new JSONObject();\n if ((reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) || (!StringUtil.isNullOrEmpty(params.optString(\"transactionType\", null)) && (params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_INVOICE || params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_ALL))) {\n /**\n * For GSTR3B-Detail View.\n */\n temp = getGoodsReceiptForGSTR3BTaxable(reqParams);\n }\n if (!(reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) && params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n JSONArray tempArr = temp.optJSONArray(\"data\");\n if (tempArr != null && tempArr.length() > 0) {\n dataJArr = StringUtil.concatJSONArray(dataJArr, tempArr);\n }\n } else {\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount((jSONObject.optDouble(\"taxableamt\", 0.0) + temp.optDouble(\"taxableamt\", 0.0)), companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount((jSONObject.optDouble(\"igst\", 0.0) + temp.optDouble(\"igst\", 0.0)), companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount((jSONObject.optDouble(\"cgst\", 0.0) + temp.optDouble(\"cgst\", 0.0)), companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount((jSONObject.optDouble(\"sgst\", 0.0) + temp.optDouble(\"sgst\", 0.0)), companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount((jSONObject.optDouble(\"csgst\", 0.0) + temp.optDouble(\"csgst\", 0.0)), companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount((jSONObject.optDouble(\"totaltax\", 0.0) + temp.optDouble(\"totaltax\", 0.0)), companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount((jSONObject.optDouble(\"totalamount\", 0.0) + temp.optDouble(\"totalamount\", 0.0)), companyId));\n jSONObject.put(\"tableno\", \"\");\n jSONObject.put(\"particulars\", GSTRConstants.GSTR3B_SECTION_5_1);\n jSONObject.put(\"fmt\", \"B\");\n jSONObject.put(\"enableViewDetail\", true);\n }\n /**\n * Vendor DN (ERP-40740)\n */\n reqParams = new JSONObject(params, JSONObject.getNames(params));\n reqParams.put(\"GST3B\", !params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false));\n reqParams.put(\"CustomerType\", Constants.CUSTVENTYPE_NA);\n reqParams.put(\"registrationType\", Constants.GSTRegType_Unregistered);\n reqParams.put(\"typeofjoinisleft\", true);\n reqParams.put(\"taxClassType\", FieldComboData.TaxClass_Percenatge);\n reqParams.remove(\"cnentityValue\");\n temp = new JSONObject();\n if ((reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) || (!StringUtil.isNullOrEmpty(params.optString(\"transactionType\", null)) && (params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_NOTE || params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_ALL))) {\n /**\n * For GSTR3B-Detail View.\n */\n temp = getDNForGSTR3BTaxable(reqParams);\n }\n if (!(reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) && params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n JSONArray tempArr = temp.optJSONArray(\"data\");\n if (tempArr != null && tempArr.length() > 0) {\n dataJArr = StringUtil.concatJSONArray(dataJArr, tempArr);\n }\n } else {\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount((jSONObject.optDouble(\"taxableamt\", 0.0) + temp.optDouble(\"taxableamt\", 0.0)), companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount((jSONObject.optDouble(\"igst\", 0.0) + temp.optDouble(\"igst\", 0.0)), companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount((jSONObject.optDouble(\"cgst\", 0.0) + temp.optDouble(\"cgst\", 0.0)), companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount((jSONObject.optDouble(\"sgst\", 0.0) + temp.optDouble(\"sgst\", 0.0)), companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount((jSONObject.optDouble(\"csgst\", 0.0) + temp.optDouble(\"csgst\", 0.0)), companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount((jSONObject.optDouble(\"totaltax\", 0.0) + temp.optDouble(\"totaltax\", 0.0)), companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount((jSONObject.optDouble(\"totalamount\", 0.0) + temp.optDouble(\"totalamount\", 0.0)), companyId));\n jSONObject.put(\"tableno\", \"\");\n jSONObject.put(\"particulars\", GSTRConstants.GSTR3B_SECTION_5_1);\n jSONObject.put(\"fmt\", \"B\");\n jSONObject.put(\"enableViewDetail\", true);\n }\n /**\n * Vendor CN (ERP-40740)\n */\n reqParams = new JSONObject(params, JSONObject.getNames(params));\n reqParams.put(\"GST3B\", !params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false));\n reqParams.put(\"CustomerType\", Constants.CUSTVENTYPE_NA);\n reqParams.put(\"registrationType\", Constants.GSTRegType_Unregistered);\n reqParams.put(\"typeofjoinisleft\", true);\n reqParams.put(\"taxClassType\", FieldComboData.TaxClass_Percenatge);\n reqParams.put(\"onlycnagainstvendor\", true);\n temp = new JSONObject();\n if ((reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) || (!StringUtil.isNullOrEmpty(params.optString(\"transactionType\", null)) && (params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_NOTE || params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_ALL))) {\n /**\n * For GSTR3B-Detail View.\n */\n temp = getDNForGSTR3BTaxable(reqParams);\n }\n if (!(reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) && params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n JSONArray tempArr = temp.optJSONArray(\"data\");\n if (tempArr != null && tempArr.length() > 0) {\n dataJArr = StringUtil.concatJSONArray(dataJArr, tempArr);\n }\n } else {\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount((jSONObject.optDouble(\"taxableamt\", 0.0) + temp.optDouble(\"taxableamt\", 0.0)), companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount((jSONObject.optDouble(\"igst\", 0.0) + temp.optDouble(\"igst\", 0.0)), companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount((jSONObject.optDouble(\"cgst\", 0.0) + temp.optDouble(\"cgst\", 0.0)), companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount((jSONObject.optDouble(\"sgst\", 0.0) + temp.optDouble(\"sgst\", 0.0)), companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount((jSONObject.optDouble(\"csgst\", 0.0) + temp.optDouble(\"csgst\", 0.0)), companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount((jSONObject.optDouble(\"totaltax\", 0.0) + temp.optDouble(\"totaltax\", 0.0)), companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount((jSONObject.optDouble(\"totalamount\", 0.0) + temp.optDouble(\"totalamount\", 0.0)), companyId));\n jSONObject.put(\"tableno\", \"\");\n jSONObject.put(\"particulars\", GSTRConstants.GSTR3B_SECTION_5_1);\n jSONObject.put(\"fmt\", \"B\");\n jSONObject.put(\"enableViewDetail\", true);\n dataJArr.put(jSONObject);\n }\n return jSONObject;\n }",
"public ProductInfo call() throws DataLoadException {\n\t\t\treturn new ProductInfo();\r\n\t\t}",
"@Override\n public String toString() {\n return this.data.toString();\n }",
"@Override\r\n\t\tpublic BatchArgumentBuilder addData(String dataName, Document data) {\n\t\t\tthrow new UnsupportedOperationException(\"Not implemented yet.\");\r\n\t\t}",
"protected String getUserValues(String name){\n\t\tPreparedStatement getValuesStatement = null;\n\t\tString returnValueString = \"I dunno\";\n\t\ttry {\n\t\t\tString getValuesString = \"select * from responses where userName = ?\";\t\t\n\t\t\tgetValuesStatement = conn.prepareStatement(getValuesString);\t\t\t\n\t\t\tgetValuesStatement.setString(1, name);\t\t\t\n\t\t\tResultSet values = getValuesStatement.executeQuery();\n\t\t\tif(values.first()){\n\t\t\t\tint v1 = values.getInt(2);\n\t\t\t\tint v2 = values.getInt(3);\n\t\t\t\tint v3 = values.getInt(4);\n\t\t\t\tint v4 = values.getInt(5);\n\t\t\t\treturnValueString = \n\t\t\t\t\t\"<p> Op-perf: \" + v1 \n\t\t\t\t\t+ \"<p> Tech-perf: \" + v2 \n\t\t\t\t\t+ \"<p> Proj-sched: \" + v3 \n\t\t\t\t\t+ \"<p> Budget: \" + v4 ;\n\t\t\t}\n\t\t\treturn returnValueString;\n\t\t}catch (SQLException e){\n\t\t\treturn \"Error: While handsome, Greg seems to have missed something.\";\n\t\t}\n\t}",
"@Override\r\n\t\tpublic String getClientInfo(String name) throws SQLException {\n\t\t\treturn null;\r\n\t\t}",
"public JsonArray getFastFuelOrdersBySaleName(String saleName) {\r\n\t\tJsonArray fastFuelOrders = new JsonArray();\r\n\t\tString query = \"\";\r\n\t\tStatement stmt = null;\r\n\t\ttry {\r\n\t\t\tif (DBConnector.conn != null) {\r\n\r\n\t\t\t\tquery = \"SELECT customerID, count(orderID) as sumOfPurchase ,sum(totalPrice) as amountOfPayment FROM fast_fuel_orders \"\r\n\t\t\t\t\t\t+ \"WHERE saleTemplateName='\" + saleName + \"' group by customerID;\";\r\n\t\t\t\tstmt = DBConnector.conn.createStatement();\r\n\t\t\t\tResultSet rs = stmt.executeQuery(query);\r\n\t\t\t\twhile (rs.next()) {\r\n\t\t\t\t\tJsonObject order = new JsonObject();\r\n\t\t\t\t\torder.addProperty(\"customerID\", rs.getString(\"customerID\"));\r\n\t\t\t\t\torder.addProperty(\"sumOfPurchase\", rs.getString(\"sumOfPurchase\"));\r\n\t\t\t\t\torder.addProperty(\"amountOfPayment\", rs.getString(\"amountOfPayment\"));\r\n\t\t\t\t\tfastFuelOrders.add(order);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Conn is null\");\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn fastFuelOrders;\r\n\r\n\t}",
"public final void setDataName(String dataName) {\n this.dataName = dataName;\n }",
"public String getData() {\r\n return this.data;\r\n }",
"private String getListData() {\n String jsonStr = \"{ \\\"users\\\" :[\" +\n \"{\\\"name\\\":\\\"Ritesh Kumar\\\",\\\"designation\\\":\\\"Team Leader\\\",\\\"department\\\":\\\"Main office\\\",\\\"location\\\":\\\"Brampton\\\"}\" +\n \",{\\\"name\\\":\\\"Frank Lee\\\",\\\"designation\\\":\\\"Developer\\\",\\\"department\\\":\\\"Developer's office\\\",\\\"location\\\":\\\"Markham\\\"}\" +\n \",{\\\"name\\\":\\\"Arthur Young\\\",\\\"designation\\\":\\\"Charted Accountant\\\",\\\"department\\\":\\\"Account office\\\",\\\"location\\\":\\\"Toronto\\\"}] }\";\n return jsonStr;\n }",
"public Boolean getData(String category,String name,String dob,String email, String phone){\n return databaseManager.addInfo(category,name,dob,email,phone);\n }",
"@Override\n\tpublic void getAllByBrandName() {\n\t\tfor (int i = 0; i < dto.length; i++) {\n\t\t\tSystem.out.println(dto[i].getBrandName());\n\t\t}\n\n\t}",
"public void addData(String dataName, Object dataItem){\r\n this.mData.put(dataName, dataItem);\r\n }",
"public String getReturnData() {\n return returnData;\n }",
"private void receiveData()\n {\n Intent i = getIntent();\n productSelected = Paper.book().read(Prevalent.currentProductKey);\n vendorID = i.getStringExtra(\"vendorID\");\n if (productSelected != null) {\n\n productName = i.getStringExtra(\"productName\");\n productImage = i.getStringExtra(\"imageUrl\");\n productLongDescription = i.getStringExtra(\"productLongDescription\");\n productCategory = i.getStringExtra(\"productCategory\");\n productPrice = i.getStringExtra(\"productPrice\");\n productSizesSmall = i.getStringExtra(\"productSizesSmall\");\n productSizesMedium = i.getStringExtra(\"productSizesMedium\");\n productSizesLarge = i.getStringExtra(\"productSizesLarge\");\n productSizesXL = i.getStringExtra(\"productSizesXL\");\n productSizesXXL = i.getStringExtra(\"productSizesXXL\");\n productSizesXXXL = i.getStringExtra(\"productSizesXXXL\");\n productQuantity = i.getStringExtra(\"productQuantity\");\n }\n }",
"@Parameters\r\n public static Collection<Object[]> data() {\r\n Object[][] data = new Object[][] { { \"Transportation\" ,\"auto\" } };\r\n return Arrays.asList(data);\r\n }",
"public String getProdDetailsName(){\n String prodName = productDetailsName.toString();\n return prodName;\n }",
"public List<DataRowModel> getData() {\n return data;\n }",
"public String getData() {\r\n\t\treturn data;\r\n\t}",
"public List<ErpBookInfo> selData();",
"public String importData() {\n\t\t\treturn employeeDAO.importData();\n\t\t}",
"public String getData() {\n\t\t\tString[] columns = new String[] { KEY_ID, KEY_IMAGE, KEY_NAME ,KEY_DES};\n\t\t\tCursor c = ourDatabase.query(DATABASE_NAME, columns, null, null, null, null, null);\n\t\t\tString result = \"\";\n\n\t\t\tint irow = c.getColumnIndex(KEY_ID);\n\t\t\tint iimg = c.getColumnIndex(KEY_IMAGE);\n\t\t\tint iname = c.getColumnIndex(KEY_NAME);\n\t\t\tint ides = c.getColumnIndex(KEY_DES);\n\n\t\t\tfor (c.moveToFirst(); !c.isAfterLast(); c.moveToNext()) {\n\t\t\t\tresult = result + c.getString(irow) + \" \"+c.getString(iimg) + \" \"+c.getString(iname) + \" \"+c.getString(ides) + \" \"+\"\\n\";\n\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}",
"java.lang.String getDataInfoId();",
"private JSONObject getGSTR3B_Section_3_1_E_Data(JSONObject params, String companyId, JSONArray dataJArr) throws JSONException, ServiceException {\n JSONObject jSONObject = new JSONObject();\n JSONObject reqParams = new JSONObject(params, JSONObject.getNames(params));\n reqParams.put(\"GST3B\", !params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false));\n reqParams.put(\"registrationType\", Constants.GSTRegType_Regular + \",\" + Constants.GSTRegType_Composition + \",\" + Constants.GSTRegType_Unregistered);\n reqParams.put(\"CustomerType\", Constants.CUSTVENTYPE_NA );\n reqParams.put(\"taxClassType\", FieldComboData.TaxClass_Non_GST_Product);\n if ((reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) || (!StringUtil.isNullOrEmpty(params.optString(\"transactionType\", null)) && (params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_INVOICE || params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_ALL))) {\n jSONObject = getInvoiceForGSTR3BNillRated(reqParams);\n }\n if (!(reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) && params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n JSONArray tempArr = jSONObject.optJSONArray(\"data\");\n if (tempArr != null && tempArr.length() > 0) {\n dataJArr = StringUtil.concatJSONArray(dataJArr, tempArr);\n }\n }\n /**\n * Debit Note-\n * REGTYPE:Regular,Composition,Unregistered.CUSTTYPE:NA,Export,ExportWOPAY,SEZ,SEZWOPAY.\n * Product Tax Class: NON-GST.\n */\n reqParams = new JSONObject(params, JSONObject.getNames(params));\n reqParams.put(\"GST3B\", !params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false));\n reqParams.put(\"registrationType\", Constants.GSTRegType_Regular + \",\" + Constants.GSTRegType_Composition + \",\" + Constants.GSTRegType_Unregistered);\n reqParams.put(\"taxClassType\", FieldComboData.TaxClass_Non_GST_Product);\n reqParams.put(\"CustomerType\", Constants.CUSTVENTYPE_NA );\n JSONObject temp = new JSONObject();\n if ((reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) || (!StringUtil.isNullOrEmpty(params.optString(\"transactionType\", null)) && (params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_NOTE || params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_ALL))) {\n temp = getDNAgainstSalesForGSTR3BTaxable(reqParams);\n }\n if (!(reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) && params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n JSONArray tempArr = temp.optJSONArray(\"data\");\n if (tempArr != null && tempArr.length() > 0) {\n dataJArr = StringUtil.concatJSONArray(dataJArr, tempArr);\n }\n } else {\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount((jSONObject.optDouble(\"taxableamt\", 0.0) + temp.optDouble(\"taxableamt\", 0.0)), companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount((jSONObject.optDouble(\"igst\", 0.0) + temp.optDouble(\"igst\", 0.0)), companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount((jSONObject.optDouble(\"cgst\", 0.0) + temp.optDouble(\"cgst\", 0.0)), companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount((jSONObject.optDouble(\"sgst\", 0.0) + temp.optDouble(\"sgst\", 0.0)), companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount((jSONObject.optDouble(\"csgst\", 0.0) + temp.optDouble(\"csgst\", 0.0)), companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount((jSONObject.optDouble(\"totaltax\", 0.0) + temp.optDouble(\"totaltax\", 0.0)), companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount((jSONObject.optDouble(\"totalamount\", 0.0) + temp.optDouble(\"totalamount\", 0.0)), companyId));\n\n }\n /**\n * Credit Note-\n * REGTYPE:Regular,Composition,Unregistered.CUSTTYPE:NA,Export,ExportWOPAY,SEZ,SEZWOPAY.\n * Product Tax Class: NON-GST.\n */\n reqParams = new JSONObject(params, JSONObject.getNames(params));\n reqParams.put(\"typeofjoinisleft\", true);\n reqParams.put(\"GST3B\", !params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false));\n reqParams.put(\"taxClassType\", FieldComboData.TaxClass_Non_GST_Product);\n reqParams.put(\"registrationType\", Constants.GSTRegType_Regular + \",\" + Constants.GSTRegType_Composition + \",\" + Constants.GSTRegType_Unregistered);\n reqParams.put(\"CustomerType\", Constants.CUSTVENTYPE_NA);\n temp = new JSONObject();\n if ((reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) || (!StringUtil.isNullOrEmpty(params.optString(\"transactionType\", null)) && (params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_NOTE || params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_ALL))) {\n temp = getCNForGSTR3BTaxable(reqParams);\n }\n if (!(reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) && params.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n JSONArray tempArr = temp.optJSONArray(\"data\");\n if (tempArr != null && tempArr.length() > 0) {\n dataJArr = StringUtil.concatJSONArray(dataJArr, tempArr);\n }\n } else {\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount((jSONObject.optDouble(\"taxableamt\", 0.0) + temp.optDouble(\"taxableamt\", 0.0)), companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount((jSONObject.optDouble(\"igst\", 0.0) + temp.optDouble(\"igst\", 0.0)), companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount((jSONObject.optDouble(\"cgst\", 0.0) + temp.optDouble(\"cgst\", 0.0)), companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount((jSONObject.optDouble(\"sgst\", 0.0) + temp.optDouble(\"sgst\", 0.0)), companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount((jSONObject.optDouble(\"csgst\", 0.0) + temp.optDouble(\"csgst\", 0.0)), companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount((jSONObject.optDouble(\"totaltax\", 0.0) + temp.optDouble(\"totaltax\", 0.0)), companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount((jSONObject.optDouble(\"totalamount\", 0.0) + temp.optDouble(\"totalamount\", 0.0)), companyId));\n }\n\n /**\n * Advance Liability-\n * REGTYPE:Regular,Composition,Unregistered.CUSTTYPE:NA,Export,ExportWOPAY,SEZ,SEZWOPAY.\n * Product Tax Class: NON-GST.\n */\n reqParams = new JSONObject(params, JSONObject.getNames(params));\n reqParams.put(\"entitycolnum\", reqParams.optString(\"receiptentitycolnum\"));\n reqParams.put(\"entityValue\", reqParams.optString(\"receiptentityValue\"));\n reqParams.put(\"taxClassType\", FieldComboData.TaxClass_Non_GST_Product);\n reqParams.put(\"registrationType\", Constants.GSTRegType_Regular + \",\" + Constants.GSTRegType_Composition + \",\" + Constants.GSTRegType_Unregistered);\n reqParams.put(\"CustomerType\", Constants.CUSTVENTYPE_NA);\n JSONObject tempObj = new JSONObject();\n if ((reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) || (!StringUtil.isNullOrEmpty(params.optString(\"transactionType\", null)) && (params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_PAYMENT_RECEIPT || params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_ALL))) {\n tempObj = getTaxLiabilityOnAdvance(reqParams);\n }\n if (!(reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) && reqParams.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n JSONArray tempArr = tempObj.optJSONArray(\"data\");\n if (tempArr != null && tempArr.length() > 0) {\n dataJArr = StringUtil.concatJSONArray(dataJArr, tempArr);\n }\n } else {\n temp = tempObj.optJSONObject(\"gstr3Obj\");\n double totaltaxamt = temp.optDouble(\"csgst3b\", 0.0) + temp.optDouble(\"cgst3b\", 0.0) + temp.optDouble(\"sgst3b\", 0.0) + temp.optDouble(\"igst3b\", 0.0);\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount((jSONObject.optDouble(\"taxableamt\", 0.0) + temp.optDouble(\"taxableamt3b\", 0.0)), companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount((jSONObject.optDouble(\"igst\", 0.0) + temp.optDouble(\"igst3b\", 0.0)), companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount((jSONObject.optDouble(\"cgst\", 0.0) + temp.optDouble(\"cgst3b\", 0.0)), companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount((jSONObject.optDouble(\"sgst\", 0.0) + temp.optDouble(\"sgst3b\", 0.0)), companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount((jSONObject.optDouble(\"csgst\", 0.0) + temp.optDouble(\"csgst3b\", 0.0)), companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount((jSONObject.optDouble(\"totaltax\", 0.0) + totaltaxamt), companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount((jSONObject.optDouble(\"totalamount\", 0.0) + temp.optDouble(\"taxableamt3b\", 0.0) + totaltaxamt), companyId));\n }\n /**\n * Adjusted Advance-\n * REGTYPE:Regular,Composition,Unregistered.CUSTTYPE:NA,Export,ExportWOPAY,SEZ,SEZWOPAY.\n * Product Tax Class: NON-GST.\n */\n reqParams = new JSONObject(params, JSONObject.getNames(params));\n reqParams.put(\"entitycolnum\", reqParams.optString(\"receiptentitycolnum\"));\n reqParams.put(\"entityValue\", reqParams.optString(\"receiptentityValue\"));\n reqParams.put(\"taxClassType\", FieldComboData.TaxClass_Non_GST_Product);\n reqParams.put(\"registrationType\", Constants.GSTRegType_Regular + \",\" + Constants.GSTRegType_Composition + \",\" + Constants.GSTRegType_Unregistered);\n reqParams.put(\"CustomerType\", Constants.CUSTVENTYPE_NA );\n tempObj = new JSONObject();\n if ((reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) || (!StringUtil.isNullOrEmpty(params.optString(\"transactionType\", null)) && (params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_PAYMENT_RECEIPT || params.optInt(\"transactionType\", 0) == GSTRConstants.GSTR3B_TRANSACTION_TYPE_ALL))) {\n tempObj = getAdjustedAdvance(reqParams);\n }\n if (!(reqParams.has(\"reportid\") && reqParams.optInt(\"reportid\", 0) == Constants.GSTR3B_Summary_Report) && reqParams.optBoolean(GSTR3BConstants.DETAILED_VIEW_REPORT, false)) {\n JSONArray tempArr = tempObj.optJSONArray(\"data\");\n if (tempArr != null && tempArr.length() > 0) {\n dataJArr = StringUtil.concatJSONArray(dataJArr, tempArr);\n }\n } else {\n temp = tempObj.optJSONObject(\"gstr3Obj\");\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount((jSONObject.optDouble(\"taxableamt\", 0.0) + temp.optDouble(\"taxableamt\", 0.0)), companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount((jSONObject.optDouble(\"igst\", 0.0) + temp.optDouble(\"igst\", 0.0)), companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount((jSONObject.optDouble(\"cgst\", 0.0) + temp.optDouble(\"cgst\", 0.0)), companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount((jSONObject.optDouble(\"sgst\", 0.0) + temp.optDouble(\"sgst\", 0.0)), companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount((jSONObject.optDouble(\"csgst\", 0.0) + temp.optDouble(\"csgst\", 0.0)), companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount((jSONObject.optDouble(\"totaltax\", 0.0) + temp.optDouble(\"totaltax\", 0.0)), companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount((jSONObject.optDouble(\"totalamount\", 0.0) + temp.optDouble(\"totalamount\", 0.0)), companyId));\n\n jSONObject.put(\"tableno\", \"\");\n jSONObject.put(\"particulars\", GSTRConstants.GSTR3B_SECTION_3_1_E);\n jSONObject.put(\"fmt\", \"B\");\n jSONObject.put(\"enableViewDetail\", true);\n dataJArr.put(jSONObject);\n }\n return jSONObject;\n }"
]
| [
"0.62082565",
"0.60768896",
"0.56965226",
"0.554922",
"0.55124176",
"0.5460164",
"0.5445877",
"0.5356071",
"0.53202266",
"0.5313396",
"0.5313396",
"0.53043056",
"0.5288521",
"0.5283253",
"0.52580905",
"0.5239827",
"0.5206565",
"0.51768786",
"0.5175366",
"0.51725745",
"0.51703435",
"0.5166303",
"0.516054",
"0.51542836",
"0.5139216",
"0.5133911",
"0.5117808",
"0.5113665",
"0.51078475",
"0.509621",
"0.5093687",
"0.5093687",
"0.50758773",
"0.50747657",
"0.506899",
"0.50626874",
"0.50613433",
"0.50525546",
"0.5052346",
"0.5051439",
"0.5049292",
"0.5048104",
"0.5046298",
"0.50393575",
"0.50378925",
"0.50348824",
"0.5034053",
"0.5013687",
"0.50135046",
"0.5013448",
"0.5006532",
"0.5005747",
"0.49942374",
"0.49830887",
"0.49814627",
"0.4977055",
"0.4975737",
"0.49749875",
"0.49687594",
"0.49671003",
"0.49652526",
"0.49635065",
"0.49623838",
"0.4960973",
"0.49599317",
"0.49596372",
"0.49581945",
"0.49516365",
"0.49463248",
"0.4944012",
"0.49432048",
"0.49363407",
"0.49329636",
"0.49302217",
"0.49287698",
"0.492875",
"0.49240813",
"0.49234763",
"0.49126714",
"0.49067104",
"0.49029878",
"0.49007273",
"0.4898385",
"0.4898103",
"0.48976573",
"0.48968548",
"0.48962727",
"0.4895841",
"0.4891491",
"0.48902786",
"0.48884493",
"0.4885428",
"0.4882943",
"0.4881539",
"0.48811403",
"0.48715368",
"0.4870624",
"0.4864433",
"0.48644188",
"0.48637414"
]
| 0.55516124 | 3 |
TODO Autogenerated method stub | public void fieldChanged(Field field, int context) {
} | {
"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 | public void modelPropertyChange(PropertyChangeEvent evt) {
} | {
"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 | private static double getLongt() {
return longt;
} | {
"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 |
gpsThread = new GPSThread(); // gpsThread.start(); invokeLater(gpsThread); | public void handleGPS()
{
Runnable r2 = new Runnable() {
public void run() {
try {
BlackBerryCriteria criteria = new BlackBerryCriteria(GPSInfo.GPS_MODE_AUTONOMOUS);
try
{
BlackBerryLocationProvider myProvider =
(BlackBerryLocationProvider)
LocationProvider.getInstance(criteria);
try
{
BlackBerryLocation myLocation = (BlackBerryLocation)myProvider.getLocation(300);
int satCount = myLocation.getSatelliteCount();
setLat(myLocation.getQualifiedCoordinates().getLatitude());
setLongt(myLocation.getQualifiedCoordinates().getLongitude());
//data.setVisibleNone();
MapLocation test = new MapLocation(myLocation.getQualifiedCoordinates().getLatitude(), myLocation.getQualifiedCoordinates().getLongitude(), "test", null);
int testId = data.add((Mappable) test, "test");
data.tag(testId, "test");
data.setVisibleNone();
data.setVisible( "test");
// MapAction action = map.getAction();
// action.setCentreAndZoom(new MapPoint(43.47462, -80.53820), 2);
map.getMapField().update(true);
int signalQuality = myLocation.getAverageSatelliteSignalQuality();
int dataSource = myLocation.getDataSource();
int gpsMode = myLocation.getGPSMode();
SatelliteInfo si;
StringBuffer sb = new StringBuffer("[Id:SQ:E:A]\n");
String separator = ":";
for (Enumeration e = myLocation.getSatelliteInfo();
e!=null && e.hasMoreElements(); )
{
si = (SatelliteInfo)e.nextElement();
sb.append(si.getId() + separator);
sb.append(si.getSignalQuality() + separator);
sb.append(si.getElevation() + separator);
sb.append(si.getAzimuth());
sb.append('\n');
System.out.println(sb);
}
}
catch ( InterruptedException iex )
{
Logger.log(iex.toString());
}
catch ( LocationException lex )
{
Logger.log(lex.toString());
}
}
catch ( LocationException lex )
{
Logger.log(lex.toString());
}
}
catch ( UnsupportedOperationException uoex )
{
Logger.log(uoex.toString());
}
// return;
}
};
controller.invokeLater(r2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void ativaThread() {\n\t\t\n\t\tmDialog = ProgressDialog.show(this, \"Buslocation\",\n\t\t\t\t\"Buscando coordenadas...\", false, false);\n\t\tmHandler = new Handler();\n\t\tmThread = new MinhaThread(1);\n\t\tmThread.start();\n\t}",
"@Override \n\t\tpublic void run() {\n\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tIGPSService gpsService = gpsServiceConnection.getServiceIfBound();\n\t\t\t \tif (gpsService != null) {\n\t\t\t \t\ttry {\n\t\t\t \t\t\tmLastSuccess.setText(gpsService.getLastSuccessfulRequest());\n\t\t\t\t\t\t} catch (RemoteException e) {\n\t\t\t\t\t\t\tLog.d(LocationUtils.APPTAG, e.getLocalizedMessage());\n\t\t\t\t\t\t}\n\t\t\t \t}\n\t\t\t\t}\n\t\t\t});\n\t\t}",
"private void startLocationUpdate()\r\n {\r\n try \r\n {\r\n _locationProvider = LocationProvider.getInstance(null);\r\n \r\n if ( _locationProvider == null ) \r\n {\r\n // We would like to display a dialog box indicating that GPS isn't supported, but because\r\n // the event-dispatcher thread hasn't been started yet, modal screens cannot be pushed onto\r\n // the display stack. So delay this operation until the event-dispatcher thread is running\r\n // by asking it to invoke the following Runnable object as soon as it can.\r\n Runnable showGpsUnsupportedDialog = new Runnable() \r\n {\r\n public void run() \r\n {\r\n Dialog.alert(\"GPS is not supported on this platform, exiting...\");\r\n System.exit( 1 );\r\n }\r\n };\r\n invokeLater( showGpsUnsupportedDialog ); // ask event-dispatcher thread to display dialog ASAP\r\n } \r\n else \r\n {\r\n // only a single listener can be associated with a provider, and unsetting it involves the same\r\n // call but with null, therefore, no need to cache the listener instance\r\n _locationProvider.setLocationListener(new LocationListenerImpl(), _interval, 1, 1);\r\n }\r\n } catch (LocationException le) {\r\n System.err.println(\"Failed to instantiate the LocationProvider object, exiting...\");\r\n System.err.println(le); \r\n System.exit(0);\r\n } \r\n }",
"public void run(){\n\t\t\t\ttry {\n\t\t\t\t\tSystem.out.println(\"LocyNavigatorThread has started\");\n\t\t\t\t\twhile(true){\n\t\t\t\t\t\tif(locyNavigator.getLocation()!=null){\n\t\t\t\t\t\t\tfor(LocationListener listener: locationListeners){\n\t\t\t\t\t\t\t\tlistener.onLocationChanged(locyNavigator.getLocation());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tThread.sleep(REQUEST_TIME);\n\t\t\t\t\t}\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\tSystem.out.println(\"LocyNavigatorThread has stopped\");\n\t\t\t\t}\n\t }",
"@Override\n public void run() {\n ((GPSDelegate)delegate).cambioLocalizacion(gps.getLastLocation());\n }",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tLocation myLocation = googleMap.getMyLocation();\r\n\t\t\t\t\t\tif (myLocation != null) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t GPSTracker gpsTracker = new GPSTracker(context); \r\n\t\t\t\t\t\t\t if(gpsTracker.canGetLocation()) \r\n\t\t\t\t\t\t\t { \r\n\t\t\t\t\t\t\t\t String stringLatitude = String.valueOf(gpsTracker.latitude); \r\n\t\t\t\t\t\t\t\t String stringLongitude = String.valueOf(gpsTracker.longitude); \r\n\t\t\t\t\t\t\t\t currentlocation = new LatLng(gpsTracker.latitude,gpsTracker.longitude);\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t/*double dclat = googleMap.getMyLocation()\r\n\t\t\t\t\t\t\t\t\t.getLatitude();\r\n\t\t\t\t\t\t\tdouble dclon = googleMap.getMyLocation()\r\n\t\t\t\t\t\t\t\t\t.getLongitude();\r\n\t\t\t\t\t\t\tcurrentlocation = new LatLng(dclat, dclon);*/\r\n\r\n\t\t\t\t\t\t\tif (!myList.contains(currentlocation)\r\n\t\t\t\t\t\t\t\t\t&& (currentlocation != null)) {\r\n\t\t\t\t\t\t\t\tmyList.add(currentlocation);\r\n\r\n\t\t\t\t\t\t\t\tdouble lat = currentlocation.latitude;\r\n\t\t\t\t\t\t\t\tdouble lon = currentlocation.longitude;\r\n\t\t\t\t\t\t\t\tuploadarraylist.add(String.valueOf(lon) + \",\"\r\n\t\t\t\t\t\t\t\t\t\t+ String.valueOf(lat));\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (myList.size() == 1) {\r\n\t\t\t\t\t\t\t\tSystem.err.println(\"First zoom\");\r\n\t\t\t\t\t\t\t\tLatLng CurrentLocation = new LatLng(googleMap\r\n\t\t\t\t\t\t\t\t\t\t.getMyLocation().getLatitude(),\r\n\t\t\t\t\t\t\t\t\t\tgoogleMap.getMyLocation()\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getLongitude());\r\n\t\t\t\t\t\t\t\tCameraPosition cameraPosition = new CameraPosition.Builder()\r\n\t\t\t\t\t\t\t\t\t\t.target(CurrentLocation).zoom(18)\r\n\t\t\t\t\t\t\t\t\t\t.bearing(70).tilt(25).build();\r\n\t\t\t\t\t\t\t\tgoogleMap.animateCamera(CameraUpdateFactory\r\n\t\t\t\t\t\t\t\t\t\t.newCameraPosition(cameraPosition));\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (myList.size() >= 2) {\r\n\t\t\t\t\t\t\t\tdouble slat = myList.get(myList.size() - 2).latitude;\r\n\t\t\t\t\t\t\t\tdouble slon = myList.get(myList.size() - 2).longitude;\r\n\r\n\t\t\t\t\t\t\t\tdouble dlat = myList.get(myList.size() - 1).latitude;\r\n\t\t\t\t\t\t\t\tdouble dlon = myList.get(myList.size() - 1).latitude;\r\n\r\n\t\t\t\t\t\t\t\tLatLng mmarkersourcelatlng = new LatLng(myList\r\n\t\t\t\t\t\t\t\t\t\t.get(1).latitude,\r\n\t\t\t\t\t\t\t\t\t\tmyList.get(1).longitude);\r\n\t\t\t\t\t\t\t\tmsourcelatlng = new LatLng(slat, slon);\r\n\t\t\t\t\t\t\t\tmdestlatlng = new LatLng(dlat, dlon);\r\n\t\t\t\t\t\t\t\tSystem.err.println(\"myLocation:\"\r\n\t\t\t\t\t\t\t\t\t\t+ currentlocation);\r\n\t\t\t\t\t\t\t\tfor (int i = 1; i < myList.size() - 1; i++) {\r\n\t\t\t\t\t\t\t\t\tLatLng src = myList.get(i);\r\n\t\t\t\t\t\t\t\t\tLatLng dest = myList.get(i + 1);\r\n\t\t\t\t\t\t\t\t\tPolyline line = googleMap\r\n\t\t\t\t\t\t\t\t\t\t\t.addPolyline(new PolylineOptions()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// mMap is the Map Object\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.add(new LatLng(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsrc.latitude,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsrc.longitude),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew LatLng(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdest.latitude,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdest.longitude))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.width(10)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.color(R.color.pink)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.geodesic(true));\r\n\t\t\t\t\t\t\t\t\tmsmarker = googleMap\r\n\t\t\t\t\t\t\t\t\t\t\t.addMarker(new MarkerOptions()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.position(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmmarkersourcelatlng)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.title(\"Source\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.icon(BitmapDescriptorFactory\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.defaultMarker(BitmapDescriptorFactory.HUE_GREEN)));\r\n\r\n\t\t\t\t\t\t\t\t\tif (mdmarker != null) {\r\n\t\t\t\t\t\t\t\t\t\tmdmarker.remove();\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tmdmarker = googleMap\r\n\t\t\t\t\t\t\t\t\t\t\t.addMarker(new MarkerOptions()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.position(msourcelatlng)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.title(\"Destination\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.icon(BitmapDescriptorFactory\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.defaultMarker(BitmapDescriptorFactory.HUE_RED)));\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\t\t} else {\r\n\t\t\t\t\t\t\tSystem.err.println(\"Mylocation Empty\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\t\t}",
"@Override\n public void run() {\n mHandler.post(new Runnable() {\n\n @Override\n public void run() {\n // display toast\n locationupdate();\n }\n\n });\n }",
"public void actionPerformed(ActionEvent e)\n/* */ {\n/* */ \n/* */ \n/* 60 */ new Thread()\n/* */ {\n/* */ public void run()\n/* */ {\n/* 55 */ P2PAnalysisFrame.this.start.setEnabled(false);\n/* 56 */ P2PAnalysisFrame.this.init();\n/* 57 */ P2PAnalysisFrame.this.analysis();\n/* 58 */ P2PAnalysisFrame.this.start.setEnabled(true);\n/* */ }\n/* */ }.start();\n/* */ }",
"public void ThreadStart()\r\n\t{\r\n\t\tthread_running=true;\r\n\t\tNewBallTheard.start();\r\n\t}",
"public JanelaThread() {\n initComponents();\n }",
"@Override\n\t\tprotected JSONObject doInBackground(Integer... params) {\n\t\t\t{\n\t\t\t\n\t\t \n\t\t Log.d(\"mylog\", \"SerLat:\"+latitude+\" :\"+longitude);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\t/*\n\t\t\ttry {\n\t\t\t//\tThread.sleep(3000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}*/\n\t\t\twhile (now.toMillis(false)-curt<3000){\n\t\t\t\tnow.setToNow();\n\t\t\t}\n\t\t\treturn null;\n\t\t}",
"public void start ()\n {\n Thread th = new Thread (this);\n // start this thread\n th.start ();\n\n }",
"@Override\r\n public int onStartCommand(Intent intent, int flags, int startId) {\n\r\n gps = new GPSTracker(CaptureService.this);\r\n Thread t = new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n\r\n while (true) {\r\n //startJob();\r\n try {\r\n //Thread.sleep(3600000);\r\n // Thread.sleep(1800000);\r\n Thread.sleep(3600000);\r\n if (gps.canGetLocation()) {\r\n if (gps.canGetLocation()) {\r\n new SendToServer(gps.getLongitude(), gps.getLatitude()).execute();\r\n }\r\n\r\n gps.getLongitude();\r\n gps.getLatitude();\r\n gps.getTime();\r\n sending_latt = String.valueOf(gps.getLatitude());\r\n sending_longg = String.valueOf(gps.getLongitude());\r\n final SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n Date d = new Date(gps.getTime());\r\n str_timestamp = sdf.format(d);\r\n Log.e( \"CaptureService \", \"GPSTIME : \" + str_timestamp);\r\n\r\n }\r\n\r\n } catch (InterruptedException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n }\r\n\r\n }\r\n });\r\n t.start();\r\n return START_STICKY;\r\n }",
"@Override\r\n\tpublic void run() {\n\t\tmLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,\r\n\t\t\t\tConstants.GPS_MIN_TIME_MIL_SEC,\r\n\t\t\t\tConstants.GPS_MIN_DISTANCE_METER, myLocationListener);\r\n\t}",
"public void login(){\n String s1 = user.getText().toString();\n String s2 = pass.getText().toString();\n if(s1.trim().length() == 0 ||s1 == null){\n Toast.makeText(DriverLogin.this, \"Please enter username\", Toast.LENGTH_LONG).show();\n user.requestFocus();\n return;\n }\n if(s2.trim().length() == 0 ||s2 == null){\n Toast.makeText(DriverLogin.this, \"Please enter password\", Toast.LENGTH_LONG).show();\n user.requestFocus();\n return;\n }\n StringBuilder request = new StringBuilder();\n request.append(\"t1=\"+s1+\"&t2=\"+s2);\n //progress dialog\n ProgressDialog dialog = new ProgressDialog(DriverLogin.this);\n dialog.setMessage(\"Processing...\");\n dialog.setIndeterminate(true);\n dialog.setCancelable(false);\n dialog.show();\n //call thread\n DriverLoginThread register = new DriverLoginThread(request.toString());\n try{\n //wait till thread complete its execution\n register.join();\n dialog.dismiss();\n //get response from server\n String res = register.getResponse();\n //if response successfull then go to LoginActivity\n if (res.equals(\"success\")) {\n GPSTracker gps = new GPSTracker(DriverLogin.this);\n if(gps.canGetLocation()){\n\n double latitude = gps.getLatitude();\n double longitude = gps.getLongitude();\n\n // \\n is for new line\n sendDriverLocation(latitude,longitude);\n }else{\n // can't get location\n // GPS or Network is not enabled\n // Ask user to enable GPS/network in settings\n gps.showSettingsAlert();\n }\n\n } else {\n //show login fail\n Toast.makeText(DriverLogin.this, \"login failed\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\r\n public void onGpsStatusChanged(int event) {\n\r\n }",
"@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.main);\n\n\t\tmButtonGetLocation = (Button) findViewById(R.id.btn_get_location);\n\t\tmTextViewResult = (TextView) findViewById(R.id.tv_result_value);\n\t\tmTextViewGPSStatus = (TextView) findViewById(R.id.tv_gps_status);\n\t\tmMapView = (MapView) findViewById(R.id.map_view);\n\t\tmMapController = mMapView.getController();\n\t\tmMapController.setZoom(11);\n\t\tsetMapCenter(18.04, 59.35);\n\n\t\tmDialog = new ProgressDialog(this);\n\t\tmDialog.setOnCancelListener(new OnCancelListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\tmButtonGetLocation.setEnabled(true);\n\t\t\t\tmLocationManager.removeUpdates(mLocationListener);\n\t\t\t}\n\t\t});\n\t\tmLocationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n\n\t\tmLocationListener = new LocationListener() {\n\t\t\t@Override\n\t\t\tpublic void onLocationChanged(Location location) {\n\t\t\t\t// Called when a new location is found.\n\t\t\t\tnew PostDogShitTask().execute(location);\n\t\t\t\tmLocationManager.removeUpdates(mLocationListener);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onStatusChanged(String provider, int status, Bundle extras) {\n\t\t\t\tswitch (status) {\n\t\t\t\tcase LocationProvider.AVAILABLE:\n\t\t\t\t\tmTextViewGPSStatus.setText(mTextViewGPSStatus.getText().toString()\n\t\t\t\t\t + \"GPS available again\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase LocationProvider.OUT_OF_SERVICE:\n\t\t\t\t\tmTextViewGPSStatus.setText(mTextViewGPSStatus.getText().toString()\n\t\t\t\t\t + \"GPS out of service\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase LocationProvider.TEMPORARILY_UNAVAILABLE:\n\t\t\t\t\tmTextViewGPSStatus.setText(mTextViewGPSStatus.getText().toString()\n\t\t\t\t\t + \"GPS temporarily unavailable\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onProviderEnabled(String provider) {\n\t\t\t\tLog.i(TAG, \"Provider enabled\");\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onProviderDisabled(String provider) {\n\t\t\t\tLog.i(TAG, \"Provider disabled\");\n\t\t\t}\n\t\t};\n\n\t\tmapOverlays = mMapView.getOverlays();\n\t\tDrawable drawable = this.getResources().getDrawable(R.drawable.poop);\n\t\titemizedoverlay = new HelloItemizedOverlay(drawable);\n\t}",
"void startThread();",
"void start() {\n\tsleepThread = new Thread(this);\n\tsleepThread.start();\n }",
"@Override\n public void onClick(View view) {\n currentScanCounter = -1;\n //\n toRoomNo = Integer.parseInt(roomNo.getText().toString());\n TaskRoute task = new TaskRoute();\n //task.run();\n run = new Thread(task);\n run.start();\n\n //roomNo.setEnabled(true);\n //our_check.setEnabled(true);\n\n //run = new Thread(task);\n //run.start();\n\n //Toast.makeText(MainActivity.mContext, \"go cal\", Toast.LENGTH_SHORT).show();\n\n //locat result = mRoute.calRoute();\n //System.out.println(result.current[0]);\n /*\n String abc = Integer.toString(maze[result.current[0]][result.current[1]]);\n while(result.previous != null){\n result = result.previous;\n abc = abc + \"<-\" + Integer.toString(maze[result.current[0]][result.current[1]]);\n }\n Toast.makeText(getApplicationContext(), abc, Toast.LENGTH_LONG).show();\n*/\n\n\n //wifiManager.startScan();\n\n // synchronized (obj){\n // }\n //Toast.makeText(getApplicationContext(), \"2429\", Toast.LENGTH_SHORT).show();\n //Toast.makeText(getApplicationContext(), \"current x:\" + current_x + \", current y:\" + current_y, Toast.LENGTH_SHORT).show();\n\n }",
"@Override\n public void run() {\n LatLng myLoc = new LatLng(myLatitude, myLongitude);\n myMarker.setPosition(myLoc);\n }",
"public void componentShown(ComponentEvent e)\r\n\t\t\t{\n\t\t\t\tnew Thread(new Runnable()\r\n\t\t\t\t{\r\n\t\t\t\t\tpublic void run()\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttry\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif(geopistaEditor==null)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tgeopistaEditor = new GeopistaEditor();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tblackboard.put(\"capaParcelasInfoReferencia\", null);\r\n\t\t\t\t\t\t\tblackboard.put(\"geopistaEditorInfoReferencia\", geopistaEditor);\r\n\t\t\t\t\t\t\tcontext = geopistaEditor.getContext();\r\n\t\t\t\t\t\t\tscpErrores.setBounds(new Rectangle(135, 320, 595, 215));\r\n\r\n\t\t\t\t\t\t\tbtnAbrirUrbana.setIcon(IconLoader.icon(\"abrir.gif\"));\r\n\t\t\t\t\t\t\tbtnAbrirRustica.setIcon(IconLoader.icon(\"abrir.gif\"));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tlblImagen.setIcon(IconLoader.icon(\"catastro.png\"));\r\n\t\t\t\t\t\t\tlblImagen.setBounds(new Rectangle(15, 20, 110, 490));\r\n\t\t\t\t\t\t\tlblImagen.setBorder(BorderFactory.createLineBorder(\r\n\t\t\t\t\t\t\t\t\tColor.black, 1));\r\n\r\n\t\t\t\t\t\t\tlblFicheroRustica.setText(I18N.get(\"ImportadorParcelas\",\"importar.informacion.referencia.fichero.rustica\"));\r\n\t\t\t\t\t\t\tlblFicheroRustica.setBounds(new Rectangle(135, 210, 180, 20));\r\n\r\n\t\t\t\t\t\t\ttxtFicheroRustica.setBounds(new Rectangle(330, 210, 365, 20));\r\n\t\t\t\t\t\t\ttxtFicheroRustica.setEditable(false);\r\n\t\t\t\t\t\t\ttxtFicheroRustica.addPropertyChangeListener(new PropertyChangeListener()\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tpublic void propertyChange(\r\n\t\t\t\t\t\t\t\t\t\tPropertyChangeEvent e)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\ttxtFichero_propertyChange(e);\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\t\t\tbtnAbrirRustica.setBounds(new Rectangle(700, 205, 25, 25));\r\n\t\t\t\t\t\t\tbtnAbrirRustica.addActionListener(new ActionListener()\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tbtnAbrirRustica_actionPerformed(e);\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\t\r\n\t\t\t\t\t\t\tbtnAbrirUrbana.setBounds(new Rectangle(700, 180, 25, 25));\r\n\t\t\t\t\t\t\tbtnAbrirUrbana.addActionListener(new ActionListener()\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tbtnAbrirUrbana_actionPerformed(e);\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\t\t\tlblErrores.setText(aplicacion.getI18nString(\"importar.informacion.referencia.errores.validacion\"));\r\n\t\t\t\t\t\t\tlblErrores.setBounds(new Rectangle(135, 295, 250, 20));\r\n\r\n\t\t\t\t\t\t\tlblFicheroUrbana.setText(I18N.get(\"ImportadorParcelas\", \"importar.informacion.referencia.fichero.urbana\"));\r\n\t\t\t\t\t\t\tlblFicheroUrbana.setBounds(new Rectangle(135, 180, 180, 20));\r\n\r\n\t\t\t\t\t\t\ttxtFicheroUrbana.setBounds(new Rectangle(330, 180, 365, 20));\r\n\t\t\t\t\t\t\ttxtFicheroUrbana.setEditable(false);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tediError.setText(\"jEditorPane1\");\r\n\t\t\t\t\t\t\tediError.setContentType(\"text/html\");\r\n\t\t\t\t\t\t\tediError.setEditable(false);\r\n\t\t\t\t\t\t\tlblFuente.setText(aplicacion.getI18nString(\"GeopistaSeleccionarFicheroParcelas.Fuente\"));\r\n\t\t\t\t\t\t\tlblFuente.setBounds(new Rectangle(135, 25, 95, 20));\r\n\t\t\t\t\t\t\ttxtFuente.setBounds(new Rectangle(240, 25, 490, 20));\r\n\t\t\t\t\t\t\tlblOrganismo.setText(aplicacion.getI18nString(\"GeopistaSeleccionarFicheroParcelas.Organismo\"));\r\n\t\t\t\t\t\t\tlblOrganismo.setBounds(new Rectangle(135, 55, 90, 20));\r\n\t\t\t\t\t\t\ttxtOrganismo.setBounds(new Rectangle(240, 55, 490, 20));\r\n\t\t\t\t\t\t\tlblPersona.setText(aplicacion.getI18nString(\"GeopistaSeleccionarFicheroParcelas.Persona\"));\r\n\t\t\t\t\t\t\tlblPersona.setBounds(new Rectangle(135, 80, 85, 20));\r\n\t\t\t\t\t\t\ttxtPersona.setBounds(new Rectangle(240, 80, 490, 20));\r\n\t\t\t\t\t\t\tlblFecha.setText(aplicacion.getI18nString(\"GeopistaSeleccionarFicheroParcelas.Fecha\"));\r\n\t\t\t\t\t\t\tlblFecha.setBounds(new Rectangle(135, 110, 75, 25));\r\n\t\t\t\t\t\t\ttxtFecha.setBounds(new Rectangle(240, 110, 75, 20));\r\n\t\t\t\t\t\t\ttxtFecha.setEditable(false);\r\n\t\t\t\t\t\t\tlblTipo.setText(aplicacion.getI18nString(\"GeopistaSeleccionarFicheroParcelas.Tipo\"));\r\n\t\t\t\t\t\t\tlblTipo.setBounds(new Rectangle(320, 110, 135, 20));\r\n\t\t\t\t\t\t\tjSeparator1.setBounds(new Rectangle(135, 140, 600, 5));\r\n\r\n\t\t\t\t\t\t\tDateFormat formatter = new SimpleDateFormat(\"dd-MMM-yy\");\r\n\t\t\t\t\t\t\tString date = (String) formatter.format(new Date());\r\n\t\t\t\t\t\t\tjSeparator4.setBounds(new Rectangle(135, 20, 595, 5));\r\n\t\t\t\t\t\t\tjSeparator2.setBounds(new Rectangle(135, 295, 605, 2));\r\n\t\t\t\t\t\t\tjComboBox1.setBounds(new Rectangle(355, 110, 100, 20));\r\n\t\t\t\t\t\t\tlbldesc.setText(aplicacion.getI18nString(\"importar.asistente.descripcion.parcelas\"));\r\n\t\t\t\t\t\t\tlbldesc.setBounds(new Rectangle(135, 150, 600, 20));\r\n\t\t\t\t\t\t\ttxtFecha.setText(date);\r\n\r\n\t\t\t\t\t\t\t// Paso los textos etiquetas\r\n\r\n\t\t\t\t\t\t\tlblFuente.setText(aplicacion.getI18nString(\"fuente.importacion.caja.texto\"));\r\n\t\t\t\t\t\t\tlblPersona.setText(aplicacion.getI18nString(\"persona.importacion.caja.texto\"));\r\n\t\t\t\t\t\t\tlblOrganismo.setText(aplicacion.getI18nString(\"organismo.importacion.caja.texto\"));\r\n\t\t\t\t\t\t\tlblFecha.setText(aplicacion.getI18nString(\"fecha.importacion.caja.texto\"));\r\n\t\t\t\t\t\t\tlblTipo.setText(aplicacion.getI18nString(\"tipo.importacion.caja.texto\"));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tlblTipo.setText(aplicacion.getI18nString(\"tipo.importacion.caja.texto\"));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//EPSG\r\n\t\t\t\t\t\t\tlblEPSG.setText(aplicacion.getI18nString(\"GeopistaSeleccionarFicheroParcelas.SistemaCoordenadas\"));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tlblEPSG.setBounds(new java.awt.Rectangle(460, 110, 135, 20));\r\n\t\t\t\t\t\t\tjComboEPSG.setBounds(new java.awt.Rectangle(600, 110, 135, 20));\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//lblEPSG.setBounds(new java.awt.Rectangle(135, 240, 135, 20));\r\n\t\t\t\t\t\t\t//jComboEPSG.setBounds(new java.awt.Rectangle(335, 240, 135, 20));\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tjComboEPSG.setModel(new DefaultComboBoxModel(\r\n\t\t\t\t\t new Vector(CoordinateSystemRegistry.instance(blackboard).getCoordinateSystems())));\r\n\r\n\r\n\t\t\t\t\t\t\t// cmbTipoInfo.setBounds(283, 22, 290, 20);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tchkDelete.setText(I18N.get(\"ImportadorParcelas\", \"importar.informacion.referencia.borrar.texto\"));\r\n\t\t\t\t\t\t\tchkDelete.setBounds(new java.awt.Rectangle(135, 270, 500, 20));\r\n\t\t\t\t\t\t\tchkDelete.setSelected(false);\r\n\r\n\t\t\t\t\t\t\tsetSize(750, 550);\r\n\t\t\t\t\t\t\tadd(lbldesc, null);\r\n\t\t\t\t\t\t\tadd(jComboBox1, null);\r\n\t\t\t\t\t\t\tadd(jSeparator2, null);\r\n\t\t\t\t\t\t\tadd(jSeparator4, null);\r\n\t\t\t\t\t\t\tadd(jSeparator1, null);\r\n\t\t\t\t\t\t\tadd(lblTipo, null);\r\n\t\t\t\t\t\t\tadd(txtFecha, null);\r\n\t\t\t\t\t\t\tadd(lblFecha, null);\r\n\t\t\t\t\t\t\tadd(txtPersona, null);\r\n\t\t\t\t\t\t\tadd(lblPersona, null);\r\n\t\t\t\t\t\t\tadd(txtOrganismo, null);\r\n\t\t\t\t\t\t\tadd(lblOrganismo, null);\r\n\t\t\t\t\t\t\tadd(txtFuente, null);\r\n\t\t\t\t\t\t\tadd(lblFuente, null);\r\n\t\t\t\t\t\t\tadd(txtFicheroUrbana, null);\r\n\t\t\t\t\t\t\tadd(lblFicheroUrbana, null);\r\n\t\t\t\t\t\t\tadd(lblErrores, null);\r\n\t\t\t\t\t\t\tadd(btnAbrirRustica, null);\r\n\t\t\t\t\t\t\tadd(btnAbrirUrbana, null);\r\n\t\t\t\t\t\t\tadd(txtFicheroRustica, null);\r\n\t\t\t\t\t\t\tadd(lblFicheroRustica, null);\r\n\t\t\t\t\t\t\tadd(lblImagen, null);\r\n\t\t\t\t\t\t\tadd(chkDelete, null);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//EPSG\r\n\t\t\t\t\t\t\tadd(lblEPSG,null);\r\n\t\t\t\t\t\t\tadd(jComboEPSG,null);\r\n\r\n\t\t\t\t\t\t\tscpErrores.getViewport().add(ediError, null);\r\n\t\t\t\t\t\t\tadd(scpErrores, null);\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{\r\n\r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t\tfinally\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tprogressDialog.setVisible(false);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}).start();\r\n\t\t\t}",
"@Override\n public void requestLocationUpdates() {\n handler = new Handler();\n handler.postDelayed(new LocationUpdateRunnable(), UPDATE_INTERVAL_MS);\n }",
"public void start_distance_process(View view){\n \t\t//false below is for cancleable; may need to change\n \t\tpd = ProgressDialog.show(this, \"Working..\", \"Calculating\", true, false);\n \t\tThread thread = new Thread(this);\n \t\tthread.start();\n \t}",
"@Override\n public void threadStarted() {\n }",
"public static void run(){\n EventQueue.invokeLater(new Runnable() {\n public void run() {\n try {\n PlanHomeCoach frame = new PlanHomeCoach();\n frame.init();\n Dimension screenSize =Toolkit.getDefaultToolkit().getScreenSize();\n frame.setLocation(screenSize.width/2-400/2,screenSize.height/2-700/2);\n frame.setResizable(false);\n frame.setVisible(true);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n }",
"public void pathwayScan() {\n ScanPathwayBasedAssocSwingWorker worker = new ScanPathwayBasedAssocSwingWorker();\n // buildTask = buildTask.create(buildingThread); //the task is not started yet\n buildTask = RP.create(worker); //the task is not started yet\n buildTask.schedule(0); //start the task\n }",
"private void startListener() {\r\n initializationMapOfLastDistance();\r\n runnable = new Runnable() {\r\n public void run() {\r\n doInBackgroundHandler();\r\n handler.postDelayed(this, 9000);\r\n }\r\n };\r\n handler.post(runnable);\r\n }",
"private void start(){\n isRunning = true;\n thread = new Thread(this);\n thread.start();\n }",
"private void CallFunction() {\n\t\tmTimer.scheduleAtFixedRate(new TimerTask() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\t// What you want to do goes here\r\n\t\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tLocation myLocation = googleMap.getMyLocation();\r\n\t\t\t\t\t\tif (myLocation != null) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t GPSTracker gpsTracker = new GPSTracker(context); \r\n\t\t\t\t\t\t\t if(gpsTracker.canGetLocation()) \r\n\t\t\t\t\t\t\t { \r\n\t\t\t\t\t\t\t\t String stringLatitude = String.valueOf(gpsTracker.latitude); \r\n\t\t\t\t\t\t\t\t String stringLongitude = String.valueOf(gpsTracker.longitude); \r\n\t\t\t\t\t\t\t\t currentlocation = new LatLng(gpsTracker.latitude,gpsTracker.longitude);\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t/*double dclat = googleMap.getMyLocation()\r\n\t\t\t\t\t\t\t\t\t.getLatitude();\r\n\t\t\t\t\t\t\tdouble dclon = googleMap.getMyLocation()\r\n\t\t\t\t\t\t\t\t\t.getLongitude();\r\n\t\t\t\t\t\t\tcurrentlocation = new LatLng(dclat, dclon);*/\r\n\r\n\t\t\t\t\t\t\tif (!myList.contains(currentlocation)\r\n\t\t\t\t\t\t\t\t\t&& (currentlocation != null)) {\r\n\t\t\t\t\t\t\t\tmyList.add(currentlocation);\r\n\r\n\t\t\t\t\t\t\t\tdouble lat = currentlocation.latitude;\r\n\t\t\t\t\t\t\t\tdouble lon = currentlocation.longitude;\r\n\t\t\t\t\t\t\t\tuploadarraylist.add(String.valueOf(lon) + \",\"\r\n\t\t\t\t\t\t\t\t\t\t+ String.valueOf(lat));\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (myList.size() == 1) {\r\n\t\t\t\t\t\t\t\tSystem.err.println(\"First zoom\");\r\n\t\t\t\t\t\t\t\tLatLng CurrentLocation = new LatLng(googleMap\r\n\t\t\t\t\t\t\t\t\t\t.getMyLocation().getLatitude(),\r\n\t\t\t\t\t\t\t\t\t\tgoogleMap.getMyLocation()\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getLongitude());\r\n\t\t\t\t\t\t\t\tCameraPosition cameraPosition = new CameraPosition.Builder()\r\n\t\t\t\t\t\t\t\t\t\t.target(CurrentLocation).zoom(18)\r\n\t\t\t\t\t\t\t\t\t\t.bearing(70).tilt(25).build();\r\n\t\t\t\t\t\t\t\tgoogleMap.animateCamera(CameraUpdateFactory\r\n\t\t\t\t\t\t\t\t\t\t.newCameraPosition(cameraPosition));\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (myList.size() >= 2) {\r\n\t\t\t\t\t\t\t\tdouble slat = myList.get(myList.size() - 2).latitude;\r\n\t\t\t\t\t\t\t\tdouble slon = myList.get(myList.size() - 2).longitude;\r\n\r\n\t\t\t\t\t\t\t\tdouble dlat = myList.get(myList.size() - 1).latitude;\r\n\t\t\t\t\t\t\t\tdouble dlon = myList.get(myList.size() - 1).latitude;\r\n\r\n\t\t\t\t\t\t\t\tLatLng mmarkersourcelatlng = new LatLng(myList\r\n\t\t\t\t\t\t\t\t\t\t.get(1).latitude,\r\n\t\t\t\t\t\t\t\t\t\tmyList.get(1).longitude);\r\n\t\t\t\t\t\t\t\tmsourcelatlng = new LatLng(slat, slon);\r\n\t\t\t\t\t\t\t\tmdestlatlng = new LatLng(dlat, dlon);\r\n\t\t\t\t\t\t\t\tSystem.err.println(\"myLocation:\"\r\n\t\t\t\t\t\t\t\t\t\t+ currentlocation);\r\n\t\t\t\t\t\t\t\tfor (int i = 1; i < myList.size() - 1; i++) {\r\n\t\t\t\t\t\t\t\t\tLatLng src = myList.get(i);\r\n\t\t\t\t\t\t\t\t\tLatLng dest = myList.get(i + 1);\r\n\t\t\t\t\t\t\t\t\tPolyline line = googleMap\r\n\t\t\t\t\t\t\t\t\t\t\t.addPolyline(new PolylineOptions()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// mMap is the Map Object\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.add(new LatLng(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsrc.latitude,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsrc.longitude),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew LatLng(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdest.latitude,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdest.longitude))\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.width(10)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.color(R.color.pink)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.geodesic(true));\r\n\t\t\t\t\t\t\t\t\tmsmarker = googleMap\r\n\t\t\t\t\t\t\t\t\t\t\t.addMarker(new MarkerOptions()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.position(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmmarkersourcelatlng)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.title(\"Source\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.icon(BitmapDescriptorFactory\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.defaultMarker(BitmapDescriptorFactory.HUE_GREEN)));\r\n\r\n\t\t\t\t\t\t\t\t\tif (mdmarker != null) {\r\n\t\t\t\t\t\t\t\t\t\tmdmarker.remove();\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tmdmarker = googleMap\r\n\t\t\t\t\t\t\t\t\t\t\t.addMarker(new MarkerOptions()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.position(msourcelatlng)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.title(\"Destination\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.icon(BitmapDescriptorFactory\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.defaultMarker(BitmapDescriptorFactory.HUE_RED)));\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\t\t} else {\r\n\t\t\t\t\t\t\tSystem.err.println(\"Mylocation Empty\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}, 200, 5000);\r\n\r\n\t}",
"public void start(){\n thread.start();\n }",
"private void startLocationService() {\n\t\tmLocationMngr = (LocationManager) this\r\n\t\t\t\t.getSystemService(Context.LOCATION_SERVICE);\r\n\r\n\t\tmGpsListener = new GPSListener();\r\n\t\tlong minTime = 10000;\r\n\t\tfloat minDistance = 0;\r\n\r\n\t\tmLocationMngr.requestLocationUpdates(LocationManager.GPS_PROVIDER,\r\n\t\t\t\tminTime, minDistance, mGpsListener);\r\n\t\tmLocationMngr.requestLocationUpdates(LocationManager.NETWORK_PROVIDER,\r\n\t\t\t\tminTime, minDistance, mGpsListener);\r\n\r\n\t\ttry {\r\n\t\t\tLocation lastLocation = mLocationMngr\r\n\t\t\t\t\t.getLastKnownLocation(LocationManager.GPS_PROVIDER);\r\n\t\t\tif (lastLocation != null) {\r\n\t\t\t\tDouble latitude = lastLocation.getLatitude();\r\n\t\t\t\tDouble longitude = lastLocation.getLongitude();\r\n\t\t\t\tString msg = \"Your Current Location \\nLatitude: \" + latitude\r\n\t\t\t\t\t\t+ \", Longitude: \" + longitude;\r\n\t\t\t\tLog.i(TAG, msg);\r\n\t\t\t\t// this.showToastMsg(msg);\r\n\t\t\t\tshowCurrentLocation(latitude, longitude);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tString msg = \"Failed to get current location. Please try later.\";\r\n\t\t\tLog.e(TAG, msg);\r\n\t\t\tshowToastMsg(msg);\r\n\t\t}\r\n\r\n\t}",
"ThreadStart createThreadStart();",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.maps);\n \n //Activate the GPS\n locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); \n locationListener = new GPSListener(this); \n \n //Requests updates each 200 meters\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 200,locationListener);\n \n mlv = (MapViewer) findViewById(R.id.map_view);\n \n \t// Register for events\n addEvents(); \n }",
"private void registerForGPS() {\n Log.d(NAMAZ_LOG_TAG, \"registerForGPS:\");\n Criteria criteria = new Criteria();\n criteria.setAccuracy(Criteria.ACCURACY_COARSE);\n criteria.setPowerRequirement(Criteria.POWER_LOW);\n criteria.setAltitudeRequired(false);\n criteria.setBearingRequired(false);\n criteria.setSpeedRequired(false);\n criteria.setCostAllowed(true);\n LocationManager locationManager = ((LocationManager) getSystemService(Context.LOCATION_SERVICE));\n String provider = locationManager.getBestProvider(criteria, true);\n\n if(!isLocationEnabled()) {\n showDialog(\"Location Access\", getResources().getString(R.string.location_enable), \"Enable Location\", \"Cancel\", 1);\n } else {\n ActivityCompat.requestPermissions(QiblaDirectionActivity.this,\n new String[]{Manifest.permission. ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }\n\n /* if (provider != null) {\n locationManager.requestLocationUpdates(provider, MIN_LOCATION_TIME,\n MIN_LOCATION_DISTANCE, qiblaManager);\n }\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,\n MIN_LOCATION_TIME, MIN_LOCATION_DISTANCE, qiblaManager);\n locationManager.requestLocationUpdates(\n LocationManager.NETWORK_PROVIDER, MIN_LOCATION_TIME,\n MIN_LOCATION_DISTANCE, qiblaManager);*/\n /*Location location = locationManager\n .getLastKnownLocation(LocationManager.GPS_PROVIDER);\n if (location == null) {\n location = ((LocationManager) getSystemService(Context.LOCATION_SERVICE))\n .getLastKnownLocation(LocationManager.GPS_PROVIDER);\n }*/\n\n }",
"public Location myLocation() {\n\n // Acquire a reference to the system Location Manager\n LocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n Criteria criteria = new Criteria();\n criteria.setHorizontalAccuracy(Criteria.ACCURACY_FINE);\n String provider = locationManager.getBestProvider(criteria, true);\n // Define a listener that responds to location updates\n LocationListener locationListener = new LocationListener() {\n\n //When the location of the device changes\n public void onLocationChanged(Location location) {\n\n //Display the current location\n double latitude = location.getLatitude();\n double longitude = location.getLongitude();\n MapProjection mapProjection = MapProjection.getDefault();\n GridPoint gp = mapProjection.toGridPoint(latitude,longitude);\n mGPSon.setText(\"Latitude: \"+Math.round(gp.x)+\"\\nLongitude: \"+Math.round(gp.y));\n\n }\n\n //When the status of the GNSS receiver changes\n public void onStatusChanged(String provider, int status, Bundle extras) {\n\n\n\n }\n\n //When the location provider is enabled\n public void onProviderEnabled(String provider) {\n\n\n\n }\n\n //When the location provider is disabled\n public void onProviderDisabled(String provider) {\n\n\n\n }\n\n };\n // Register the listener with the Location Manager to receive location updates\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,0,0,locationListener);\n // Obtain the current location\n Location myLocation = locationManager.getLastKnownLocation(provider);\n\n //Only if the current location is passed\n if (myLocation != null) {\n\n //Project the Location object to a GridPoint object\n double latitude = myLocation.getLatitude();\n double longitude = myLocation.getLongitude();\n MapProjection mapProjection = MapProjection.getDefault();\n GridPoint gp = mapProjection.toGridPoint(latitude, longitude);\n //Update the real-time latitude and longitude\n mGPSon.setText(\"Latitude: \" + Math.round(gp.x) + \"\\nLongitude: \" + Math.round(gp.y));\n return myLocation;\n\n } else {\n\n //If GPS is off, notify the user to turn it on\n Toast.makeText(MainActivity.this,\"Turn on GPS.\",Toast.LENGTH_SHORT).show();\n return null;\n\n }\n\n }",
"public void start(){\n hiloAux = new Thread(this);\n hiloAux.start();\n }",
"public Frame1() {\n initComponents();\n setBounds(300,250,450,350);\n p1.setBackground(new Color(100,100,240));\n setResizable(false);\n Thread t=new Thread(this);\nt.start();\n }",
"@Override\n public void run() {\n List<LatLng> trailPoints = new ArrayList<>();\n\n // Get a reference of the LatLng that will be used to mark the start of the trail\n LatLng start = null;\n\n try {\n // Create an InputStream from gpxFile\n FileInputStream inStream = new FileInputStream(gpxFile);\n\n // Parse a Gpx from the FileInputStream\n Gpx parsedGpx = new GPXParser().parse(inStream);\n\n // Close the InputStream\n inStream.close();\n\n\n\n if (parsedGpx != null) {\n // Get the individual points from the Gpx\n List<TrackPoint> points = parsedGpx.getTracks().get(0).getTrackSegments().get(0).getTrackPoints();\n\n // Iterate through and convert the point coordinates to a LatLng\n for (TrackPoint point : points) {\n LatLng trailPoint = new LatLng(point.getLatitude(), point.getLongitude(), point.getElevation());\n\n // Add the LatLng to the List\n trailPoints.add(trailPoint);\n\n if (start == null) {\n // Set the LatLng to be used for the starting coordinate\n start = new LatLng(point.getLatitude(), point.getLongitude());\n }\n }\n }\n } catch (XmlPullParserException | IOException e) {\n e.printStackTrace();\n }\n\n // Create a MarkerOptions for marking the beginning of the trail\n MarkerOptions markerOptions = new MarkerOptions().position(start);\n\n // Create a PolylineOptions from the List\n PolylineOptions polylineOptions = new PolylineOptions().addAll(trailPoints);\n\n listener.onOptionReady(markerOptions, polylineOptions);\n }",
"@Override\n public void onLocationChanged(Location location) {\n if(location!=null)\n {\n lat.setText(location.getLatitude() + \"\");\n lon.setText(location.getLongitude() + \"\");\n }\n else {\n showAlertDialog(\"GPS Connectivity Problem, Try Again!\");\n }\n //pb.setVisibility(View.GONE);\n if ( d1!=null && d1.isShowing() ){\n d1.dismiss();\n d1=null;\n }\n // fetchadd();\n }",
"public static void main(String[] args) {\n \n javax.swing.SwingUtilities.invokeLater(new Runnable() {\n \npublic void run() {\n \n createAndShowGUI(); \n \n}\n \n });\n }",
"protected void onPreExecute(){\n\t Utils.logThreadSignature(this.tag);\n\t pd = newPDinstance(0);\n\t pd.show();\n }",
"@Override\r\n public void run() {\n\r\n }",
"public void start(){\r\n\t\tnew Thread(\r\n\t new Runnable() {\r\n\t public void run() {\r\n\t \twhile(true){\r\n\t \t\t try {\r\n\t \t Thread.sleep(200);\r\n\t \t } catch (Exception e) {\r\n\t \t e.printStackTrace();\r\n\t \t }\r\n\t \t // Functions.DEBUG(\r\n\t \t // \"child thread \" + new Date(System.currentTimeMillis()));\r\n\t \t repaint();\r\n\t \t}\r\n\t }\r\n\t }).start();\r\n\t}",
"public void run() \n\t\t{\n\t\t\tBundle dataBundle = new Bundle(); \n\t\t\t\n\t\t\tdataBundle.putSerializable( \"rts\", GTStore_sqlite.getNearByTripInfo(latDouble, longDouble));\n\t\t\tMessage msg = _handler.obtainMessage();\n\t\t\tmsg.setData( dataBundle );\n\t\t\t_handler.sendMessage( msg );\n }",
"private void getlocation() {\n\t\t\t\ttry {\n\n\t\t\t\t\tgps = new GPSTracker(RegisterActivity.this);\n\t\t\t\t\tLog.d(\"LOgggg\", \"inCurrentlocation\");\n\n\t\t\t\t\t// check if GPS enabled\n\t\t\t\t\tif (gps.canGetLocation()) {\n\n\t\t\t\t\t\tlatitude = gps.getLatitude();\n\t\t\t\t\t\tlongitude = gps.getLongitude();\n\n\t\t\t\t\t\tLog.i(\"latitude\", \"\" + latitude);\n\t\t\t\t\t\tLog.i(\"longitude\", \"\" + longitude);\n\n\t\t\t\t\t\tnew getLoc().execute(\"\");\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tgps.showSettingsAlert();\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}",
"public OnMainThread() {\n new AsyncTask<Void, Void, Void>() {\n\n @Override\n protected Void doInBackground(Void... params) {\n return null;\n }\n\n @Override\n protected void onPostExecute(Void aVoid) {\n run();\n }\n }.execute();\n }",
"public void addNotify() {\n\t\tsuper.addNotify();\n\t\tif (thread == null) {\n\t\t\tthread = new Thread(this);\n\t\t\tthread.start();\n\t\t}\n\t}",
"private void startService() {\r\n\r\n\t\t// ---use the LocationManager class to obtain GPS locations---\r\n\t\tlm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\r\n\t\tlocationListener = new MyLocationListener();\r\n\r\n\t\tlm.requestLocationUpdates(LocationManager.GPS_PROVIDER, minTimeMillis,\r\n\t\t\t\tminDistanceMeters, locationListener);\r\n\t\tlocationListener.onLocationChanged(lm.getLastKnownLocation(LocationManager.GPS_PROVIDER));\r\n\t}",
"private void startThread()\n {\n if (workerThread == null || !workerThread.isLooping())\n {\n workerThread = new LiveViewThread(this);\n workerThread.start();\n }\n }",
"public void start() {\n\t\tmyThread = new Thread(this); myThread.start();\n\t}",
"public void startTracking()\n {\n if(!pixyThread.isAlive())\n {\n pixyThread = new Thread(this);\n pixyThread.start();\n leds.setMode(LEDController.Mode.ON);\n }\n }",
"@Override\n\tpublic void onMessageBackgroundThread(Object arg0) {\n\t\t\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_mapwrapper, container, false);\n mUserButton = (ImageButton)v.findViewById(R.id.mapUserButton);\n mChatButton = (ImageButton)v.findViewById(R.id.mapChatButton);\n mFlagImage = (ImageView)v.findViewById(R.id.flagEve);\n mPointImage = (ImageView)v.findViewById(R.id.pointEve);\n mAddEventButton = (ImageButton)v.findViewById(R.id.addEventButton);\n mAcceptEventButton = (ImageButton)v.findViewById(R.id.acceptEventButton);\n mDiscardEventButton = (ImageButton)v.findViewById(R.id.discardEventButton);\n\n\n scheduler = Executors.newScheduledThreadPool(1);\n networkGPS = new NetworkGPS();\n\n scheduler.scheduleAtFixedRate(new Runnable() {\n @Override\n public void run() {\n if(myCity != null )\n try {\n networkGPS.UpdateLoc(myLatitude, myLongitude, myCity);\n compareSavedUser(networkGPS.getFetchedUser());\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n updateMap();\n }\n });\n\n } catch (IOException e) {\n e.printStackTrace();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, 2, 60, TimeUnit.SECONDS); // Every 60 sec\n\n return v;\n }",
"@Override\r\n public void run() {\r\n mLocationManager.removeUpdates(locationListenerGps);\r\n mLocationManager.removeUpdates(locationListenerNetwork);\r\n \r\n try{\r\n \t isGpsEnabled=mLocationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);\r\n }catch(Exception ex){\r\n \t//Exception: No suitable permission is present for the provider.\r\n \tConstants.PROVIDER_EXCEPTION = ex.getMessage();\r\n }\r\n try{\r\n \t isNetworkEnabled=mLocationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER);\r\n }catch(Exception ex){\r\n \tConstants.PROVIDER_EXCEPTION = ex.getMessage();\r\n }\r\n\r\n Location net_loc=null, gps_loc=null;\r\n\r\n if(isGpsEnabled){\r\n \t /*Returns a Location indicating the data from the last known location fix obtained \r\n \t * from the given provider. This can be done without starting the provider. \r\n \t * Note that this location could be out-of-date, \r\n \t * for example if the device was turned off and moved to another location.*/\r\n gps_loc=mLocationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\r\n Constants.LAST_KNOWN_LOCATION = true;\r\n }\r\n if(isNetworkEnabled){\r\n net_loc=mLocationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);\r\n Constants.LAST_KNOWN_LOCATION = true;\r\n }\r\n \r\n //if there are both values then use the latest one.\r\n if(gps_loc!=null && net_loc!=null){\r\n if(gps_loc.getTime()>net_loc.getTime())\r\n gotLocation(gps_loc);\r\n else\r\n gotLocation(net_loc);\r\n return;\r\n }\r\n\r\n if(gps_loc!=null){\r\n gotLocation(gps_loc);\r\n return;\r\n }\r\n \r\n if(net_loc!=null){\r\n gotLocation(net_loc);\r\n return;\r\n }\r\n gotLocation(null);\r\n }",
"@Override\n public void run() {\n try{\n Thread.sleep(5000);\n // To get rid of the Exception lets run the label updating after process is get completing. So that is label is\n // getting updated on the UI Thread and we don't get any exception\n Platform.runLater(new Runnable() { // Opening new Runnable to update the label\n @Override\n public void run() { // This is running in the UI Thread so updating the label\n ourLabel.setText(\"We did something\");\n }\n });\n } catch (InterruptedException e) {\n // We don't care about this\n }\n }",
"@Override\n\t\tprotected Void doInBackground(Void... args) {\n\n\t\t\tMonitors mMonitors=new Monitors(mContext,pref);\n\t\t\tmMonitors.start();//this step takes time\n\t\t\tCommonMethods.Log(\"MonitorAsyncTask.doInBackground() completed\");\n\t\t\treturn null;\t\t\n\t\t}",
"public void startTracking()\n\t{\n\t\tthisRoute.timeStart = System.currentTimeMillis();\n\t\t\n\t\tlocationManager.requestLocationUpdates(provider, gpsTimeFreq, 0, locListener);\n\t}",
"public void start()\n\t{\n\t\tthread = new Thread(this);\n\t\tthread.start();\n\t}",
"@Override\n public void run()\n {\n\n }",
"@SuppressLint(\"MissingPermission\")\n private void doStuff() {\n LocationManager locationManager = (LocationManager) getApplicationContext().getSystemService(Context.LOCATION_SERVICE);\n if (locationManager != null) {\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, (LocationListener) this);\n }\n\n }",
"public void showGpsAlert() {\r\n final Dialog dialog = new Dialog(VenusActivity.appActivity, android.R.style.Theme_Translucent_NoTitleBar);\r\n dialog.setContentView(R.layout.gps);\r\n Button gps_yes = (Button)dialog.findViewById(R.id.button_yes);\r\n gps_yes.setOnClickListener(new OnClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tVenusActivity.appActivity.startActivity(new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS));\r\n\t\t\t\tdialog.dismiss();\r\n\t\t\t}\r\n\t\t});\r\n Button gps_cancel = (Button)dialog.findViewById(R.id.button_cancel);\r\n gps_cancel.setOnClickListener(new OnClickListener() {\r\n \t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tdialog.dismiss();\r\n\t\t\t}\r\n });\r\n final Handler threadHandler = new Handler(); ; \r\n new Thread() {\r\n \t@Override\r\n \tpublic void run() {\r\n \t\t threadHandler.post( new Runnable(){\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tdialog.show();\r\n\t\t\t\t\t}\r\n \t\t });\r\n \t}\r\n }.start();\r\n\t}",
"public void startThread(){\n String message = \"Connecting to RescueNet...Please Wait\";\n showProgressDialog(message);\n connectionThread = new ConnectionThread(mwifiAdmin, handlerMain);\n connectionThread.start();\n }",
"public void startLocationUpdates() {\n startLocationUpdatesFromInside();\n showForegroundNotification();\n }",
"private void readGPS() {\n }",
"public void run(){\n //logic to execute in a thread \n }",
"@Override\n protected Void doInBackground() {\n System.out.println(\"SwingWorker has started working.\");\n updateFields(gameService.receiveUpdates());\n return null;\n }",
"@Override\r\n public void onLocationChanged(Location location) {\n\r\n sendLocationUpdates(location);\r\n }",
"public void add_location() {\n if (currentLocationCheckbox.isChecked()) {\n try {\n CurrentLocation locationListener = new CurrentLocation();\n LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locationListener);\n Location location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n if (location != null) {\n int latitude = (int) (location.getLatitude() * 1E6);\n int longitude = (int) (location.getLongitude() * 1E6);\n currentLocation = new GeoPoint(latitude, longitude);\n }\n } catch (SecurityException e) {\n e.printStackTrace();\n }\n } else {\n currentLocation = null;\n }\n\n }",
"@Override\n protected Void doInBackground(Void... params) {\n\n try {\n while(mLastLocation==null)\n {\n try {\n mLastLocation = LocationServices.FusedLocationApi.getLastLocation(\n googleApiClient);\n Thread.sleep(1000);\n }catch (SecurityException e){\n e.printStackTrace();\n }\n }\n\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return null;\n }",
"private void init() {\n\t\tSwingUtilities.invokeLater(new Runnable() {\n\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\tclient = new AuctioneerWindow();\n\t\t\t\tsure = client.getSure();\n\t\t\t\tip_text = client.getIp_text();\n\t\t\t\tcontent = client.getContent();\n\t\t\t\tsure.addActionListener(new ActionListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\t\tIP = ip_text.getText();\n\t\t\t\t\t\tip_text.setEnabled(false);\n\t\t\t\t\t\tsure.setEnabled(false);\n\n\t\t\t\t\t\tcontent.append(\"获取IP成功\");\n\n\t\t\t\t\t\tnew Thread(new Runnable() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tinitBroadCastClient();\n\t\t\t\t\t\t\t\t\tReceivePublicKey();\n\t\t\t\t\t\t\t\t\tReceiveEncryptPrice();\n\t\t\t\t\t\t\t\t\tgenerateEProduct();\n\t\t\t\t\t\t\t\t\tsendEProduct();\n\t\t\t\t\t\t\t\t\tGarbleCircuits();\n\t\t\t\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}).start();\n\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t}\n\t\t});\n\n\t}",
"public void run()\n {\n if (location != null) {\n Constants.GEO_LATITUDE = String.valueOf(location.getLatitude());\n Constants.GEO_LONGITUDE = String.valueOf(location.getLongitude());\n setupServiceReceiver();\n mServiceIntent = new Intent(getActivity(), GettingRetailerListService.class);\n mServiceIntent.putExtra(\"gettingStatus\", true);\n mServiceIntent.putExtra(\"receiver\", mReceiverForRetailer);\n getActivity().startService(mServiceIntent);\n } else {\n// new Handler(Looper.getMainLooper()).post(new Runnable() {\n// @Override\n// public void run() {\n Toast.makeText(getActivity(), \"Geo service is not working\", Toast.LENGTH_SHORT).show();\n\n// }\n// });\n\n }\n }",
"@Override\r\n\tpublic void run() {\n\r\n\t}",
"public void start(){\n runServerGUI();\n // new server thread object created\n ServerThread m_Server = new ServerThread(this);\n m_Server.start();\n }",
"protected void startBackgroundThread() {\n mBackgroundThread = new HandlerThread(\"Camera Background\");\n mBackgroundThread.start();\n mBackgroundHandler = new Handler(mBackgroundThread.getLooper());\n }",
"public void invokeLater(Runnable task) {\n queue.add(task);\n }",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tMessage m;\n\t\t\t\t\tm = hr.obtainMessage(2, \"获取定位信息..\");\n\t\t\t\t\thr.sendMessage(m);\n\t\t\t\t\tif (lng == null || lng == 4.9E-324 || lat == null) {\n\t\t\t\t\t\tm = hr.obtainMessage(501, \"定位失败!请开启GPS和无线网络后重试\");\n\t\t\t\t\t\thr.sendMessage(m);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n double dv = 0;\n if (bsLongitude.equals(\"\") || bsLatitude.equals(\"\")){\n dv = BDGeoLocation.getShortDistance(lng, lat,\n Double.valueOf(lng),\n Double.valueOf(lat));\n } else {\n dv = BDGeoLocation.getShortDistance(lng, lat,\n Double.valueOf(bsLongitude),\n Double.valueOf(bsLatitude));\n }\n\t\t\t\t\tBigDecimal bdl = new BigDecimal(dv);\n\t\t\t\t\tdv = bdl.setScale(2, BigDecimal.ROUND_HALF_UP)\n\t\t\t\t\t\t\t.doubleValue();\n\t\t\t\t\tWGSTOGCJ02 wg = new WGSTOGCJ02();\n\t\t\t\t\tMap<String, Double> wgloc = wg.transform(lng, lat);\n\t\t\t\t\tSharedPreferences share = context.getSharedPreferences(\n\t\t\t\t\t\t\tApp.SHARE_TAG, 0);\n\t\t\t\t\tString userid = share.getString(\n\t\t\t\t\t\t\tAppCheckLogin.SHARE_USER_ID, \"\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\tjson.put(\"userid\", userid);\n\t\t\t\t\t\tjson.put(\"longitude\", String.valueOf(wgloc.get(\"lon\")));\n\t\t\t\t\t\tjson.put(\"latitude\", String.valueOf(wgloc.get(\"lat\")));\n\t\t\t\t\t\tjson.put(\"range\", String.valueOf(dv));\n\t\t\t\t\t\tm = hr.obtainMessage(3, \"定位成功\");\n\t\t\t\t\t\thr.sendMessage(m);\n\t\t\t\t\t\tm = hr.obtainMessage(4, \"上传数据中...\");\n\t\t\t\t\t\thr.sendMessage(m);\n\t\t\t\t\t\tString subRes = submitToServer(json);\n\t\t\t\t\t\tif (subRes.equals(AppHttpClient.RESULT_FAIL)) {\n\t\t\t\t\t\t\tm = hr.obtainMessage(501, \"上传数据失败!请检查手机网络是否有效\");\n\t\t\t\t\t\t\thr.sendMessage(m);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tJSONObject jr = new JSONObject(subRes);\n\t\t\t\t\t\tif ((\"-1\").equals(jr.getString(\"result\"))) {\n\t\t\t\t\t\t\tm = hr.obtainMessage(501, jr.getString(\"msg\"));\n\t\t\t\t\t\t\thr.sendMessage(m);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tm = hr.obtainMessage(5, \"上传成功\");\n\t\t\t\t\t\thr.sendMessage(m);\n\t\t\t\t\t\tm = hr.obtainMessage(6, \"上传图片中...\");\n\t\t\t\t\t\thr.sendMessage(m);\n\t\t\t\t\t\tString infoid = jr.getString(\"infoid\");\n\t\t\t\t\t\tif (imgPaths == null) {\n\t\t\t\t\t\t\tm = hr.obtainMessage(200, \"恭喜,提交巡检数据成功!\");\n\t\t\t\t\t\t\thr.sendMessage(m);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tFuncUploadFile ff = new FuncUploadFile(context);\n\t\t\t\t\t\tfor (int i = 0; i < imgPaths.length; i++) {\n\t\t\t\t\t\t\tif (imgPaths[i] != null) {\n\t\t\t\t\t\t\t\tString res = ff.uploadFileToServer(imgPaths[i],\n\t\t\t\t\t\t\t\t\t\t\"1\", \"巡检-\" + bsName, DATA_TYPE, \"\",\n\t\t\t\t\t\t\t\t\t\tinfoid, DataSiteStart.HTTP_SERVER_URL,\n\t\t\t\t\t\t\t\t\t\tDataSiteStart.HTTP_KEYSTORE);\n\t\t\t\t\t\t\t\tif (res.equals(AppHttpConnection.RESULT_FAIL)) {\n\t\t\t\t\t\t\t\t\tm = hr.obtainMessage(201, \"上传图片:\"\n\t\t\t\t\t\t\t\t\t\t\t+ imgPaths[i] + \"--失败\");\n\t\t\t\t\t\t\t\t\thr.sendMessage(m);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tJSONObject imgjr = new JSONObject(res);\n\t\t\t\t\t\t\t\t\tm = hr.obtainMessage(201,\n\t\t\t\t\t\t\t\t\t\t\t\"上传图片:\" + imgPaths[i] + \"--\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ imgjr.getString(\"msg\"));\n\t\t\t\t\t\t\t\t\thr.sendMessage(m);\n\t\t\t\t\t\t\t\t\tString resCode = imgjr.getString(\"result\");\n\t\t\t\t\t\t\t\t\tif (resCode.equals(\"1\")\n\t\t\t\t\t\t\t\t\t\t\t&& imgPaths[i] != null) {\n\t\t\t\t\t\t\t\t\t\tFile file = new File(imgPaths[i]);\n\t\t\t\t\t\t\t\t\t\tfile.delete();// 删除临时文件\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}\n\t\t\t\t\t\tm = hr.obtainMessage(200, \"恭喜,提交巡检数据成功!\");\n\t\t\t\t\t\thr.sendMessage(m);\n\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}",
"private void getGPSLocation()\n {\n gps_ = new GPSLocator( LoginActivity.this );\n\n // check if GPS enabled\n if ( gps_.canGetLocation() )\n {\n latitude_ = gps_.getLatitude();\n longitude_ = gps_.getLongitude();\n\n // Raises a toast to show the location\n Toast.makeText(\n getApplicationContext(),\n \"Your Location is - \\nLat: \" + latitude_ + \"\\nLong: \"\n + longitude_, Toast.LENGTH_SHORT ).show();\n }\n else\n {\n // There was an error getting the gps information\n gps_.showSettingsAlert();\n }\n }",
"@Override\n public void run() {\n\n }",
"@Override\n public void run() {\n\n }",
"protected void showNotify() {\n try {\n myJump.systemStartThreads();\n } catch (Exception oe) {\n myJump.errorMsg(oe);\n }\n }",
"public void runGoogleDirectionsQuery(){\n if(directionsRequestUrl != null) {\n new Thread(new Runnable(){\n public void run(){\n //Establishes URLConnections, sends the request, and receives the response as a string\n String searchResultString = getUrlContents(directionsRequestUrl);\n try {\n //Turns the response to a JSON object\n JSONObject directionsResultJSON = new JSONObject(searchResultString);\n\n //Parses the JSON object\n JSONArray routesArray = directionsResultJSON.getJSONArray(\"routes\");\n JSONObject route = routesArray.getJSONObject(0);\n\n //Extract the encodedPolylineString\n JSONObject overviewPolylines = route.getJSONObject(\"overview_polyline\");\n polylineEncodedString = overviewPolylines.getString(\"points\");\n\n //Extract the optimized order of the waypoints\n if(route.has(\"waypoint_order\")) {\n //uses this new order to build the orderedDestinations ArrayList\n JSONArray waypoint_order = route.getJSONArray(\"waypoint_order\");\n int[] order = new int[waypoint_order.length()];\n for(int i = 0; i < waypoint_order.length(); i++){\n order[i] = (Integer)waypoint_order.get(i);\n }\n orderedDestinations = calculateOrderedDestinations(order);\n } else {\n orderedDestinations = destinations;\n }\n\n //Inform the message handler that the request was a success\n Message msg = Message.obtain();\n msg.what = 0;\n handler.sendMessage(msg);\n } catch (JSONException e) {\n //error, probably network related\n e.printStackTrace();\n //inform the message handler that the request was a failure\n Message msg = Message.obtain();\n msg.what = 1;\n handler.sendMessage(msg);\n }\n }\n }).start();\n }\n }",
"private void comenzarLocalizacionPorGPS() {\n\t\tmLocManagerGPS = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n//\t\tLog.i(LOGTAG, \"mLocManagerGPS: \" + mLocManagerGPS);\n\t\t\n\t\t//Nos registramos para recibir actualizaciones de la posicion\n\t\tmLocListenerGPS = new LocationListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onStatusChanged(String provider, int status, Bundle extras) {\n//\t\t\t\tLog.i(LOGTAG, \"Cambio en estatus GPS: \" + provider + \" status: \" + status);\n//\t\t\t\tToast.makeText(getApplicationContext(), \"Cambio en estatus GPS: \" + provider + \" status: \" + status, Toast.LENGTH_SHORT).show();\n//\t\t\t\tif (status != 1) {\n//\t\t\t\t\tToast.makeText(getApplicationContext(), \"GPS NA, Iniciar geo por datos\", Toast.LENGTH_SHORT).show();\n//\t\t\t\t} else {\n//\t\t\t\t\tToast.makeText(getApplicationContext(), \"Se geolocalizo por GPS, no lanzar geo por datos\", Toast.LENGTH_SHORT).show();\n//\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onProviderEnabled(String provider) {\n\t\t\t\tToast.makeText(getApplicationContext(), \"GPS Encendido\", Toast.LENGTH_SHORT).show();\n\t\t\t\ttimeStamp = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\", Locale.US).format(new Date());\n//\t\t\t\tString numeroTelefonico = obtenerLineaTelefonica();\n\t\t\t\tString imeiTelefono = obtenerIMEI();\n\t\t\t\tString icono = \"icons/gpsEncendido.png\";\n\t\t\t\tdatasource.guardoGeolocalizacionInvisible(imeiTelefono, icono, timeStamp);\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onProviderDisabled(String provider) {\n\t\t\t\tToast.makeText(getApplicationContext(), \"GPS Apagado por favor revise\", Toast.LENGTH_SHORT).show();\n\t\t\t\ttimeStamp = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\", Locale.US).format(new Date());\n//\t\t\t\tString numeroTelefonico = obtenerLineaTelefonica();\n\t\t\t\tString imeiTelefono = obtenerIMEI();\n\t\t\t\tString icono = \"icons/gpsApagado.png\";\n\t\t\t\tdatasource.guardoGeolocalizacionInvisible(imeiTelefono, icono, timeStamp);\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onLocationChanged(Location location) {\n\t\t\t\tguardarPosicion(location);\n\t\t\t}\n\t\t};\n//\t\tLog.i(LOGTAG, \"mLocListenerGPS: \" + mLocListenerGPS);\n\t\tmLocManagerGPS.requestLocationUpdates(LocationManager.GPS_PROVIDER, MIN_TIME_BW_UPDATES, MIN_DISTANCE_CHANGE_FOR_UPDATES, mLocListenerGPS);\n\t}",
"public void go() { // Thread stuff.\n current = 0;\n// final SwingWorker worker = new SwingWorker() {\n// public Object construct() {\n Render render = null;\n// try {\n render = new Render();\n /*} catch (Exception e) {\n System.out.println(\"Thread Error!\");\n e.printStackTrace();\n }\n if (render == null) {\n return null;\n } else {\n return render;\n }\n }\n };\n worker.start();*/\n }",
"public void startUDPTask() {\r\n \tif(isRunning){\r\n \t\tsetChanged();\r\n \t\tnotifyObservers(isRunning);\r\n \t}\r\n \telse {\r\n \t\tUDPServerThread = new Thread(this);\r\n \t\tUDPServerThread.start();\r\n \t}\r\n }",
"@Override\r\n protected void start() throws StartException {\n\r\n if (!Main.INIT_COMPLETE.isReached()) startServer();\r\n new EDTRunner() {\r\n\r\n @Override\r\n protected void runInEDT() {\r\n initGUI();\r\n }\r\n };\r\n\r\n }",
"public void onLocationChanged(Location location) {\n\n if (net_connection_check()) {\n\n String message = String.format(\n\n \"New Location \\n Longitude: %1$s \\n Latitude: %2$s\",\n\n location.getLongitude(), location.getLatitude());\n\n // *************************** GPS LOCATION ***************************\n\n\n driveruserid = User_id;\n driverlat = location.getLatitude();\n driverlong = location.getLongitude();\n\n\n Location driverLocation = new Location(\"user location\");\n driverLocation.setLatitude(driverlat);\n driverLocation.setLongitude(driverlong);\n\n aController.setDriverLocation(driverLocation);\n\n String drivercurrentaddress = lattoaddress(driverlat, driverlong);\n\n\n if (!checktripend && mGoogleMap != null) {\n // mGoogleMap.clear();\n\n\n }\n LatLng mark1 = new LatLng(driverlat, driverlong);\n\n if (logoutcheck) {\n//\t\t\tDriverdetails();\n }\n\n LatLng target = new LatLng(driverlat, driverlong);\n\n String check = fullbutton.getText().toString();\n if (acc.equals(\"yes\") || check.equals(\"End Trip\")) {\n if (check.equals(\"End Trip\")) {\n // mGoogleMap.clear();\n // mGoogleMap.setTrafficEnabled(true);\n }\n origin = new LatLng(driverlat, driverlong);\n /* try{\n String url = getDirectionsUrl(origin, dest);\n drawMarker(dest);\n DownloadTask downloadTask = new DownloadTask();\n //Start downloading json data from Google Directions API\n downloadTask.execute(url);\n }catch (Exception e){\n\n }*/\n\n// checkOffRouteAndRedrwaRoute(location);\n\n }\n\n checkOffRouteAndRedrwaRoute(location);\n if (location.hasBearing() && mGoogleMap != null) {\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(target) // Sets the center of the map to current location\n .zoom(16)\n .bearing(location.getBearing()) // Sets the orientation of the camera to east\n .tilt(0) // Sets the tilt of the camera to 0 degrees\n .build(); // Creates a CameraPosition from the builder\n mGoogleMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n }\n }\n }",
"@Override\n\t\t\t\t\tprotected Void doInBackground() {\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}",
"private void startLoggerService() {\n\n // ---use the LocationManager class to obtain GPS locations---\n lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n GPSLoggerService.setLocationManager(lm);\n\n locationListener = new MyLocationListener();\n\n lm.requestLocationUpdates(LocationManager.GPS_PROVIDER,\n minTimeMillis,\n minDistanceMeters,\n locationListener);\n lm.requestLocationUpdates(LocationManager.NETWORK_PROVIDER,\n minTimeMillis,\n minDistanceMeters,\n locationListener);\n\n }",
"private void go() {\n\n new Thread(this).start();\n }",
"public void run(){\r\n // compute primes larger than minPrime\r\n // Ler os dados do GPS\r\n \r\n while (Thread.currentThread() == runner) {\r\n pos=Integer.valueOf(edPos.getText()); // Posio do Arquivo\r\n BurroPost(pos);\r\n //Mostra.setText(Mostra.getText()+\"\\n\\nMERDADDDDDD\");\r\n //Mostra.setCaretPosition(Mostra.getText().length() ); // new URL() failed\r\n \r\n try {\r\n \r\n Long tempo= Long.parseLong(edTempo.getText());\r\n //Mostra.setText(Mostra.getText()+\"\\n\\nMERDADDDDDD\"+String.valueOf(tempo));\r\n //Mostra.setCaretPosition(Mostra.getText().length() ); // new URL() failed\r\n \r\n Thread.sleep(tempo);\r\n \r\n } catch (InterruptedException e) {\r\n } // try sleep\r\n \r\n \r\n }// while\r\n \r\n }",
"public void onEventMainThread(Object event) {\n\n }",
"public void startTask() {\n\t}",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n\n getLat g = new getLat();\n g.execute(tid);\n\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n\n }",
"@SuppressLint(\"MissingPermission\")\n private void Locate(){\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 2000, 0, (LocationListener) this);\n\n // Obtain the SupportMapFragment and get notified when the map is ready to be used.\n mapFragment = (SupportMapFragment) getSupportFragmentManager()\n .findFragmentById(R.id.map);\n\n //Initialize fused location\n client = LocationServices.getFusedLocationProviderClient(this);\n }",
"private void startBackgroundThread() {\n backgroundHandlerThread = new HandlerThread(\"Camera2\");\n backgroundHandlerThread.start();\n backgroundHandler = new Handler(backgroundHandlerThread.getLooper());\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n\n if (displayGpsStatus()) {\n\n Log.v(TAG, \"onClick\");\n\n\n locationListener = new MyLocationListener();\n\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED ) {\n locationMangaer.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListener);\n\n }\n else{\n Toast.makeText(this,\"Kindly Provide Location Acces\",Toast.LENGTH_SHORT).show();\n }\n\n Log.v(TAG,latitudeUsers +\" , \"+longitudeUsers);\n\n } else {\n Toast.makeText(this,\"GPS not available!!\",Toast.LENGTH_SHORT).show();\n }\n\n }",
"private void updateGPS() {\n fusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(Location.this);\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n fusedLocationProviderClient.getLastLocation().addOnSuccessListener(this, new OnSuccessListener<android.location.Location>() {\n @Override\n public void onSuccess(android.location.Location location) {\n updateUI(location);\n }\n });\n } else {\n //permission not granted, we will ask for it\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 99);\n }\n }\n }",
"public void resumeGpsService() {\n if(locationManager != null) {\n try {\n locationManager.requestLocationUpdates(provider, MIN_TIME_BW_UPDATES, MIN_DISTANCE_CHANGE_FOR_UPDATES, this);\n }catch (SecurityException secx) {\n showSettingsAlert();\n secx.printStackTrace();\n }catch (Exception ex) {\n ex.printStackTrace();\n }\n }\n }",
"@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\tgetLocation();\r\n\t\t\t\t\tstartLooping();\r\n\t\t\t\t}"
]
| [
"0.6694469",
"0.6146464",
"0.60668546",
"0.59703976",
"0.5909719",
"0.5801677",
"0.579127",
"0.57542706",
"0.574519",
"0.573983",
"0.57352304",
"0.5709748",
"0.57091933",
"0.5707807",
"0.57033706",
"0.56902224",
"0.56851345",
"0.56759435",
"0.5671546",
"0.5613137",
"0.56101316",
"0.55944014",
"0.55645514",
"0.5559423",
"0.55522585",
"0.55368656",
"0.55074537",
"0.5497897",
"0.5484241",
"0.5482567",
"0.5477859",
"0.5476102",
"0.5471791",
"0.5462166",
"0.54525095",
"0.5447889",
"0.54374355",
"0.54363865",
"0.54294235",
"0.54253834",
"0.5410047",
"0.5407152",
"0.5407037",
"0.54044163",
"0.5392275",
"0.5389578",
"0.5387125",
"0.5385196",
"0.53826606",
"0.5378504",
"0.5369976",
"0.536541",
"0.5343087",
"0.53394926",
"0.53206474",
"0.53098154",
"0.5300888",
"0.53003937",
"0.5298219",
"0.5278082",
"0.5277625",
"0.5274774",
"0.52718794",
"0.5261563",
"0.52598464",
"0.5258986",
"0.5246335",
"0.52437973",
"0.5239192",
"0.5237094",
"0.5228353",
"0.52264446",
"0.5221382",
"0.5217683",
"0.5215299",
"0.5208926",
"0.5206414",
"0.52010864",
"0.51959944",
"0.51959944",
"0.51872194",
"0.51844263",
"0.5178954",
"0.5166872",
"0.5161963",
"0.51565754",
"0.51535696",
"0.51521474",
"0.51502675",
"0.5149719",
"0.5140731",
"0.5137174",
"0.51371",
"0.51346695",
"0.51327425",
"0.51310015",
"0.5127693",
"0.51259613",
"0.5124413",
"0.51161236"
]
| 0.695034 | 0 |
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();
switch (id){
case android.R.id.home:
this.finish();
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 // 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 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\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\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 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\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\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\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\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\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.79041183",
"0.7805934",
"0.77659106",
"0.7727251",
"0.7631684",
"0.7621701",
"0.75839096",
"0.75300384",
"0.74873656",
"0.7458051",
"0.7458051",
"0.7438486",
"0.742157",
"0.7403794",
"0.7391802",
"0.73870087",
"0.7379108",
"0.7370295",
"0.7362194",
"0.7355759",
"0.73454577",
"0.734109",
"0.73295504",
"0.7327726",
"0.73259085",
"0.73188347",
"0.731648",
"0.73134047",
"0.7303978",
"0.7303978",
"0.7301588",
"0.7298084",
"0.72932935",
"0.7286338",
"0.7283324",
"0.72808945",
"0.72785115",
"0.72597474",
"0.72597474",
"0.72597474",
"0.725962",
"0.7259136",
"0.7249966",
"0.7224023",
"0.721937",
"0.7216621",
"0.7200649",
"0.71991026",
"0.71923256",
"0.71851367",
"0.7176769",
"0.7168457",
"0.71675026",
"0.7153402",
"0.71533287",
"0.71352696",
"0.71350807",
"0.71350807",
"0.7129153",
"0.7128639",
"0.7124181",
"0.7123387",
"0.7122983",
"0.71220255",
"0.711715",
"0.711715",
"0.711715",
"0.711715",
"0.7117043",
"0.71169263",
"0.7116624",
"0.71149373",
"0.71123946",
"0.7109806",
"0.7108778",
"0.710536",
"0.7098968",
"0.70981944",
"0.7095771",
"0.7093572",
"0.7093572",
"0.70862055",
"0.7082207",
"0.70808214",
"0.7080366",
"0.7073644",
"0.7068183",
"0.706161",
"0.7060019",
"0.70598614",
"0.7051272",
"0.70374316",
"0.70374316",
"0.7035865",
"0.70352185",
"0.70352185",
"0.7031749",
"0.703084",
"0.7029517",
"0.7018633"
]
| 0.72045326 | 46 |
Called by the UI. Blocks until a decision is ready, then returns. | public void waitForDecision(){
if(gameOver) {
return;
}
if(!decisionActive) {
try {
uiWaiting = true;
synchronized(uiWait) {
uiWait.wait();
}
} catch (Exception e) { logger.log(""+e); }
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 boolean waitToProceed() {\n return false;\n }",
"public void showReady();",
"public Status waitUntilFinished();",
"protected void waitUntilCommandFinished() {\n }",
"public void waitingForPartner();",
"final void waitFinished() {\n if (selectionSyncTask != null) {\n selectionSyncTask.waitFinished();\n }\n }",
"public abstract void onWait();",
"@Override\n\t\t\t\t\t\t\t\tpublic void run() {\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}",
"@Override\n public boolean isReady() {\n return isFinished();\n }",
"public void clickApply() {\n // check if more than one player is selected\n playerNameList = new ArrayList<>();\n if (!boxPlayer1.getValue().equals(\"None\"))\n playerNameList.add(boxPlayer1.getValue().toString());\n if (!boxPlayer2.getValue().equals(\"None\"))\n playerNameList.add(boxPlayer2.getValue().toString());\n if (!boxPlayer3.getValue().equals(\"None\"))\n playerNameList.add(boxPlayer3.getValue().toString());\n if (!boxPlayer4.getValue().equals(\"None\"))\n playerNameList.add(boxPlayer4.getValue().toString());\n // sort list\n Collections.sort(playerNameList);\n if (playerNameList.size() < 2) {\n resetPieChart();\n resetLabels();\n showAlertSelectionFail(\"Selection error\", \"Please select at least two players.\");\n return;\n }else {\n numberOfParticipants = playerNameList.size();\n }\n\n // open window with wait message and center it\n Window window = btnApply.getScene().getWindow();\n showWaitWindow(window);\n\n // run task/thread with evaluation, then close message\n Task checkEvaluateDataTask = new Task<Void>() {\n @Override\n public Void call() {\n Platform.runLater(\n () -> {\n // TIMESTAMP\n //System.out.println(\"#### \" + this.getClass() + \": method \" + new Object(){}.getClass().getEnclosingMethod().getName() + \"() is running now at line XXXX. Time: \" + java.time.Clock.systemUTC().instant());\n //evaluateDataClientHeavy();\n evaluateDataDBHeavy();\n waitAlert.setResult(ButtonType.OK);\n waitAlert.close();\n // TIMESTAMP\n //System.out.println(\"#### \" + this.getClass() + \": method \" + new Object(){}.getClass().getEnclosingMethod().getName() + \"() is running now at line XXXX. Time: \" + java.time.Clock.systemUTC().instant());\n\n }\n );\n return null;\n }\n };\n new Thread(checkEvaluateDataTask).start();\n // run timer to check if this task is finished. If finished run update on gui and close waitAlert\n }",
"public abstract void ready();",
"public boolean isReady(){\n return !result.equals(\"\");\n }",
"@Override public void onAfterStateSwitch() {\n assert SwingUtilities.isEventDispatchThread();\n assert isVisible();\n try {\n license = manager().load();\n onLicenseChange();\n manager().verify();\n } catch (final Exception failure) {\n JOptionPane.showMessageDialog(\n this,\n failure instanceof LicenseValidationException\n ? failure.getLocalizedMessage()\n : format(LicenseWizardMessage.display_failure),\n format(LicenseWizardMessage.failure_title),\n JOptionPane.ERROR_MESSAGE);\n }\n }",
"@Override\n\tpublic void provideInitialChoice() throws RemoteException {\n\t\tgamePane.showAsStatus(\"Please choose your figure to decide who starts\");\n\t\tgamePane.showInitialChoicePane();\n\t}",
"@Override\r\n\tpublic boolean isReady() {\n\t\treturn !finish;\r\n\t}",
"boolean isReadyForShowing();",
"void waitForAddStatusIsDisplayed() {\n\t\tSeleniumUtility.waitElementToBeVisible(driver, homepageVehiclePlanning.buttonTagAddStatusHomepageVehiclePlanning);\n\t}",
"@Override\n public void run() {\n \tBTstatusTextView.setText(s);\n \t\n \tif(s.equals(\"BT-Ready\") && !(poll.getVisibility() == View.VISIBLE)){\n \t\tLog.d(\"poll buttion\", \"setting visible\");\n \t//Ready to poll\n \t\tpoll.setVisibility(View.VISIBLE);\n \t\n }\n }",
"@Override\n\tpublic void msgReadyForCheck(Customer customerAgent, String choice) {\n\t\t\n\t}",
"protected void done() {\n logoPanel.stop();\n qtf.setCursor(normalCursor);\n searchButton.setEnabled(true);\n\n boolean isStatusOK = false;\n try {\n isStatusOK = get();\n } catch (Exception e) {\n }\n\n if (isStatusOK) {\n Thread tableFill = new Thread(msb_qtm);\n tableFill.start();\n\n try {\n tableFill.join();\n } catch (InterruptedException iex) {\n logger.warn(\"Problem joining tablefill thread\");\n }\n\n synchronized (this) {\n Thread projectFill = new Thread(\n qtf.getProjectModel());\n projectFill.start();\n try {\n projectFill.join();\n } catch (InterruptedException iex) {\n logger.warn(\"Problem joining projectfill thread\");\n }\n\n qtf.initProjectTable();\n }\n\n msb_qtm.setProjectId(\"All\");\n qtf.setColumnSizes();\n qtf.resetScrollBars();\n logoPanel.stop();\n qtf.setCursor(normalCursor);\n\n if (queryTask != null) {\n queryTask.cancel();\n }\n\n qtf.setQueryExpired(false);\n String queryTimeout = System.getProperty(\n \"queryTimeout\");\n System.out.println(\"Query expiration: \"\n + queryTimeout);\n Integer timeout = new Integer(queryTimeout);\n if (timeout != 0) {\n // Conversion from minutes of milliseconds\n int delay = timeout * 60 * 1000;\n queryTask = OMPTimer.getOMPTimer().setTimer(\n delay, infoPanel, false);\n }\n }\n }",
"@Override\n protected void onPreExecute() {\n\n this.dialog.setMessage(\"Please wait ...\");\n this.dialog.show();\n }",
"@Override\n public boolean isReady() {\n return !isDone;\n }",
"public boolean isReady();",
"public boolean isReady();",
"@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\tpublic void showProgress() {\n\t\twaitDialog(true);\n\t}",
"protected abstract void askResponse();",
"void isReady();",
"void isReady();",
"@Test \n\t@Description(\"Wait for Loader to finish TC\")\n\tpublic void waitText() {\n\t\therokuappNavigate();\n\t\therokuapp hero = new herokuapp(driver);\n\t\thero.dynamicloadclick();\n\t\thero.example2click();\n\t\thero.start();\n\t\t//hero.waitToFinish();\n\t\tWebDriverWait wait = new WebDriverWait(driver, 40);\n\t\twait.until(ExpectedConditions.invisibilityOf(hero.ajaxloader));\n\t\tAssert.assertEquals(hero.finishmsg.getText(), \"Hello World!\");\n\t\t//logger.pass(\"Required Search Result appeared\");\n\t\t//logger.fail(\"Required Search Result didn't appear\");\n\t}",
"protected abstract long waitToTravel();",
"public abstract boolean isCompleted();",
"public boolean ready();",
"@Override\n\tpublic boolean ready() {\n\t\treturn this.ok;\n\t}",
"@Override\n protected void onPreExecute() {\n\n dialog.setCancelable(true);\n dialog.setMessage(\"Fetching...\");\n\n dialog.show();\n\n }",
"@Override\n public void userRequestedAction()\n {\n inComm = true;\n view.disableAction();\n\n // switch to loading ui\n view.setActionText(\"Loading...\");\n view.setStatusText(loadingMessages[rand.nextInt(loadingMessages.length)]);\n view.setStatusColor(COLOR_WAITING);\n view.loadingAnimation();\n\n // switch the status of the system\n if (isArmed) disarmSystem();\n else armSystem();\n isArmed = !isArmed;\n\n // notify PubNub\n }",
"public void callTheWaiter();",
"@Override\n protected void onPreExecute() {\n progress = ProgressDialog.show(ModeSelection.this, \"Connecting...\", \"Please wait!!!\"); //show a progress dialog\n }",
"@Override\n\tprotected void onPreExecute() {\n\t\tpd.setMessage(\"Wait Connecting\");\n\t\tpd.show();\n\t\tsuper.onPreExecute();\n\t}",
"@Override\r\n\t\t\tpublic boolean isReady() {\n\t\t\t\treturn false;\r\n\t\t\t}",
"protected abstract void afterWait();",
"public void onYesButtonClicked() {\n changeAfterClientPick();\n }",
"@Override\n public boolean isBusy() {\n return false;\n }",
"@Override\n public boolean isReady() {\n return true;\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 }",
"private int waitUntilReady()\r\n {\r\n int rc = 0;\r\n // If a stock Item is in the Table, We do not want to start\r\n // The Lookup, if the name of the stock has not been identified.\r\n // here we will wait just a couple a second at a time.\r\n // until, the user has entered the name of the stock.\r\n // MAXWAIT is 20 minutes, since we are 1 second loops.\r\n // 60 loops is 1 minute and 20 of those is 20 minutes\r\n final int MAXWAIT = 60 * 20;\r\n int counter = 0;\r\n do\r\n {\r\n try\r\n {\r\n Thread.currentThread().sleep(ONE_SECOND);\r\n }\r\n catch (InterruptedException exc)\r\n {\r\n // Do Nothing - Try again\r\n }\r\n if (counter++ > MAXWAIT)\r\n { // Abort the Lookup for historic data\r\n this.cancel();\r\n return -1;\r\n }\r\n }\r\n while (\"\".equals(sd.getSymbol().getDataSz().trim()));\r\n\r\n return 0;\r\n }",
"public void run()\n {\n getMenuChoice();\n }",
"@Override\n\tprotected void onPreExecute() {\n\t\tpleaseWait.setTitle(\"Please wait\");\n\t\tpleaseWait.setMessage(\"Connecting to server\");\n\t\tpleaseWait.show();\n\t}",
"@Override\n\t\tpublic boolean isReady() {\n\t\t\treturn false;\n\t\t}",
"@Override\n\t\tpublic boolean isReady() {\n\t\t\treturn false;\n\t\t}",
"void waitingForMyTurn();",
"@Override\n\t\t\tprotected void onPreExecute() {\n\t\t\t\tsuper.onPreExecute();\n\t\t\t\tpDialog.setMessage(\"Relax for a while...\");\n\t\t\t\tpDialog.setCancelable(false);\n\t\t\t\tpDialog.show();\n\t\t\t}",
"@Override\n\t\t\tprotected void onPreExecute() {\n\t\t\t\tsuper.onPreExecute();\n\t\t\t\tpDialog.setMessage(\"Relax for a while...\");\n\t\t\t\tpDialog.setCancelable(false);\n\t\t\t\tpDialog.show();\n\t\t\t}",
"public boolean operationWaiting(){\n\t\tif (var2Set) return true; else return false;\n\t}",
"public void CondWait(){\n try {\r\n trainCond.await();\r\n } catch (InterruptedException ex) {\r\n Logger.getLogger(Area.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"@Override\n public boolean isReady() {\n return true;\n }",
"public static void waitToGo() {\r\n try {\r\n sendMessageToMaster(SocketMessage.SLAVE_READY_TO_GO);\r\n wait_to_run.acquire();\r\n } catch (InterruptedException e) {\r\n }\r\n }",
"boolean isReady();",
"boolean isReady();",
"boolean isReady();",
"private void proceedManual() {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n abortProgress(true);\n startValidationCode(REQUEST_MANUAL_VALIDATION);\n }\n });\n }",
"public void doWait() {\n\t\tsynchronized(lockObject){\n\t\t\t//Now even if the notify() is called earlier without a pre-wait() call then it will check the condition\n\t\t\t//and will found \"resumeSignal\" to be true hence, will not enter the waiting state.\n\t\t\tif(!resumeSignal){\n\t\t\t\ttry{\n\t\t\t\t\tlockObject.wait();\n\t\t\t\t} catch(InterruptedException e){}\n\t\t\t}\n\t\t\t//Waiting state is over. So, clear the signal flag and continue running.\n\t\t\tresumeSignal = false;\n\t\t}\n\t}",
"private boolean isBusyNow() {\n if (tip.visibleProperty().getValue()){\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"FTP Client\");\n alert.setHeaderText(\"Please wait current download finish!\");\n alert.initOwner(main.getWindow());\n alert.showAndWait();\n return true;\n }\n return false;\n }",
"public synchronized void makeAvailable(){\n isBusy = false;\n }",
"@Override\n protected void onPostExecute(Face[] result) {\n if (check == 0) {\n setUiAfterDetection(result, mSucceed, 0);\n } else if (check == 1) {\n setUiAfterDetection(result, mSucceed, 1);\n }\n }",
"protected void awaitResult(){\t\n\t\ttry {\n\t\t\t/*place thread/tuple identifier in waitlist for future responses from web service*/\n\t\t\tResponses.getInstance().addToWaitList(this.transId, this);\n\t\t\tthis.latch.await();\n\t\t\t\n\t\t} catch (InterruptedException e) {\n\n\t\t\tLogger.getLogger(\"RSpace\").log(Level.WARNING, \"Transaction #\" + transId + \" response listener was terminated\");\n\t\t}\n\t}",
"private static void askForContinue() {\n\t\t\t\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}",
"public boolean getReadyToRun();",
"public void waitToFinish()\n {\n while(!this.finished)\n {\n try\n {\n Thread.sleep(1);\n }\n catch (InterruptedException e)\n {\n e.printStackTrace();\n return;\n }\n }\n }",
"@Override\n protected void onPostExecute(Boolean result) {\n super.onPostExecute(result);\n techStatus = (TextView)findViewById(R.id.techStatus);\n if(check ==0){\n techStatus.setText(\"You are now Busy\");\n }\n if(check == 1){\n techStatus.setText(\"You are now Available\");\n }\n if(check == 2){\n techStatus.setText(\"You are not Available\");\n }\n }",
"public void result() {\n JLabel header = new JLabel(\"Finish!!\");\n header.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 28));\n gui.getConstraints().gridx = 0;\n gui.getConstraints().gridy = 0;\n gui.getConstraints().insets = new Insets(10,10,50,10);\n gui.getPanel().add(header, gui.getConstraints());\n\n String outcomeText = String.format(\"You answer correctly %d / %d.\",\n totalCorrect, VocabularyQuizList.MAX_NUMBER_QUIZ);\n JTextArea outcome = new JTextArea(outcomeText);\n outcome.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 20));\n outcome.setEditable(false);\n gui.getConstraints().gridy = 1;\n gui.getConstraints().insets = new Insets(10,10,30,10);\n gui.getPanel().add(outcome, gui.getConstraints());\n\n JButton b = new JButton(\"home\");\n gui.getGuiAssist().homeListener(b);\n gui.getConstraints().gridy = 2;\n gui.getConstraints().insets = new Insets(10,200,10,200);\n gui.getPanel().add(b, gui.getConstraints());\n\n b = new JButton(\"start again\");\n startQuestionListener(b);\n gui.getConstraints().gridy = 3;\n gui.getPanel().add(b, gui.getConstraints());\n }",
"@Override\n public boolean isFinished() {\n return controller.atSetpoint();\n }",
"@Override\n\t\t\tprotected void onPreExecute() {\n\t\t\t\tsuper.onPreExecute();\n//\t\t\t\tpDialog.setMessage(\"Relax for a while...\");\n//\t\t\t\tpDialog.setCancelable(false);\n//\t\t\t\tpDialog.show();\n\t\t\t\t\n\t\t\t}",
"@Override\n protected void onPreExecute() {\n Utils.showProcessingDialog(_context);\n }",
"protected boolean pickAndExecuteAnAction() {\n\t//print(\"in waiter scheduler\");\n\t//Starts the break cycle if onBreak == true\n\tif(onBreak && working ) {\n\t initiateBreak();\n\t return true;\n\t}\n\n\t//Once all the customers have been served\n\t//then the waiter can actually go on break\n\tif(!working && customers.isEmpty() && !startedBreak) {\n\t goOnBreak();\n\t return true;\n\t}\n\n\tif(!onBreak && !working){\n\t endBreak();\n\t}\n\n\t\n\t//Runs through the customers for each rule, so \n\t//the waiter doesn't serve only one customer at a time\n\tif(!customers.isEmpty()){\n\t //System.out.println(\"in scheduler, customers not empty:\");\n\t //Gives food to customer if the order is ready\n\t for(MyCustomer c:customers){\n\t\tif(c.state == CustomerState.ORDER_READY) {\n\t\t giveFoodToCustomer(c);\n\t\t return true;\n\t\t}\n\t }\n\t //Clears the table if the customer has left\n\t for(MyCustomer c:customers){\n\t\tif(c.state == CustomerState.IS_DONE) {\n\t\t clearTable(c);\n\t\t return true;\n\t\t}\n\t }\n\n\t //Seats the customer if they need it\n\t for(MyCustomer c:customers){\n\t\tif(c.state == CustomerState.NEED_SEATED){\n\t\t seatCustomer(c);\n\t\t return true;\n\t\t}\n\t }\n\n\t //Gives all pending orders to the cook\n\t for(MyCustomer c:customers){\n\t\tif(c.state == CustomerState.ORDER_PENDING){\n\t\t giveOrderToCook(c);\n\t\t return true;\n\t\t}\n\t }\n\n\t //Takes new orders for customers that are ready\n\t for(MyCustomer c:customers){\n\t\t//print(\"testing for ready to order\"+c.state);\n\t\tif(c.state == CustomerState.READY_TO_ORDER) {\n\t\t takeOrder(c);\n\t\t return true;\n\t\t}\n\t }\t \n\t}\n\tif (!currentPosition.equals(originalPosition)) {\n\t moveToOriginalPosition();\n\t return true;\n\t}\n\n\t//we have tried all our rules and found nothing to do. \n\t// So return false to main loop of abstract agent and wait.\n\t//print(\"in scheduler, no rules matched:\");\n\treturn false;\n }",
"@Override\n\tpublic boolean isReady() {\n\t\treturn false;\n\t}",
"@Override\n\t\tprotected Object doInBackground(Object... params) {\n\t\t\tServerInterface.sendCorrectAnswerResponse();\n\t\t\treturn null;\n\t\t}",
"@Override\n public void viewWillAppear() throws InterruptedException {\n commandView.addLocalizedText(\"Vuoi essere scomunicato? 0: sì, 1:no\");\n int answ = commandView.getInt(0, 1);\n boolean answer = (answ == 0);\n clientNetworkOrchestrator.send(new PlayerChoiceExcommunication(answer));\n }",
"@Override\n\tpublic boolean isBusy() {\n\t\treturn false;\n\t}",
"public void accomplishGoal() {\r\n isAccomplished = true;\r\n }",
"@Override\n protected void onPreExecute() {\n this.progressDialog.setMessage(\"Retrieving workouts list...\");\n this.progressDialog.show();\n }",
"private void buildWaitScene(){\n\t\t//Nothing to do\n\t}",
"public final void activate(){\n waitingToExecute = true;\n }",
"protected void afterLockWaitingForBooleanCondition() {\n }",
"@Override\n\t\t\tpublic void onStartInMainThread(Object result)\n\t\t\t{\n\t\t\t\tsuper.onStartInMainThread(result);\n\t\t\t\tif (mStartType == 1)\n\t\t\t\t{\n\t\t\t\t\tnDialog = SDDialogUtil.showLoading(\"正在检测新版本...\");\n\t\t\t\t}\n\t\t\t}",
"public boolean isBusy();",
"protected abstract void beforeWait();",
"private void handleGetTraining()\n {\n Doctor selectedDoctor = selectDoctor(); // will be null if the doctor is occupied\n\n // TODO:\n // step 1. check if the doctor is occupied, if the doctor is occupied selectedDoctor will be null. If the doctor is occupied\n // add \"You have to select a unoccupied doctor.\\n\" into the printResult ArrayList, call updateListViewLogWindow() to display the message\n // and then return from this method\n // step 2. if the selectedDoctor is not occupied,\n // a. call selectedDoctor.goTraining(humanPlayer)\n // b. and then end the turn for the selectedDoctor\n // c. add the string \"GetTraining\" to printResult ArrayList\n // d. add the string \"After training:\\n\"+selectedDoctor+\"\\n\" to the printResult ArrayList\n // e. output the printResult ArrayList by calling updateListViewLogWindow()\n // f. update the human player's money displayed in the UI by calling updateHumanPlayerMoney()\n // g. set listViewSelectedDoctor to null, this is a string holding all the name, specialty, skill level,\n // salary etc information of the doctor being selected to get training. The selectDoctor()\n // method extract the name to search for the doctor object from the doctors list of the player.\n // WE ASSUME DOCTOR NAMES ARE UNIQUE, if this is not the case, selectDoctor() will not work correctly\n if(selectedDoctor == null){\n printResult.add(\"You have to select a unoccupied doctor.\\n\");\n updateListViewLogWindow();\n return;\n }\n selectedDoctor.goTraining(humanPlayer);\n selectedDoctor.endTurn();\n updateListViewDoctorItems();\n printResult.add(\"GetTraining\");\n printResult.add(\"After training:\\n\"+selectedDoctor+\"\\n\");\n updateListViewLogWindow();\n updateHumanPlayerMoney();\n\n listViewSelectedDoctor = null;\n }",
"public void onFinishFetching() {\n\t\t\t\thideLoading();\n\t\t\t\tUiApplication.getUiApplication().invokeLater(\n\t\t\t\t\tnew Runnable() {\n\t\t\t\t\t\t\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tAlertDialog.showInformMessage(message);\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tUiApplication.getUiApplication().pushScreen(new HomeScreen());\n\t\t\t\t\t\t}\n\t\t\t\t\t});\t\t\t\t\n\t\t\t}",
"@Override\n public void waitUntilPageObjectIsLoaded() {\n }",
"public abstract boolean isFinished ();",
"public void run() {\n\t\t\t\t\t\t\tProposal p = getSelectedProposal();\n\t\t\t\t\t\t\tif (p != null) {\n\t\t\t\t\t\t\t\tString description = p.getDescription();\n\t\t\t\t\t\t\t\tif (description != null) {\n\t\t\t\t\t\t\t\t\tif (infoPopup == null) {\n\t\t\t\t\t\t\t\t\t\tinfoPopup = new InfoPopupDialog(getShell());\n\t\t\t\t\t\t\t\t\t\tinfoPopup.open();\n\t\t\t\t\t\t\t\t\t\tinfoPopup.getShell()\n\t\t\t\t\t\t\t\t\t\t\t\t.addDisposeListener(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew DisposeListener() {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void widgetDisposed(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDisposeEvent event) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinfoPopup = null;\n\t\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\t});\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tinfoPopup.setContents(p.getDescription());\n\t\t\t\t\t\t\t\t} else if (infoPopup != null) {\n\t\t\t\t\t\t\t\t\tinfoPopup.close();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tpendingDescriptionUpdate = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}",
"public void run() {\n\t\t\tshowSystemDialog(ResultMsg);\r\n\t\t}",
"protected void done() {\n\t\ttry {\n\t\t\t// get the result of doInBackground and display it\n\t\t\tresultJLabel.setText(get().toString());\n\t\t} // end try\n\t\tcatch (InterruptedException ex) {\n\t\t\tresultJLabel.setText(\"Interrupted while waiting for results.\");\n\t\t} // end catch\n\t\tcatch (ExecutionException ex) {\n\t\t\tresultJLabel.setText(\"Error encountered while performing calculation.\");\n\t\t} // end catch\n\t}",
"@Override\r\n\tpublic boolean isChosen() {\n\t\treturn false;\r\n\t}",
"@Override\n protected boolean isFinished() {\n return true;\n }",
"@Override\n\tprotected void onPreExecute() {\n\t\tUtils.showProcessingDialog(_context);\n\t}",
"private boolean performUserOption(final IGraphFile currentFile, final int userDecision)\n {\n switch (userDecision)\n {\n case JOptionPane.CANCEL_OPTION:\n return false;\n case JOptionPane.YES_OPTION:\n currentFile.save();\n setActiveDiagramPreference();\n return true;\n case JOptionPane.NO_OPTION:\n setActiveDiagramPreference();\n return true;\n default:\n return false;\n }\n }"
]
| [
"0.63471556",
"0.62539744",
"0.6192393",
"0.6147836",
"0.60418284",
"0.6035404",
"0.60138226",
"0.59833705",
"0.5968115",
"0.59244955",
"0.58559453",
"0.5819507",
"0.5764262",
"0.56830215",
"0.5681843",
"0.56767035",
"0.56570894",
"0.5656231",
"0.5653772",
"0.5638019",
"0.56124294",
"0.55933",
"0.55890346",
"0.5566479",
"0.5566479",
"0.55628043",
"0.5539897",
"0.552794",
"0.552345",
"0.552345",
"0.5523419",
"0.55103457",
"0.5507084",
"0.54930377",
"0.54897547",
"0.5476381",
"0.54740024",
"0.54718196",
"0.54567987",
"0.54566723",
"0.5433271",
"0.5429987",
"0.5424883",
"0.5422758",
"0.5418182",
"0.5410633",
"0.54014933",
"0.5399297",
"0.53947765",
"0.53858393",
"0.53858393",
"0.53815305",
"0.53721064",
"0.53721064",
"0.53670126",
"0.5364656",
"0.53633976",
"0.5356172",
"0.5350458",
"0.5350458",
"0.5350458",
"0.53443336",
"0.53371495",
"0.53248274",
"0.53244007",
"0.5323505",
"0.53181505",
"0.53173155",
"0.531638",
"0.53149813",
"0.5310913",
"0.5302879",
"0.53018725",
"0.5296049",
"0.52957976",
"0.52932554",
"0.52927035",
"0.52920866",
"0.5288948",
"0.5287483",
"0.5285159",
"0.5283797",
"0.52833873",
"0.52807295",
"0.5279589",
"0.5273566",
"0.52709585",
"0.5269839",
"0.52667844",
"0.52613896",
"0.5259394",
"0.52542305",
"0.52522415",
"0.52469677",
"0.5241761",
"0.5234819",
"0.5234489",
"0.52288365",
"0.52206886",
"0.5217779"
]
| 0.75432885 | 0 |
Get List of dependencies from package.json file | public List<String> getDependencies() throws IOException {
PackageJSON packageJSON = new ObjectMapper()
.readValue(this.getClass().getClassLoader().getResourceAsStream("package.json"), PackageJSON.class);
return packageJSON.getDependencies();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Set<String> getDependencies();",
"public String[] getResolvedDependencies();",
"String getApplicationDependencies();",
"public List getDependencies() {\n return Collections.unmodifiableList(dependencies);\n }",
"public List<String> getDependencies() {\n return new ArrayList<>(mDependencies);\n }",
"public String[] getUnresolvedDependencies();",
"public String[] getDependencies()\r\n {\r\n return m_dependencies;\r\n }",
"public default String[] getDependencies() {\r\n\t\treturn new String[0];\r\n\t}",
"public Map<String, Set<String>> getDependencies() {\n return new HashMap<String, Set<String>>(dependencies);\n }",
"public IPath[] getAdditionalDependencies();",
"Set<Path> getDependencies();",
"@Stub\n\tpublic String[] getDependencies()\n\t{\n\t\treturn new String[] {};\n\t}",
"public String[] getAllDependencyExtensions();",
"DependenciesBean getDependencies(String path) throws RegistryException;",
"java.util.List<com.clarifai.grpc.api.InstalledModuleVersion> \n getInstalledModuleVersionsList();",
"@Override\n public String getApplicationDependencies() {\n List<String> orderedNames = new ArrayList<String>();\n \n //deprecated: Current way of configuring pu dependencies in Cloudify is by entering a groovy list of the pu names in the format \"[a,b,c]\"\n String deprecatedDependenciesValue = getBeanLevelProperties().getContextProperties().getProperty(APPLICATION_DEPENDENCIES_CONTEXT_PROPERTY);\n if (deprecatedDependenciesValue != null) {\n String trimmedDeprecatedDependenciesValue = deprecatedDependenciesValue.replace('[', ' ').replace(']', ' ').trim();\n String[] deprecatedDependencies = StringUtils.delimitedListToStringArray(trimmedDeprecatedDependenciesValue,\",\");\n for (String name : deprecatedDependencies) {\n if (!orderedNames.contains(name)) {\n orderedNames.add(name);\n }\n }\n }\n \n // Admin API way for configuring pu dependencies\n for (String name : dependencies.getDeploymentDependencies().getRequiredProcessingUnitsNames()) {\n if (!orderedNames.contains(name)) {\n orderedNames.add(name);\n }\n }\n if (orderedNames.isEmpty()) {\n //backwards compatibility\n return \"\";\n }\n return \"[\" + StringUtils.collectionToCommaDelimitedString(orderedNames) +\"]\";\n }",
"List<String> getSystemPackages();",
"public abstract NestedSet<Artifact> getTransitiveJackClasspathLibraries();",
"java.util.List<com.google.devtools.kythe.proto.Java.JarDetails.Jar> \n getJarList();",
"public List getLibs() {\r\n\t\tList libs = (List) super.get(LIBS_FIELD_NAME);\r\n\t\tif (libs == null) {\r\n\t\t\tlibs = new JSONArray();\r\n\t\t\tsuper.put(LIBS_FIELD_NAME, libs);\r\n\t\t}\r\n\t\treturn libs;\r\n\t}",
"public Set<ModuleRevisionId> getDependencies() { return this.dependencies; }",
"protected List getDependenciesIncludeList()\n throws MojoExecutionException\n {\n List includes = new ArrayList();\n\n for ( Iterator i = getDependencies().iterator(); i.hasNext(); )\n {\n Artifact a = (Artifact) i.next();\n\n if ( project.getGroupId().equals( a.getGroupId() ) && project.getArtifactId().equals( a.getArtifactId() ))\n {\n continue;\n }\n\n includes.add( a.getGroupId() + \":\" + a.getArtifactId() );\n }\n\n return includes;\n }",
"public List<String> getSupportedSchemaVersions() {\n // Taken from https://stackoverflow.com/a/20073154/\n List<String> supportedSchemaVersions = new ArrayList<>();\n File jarFile = new File(getClass().getProtectionDomain().getCodeSource().getLocation().getPath());\n try {\n if (jarFile.isFile()) { // Run with JAR file\n final JarFile jar = new JarFile(jarFile);\n final Enumeration<JarEntry> entries = jar.entries(); //gives ALL entries in jar\n while (entries.hasMoreElements()) {\n final String name = entries.nextElement().getName();\n if (name.startsWith(RESOURCES_PATH)) { //filter according to the path\n if (name.split(\"/\").length == 2) {\n supportedSchemaVersions.add(name.split(\"/\")[1]);\n }\n }\n }\n jar.close();\n } else {\n supportedSchemaVersions = getSupportedSchemaVersionsFromResources();\n }\n } catch (IOException ignored) {\n\n }\n return supportedSchemaVersions;\n }",
"@Override\n public List<Class<? extends ProjectInitializer>> getDependencies()\n {\n return asList(TokenLayerInitializer.class);\n }",
"Requires getRequires();",
"Set<DependencyItem> getDependsOnMe(Class<?> type);",
"public Set<DependencyElement> getDependencies() {\n\t\treturn Collections.unmodifiableSet(dependencies);\n\t}",
"public Map<String, PackageDesc> getPackagesInstalled() {\n\teval(ANS + \"=pkg('list');\");\n\t// TBC: why ans=necessary??? without like pkg list .. bug? \n\tOctaveCell cell = get(OctaveCell.class, ANS);\n\tint len = cell.dataSize();\n\tMap<String, PackageDesc> res = new HashMap<String, PackageDesc>();\n\tPackageDesc pkg;\n\tfor (int idx = 1; idx <= len; idx++) {\n\t pkg = new PackageDesc(cell.get(OctaveStruct.class, 1, idx));\n\t res.put(pkg.name, pkg);\n\t}\n\treturn res;\n }",
"@NonNull\n Set<ServerLibraryDependency> getLibraries() throws ConfigurationException;",
"java.util.List<? extends com.clarifai.grpc.api.InstalledModuleVersionOrBuilder> \n getInstalledModuleVersionsOrBuilderList();",
"private ArrayList<String> getJARList() {\n String[] jars = getJARNames();\n return new ArrayList<>(Arrays.asList(jars));\n }",
"java.util.List<com.google.cloud.functions.v2.SecretVolume.SecretVersion> getVersionsList();",
"ImportOption[] getImports();",
"public List<Integer> getDependsOn() {\r\n return dependsOn;\r\n }",
"protected List<ReactPackage> getPackages() {\n\n @SuppressWarnings(\"UnnecessaryLocalVariable\")\n List<ReactPackage> packages = new PackageList(this).getPackages();\n // Packages that cannot be autolinked yet can be added manually here, for example:\n // packages.add(new MyReactNativePackage());\n packages.add(new CodePush(BuildConfig.ANDROID_CODEPUSH_DEPLOYMENT_KEY, MainApplication.this, BuildConfig.DEBUG));\n return packages;\n }",
"public abstract List<Dependency> selectDependencies( Class<?> clazz );",
"@Classpath\n public FileCollection getJdependClasspath() {\n return jdependClasspath;\n }",
"private String getRequireBundle() {\n StringBuilder requires = new StringBuilder();\n if (!isLanguageModule()) {\n for (ModuleImport anImport : module.getImports()) {\n Module m = anImport.getModule();\n if (!m.isJava() && !m.equals(module)) {\n if (requires.length() > 0) {\n requires.append(\",\");\n }\n \n requires.append(m.getNameAsString())\n .append(\";bundle-version=\").append(m.getVersion());\n \n if (anImport.isExport()) {\n requires.append(\";visibility:=reexport\");\n }\n if (anImport.isOptional()) {\n requires.append(\";resolution:=optional\");\n }\n }\n }\n }\n return requires.toString();\n }",
"private List<Dependency> getDependenciesFor( org.eclipse.aether.artifact.Artifact artifact )\n throws MojoExecutionException\n {\n final List<Dependency> results = new ArrayList<Dependency>();\n\n final ArtifactDescriptorRequest descriptorRequest = new ArtifactDescriptorRequest();\n descriptorRequest.setArtifact( artifact );\n descriptorRequest.setRepositories( remoteRepos );\n\n final ArtifactDescriptorResult descriptorResult;\n try\n {\n descriptorResult = repoSystem.readArtifactDescriptor( repoSession, descriptorRequest );\n }\n catch ( ArtifactDescriptorException e )\n {\n throw new MojoExecutionException( \"Could not resolve dependencies for \" + artifact, e );\n }\n\n for ( Dependency dependency : descriptorResult.getDependencies() )\n {\n log.debug( \"Found dependency: \" + dependency );\n final String extension = dependency.getArtifact().getExtension();\n if ( extension.equals( APKLIB ) || extension.equals( AAR ) || extension.equals( APK ) )\n {\n results.add( dependency );\n results.addAll( getDependenciesFor( dependency.getArtifact() ) );\n }\n }\n\n return results;\n }",
"public List<ReactPackage> getPackages() {\n return Arrays.<ReactPackage>asList(\n\n );\n }",
"java.util.List<? extends com.google.devtools.kythe.proto.Java.JarDetails.JarOrBuilder> \n getJarOrBuilderList();",
"public Set<GHRepository> listDependents(GHRepository repo) throws IOException {\n\t\treturn listDependents(repo, 1, true);\n\t}",
"public List/* <NarArtifact> */getNarDependencies(String scope)\n \t\t\tthrows MojoExecutionException {\n \t\tList narDependencies = new ArrayList();\n \t\tfor (Iterator i = getDependencies(scope).iterator(); i.hasNext();) {\n \t\t\tArtifact dependency = (Artifact) i.next();\n \t\t\tlog.debug(\"Examining artifact for NarInfo: \"+dependency);\n \t\t\t\n \t\t\tNarInfo narInfo = getNarInfo(dependency);\n \t\t\tif (narInfo != null) {\n \t\t\t\tlog.debug(\" - added as NarDependency\");\n \t\t\t\tnarDependencies.add(new NarArtifact(dependency, narInfo));\n \t\t\t}\n \t\t}\n \t\treturn narDependencies;\n \t}",
"public String getPackages() {\n\t\treturn this.packages;\n\t}",
"default Map<DependencyDescriptor, Set<DependencyDescriptor>> getDependencies() {\n return Collections.emptyMap();\n }",
"private void collectDependencies() throws Exception {\n backupModAnsSumFiles();\n CommandResults goGraphResult = goDriver.modGraph(true);\n String cachePath = getCachePath();\n String[] dependenciesGraph = goGraphResult.getRes().split(\"\\\\r?\\\\n\");\n for (String entry : dependenciesGraph) {\n String moduleToAdd = entry.split(\" \")[1];\n addModuleDependencies(moduleToAdd, cachePath);\n }\n restoreModAnsSumFiles();\n }",
"private JsonNode jsonPackages(ObjectMapper mapper) {\n ArrayNode packages = mapper.createArrayNode();\n for (JavaPackage javaPackage : catalog.getPackages()) {\n packages.add(json(mapper, javaPackage));\n }\n return packages;\n }",
"Collection<String> getVersions();",
"java.util.List<com.expedia.www.packagefinder.database.exppackage.ExpPackageProtos.Package> \n getFHPackagesList();",
"java.util.List<java.lang.String>\n getSourceFileList();",
"public Set<GHRepository> listDependents(GHRepository repo, String packageId) throws IOException {\n\t\treturn listDependents(repo, packageId, 1, true);\n\t}",
"java.util.List<? extends com.expedia.www.packagefinder.database.exppackage.ExpPackageProtos.PackageOrBuilder> \n getFHPackagesOrBuilderList();",
"Set<DependencyDescriptor> getDependencyDescriptors() {\n return dependencyDescriptors;\n }",
"public List<? extends Requirement> getRequirements();",
"@JsonGetter(\"dependents\")\n public List<Person> getDependents ( ) { \n return this.dependents;\n }",
"public Set<GHRepository> listDependents(GHRepository repo, String packageId, int minDependents) throws IOException {\n\t\treturn listDependents(repo, packageId, minDependents, true);\n\t}",
"List<String> apiVersions();",
"public static List<Module> getExtraDependencyModules() {\r\n\t\treturn Arrays.asList((Module)new TitanGraphModule());\r\n\t}",
"public Collection<String> getNamesOfPackagesInstalled() {\n\teval(\"cellfun(@(x) x.name, pkg('list'), 'UniformOutput', false);\");\n\treturn getStringCellFromAns();\n }",
"public List getRuntimeClasspath(IPath installPath, IPath configPath);",
"public Set<String> getPluginDependencyNames() { return pluginDependencyNames; }",
"private Collection getPackagesProvidedBy(BundlePackages bpkgs) {\n ArrayList res = new ArrayList();\n // NYI Improve the speed here!\n for (Iterator i = bpkgs.getExports(); i.hasNext();) {\n ExportPkg ep = (ExportPkg) i.next();\n if (ep.pkg.providers.contains(ep)) {\n res.add(ep);\n }\n }\n return res;\n }",
"Set<File> getModules();",
"boolean isBundleDependencies();",
"public static Set<String> getExternalDeps(Scope runtime, Scope compile) {\n return Sets.intersection(runtime.getExternalDeps(), compile.getExternalDeps());\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic List getDependents(PDGNode node);",
"public abstract List<AbstractRequirement> getRequirements();",
"private ArrayList<String> getPackagesFromFile() {\n\t\tArrayList<String> temp = new ArrayList<String>();\r\n\t\ttry {\r\n\t\t\tString path = Environment.getExternalStorageDirectory().getCanonicalPath() + \"/data/levelup/\";\r\n\r\n\r\n\t\t\t//view2_.setText(\"\");\r\n\t\t\tFile root = new File(path);\r\n\r\n\r\n\t\t\troot.mkdirs();\r\n\r\n\r\n\t\t\tFile f = new File(root, \"custom.txt\");\r\n\t\t\tif(!f.exists())\r\n\t\t\t{\r\n\t\t\t\t//view2_.setText(\"now I am here\");\r\n\t\t\t\tFileOutputStream fos = new FileOutputStream(f);\r\n\t\t\t\tfos.close();\r\n\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\tFileReader r = new FileReader(f);\r\n\t\t\tBufferedReader br = new BufferedReader(r);\r\n\r\n\r\n\r\n\t\t\t// Open the file that is the first\r\n\t\t\t// command line parameter\r\n\r\n\r\n\t\t\tString strLine;\r\n\t\t\t// Read File Line By Line\r\n\r\n\r\n\r\n\t\t\twhile ((strLine = br.readLine()) != null) {\r\n\t\t\t\t// Print the content on the console\r\n\t\t\t\t//String[] allWords;\r\n\t\t\t\tif(!strLine.equals(null)) temp.add(strLine);\r\n\t\t\t\tLog.i(\"packages from file\", strLine);\r\n\t\t\t}\r\n\r\n\t\t\tr.close();\r\n\r\n\r\n\t\t} catch (Exception e) {// Catch exception if any\r\n\t\t\t//System.err.println(\"Error: \" + e.getMessage());\r\n\t\t}\r\n\t\treturn temp;\r\n\t}",
"public Set<T> getDependencies(T node) {\n HashSet<T> result = new HashSet<>();\n\n LinkedList<T> pendingKeys = new LinkedList<>();\n pendingKeys.add(node);\n\n try {\n while (!pendingKeys.isEmpty()) {\n T path = pendingKeys.removeLast();\n\n if (result.add(path)) {\n getOrParseDependencies(path).forEach(pendingKeys::add);\n }\n }\n } catch (InterruptedException e) {\n // Restore interrupted state\n Thread.currentThread().interrupt();\n\n throw new RuntimeException(\n \"Interrupted while finding dependencies for \" + node, e);\n }\n\n return result;\n }",
"@Override\n\tpublic List<HeaderItem> getDependencies() {\n\t\tList<HeaderItem> dependencies = super.getDependencies();\n\t\tdependencies.add(CssHeaderItem.forReference(new FontAwesomeCssResourceReference()));\n\t\treturn dependencies;\n\t}",
"public List<Dependency> getDependencies(MavenSession session, MavenProject project)\n\t\t\tthrows MavenExecutionException {\n\t\tString productFilename = project.getArtifactId() + \".product\";\n\n\t\tFile productFile = new File(project.getBasedir(), productFilename);\n\t\tif (!productFile.exists()) {\n\t\t\tgetLogger().warn(\"product file not found at \" + productFile.getAbsolutePath());\n\t\t\treturn NO_DEPENDENCIES;\n\t\t}\n\n\t\tProductConfiguration product;\n\t\ttry {\n\t\t\tproduct = ProductConfiguration.read(productFile);\n\t\t} catch (Exception e) {\n\t\t\tString m = e.getMessage();\n\t\t\tif (null == m) {\n\t\t\t\tm = e.getClass().getName();\n\t\t\t}\n\t\t\tMavenExecutionException me = new MavenExecutionException(m, project\n\t\t\t\t\t.getFile());\n\t\t\tme.initCause(e);\n\t\t\tthrow me;\n\t\t}\n\n\t\tArrayList<Dependency> result = new ArrayList<Dependency>();\n\n\t\tresult.addAll(getPluginsDependencies(project, product.getPlugins(), session));\n\t\tresult.addAll(getFeaturesDependencies(project, product.getFeatures(), session));\n\n\t\treturn new ArrayList<Dependency>(result);\n\t}",
"public static String getDependencies( final Set inArtifacts )\n {\n\n if ( inArtifacts == null || inArtifacts.isEmpty() )\n {\n return \"\";\n }\n // Loop over all the artifacts and create a classpath string.\n Iterator iter = inArtifacts.iterator();\n\n StringBuffer buffer = new StringBuffer();\n if ( iter.hasNext() )\n {\n Artifact artifact = (Artifact) iter.next();\n buffer.append( artifact.getFile() );\n\n while ( iter.hasNext() )\n {\n artifact = (Artifact) iter.next();\n buffer.append( System.getProperty( \"path.separator\" ) );\n buffer.append( artifact.getFile() );\n }\n }\n\n return buffer.toString();\n }",
"private List<String> copyDependencies(File javaDirectory) throws MojoExecutionException {\n ArtifactRepositoryLayout layout = new DefaultRepositoryLayout();\n\n List<String> list = new ArrayList<String>();\n\n // First, copy the project's own artifact\n File artifactFile = project.getArtifact().getFile();\n list.add(layout.pathOf(project.getArtifact()));\n\n try {\n FileUtils.copyFile(artifactFile, new File(javaDirectory, layout.pathOf(project.getArtifact())));\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Could not copy artifact file \" + artifactFile + \" to \" + javaDirectory, ex);\n }\n\n if (excludeDependencies) {\n // skip adding dependencies from project.getArtifacts()\n return list;\n }\n\n for (Artifact artifact : project.getArtifacts()) {\n File file = artifact.getFile();\n File dest = new File(javaDirectory, layout.pathOf(artifact));\n\n getLog().debug(\"Adding \" + file);\n\n try {\n FileUtils.copyFile(file, dest);\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Error copying file \" + file + \" into \" + javaDirectory, ex);\n }\n\n list.add(layout.pathOf(artifact));\n }\n\n return list;\n }",
"public java.util.List<? extends com.expedia.www.packagefinder.database.exppackage.ExpPackageProtos.PackageOrBuilder> \n getFHPackagesOrBuilderList() {\n if (fHPackagesBuilder_ != null) {\n return fHPackagesBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(fHPackages_);\n }\n }",
"ImmutableList<ResourceRequirement> getRequirements();",
"Set<DependencyItem> getUnresolvedDependencies(ControllerState state);",
"public List<String> getServices() throws IOException;",
"@Override\n public Stream<BuildTarget> getRuntimeDeps(BuildRuleResolver buildRuleResolver) {\n return getDeclaredDeps().stream().map(BuildRule::getBuildTarget);\n }",
"java.util.List<java.lang.String>\n getClasspathList();",
"java.util.List<? extends com.google.cloud.functions.v2.SecretVolume.SecretVersionOrBuilder>\n getVersionsOrBuilderList();",
"@NotNull\n private static List<ClientLibrary> getClientLibraries(@org.jetbrains.annotations.Nullable final Resource resource,\n @NotNull final Map<String, ClientLibrary> allLibraries) {\n return Optional.ofNullable(resource)\n .map(Resource::getPath)\n .map(path -> allLibraries.entrySet().stream()\n .filter(entry -> entry.getKey().equals(path) || entry.getKey().startsWith(path + \"/\"))\n .map(Map.Entry::getValue)\n .collect(Collectors.toList()))\n .orElseGet(Collections::emptyList);\n }",
"protected static List<Package> convertFileItemsToPackages(String filePath) throws APIException {\n //read the file in the filepath into a Stream\n Path path = Paths.get(filePath);\n List<Package> listOfPackages = null;\n try {\n Stream<String> lines = Files.lines(path);\n // parse each line of the file into a Package object and filter out any null objects\n listOfPackages = lines.map(line -> parseLine(line))\n .filter(o -> o != null)\n .collect(Collectors.toList());\n lines.close();\n } catch (IOException ioe) {\n throw new APIException(\"Error reading the file.\");\n }\n return listOfPackages;\n }",
"public final HashSet<Drop> getDependents() {\r\n synchronized (f_seaLock) {\r\n return new HashSet<>(f_dependents);\r\n }\r\n }",
"@Override\n\tpublic Collection<Class<? extends IFloodlightService>> getModuleDependencies() {\n\t\tCollection<Class<? extends IFloodlightService>> l =\n\t\t new ArrayList<Class<? extends IFloodlightService>>();\n\t\t l.add(IFloodlightProviderService.class);\n\t\t l.add(IStaticEntryPusherService.class);\n\t\t return l;\n\t}",
"@Override\n\tpublic Collection<Class<? extends IFloodlightService>> getModuleDependencies() {\n\t\tCollection<Class<? extends IFloodlightService>> l =\n\t\t new ArrayList<Class<? extends IFloodlightService>>();\n\t\t l.add(IFloodlightProviderService.class);\n\t\t l.add(ITopologyService.class);\n\t\t return l;\n\t}",
"public String toString() {\n return \"Module Dependency : \" + getName() + \":\" + getVersion();\n }",
"public void getDependencies(ScopeInformation scopeInfo,\n\t\tDependencyManager fdm);",
"public java.util.List<DocumentRequires> getRequires() {\n if (requires == null) {\n requires = new com.amazonaws.internal.SdkInternalList<DocumentRequires>();\n }\n return requires;\n }",
"public final String getUseVersions() {\n return properties.get(USE_VERSIONS_PROPERTY);\n }",
"public Map<ClassName, List<ClassName>> dependenciesMap() { return m_dependenceisMap; }",
"public List<Artifact> getDependenciesFor( Artifact artifact ) throws MojoExecutionException\n {\n final List<Artifact> results = new ArrayList<Artifact>();\n\n final org.eclipse.aether.artifact.Artifact artifactToResolve =\n new DefaultArtifact(\n artifact.getGroupId(),\n artifact.getArtifactId(),\n artifact.getType(),\n artifact.getVersion()\n );\n\n final List<Dependency> transitiveDeps = getDependenciesFor( artifactToResolve );\n for ( Dependency dependency : transitiveDeps )\n {\n final Artifact artifactDep = new org.apache.maven.artifact.DefaultArtifact(\n dependency.getArtifact().getGroupId(),\n dependency.getArtifact().getArtifactId(),\n dependency.getArtifact().getVersion(),\n dependency.getScope(),\n dependency.getArtifact().getExtension(),\n dependency.getArtifact().getClassifier(),\n artifactHandler\n );\n results.add( artifactDep );\n }\n\n return results;\n }",
"public String[] getImports() {\n\t\treturn (this.Imports.length == 0)?this.Imports:this.Imports.clone();\n\t}",
"public static Set<String> findTranslatablePackagesInModule(final GeneratorContext context) {\n final Set<String> packages = new HashSet<String>();\n try {\n final StandardGeneratorContext stdContext = (StandardGeneratorContext) context;\n final Field field = StandardGeneratorContext.class.getDeclaredField(\"module\");\n field.setAccessible(true);\n final Object o = field.get(stdContext);\n\n final ModuleDef moduleDef = (ModuleDef) o;\n\n if (moduleDef == null) {\n return Collections.emptySet();\n }\n\n // moduleName looks like \"com.foo.xyz.MyModule\" and we just want the package part\n // for tests .JUnit is appended to the module name by GWT\n final String moduleName = moduleDef.getCanonicalName().replace(\".JUnit\", \"\");\n final int endIndex = moduleName.lastIndexOf('.');\n final String modulePackage = endIndex == -1 ? \"\" : moduleName.substring(0, endIndex);\n\n for (final String packageName : findTranslatablePackages(context)) {\n if (packageName != null && packageName.startsWith(modulePackage)) {\n packages.add(packageName);\n }\n }\n }\n catch (final NoSuchFieldException e) {\n logger.error(\"the version of GWT you are running does not appear to be compatible with this version of Errai\", e);\n throw new RuntimeException(\"could not access the module field in the GeneratorContext\");\n }\n catch (final Exception e) {\n throw new RuntimeException(\"could not determine module package\", e);\n }\n\n return packages;\n }",
"public java.util.List<com.expedia.www.packagefinder.database.exppackage.ExpPackageProtos.Package> getFHPackagesList() {\n if (fHPackagesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(fHPackages_);\n } else {\n return fHPackagesBuilder_.getMessageList();\n }\n }",
"List<ICMakeModule> getModules();",
"public Set<GHRepository> listDependents(GHRepository repo, int minDependents) throws IOException {\n\t\treturn listDependents(repo, minDependents, true);\n\t}",
"java.util.List<java.lang.String>\n getBootclasspathList();",
"@Input\n public List<String> getNativeLibrariesAndDexPackagingModeNames() {\n ImmutableList.Builder<String> listBuilder = ImmutableList.builder();\n getManifests()\n .get()\n .getAsFileTree()\n .getFiles()\n .forEach(\n manifest -> {\n if (manifest.isFile()\n && manifest.getName()\n .equals(SdkConstants.ANDROID_MANIFEST_XML)) {\n ManifestAttributeSupplier parser =\n new DefaultManifestParser(manifest, () -> true, true, null);\n String nativeLibsPackagingMode =\n PackagingUtils.getNativeLibrariesLibrariesPackagingMode(\n parser.getExtractNativeLibs())\n .toString();\n listBuilder.add(nativeLibsPackagingMode);\n String dexPackagingMode =\n PackagingUtils\n .getDexPackagingMode(\n parser.getUseEmbeddedDex(),\n getDexUseLegacyPackaging().get())\n .toString();\n listBuilder.add(dexPackagingMode);\n }\n });\n return listBuilder.build();\n }",
"public java.util.List<com.google.devtools.kythe.proto.Java.JarDetails.Jar> getJarList() {\n if (jarBuilder_ == null) {\n return java.util.Collections.unmodifiableList(jar_);\n } else {\n return jarBuilder_.getMessageList();\n }\n }",
"@Override\n public List<String> extractLibraryNameByUrl(String url) {\n List<String> javascriptLibaries = new ArrayList<>();\n\n try {\n Optional<Document> doc = parser.downloadPage(url);\n\n if (doc.isPresent()) {\n //Extract List of JavaScript Libraries used by the page\n javascriptLibaries = parser.parseDocument(String.valueOf(doc.get()))\n .select(\"script\")\n .stream()\n .map(element -> element.attr(\"src\"))\n .filter(src -> !StringUtil.isBlank(src) && src.endsWith(\".js\"))\n .map(r -> r.substring(r.lastIndexOf('/') + 1, r.length()))\n .collect(Collectors.toList());\n }\n\n } catch (Exception exception) {\n logger.error(\"Unable to Extract JavaScript Library Names\", exception);\n }\n\n return javascriptLibaries;\n }"
]
| [
"0.679978",
"0.6666655",
"0.6615784",
"0.65161794",
"0.63980734",
"0.6377451",
"0.634265",
"0.631317",
"0.6298529",
"0.6286119",
"0.6283997",
"0.6164717",
"0.5813515",
"0.5748534",
"0.5604072",
"0.5563777",
"0.5528235",
"0.5486065",
"0.54850745",
"0.5471276",
"0.5465283",
"0.5464322",
"0.5434656",
"0.53368217",
"0.53224546",
"0.5320238",
"0.53092057",
"0.5295984",
"0.5295034",
"0.5282748",
"0.5264873",
"0.52635515",
"0.5260726",
"0.5252074",
"0.5245289",
"0.52449995",
"0.52371854",
"0.5221161",
"0.5211753",
"0.51939124",
"0.51887864",
"0.51773137",
"0.51608294",
"0.5145785",
"0.51403356",
"0.5134836",
"0.51281315",
"0.5112136",
"0.5101977",
"0.5073251",
"0.50424635",
"0.5034578",
"0.5024731",
"0.50213945",
"0.5013593",
"0.5003302",
"0.49932498",
"0.49659473",
"0.49440876",
"0.4941572",
"0.4912531",
"0.48879158",
"0.4882891",
"0.48770067",
"0.48680687",
"0.486431",
"0.4863802",
"0.485983",
"0.48514342",
"0.48386395",
"0.4829896",
"0.482417",
"0.48200598",
"0.48132145",
"0.4811401",
"0.48107344",
"0.47998005",
"0.4794884",
"0.47864354",
"0.47863775",
"0.47783136",
"0.47579795",
"0.47558942",
"0.47543243",
"0.4751145",
"0.47470802",
"0.47448826",
"0.4739736",
"0.47373748",
"0.47369435",
"0.47348157",
"0.47325417",
"0.472363",
"0.47054043",
"0.47014135",
"0.4692636",
"0.46873882",
"0.46829695",
"0.4650445",
"0.4637887"
]
| 0.8195699 | 0 |
Get process response, by parsing input streams | private String getResponse(InputStream input) throws IOException {
try (BufferedReader buffer = new BufferedReader(new InputStreamReader(input))) {
return buffer.lines().collect(Collectors.joining("\n"));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void processStreamInput() {\n }",
"default Output processResponse(Input input, Output response) {\n process(input, response);\n return response;\n }",
"JsonNode readNextResponse() {\n try {\n String responseLine = this.stdout.readLine();\n if (responseLine == null) {\n throw new JsiiException(\"Child process exited unexpectedly!\");\n }\n final JsonNode response = JsiiObjectMapper.INSTANCE.readTree(responseLine);\n JsiiRuntime.notifyInspector(response, MessageInspector.MessageType.Response);\n return response;\n } catch (IOException e) {\n throw new JsiiException(\"Unable to read reply from jsii-runtime: \" + e.toString(), e);\n }\n }",
"public void readRequest()\n {\n t1.start();\n StringBuffer sb = new StringBuffer(BUFFER_SIZE);\n char c;\n int sequentialBreaks = 0;\n while (true)\n {\n try\n {\n if (in.available() > 0)\n {\n c = (char) in.read();\n\n //keep track of the number of \\r or \\n s read in a row.\n if (c != '\\n' && c != '\\r')\n sequentialBreaks = 0;\n else\n sequentialBreaks++;\n\n //If there is an error, or we read the \\r\\n\\r\\n EOF, break the read loop.\n //We don't want to read too far.\n if (c == -1 || sequentialBreaks == 4)\n break;\n else\n sb.append(c);\n }\n }\n catch (Exception e)\n {\n sendError();\n }\n }\n header += sb.toString().trim();\n Utilities.debugLine(\"WebServer.readRequest(): Header was \\n\" + header, DEBUG);\n\n Utilities.debugLine(\"WebServer read bytes completed in \" + t1.get(), running);\n lastTime = t1.get();\n\n parseHeader();\n\n Utilities.debugLine(\"WebServer parse header completed in \" + (t1.get() - lastTime), running);\n lastTime = t1.get();\n\n readContent();\n\n Utilities.debugLine(\"WebServer parseHeader completed in \" + (t1.get() - lastTime), running);\n lastTime = t1.get();\n\n process();\n\n Utilities.debugLine(\"WebServer processing and reply completed in \" + (t1.get() - lastTime), running);\n }",
"private static String receiveResponse() {\n String response = null;\n try {\n response = in.readLine();\n } catch (IOException e) {\n System.out.println(\"Error receiving response\");\n }\n\n return response;\n }",
"default void process(Input input, Output response) { }",
"public interface RequestProcessor {\n public String process(BufferedReader in);\n}",
"private static XdmValue decodeResponse(ReadablePipe port)\n throws SaxonApiException\n , ServlexException\n {\n List<XdmItem> result = new ArrayList<XdmItem>();\n port.canReadSequence(true);\n // if there are more than 1 docs, the first one must be web:response,\n // and the following ones are the bodies\n int count = port.documentCount();\n if ( count == 0 ) {\n LOG.debug(\"The pipeline returned no document on '\" + org.expath.servlex.processors.XProcProcessor.OUTPUT_PORT_NAME + \"'.\");\n // TODO: If there is no document on the port, we return an empty\n // sequence. We should probably throw an error instead...\n return XdmEmptySequence.getInstance();\n }\n else if ( count > 1 ) {\n LOG.debug(\"The pipeline returned \" + count + \" documents on '\" + org.expath.servlex.processors.XProcProcessor.OUTPUT_PORT_NAME + \"'.\");\n while ( port.moreDocuments() ) {\n XdmNode doc = port.read();\n addToList(result, doc);\n }\n }\n else {\n LOG.debug(\"The pipeline returned 1 document on '\" + org.expath.servlex.processors.XProcProcessor.OUTPUT_PORT_NAME + \"'.\");\n XdmNode response = port.read();\n if ( LOG.debug()) {\n LOG.debug(\"Content of the outpot port '\" + org.expath.servlex.processors.XProcProcessor.OUTPUT_PORT_NAME + \"': \" + response);\n }\n if ( response == null ) {\n // TODO: If there is no web:response, we return an empty sequence.\n // We should probably throw an error instead...\n return XdmEmptySequence.getInstance();\n }\n XdmNode wrapper_elem = getWrapperElem(response);\n // not a web:wrapper, so only one doc, so must be web:response\n if ( wrapper_elem == null ) {\n addToList(result, response);\n }\n // a web:wrapper, so unwrap the sequence\n else {\n XdmSequenceIterator it = wrapper_elem.axisIterator(Axis.CHILD);\n while ( it.hasNext() ) {\n // TODO: FIXME: For now, due to some strange behaviour in\n // Calabash, we ignore everything but elements (because it\n // exposes the indentation as text nodes, which is wrong...)\n XdmItem child = it.next();\n if ( child instanceof XdmNode && ((XdmNode) child).getNodeKind() == XdmNodeKind.ELEMENT ) {\n addToList(result, (XdmNode) child);\n }\n }\n }\n }\n return new XdmValue(result);\n }",
"private void processRequest() throws Exception {\n InputStream is = socket.getInputStream();\n DataOutputStream os = new DataOutputStream(socket.getOutputStream());\n\n // Set up input stream filters.\n BufferedReader br = new BufferedReader(new InputStreamReader(is));\n \n // Get the request line of the HTTP request message.\n String requestLine = br.readLine();\n\n // Display the request line.\n System.out.println();\n System.out.println(requestLine);\n \n // Get and display the header lines.\n String headerLine = null;\n while ((headerLine = br.readLine()).length() != 0) {\n System.out.println(headerLine);\n }\n \n // Close streams and socket.\n os.close();\n br.close();\n socket.close();\n }",
"private String parseAndRespond() {\n\t\tList<String> commands = new ArrayList<String>();\n\t\twhile (input.hasNext()) {\n\t\t\tString inputToken = input.next();\n\t\t\tcommands.add(inputToken);\n\t\t\tcommands.get(commands.size()-1).chars().forEach(p -> System.out.println(p));\n\t\t\t\n\t\t\t/* trap telnet control c */\n\t\t\tString telnetControlC = IntStream.of(65533,65533,65533,65533,6).collect(StringBuilder::new,\n\t\t\t\t\tStringBuilder::appendCodePoint, StringBuilder::append).toString();\n\t\t\tif (inputToken.contains(telnetControlC)) { \n\t\t\t\tSystem.out.println(\"Caught you CTRL+C evil!\");\n\t\t\t\treturn EXIT;\n\t\t\t}\n\t\t\tif (commands.get(commands.size()-1).equals(\".\")) {\n\t\t\t\tcommands.remove(commands.size()-1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tif (commands.get(commands.size()-1).equals(EXIT)) return EXIT;\n\t\t\t\n\t\t}\n\t\t\n\t\tString response = \"\";\n\t\t/* I'm not sure if I want to trap an error or let it percolate up yet */\n\t\t\n//\t\ttry {\n\t\t\tresponse = commandInterpreter.interpretCommands(commands);\n//\t\t} catch (IOException e) {\n//\t\t\tlogger.log(Level.WARNING, \"Error interpreting commands\", e);\n//\t\t\tresponse = \"Error occured!\";\n//\t\t}\n\t\toutput.format(\"%s\\n>\",response);\n\t\toutput.flush();\n\t\t\n\n\t\treturn \"\";\n\n\t}",
"public abstract Response read(Request request, Response response);",
"public void getResults()\n\t{\n\t\tThread mOutReader = new Thread()\n\t\t{\n\t\t\tpublic void run()\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(mProcess.getInputStream()));\n\t\t\t\t\tString line = br.readLine();\n\t\t\t\t\twhile ((!isInterrupted() && line != null))\n\t\t\t\t\t{\n\t\t\t\t\t\tline = line.trim();\n\t\t\t\t\t\tmResults.add(line);\n\t\t\t\t\t\tline = br.readLine();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (InterruptedIOException e)\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t\tcatch (Exception e)\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t//we will process the error stream just in case\n\t\tThread mErrReader = new Thread()\n\t\t{\n\t\t\tpublic void run()\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(mProcess.getErrorStream()));\n\t\t\t\t\tString line = br.readLine();\n\t\t\t\t\twhile ((!isInterrupted() && line != null))\n\t\t\t\t\t{\n\t\t\t\t\t\tline = line.trim();\n\t\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t\t\tline = br.readLine();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (InterruptedIOException e)\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t\tcatch (Exception e)\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tmOutReader.start();\n\t\tmErrReader.start();\n\n\t\t//wait for process to end.\n\t\ttry\n\t\t{\n\t\t\tmProcess.waitFor();\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.err.println(\"process exception\");\n\t\t}\n\t\tmFinished = true;\n\t}",
"public void parseResponse();",
"private String getResponseText(InputStream inStream) {\n return new Scanner(inStream).useDelimiter(\"\\\\A\").next();\n }",
"private String readResult() throws IOException {\n return reader.readLine();\n }",
"public String process(InputStream in, OutputStream out) throws IOException, TaskDfsException {\n\t\tString xmlResponse = null;\n\t\ttry {\n\t\t\t// Set socket timeout\n\t\t\ttry {\n\t\t\t\tsocket.setSoTimeout(TimeOut);\n\t\t\t} catch (SocketException ex) {\n\t\t\t\tlog.log(Level.SEVERE, \"Can't set SoTimeout for socket\");\n\t\t\t\tthrow new RuntimeException(ex);\n\t\t\t}\n\n\t\t\t// Read request from stream\n\t\t\tString req = new String(serverlibrary.headerprovider.Reader.read(in));\n\t\t\tlog.log(Level.INFO, \"Readed request '''\" + req + \"'''\");\n\n\t\t\tTask task = taskFactory.CreateTask(req);\n\t\t\tlog.info(task.toString());\n\t\t\txmlResponse = task.doTask(in, out);\n\n\n\t\t} catch (SocketException e) {\n\t\t\tlog.log(Level.WARNING, \"SocketException \" + e.getMessage());\n\t\t} catch (SocketTimeoutException e) {\n\t\t\tlog.log(Level.WARNING, \"SocketTimeoutException \" + e.getMessage());\n\t\t}\n\n\t\treturn xmlResponse;\n\t}",
"@Override\n public void run() {\n try {\n Request command = (Request) cmdInStream.readObject();\n while (!\"EXIT\".equalsIgnoreCase(command.getContent())) {\n log.info(String.format(\"Received command: %s\", command.getContent()));\n\n // Searching for appropriate handler for received request\n RequestHandler request = handlers.get(command.getContent());\n if (request != null) {\n // Processing request and writing response\n Response response = request.handle(command);\n cmdOutStream.writeObject(response);\n }\n else {\n cmdOutStream.writeObject(new Response(\"Incorrect request. Please try again.\"));\n }\n\n // Read next command\n command = (Request) cmdInStream.readObject();\n }\n\n cmdInStream.close();\n cmdOutStream.close();\n\n fileInStream.close();\n fileOutStream.close();\n\n cmdSocket.close();\n fileSocket.close();\n }\n catch (ClassNotFoundException ex) {\n log.error(\"Class can't be found! \" + ex.getMessage());\n }\n catch (IOException ex) {\n log.error(ex.getMessage());\n }\n }",
"protected abstract void parseExecResult(BufferedReader lines) throws IOException;",
"public static void readStreamOfProcess(final Process pr){\n\t\t readStreamInThread(pr.getInputStream(),false, pr);\n\t\t readStreamInThread(pr.getErrorStream(),true, pr);\n\t }",
"static void readRequest(InputStream is) throws IOException {\n out.println(\"starting readRequest\");\n byte[] buf = new byte[1024];\n String s = \"\";\n while (true) {\n int n = is.read(buf);\n if (n <= 0)\n throw new IOException(\"Error\");\n s = s + new String(buf, 0, n);\n if (s.indexOf(\"\\r\\n\\r\\n\") != -1)\n break;\n }\n out.println(\"returning from readRequest\");\n }",
"private static List<String> readOutput(Process process) throws IOException {\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));\n\t\tString line;\n\t\tList<String> lines = new ArrayList<>();\n\t\twhile ((line = reader.readLine()) != null) {\n\t\t\tlines.add(line);\n\t\t}\n\t\treturn lines;\n\t}",
"JsonNode requestResponse(final JsonNode request) {\n try {\n JsiiRuntime.notifyInspector(request, MessageInspector.MessageType.Request);\n\n // write request\n String str = request.toString();\n this.stdin.write(str + \"\\n\");\n this.stdin.flush();\n\n // read response\n JsonNode resp = readNextResponse();\n\n // throw if this is an error response\n if (resp.has(\"error\")) {\n return processErrorResponse(resp);\n }\n\n // process synchronous callbacks (which 'interrupt' the response flow).\n if (resp.has(\"callback\")) {\n return processCallbackResponse(resp);\n }\n\n // null \"ok\" means undefined result (or void).\n return resp.get(\"ok\");\n\n } catch (IOException e) {\n throw new JsiiException(\"Unable to send request to jsii-runtime: \" + e.toString(), e);\n }\n }",
"public pam_response(Pointer src) {\n useMemory(src);\n read();\n }",
"private synchronized void startProcessing() throws IOException {\n\n if (privateInput == null) {\n privateInput = new PrivateInputStream(this);\n }\n boolean more = true;\n\n if (isGet) {\n if (!isDone) {\n replyHeaders.responseCode = OBEXConstants.OBEX_HTTP_CONTINUE;\n while ((more) && (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE)) {\n more = sendRequest(0x03);\n }\n\n if (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE) {\n parent.sendRequest(0x83, null, replyHeaders, privateInput);\n }\n if (replyHeaders.responseCode != OBEXConstants.OBEX_HTTP_CONTINUE) {\n isDone = true;\n }\n }\n } else {\n\n if (!isDone) {\n replyHeaders.responseCode = OBEXConstants.OBEX_HTTP_CONTINUE;\n while ((more) && (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE)) {\n more = sendRequest(0x02);\n\n }\n }\n\n if (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE) {\n parent.sendRequest(0x82, null, replyHeaders, privateInput);\n }\n\n if (replyHeaders.responseCode != OBEXConstants.OBEX_HTTP_CONTINUE) {\n isDone = true;\n }\n }\n }",
"private static StringBuilder receiveInputStream(InputStream input) throws IOException{\r\n\t\tStringBuilder response = new StringBuilder();\r\n\t\tint i;\r\n\t\twhile((i = input.read())!= -1){//stock the inputstream\r\n\t\t\tresponse.append((char)i); \r\n\t\t}\r\n\t\treturn response;\r\n\t}",
"public String parserResultFromContent(InputStream is) throws IOException {\n String result = \"\";\n BufferedReader reader = new BufferedReader(\n new InputStreamReader(is, Constants.CHARSET_NAME_UTF8));\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n result += line;\n }\n is.close();\n return result;\n }",
"SAPL parse(InputStream saplInputStream);",
"@Override\n synchronized public void run() {\n try {\n BufferedReader bufferedReader = new BufferedReader(\n new InputStreamReader(inputStream, Charset.defaultCharset())\n );\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n this.result.add(line);\n }\n } catch (IOException ex) {\n log.error(\"Failed to consume and display the input stream of type \" + streamType + \".\", ex);\n } finally {\n this.isStopped = true;\n notify();\n }\n }",
"private boolean readResponse() throws IOException {\n replyHeaders.responseCode = socketInput.read();\n int packetLength = socketInput.read();\n packetLength = (packetLength << 8) + socketInput.read();\n\n if (packetLength > OBEXConstants.MAX_PACKET_SIZE_INT) {\n if (exceptionMessage != null) {\n abort();\n }\n throw new IOException(\"Received a packet that was too big\");\n }\n\n if (packetLength > BASE_PACKET_LENGTH) {\n int dataLength = packetLength - BASE_PACKET_LENGTH;\n byte[] data = new byte[dataLength];\n int readLength = socketInput.read(data);\n if (readLength != dataLength) {\n throw new IOException(\"Received a packet without data as decalred length\");\n }\n byte[] body = OBEXHelper.updateHeaderSet(replyHeaders, data);\n\n if (body != null) {\n privateInput.writeBytes(body, 1);\n\n /*\n * Determine if a body (0x48) header or an end of body (0x49)\n * was received. If we received an end of body and\n * a response code of OBEX_HTTP_OK, then the operation should\n * end.\n */\n if ((body[0] == 0x49) && (replyHeaders.responseCode == ResponseCodes.OBEX_HTTP_OK)) {\n return false;\n }\n }\n }\n\n if (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE) {\n return true;\n } else {\n return false;\n }\n }",
"@Override\n protected Object readResponse(XmlRpcStreamRequestConfig pConfig, InputStream pStream) throws XmlRpcException {\n final StringBuffer sb = new StringBuffer();\n\n try {\n final BufferedReader reader = new BufferedReader(new InputStreamReader(pStream));\n String line = reader.readLine();\n while (line != null) {\n sb.append(line);\n line = reader.readLine();\n }\n }\n catch (final IOException e) {\n LOG.error(\"Fail to dump\", e);\n }\n\n LOG.debug(\"Receive response=\\n{}\", XmlPrettyFormatter.toPrettyString(sb.toString()));\n\n final ByteArrayInputStream bais = new ByteArrayInputStream(sb.toString().getBytes());\n return super.readResponse(pConfig, bais);\n }",
"@Test\n\tpublic void testDecodeFromStreamWithPauseInStatusLine() throws Exception {\n\n\t\tByteArrayOutputStream bos = new ByteArrayOutputStream();\n\t\tString msg = \"POST /AppName HTTP/1.1\\r\\n\" + \"Content-Type: application/hl7-v2; charset=ISO-8859-2\\r\\n\" + \"Content-Length: \" + ourSampleMessage.getBytes(StandardCharsets.ISO_8859_1).length + \"\\r\\n\" + \"Authorization: Basic aGVsbG86d29ybGQ=\\r\\n\" + \"\\r\\n\";\n\t\tbos.write(msg.getBytes(StandardCharsets.ISO_8859_1));\n\t\tbos.write(ourSampleMessage.getBytes(\"ISO-8859-2\"));\n\t\tAbstractHl7OverHttpDecoder d = new Hl7OverHttpRequestDecoder();\n\n\t\tByteArrayInputStream bais = new ByteArrayInputStream(bos.toByteArray());\n\t\tSplitInputStream is = new SplitInputStream(bais, 5);\n\n\t\td.readHeadersAndContentsFromInputStreamAndDecode(is);\n\n\t\tassertEquals(0, bais.available());\n\t\tassertTrue(d.getConformanceProblems().toString(), d.getConformanceProblems().isEmpty());\n\t\tassertEquals(Charset.forName(\"ISO-8859-2\"), d.getCharset());\n\t\tassertTrue(d.isCharsetExplicitlySet());\n\t\tassertEquals(\"application/hl7-v2\", d.getContentType());\n\t\tassertEquals(ourSampleMessage, d.getMessage());\n\t\tassertEquals(\"hello\", d.getUsername());\n\t\tassertEquals(\"world\", d.getPassword());\n\t\tassertEquals(\"/AppName\", d.getPath());\n\n\t}",
"public void run() {\n\t\t\n\t\ttry {\n\t\tString reqS = \"\";\n\t\t\n\t\twhile(br.ready() || reqS.length() == 0) //reading the request from the client.\n\t\t\treqS += (char) br.read();\n\t\t\n\t\tSystem.out.println(reqS); //to see what the request message looks like (testing if the input is read in correctly)\n\t\trequest req = new request(reqS);\n\t\t\n\t\tresponse res = new response(req);\n\t\t\n\t\tpw.write(res.response.toCharArray());\n\t\t\n\t\tpw.close();\n\t\tbr.close();\n\t\ts.close();\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t} \n\t\t\n\t}",
"private int readStream(final DataInputStream dis)\n\t\tthrows IOException {\n\t\tif(dis.readInt() > MAX_PROTOCOL_VERSION) {\n\t\t\treturn E_UNSUPPORTED_PROTOCOL_VERSION;\n\t\t}\n\n\t\tint length = dis.readInt();\n\t\tLog.i(\"PhoneLink\", \"Received a \"+length+\" byte parcel\");\n\t\tbyte[] data = new byte[length];\n\t\tint position = 0;\n\t\tdo {\n\t\t\tposition += dis.read(data, position, length-position);\n\t\t} while(position < length);\n\n\t\tParcel parcel = Parcel.obtain();\n\t\tparcel.unmarshall(data, 0, length);\n\t\tparcel.setDataPosition(0);\n\t\tIntent newIntent = (Intent) parcel.readValue(Intent.class.getClassLoader());\n\t\tmIntentHandler.processIntent(newIntent);\n\t\treturn OK;\n\t}",
"@Override\n\tpublic T handleResponse(HttpResponse arg0) throws ClientProtocolException,\n\t\t\tIOException {\n\t\treturn (this.parser != null && this.processor != null) ? this.processor\n\t\t\t\t.process(this.parser.parse(arg0)) : null;\n\t}",
"protected String getResponse(String input) {\n boolean isTerminated;\n String result;\n input = input.trim();\n try {\n Command c = Parser.parse(input);\n result = c.execute(tasklist, ui, storage);\n isTerminated = c.isTerminated();\n } catch (Exception e) {\n return e.toString();\n }\n if (isTerminated) {\n return ui.sendBye();\n }\n return result;\n }",
"public void readResponse()\n\t{\n\t\tDataObject rec = null;\n\t\tsynchronized(receive)\n\t\t{\n\t\t\trec = receive.get();\n\t\t}\n\t\tAssertArgument.assertNotNull(rec, \"Received packet\");\n\t\tpublishResponse(rec);\n\t}",
"public void processReq(){\n //Using auto cloable for reader ;)\n try( BufferedReader reader = new BufferedReader(new InputStreamReader(clientSock.getInputStream()))){\n String mess = reader.readLine();\n String returnMess = getData(mess);\n\n PrintWriter writer = new PrintWriter(clientSock.getOutputStream());\n writer.println(returnMess);\n writer.flush();\n\n //Close sockets\n clientSock.close();\n sock.close();\n } catch (IOException e) {\n System.err.println(\"ERROR: Problem while opening / close a stream\");\n }\n }",
"public abstract int process(Buffer input, Buffer output);",
"private void consumeInputWire(final NHttpClientEventHandler handler) {\n if (getContext() == null) {\n return;\n }\n SynapseWireLogHolder logHolder = null;\n if (getContext().getAttribute(SynapseDebugInfoHolder.SYNAPSE_WIRE_LOG_HOLDER_PROPERTY) != null) {\n logHolder = (SynapseWireLogHolder) getContext().getAttribute(SynapseDebugInfoHolder.SYNAPSE_WIRE_LOG_HOLDER_PROPERTY);\n } else {\n logHolder = new SynapseWireLogHolder();\n }\n synchronized (logHolder) {\n logHolder.setPhase(SynapseWireLogHolder.PHASE.TARGET_RESPONSE_READY);\n getContext().setAttribute(SynapseDebugInfoHolder.SYNAPSE_WIRE_LOG_HOLDER_PROPERTY, logHolder);\n if (this.status != ACTIVE) {\n this.session.clearEvent(EventMask.READ);\n return;\n }\n try {\n if (this.response == null) {\n int bytesRead;\n do {\n bytesRead = this.responseParser.fillBuffer(this.session.channel());\n if (bytesRead > 0) {\n this.inTransportMetrics.incrementBytesTransferred(bytesRead);\n }\n this.response = this.responseParser.parse();\n } while (bytesRead > 0 && this.response == null);\n if (this.response != null) {\n if (this.response.getStatusLine().getStatusCode() >= 200) {\n final HttpEntity entity = prepareDecoder(this.response);\n this.response.setEntity(entity);\n this.connMetrics.incrementResponseCount();\n }\n this.hasBufferedInput = this.inbuf.hasData();\n onResponseReceived(this.response);\n handler.responseReceived(this);\n if (this.contentDecoder == null) {\n resetInput();\n }\n }\n if (bytesRead == -1 && !this.inbuf.hasData()) {\n handler.endOfInput(this);\n }\n }\n if (this.contentDecoder != null && (this.session.getEventMask() & SelectionKey.OP_READ) > 0) {\n handler.inputReady(this, this.contentDecoder);\n if (this.contentDecoder.isCompleted()) {\n //This is the place where it finishes the response read from back-ends\n if (getContext().getAttribute(SynapseDebugInfoHolder.SYNAPSE_WIRE_LOG_HOLDER_PROPERTY) != null) {\n logHolder = (SynapseWireLogHolder) getContext().getAttribute(SynapseDebugInfoHolder.SYNAPSE_WIRE_LOG_HOLDER_PROPERTY);\n logHolder.setPhase(SynapseWireLogHolder.PHASE.TARGET_RESPONSE_DONE);\n getContext().setAttribute(SynapseDebugInfoHolder.SYNAPSE_WIRE_LOG_HOLDER_PROPERTY, logHolder);\n }\n // Response entity received\n // Ready to receive a new response\n resetInput();\n }\n }\n } catch (final HttpException ex) {\n resetInput();\n handler.exception(this, ex);\n } catch (final Exception ex) {\n handler.exception(this, ex);\n } finally {\n if (getContext().getAttribute(SynapseDebugInfoHolder.SYNAPSE_WIRE_LOG_HOLDER_PROPERTY) != null) {\n logHolder = (SynapseWireLogHolder) getContext().getAttribute(SynapseDebugInfoHolder.SYNAPSE_WIRE_LOG_HOLDER_PROPERTY);\n logHolder.setPhase(SynapseWireLogHolder.PHASE.TARGET_RESPONSE_DONE);\n getContext().setAttribute(SynapseDebugInfoHolder.SYNAPSE_WIRE_LOG_HOLDER_PROPERTY, logHolder);\n }\n // Finally set buffered input flag\n this.hasBufferedInput = this.inbuf.hasData();\n }\n }\n }",
"public int demuxInput(byte[] buffer, int offset, int length)\n throws IOException {\n Task task = getThreadTask(Thread.currentThread());\n if (task == null) {\n return defaultInput(buffer, offset, length);\n } else {\n return task.handleInput(buffer, offset, length);\n }\n }",
"private void standByForMessages() throws IOException {\n if (reader.readLine() != null) {\n try {\n JSONObject j = (JSONObject) jps.parse(reader.readLine());\n sequence = Integer.valueOf(j.get(\"sequence\").toString());\n String cmd = (String) j.get(\"command\");\n JSONArray parameter = (JSONArray) j.get(\"parameter\");\n cmdHandler(parameter, cmd);\n } catch (ParseException ex) {\n }\n }\n }",
"private void processIn() {\n if (state != State.ESTABLISHED) {\n bbin.flip();\n if (bbin.get() != 10) {\n silentlyClose();\n return;\n } else {\n state = State.ESTABLISHED;\n }\n bbin.compact();\n } else {\n switch (intReader.process(bbin)) {\n case ERROR:\n return;\n case REFILL:\n return;\n case DONE:\n var size = intReader.get();\n bbin.flip();\n var bb = ByteBuffer.allocate(size);\n for (var i = 0; i < size; i++) {\n bb.put(bbin.get());\n }\n System.out.println(UTF.decode(bb.flip()).toString());\n bbin.compact();\n intReader.reset();\n break;\n }\n }\n }",
"private void processInput() {\r\n\t\ttry {\r\n\t\t\thandleInput(readLine());\r\n\t\t} catch (WrongFormatException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@Override\n\t\tprotected ProcessManager service(ProcessAwareServerHttpConnectionManagedObject<ByteBuffer> connection)\n\t\t\t\tthrows IOException {\n\n\t\t\t// Configure process awareness\n\t\t\tconnection.setProcessAwareContext(processAwareContext);\n\n\t\t\t// Service the connection\n\t\t\tHttpRequest request = connection.getRequest();\n\t\t\tHttpResponse response = connection.getResponse();\n\n\t\t\t// Provider Server and Date\n\t\t\tHttpResponseHeaders headers = response.getHeaders();\n\t\t\theaders.addHeader(NAME_SERVER, VALUE_SERVER);\n\t\t\theaders.addHeader(NAME_DATE, this.dateHttpHeader);\n\n\t\t\t// Determine request\n\t\t\tString requestUri = request.getUri();\n\t\t\tswitch (requestUri) {\n\n\t\t\tcase \"/plaintext\":\n\t\t\t\tresponse.setContentType(TEXT_PLAIN, null);\n\t\t\t\tresponse.getEntity().write(HELLO_WORLD);\n\t\t\t\tthis.send(connection);\n\t\t\t\tbreak;\n\n\t\t\tcase \"/json\":\n\t\t\t\tresponse.setContentType(APPLICATION_JSON, null);\n\t\t\t\tthis.objectMapper.writeValue(response.getEntityWriter(), new Message(\"Hello, World!\"));\n\t\t\t\tthis.send(connection);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t// Unknown request\n\t\t\t\tresponse.setStatus(HttpStatus.NOT_FOUND);\n\t\t\t\tthis.send(connection);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// No process management\n\t\t\treturn null;\n\t\t}",
"public void read() {\n try {\n pw = new PrintWriter(System.out, true);\n br = new BufferedReader(new InputStreamReader(System.in));\n input = br.readLine();\n while (input != null) {\n CM.processCommand(input, pw, true);\n input = br.readLine();\n }\n } catch (IOException ioe) {\n pw.println(\"ERROR: Problem with reading user input.\");\n } finally {\n try {\n br.close();\n } catch (IOException ioe) {\n pw.println(\"ERROR: Buffer DNE\");\n }\n }\n }",
"public static String readIt(InputStream is) throws IOException {\n BufferedReader reader = null;\n reader = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));\n StringBuilder responseStrBuilder = new StringBuilder();\n String inputStr;\n while ((inputStr = reader.readLine()) != null) {\n responseStrBuilder.append(inputStr);\n }\n return responseStrBuilder.toString();\n }",
"public void processResponse(String requestType) throws IOException {\n\t\tint last = 0, c = 0;\n\t\t/**\n\t\t * Process the header and add it to the header StringBuffer.\n\t\t */\n\n\t\tboolean inHeader = true; // loop control\n\t\twhile (inHeader && ((c = istream.read()) != -1)) {\n\t\t\tswitch (c) {\n\t\t\tcase '\\r':\n\t\t\t\tbreak;\n\t\t\tcase '\\n':\n\t\t\t\tif (c == last) {\n\t\t\t\t\tinHeader = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tlast = c;\n\t\t\t\theader.append(\"\\r\\n\");\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlast = c;\n\t\t\t\theader.append((char) c);\n\t\t\t}\n\t\t}\n\t\theader.append(CRLF);\n\t\tif (requestType.equals(\"GET\")) {\n\t\t\t/**\n\t\t\t * Read the contents and add it to the response StringBuffer.\n\t\t\t */\n\t\t\tString[] tokens = getHeader().split(\"\\\\s+\");\n\t\t\tstatusCode = tokens[1];\n\t\t\tint fileLength = 0;\n\t\t\tfor (int i = 0; i < tokens.length; i++) {\n\t\t\t\tif (tokens[i].equals(\"Content-Length:\")) {\n\t\t\t\t\tfileLength = Integer.parseInt(tokens[i + 1]);\n\t\t\t\t\t// Get the length of file\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcontent = new StringBuilder(fileLength + 1);\n\t\t\tint revBytes = 0;\n\t\t\tint len = 0;\n\t\t\tbyte[] buffer = new byte[BUFFER_SIZE];\n\t\t\twhile ((len = istream.read(buffer, 0, BUFFER_SIZE)) > 0) {\n\t\t\t\t// Get the data of the specified length from server\n\t\t\t\trevBytes += len;\n\t\t\t\tcontent.append(new String(buffer, 0, len, ENCODING));\n\t\t\t\tif (revBytes >= fileLength) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t}",
"private void processInputData() throws IOException {\n\t\tout.write(Protocol.PC_READY.value);\n\t\tout.flush();\n\t\tInputBuffer buffer = InputBuffer.readFrom(in);\n\t\tdispatcher.dispatch(buffer.entries);\n\t}",
"private String readFromClient() throws IOException {\n final String request = inFromClient.readLine();\n return request;\n }",
"private void waitForResponse(InputStream mmInputStream, long timeout) throws IOException {\n int bytesAvailable;\n\n while (true) {\n bytesAvailable = mmInputStream.available();\n if (bytesAvailable > 0) {\n byte[] packetBytes = new byte[bytesAvailable];\n byte[] readBuffer = new byte[1024];\n mmInputStream.read(packetBytes);\n\n for (int i = 0; i < bytesAvailable; i++) {\n byte b = packetBytes[i];\n\n if (b == delimiter) {\n byte[] encodedBytes = new byte[readBufferPosition];\n System.arraycopy(readBuffer, 0, encodedBytes, 0, encodedBytes.length);\n final String data = new String(encodedBytes, \"US-ASCII\");\n\n writeOutput(\"Received:\" + data);\n\n return;\n } else {\n readBuffer[readBufferPosition++] = b;\n }\n }\n }\n }\n }",
"public int readResponse(){\n\t\t\t\t\tint ans1 = resp.nextInt();\n\t\t\t\t\treturn ans1;\n\t\t\t\t}",
"private String readProcess (final Process p) {\n \tString message=null;\n \tfinal BufferedReader in =new BufferedReader ( new InputStreamReader(p.getErrorStream()));\n \tString line;\n \ttry {\n\t\t\twhile((line = in.readLine()) != null)\n\t\t\t{\n\t\t\t\tmessage =line;\n\t\t\t\tif((line = in.readLine()) != null && line.startsWith(\"\\tat\"))\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\t\n\t\t\t\tmessage =message.substring(message.indexOf(':')+2);\n\t\t\t\t\n\t\t} catch (IOException e) {\n\t\t\tlogfile.severe(e.getMessage());\n\t\t}\n\t\treturn message;\n }",
"private void readHTTPRequest(InputStream is) {\n BufferedReader requestReader = null;\n \n while (true) {\n try {\n requestReader = new BufferedReader(new InputStreamReader(is));\n \n while (!requestReader.ready()) Thread.sleep(1);\n String line = requestReader.readLine();\n System.err.println(\"Request line: (\"+line+\")\");\n \n \n/* Get the complete path from the root directory to the file\n* If no file requested: display default content\n*/\n String rootPath = toCompletePath(line);\n if(noFileRequested) {\n HTMLcontent = \"<html><h1>Welcome to \" + serverName + \"</h1><body>\\n\" +\n \"<p>You may request a file in the URL path.</p>\\n\" +\n \"</body></html>\\n\";\n break;\n }//end\n \n /* Check if file exists\n * If not: change the status and exit\n * If so: read the contents of the file\n */\n File fileRequested = new File(rootPath);\n if(!fileRequested.exists()) {\nstreamStatus = \"HTTP/1.1 404 NOT FOUND\\n\";\nHTMLcontent = \"<html><h1>404 Error.</h1><body>\\n\" +\n \"<p>Page not found.</p>\\n\" +\n \"</body></html>\\n\";\n break;\n }\n else {\n HTMLcontent = readFile(rootPath);\n break;\n }//end\n \n \n } catch (Exception e) {\n System.err.println(\"Request error: \" + e);\n break;\n //close BufferedReader if initialized\n }//end catch\n \n }//end while loop\n}",
"private String collectResultFromProcess(Process proc) {\n StringBuilder sb_result = new StringBuilder();\n\n BufferedReader stdInput = new BufferedReader(new InputStreamReader(proc.getInputStream()));\n BufferedReader stdError = new BufferedReader(new InputStreamReader(proc.getErrorStream()));\n String result_line = null;\n\n try {\n while ((result_line = stdInput.readLine()) != null) {\n sb_result.append(result_line);\n sb_result.append(\"\\n\");\n }\n\n while ((result_line = stdError.readLine()) != null) {\n sb_result.append(result_line);\n sb_result.append(\"\\n\");\n }\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n\n return sb_result.toString();\n }",
"private String getResponse(String input) {\n try {\n CommandResult result = logicManager.execute(input);\n if (result.isExit()) {\n handleExit();\n }\n return result.getFeedbackToUser();\n } catch (CommandException | ParserException e) {\n return e.getMessage();\n }\n }",
"public void parse()\n\t{\n\t\ttry\n\t\t{\n\t\t\tstatus = program();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\t\n\t\t}\n\t}",
"public interface IStreamProcessor {\r\n\r\n\t/**\r\n\t * \r\n\t * @return the mime type the stream processor can detect\r\n\t */\r\n\tString getMimeType();\r\n\t\r\n\t/**\r\n\t * This method is used to detect for an array of bytes if this stream processor can handle that data \r\n\t * \r\n\t * @param buffer the input data\r\n\t * @return true if the buffer contains data this stream processor is able to process \r\n\t * @throws NMEAProcessingException\r\n\t */\r\n\tboolean isValidStreamProcessor(int[] buffer) throws RawDataEventException;\r\n\t\r\n\t/**\r\n\t * reads a single byte from an underlying stream or source\r\n\t * \r\n\t * @param c\r\n\t * @param streamProvider\r\n\t * @return false if processing should stop due user termination\r\n\t * @throws NMEAProcessingException\r\n\t */\r\n\tboolean readByte(int c, String streamProvider) throws RawDataEventException ;\r\n\t\r\n\t/**\r\n\t * actively closes the stream\r\n\t * @throws IOException\r\n\t */\r\n\tvoid close() throws IOException;\r\n\r\n\t/**\r\n\t * This may be used to aid misinterpretations in stream processor detection\r\n\t * \r\n\t * @return if the stream processor accepts binary data or ascii data.\r\n\t */\r\n\tboolean isBinary();\r\n}",
"private void\n\tprocess(\n\t\tBufferedReader\t\t\tbrowserIn,\t\t// input from browser\n\t\tOutputStream\t\t\tbrowserStream)\t// output to browser\n\t\tthrows\t\t\t\t\tIOException\n\t{\n\t\tint\t\t\t\t\t\tcontentLength = 0;\n\t\tString\t\t\t\t\tline;\n\t\tString\t\t\t\t\tpath = null;\n\t\tboolean\t\t\t\t\tget = false;\n\t\tboolean\t\t\t\t\tpost = false;\n\t\tString[]\t\t\t\ttokens;\n\t\tString[]\t\t\t\tqueries;\n\t\tPrintWriter\t\t\t\tbrowserOut = getStreamWriter(browserStream);\n\t\tHashMap<String, String>\tparams = new HashMap<String, String>();\n\n\t\t// read request, a line at a time\n\n\t\twhile ((line = browserIn.readLine()) != null) {\n\t\t\tif (line.length() == 0) {\n\t\t\t\t// blank line, end of HTTP request\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// split line into tokens separated by spaces\n\n\t\t\ttokens = line.split(\" \");\n\n\t\t\t// when we find the GET line, keep arguments and print out\n\n\t\t\tif (tokens[0].equals(\"GET\")) {\n\t\t\t\tpath = tokens[1];\n\t\t\t\tget = true;\n\n\t\t\t\tif (debug) {\n\t\t\t\t\tSystem.err.println(line);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// when we find a POST line, print it out too\n\n\t\t\tif (tokens[0].equals(\"POST\")) {\n\t\t\t\tpath = tokens[1];\n\t\t\t\tpost = true;\n\n\t\t\t\tif (debug) {\n\t\t\t\t\tSystem.err.println(line);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (tokens[0].equals(\"Content-Length:\")) {\n\t\t\t\tcontentLength = Integer.parseInt(tokens[1]);\n\t\t\t}\n\t\t}\n\n\t\tif (!(get || post)) {\n\t\t\tSystem.err.println(\"no GET or POST line found\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (debug) {\n\t\t\tSystem.err.println(\"path: \" + path);\n\t\t}\n\n\t\tif (get) {\n\t\t\tqueries = path.split(\"\\\\?\");\n\n\t\t\tif (queries.length == 2) {\n\t\t\t\tgetParams(params, queries[1]);\n\t\t\t}\n\t\t} else {\n\t\t\tint\t\t\t\tch;\n\t\t\tStringBuilder\tcontent = (contentLength == 0) ?\n\t\t\t\t\t\t\t\tnew StringBuilder() :\n\t\t\t\t\t\t\t\tnew StringBuilder(contentLength);\n\n\t\t\twhile ((ch = browserIn.read()) != -1) {\n\t\t\t\tcontent.append((char) ch);\n\t\t\t}\n\n\t\t\tgetParams(params, content.toString());\n\t\t}\n\t\t\n\t\tString\tuser = params.get(\"user\");\n\n\t\tif (user == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (debug) {\n\t\t\tSystem.err.println(\"getting role for \" + user);\n\t\t}\n\n\t\tString\troleString = roleMap.get(user);\n\n\t\ttry {\n\t\t\tbyte[]\troleBytes = roleString.getBytes(encoding);\n\n\t\t\tbrowserOut.println(\"HTTP/1.1 200 OK\");\n\t\t\tbrowserOut.println(\"Content-Type: application/json; charset=utf-8\");\n\t\t\tbrowserOut.println(\"Content-Length: \" + roleBytes.length);\n\t\t\tbrowserOut.println(\"Server: roleservice/J\");\n\t\t\t// browserOut.println(\"Date: Mon, 04 Feb 2013 22:06:54 GMT\");\n\n\t\t\tbrowserOut.println();\n\n\t\t\tbrowserStream.write(roleBytes, 0, roleBytes.length);\n\t\t} catch (UnsupportedEncodingException ex) {\n\t\t\tSystem.err.println(\"can't encode roles as \" + encoding);\n\t\t\tbrowserOut.println(\"HTTP/1.1 500 can't encode roles\");\n\t\t\treturn;\n\t\t}\n\t}",
"public void Parse() \n\tthrows BadRequestException, LengthRequestException {\n\n\t// Reading the first word of the request\n\tStringBuilder command = new StringBuilder();\n\tint c = 0;\n\ttry {\n\t while((c = userInput.read()) != -1) {\n\t\tif ((char)c == ' ')\n\t\t break;\n\t\tcommand.append((char)c);\n\t }\n\t} catch (IOException e) {\n\t System.err.println(\"[\"+new Date()+\"] ERROR : Error while reading the input stream of the client socket :\" + e.getMessage());\n\t}\t\n\n\t// Read the file key\n\tStringBuilder key = new StringBuilder();\n\ttry {\n\t while((c = userInput.read()) != -1) {\n\t\tif ((char)c == ' ')\n\t\t break;\n\t\tkey.append((char)c);\n\t }\n\t} catch (IOException e) {\n\t System.err.println(\"[\"+new Date()+\"] ERROR : Error while reading the input stream of the client socket :\" + e.getMessage());\n\t}\n\n\t// Bad key\n\tif(key.toString().length() != 32){\n\t throw new BadRequestException(\"Wrong key length\");\n\t}\n\tthis.key = key.toString();\n\n\t// Search the file in the files in shared\n\tIterator<CookieFile> it = files.iterator();\n\twhile (it.hasNext()) { \n\t CookieFile f = it.next();\n\n\t if (f.getKey().equals(this.key)) {\n\t\tf.toString();\n\t\tthis.file = f;\n\t\tbreak;\n\t }\n\t}\n\n\t// check the first \"[\"\n\ttry {\n\t c = userInput.read();\n\t if( (char)c != '[')\n\t\tthrow new BadRequestException(\"Parser unable to understand this request\");\n\t} catch (IOException e) {\n\t System.err.println(\"[\"+new Date()+\"] ERROR : Error while reading the input stream of the client socket :\" + e.getMessage());\n\t}\n\n\t// get the pieces\n\twhile(true) {\n\t int index;\n\t String data;\n\t try {\n\t\t// get the index\n\t\tStringBuilder sbIndex = new StringBuilder();\n\t\tint ck;\n\t\twhile((ck = userInput.read()) != -1) {\n\t\t if ((char)ck == ':')\n\t\t\tbreak;\n\t\t sbIndex.append((char)ck);\n\t\t}\n\t\tindex = Integer.parseInt(sbIndex.toString(), 10);\n\n\t\t// get the pieces\n\t\tif (index != file.getNbPieces()) {\n\t\t char dataBuffer[] = new char[2732/*pieceLength*/];\n\t\t userInput.read(dataBuffer, 0, 2732/*pieceLength*/);\n\n\t\t data = new String(dataBuffer);\n\t\t Piece p = new Piece(index, data);\n\t\t pieces.add(p);\n\t\t if ((ck = userInput.read()) != -1){\n\t\t\tif((char)ck == ']'){\n\t\t\t return;\n\t\t\t}\n\t\t\telse if ((char)ck != ' '){\n\t\t\t throw new BadRequestException(\"Parser unable to understand this request\");\n\t\t\t}\n\t\t }\n\t\t}\n\t\t// The last piece\n\t\telse { \n\n\t\t StringBuilder lastPiece = new StringBuilder();\n\t\t while((ck = userInput.read()) != -1) {\n\t\t\tif ((char)ck == ']')\n\t\t\t break;\n\t\t\tlastPiece.append((char)ck);\n\t\t }\n\n\t\t data = lastPiece.toString();\n\t\t Piece p = new Piece(index, data);\n\t\t pieces.add(p);\n\t\t return;\n\t\t}\n\t } catch (IOException e) {\n\t\tSystem.err.println(\"read:\"+ e.getMessage());\n\t }\n\t}\n }",
"void process() throws IOException\n\t{\n\t\tboolean done = false;\n\t\twhile(!done)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t/**\n\t\t\t\t * Now if we are in a session and that session is suspended then we go\n\t\t\t\t * into a state where we wait for some user interaction to get us out\n\t\t\t\t */\n\t\t\t\trunningLoop();\n\n\t\t\t\t/* if we are in the stdin then put out a prompt */\n\t\t\t\tif (!haveStreams())\n\t\t\t\t\tdisplayPrompt();\n\n\t\t\t\t/* now read in the next line */\n\t\t\t\treadLine();\n\t\t\t\tif (m_currentLine == null)\n\t\t\t\t\tbreak;\n\n\t\t\t\tdone = processLine();\n\t\t\t}\n\t\t\tcatch(NoResponseException nre)\n\t\t\t{\n\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noResponseException\")); //$NON-NLS-1$\n\t\t\t}\n\t\t\tcatch(NotSuspendedException nse)\n\t\t\t{\n\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"notSuspendedException\")); //$NON-NLS-1$\n\t\t\t}\n\t\t\tcatch(AmbiguousException ae)\n\t\t\t{\n\t\t\t\t// we already put up a warning for the user\n\t\t\t}\n\t\t\tcatch(IllegalStateException ise)\n\t\t\t{\n\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"illegalStateException\")); //$NON-NLS-1$\n\t\t\t}\n\t\t\tcatch(IllegalMonitorStateException ime)\n\t\t\t{\n\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"illegalMonitorStateException\")); //$NON-NLS-1$\n\t\t\t}\n\t\t\tcatch(NoSuchElementException nse)\n\t\t\t{\n\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noSuchElementException\")); //$NON-NLS-1$\n\t\t\t}\n\t\t\tcatch(NumberFormatException nfe)\n\t\t\t{\n\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"numberFormatException\")); //$NON-NLS-1$\n\t\t\t}\n\t\t\tcatch(SocketException se)\n\t\t\t{\n\t\t\t\tMap<String, Object> socketArgs = new HashMap<String, Object>();\n\t\t\t\tsocketArgs.put(\"message\", se.getMessage()); //$NON-NLS-1$\n\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"socketException\", socketArgs)); //$NON-NLS-1$\n\t\t\t}\n\t\t\tcatch(VersionException ve)\n\t\t\t{\n\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"versionException\")); //$NON-NLS-1$\n\t\t\t}\n\t\t\tcatch(NotConnectedException nce)\n\t\t\t{\n\t\t\t\t// handled by isConnectionLost()\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"unexpectedError\")); //$NON-NLS-1$\n\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"stackTraceFollows\")); //$NON-NLS-1$\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\t// check for a lost connection and if it is clean-up!\n\t\t\tif (isConnectionLost())\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tdumpHaltState(false);\n\t\t\t\t}\n\t\t\t\tcatch(PlayerDebugException pde)\n\t\t\t\t{\n\t\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"sessionEndedAbruptly\")); //$NON-NLS-1$\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"static void processResponse(CTPResponse response)\n {\n \tfor(int i=0;i<response.GetNumResponses();i++)\n \t{\n \t\tint type = response.getReponseType(i);\n \t\tswitch (type) {\n\t \t\tcase CTPResponse.ERROR_RSP:{\n\t \t\t\tif(response.getStatus(i)== -1)\n\t \t\t\tSystem.out.println(\"ERROR_RSP Invalid client request\");\t\n\t \t\t\telse\n\t \t\t\tSystem.out.println(\"ERROR_RSP \"+response.getErrorText(i));\t\n\t \t\t\tbreak;\n\t \t\t}\n\t \t\tcase CTPResponse.ACKCONNECT_RSP:{\n\t \t\t\tSystem.out.println(\"ACKCONNECT_RSP received\");\t\n\t \t\t\tbreak;\n\t \t\t}\n\t\t\t\tcase CTPResponse.ACKOPEN_RSP:{\n\t\t\t\t\tSystem.out.println(\"ACKOPEN_RSP received\");\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.ACKLOCK_RSP:{\n\t\t\t\t\tSystem.out.println(\"ACKLOCK_RSP received\");\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.ACKEDIT_RSP:{\n\t\t\t\t\tSystem.out.println(\"ACKEDIT_RSP received\");\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.SERVRELEASE_RSP:{\n\t\t\t\t\tSystem.out.println(\"SERVRELEASE_RSP received\");\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.CONTENTS_RSP:{\n\t\t\t\t\tSystem.out.println(\"CONTENTS_RSP received\");\t\n\t\t\t\t\tSystem.out.println(\"Position in file = \"+response.getPosInfile(i));\n\t\t\t\t\tSystem.out.println(\"file data = \"+response.getFilData(i));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.MOVE_RSP:{\n\t\t\t\t\tSystem.out.println(\"MOVE_RSP received\");\t\n\t\t\t\t\tSystem.out.println(\"Cursor position in file= \"+response.getPosInfile(i));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.STATUS_RSP:{\n\t\t\t\t\tSystem.out.println(\"STATUS_RSP received\");\t\n\t\t\t\t\tSystem.out.println(\"Checksum = \"+response.getChecksum(i));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.EDIT_RSP:{\n\t\t\t\t\tSystem.out.println(\"EDIT_RSP received\");\t\n\t\t\t\t\tSystem.out.println(\"action = \"+response.getEditAction(i));\n\t\t\t\t\tSystem.out.println(\"Position in file = \"+response.getPosInfile(i));\n\t\t\t\t\tSystem.out.println(\"file data = \"+response.getFilData(i));\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tcase CTPResponse.CLOSE_RSP:{\n\t\t\t\t\tSystem.out.println(\"CLOSE_RSP received\");\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: \n\t\t\t\t\tSystem.out.println(\"Invalid Response type received\");\t\n \t\t}//end switch\n \t}//end for loop\n }",
"@Override\n public int read() throws IOException {\n return input.read();\n }",
"protected HttpResponse doReceiveResponse(final HttpRequest request, final HttpClientConnection conn,\n final HttpContext context)\n throws HttpException, IOException\n {\n// log.debug(\"EspMeshHttpRequestExecutor::doReceiveResponse()\");\n if (request == null)\n {\n throw new IllegalArgumentException(\"HTTP request may not be null\");\n }\n if (conn == null)\n {\n throw new IllegalArgumentException(\"HTTP connection may not be null\");\n }\n if (context == null)\n {\n throw new IllegalArgumentException(\"HTTP context may not be null\");\n }\n \n HttpResponse response = null;\n int statuscode = 0;\n \n // check whether the request is instantly, instantly request don't wait the response\n boolean isInstantly = request.getParams().isParameterTrue(EspHttpRequest.ESP_INSTANTLY);\n if (isInstantly)\n {\n ProtocolVersion version = new ProtocolVersion(\"HTTP\", 1, 1);\n StatusLine statusline = new BasicStatusLine(version, 200, \"OK\");\n // let the connection used only once to check whether the device is available\n context.setAttribute(\"timeout\", 1);\n response = ResponseFactory.newHttpResponse(statusline, context);\n Header contentLengthHeader = new BasicHeader(HTTP.CONTENT_LEN, \"0\");\n response.addHeader(contentLengthHeader);\n }\n else\n {\n if (!request.getRequestLine().getMethod().equals(EspHttpRequest.METHOD_COMMAND))\n {\n while (response == null || statuscode < HttpStatus.SC_OK)\n {\n \n response = conn.receiveResponseHeader();\n if (canResponseHaveBody(request, response))\n {\n conn.receiveResponseEntity(response);\n }\n statuscode = response.getStatusLine().getStatusCode();\n \n } // while intermediate response\n }\n else\n {\n ProtocolVersion version = new ProtocolVersion(\"HTTP\", 1, 1);\n StatusLine statusline = new BasicStatusLine(version, 200, \"OK\");\n response = ResponseFactory.newHttpResponse(statusline, context);\n // copy request headers\n // Header[] requestHeaders = request.getAllHeaders();\n // for (Header requestHeader : requestHeaders) {\n // System.out.println(\"requestHeader:\" + requestHeader);\n // response.addHeader(requestHeader);\n // }\n \n Header[] contentLengthHeader = request.getHeaders(HTTP.CONTENT_LEN);\n if (contentLengthHeader == null || contentLengthHeader.length != 1)\n {\n throw new IllegalArgumentException(\"contentLengthHeader == null || contentLengthHeader.length != 1\");\n }\n // at the moment, mesh command request and response len is the same\n response.addHeader(contentLengthHeader[0]);\n \n conn.receiveResponseEntity(response);\n }\n }\n \n // for device won't reply \"Connection: Keep-Alive\" by default, add the header by manual\n if (response != null && response.getFirstHeader(HTTP.CONN_DIRECTIVE) == null)\n {\n response.addHeader(HTTP.CONN_DIRECTIVE, HTTP.CONN_KEEP_ALIVE);\n }\n \n return response;\n \n }",
"public abstract void process() throws IOException;",
"@Test\n public void testChunkedOutputToChunkInput() throws Exception {\n final ChunkedInput<String> input = target().path(\"test\").request().get(new javax.ws.rs.core.GenericType<ChunkedInput<String>>() {});\n int counter = 0;\n String chunk;\n while ((chunk = input.read()) != null) {\n Assert.assertEquals((\"Unexpected value of chunk \" + counter), \"test\", chunk);\n counter++;\n } \n Assert.assertEquals(\"Unexpected numbed of received chunks.\", 3, counter);\n }",
"public void processOutput() {\n\n\t}",
"private void startStreams() {\n InputStream inputStream = process.getInputStream();\n bufferedInputStream = new BufferedReader(new InputStreamReader(inputStream));\n InputStream errorStream = process.getErrorStream();\n bufferedErrorStream = new BufferedReader(new InputStreamReader(errorStream));\n }",
"private String collectResultFromProcess(Process proc)\r\n\t{\r\n\t\tStringBuilder sb_result = new StringBuilder();\r\n\t\t\r\n BufferedReader stdInput = new BufferedReader(new InputStreamReader(proc.getInputStream()));\r\n BufferedReader stdError = new BufferedReader(new InputStreamReader(proc.getErrorStream()));\r\n String result_line = null;\r\n \r\n try\r\n {\r\n\t while ((result_line = stdInput.readLine()) != null) \r\n\t {\r\n\t sb_result.append(result_line);\r\n\t sb_result.append(\"\\n\");\r\n\t }\r\n\t \r\n\t while ((result_line = stdError.readLine()) != null) \r\n\t {\r\n\t sb_result.append(result_line);\r\n\t sb_result.append(\"\\n\");\r\n\t }\r\n } catch(IOException ioe)\r\n {\r\n \tioe.printStackTrace();\r\n }\r\n \r\n return sb_result.toString();\r\n\t}",
"@Override\n public Reader getInputStreamReader() throws IOException {\n return new InputStreamReader(getInputStream());\n }",
"public synchronized void readInput() throws InterruptedException, IOException \n\t{\n\t\twhile (getDataSourceEOFlag())\n\t\t{\n\t\t\tcontent.set(incomingPipe.take());\n\t\t\t\n\t\t\t// Ensure thread-timing uniformity (a speed-limiter)\n\t\t\t//Thread.sleep(100);\n\t\t\t\n\t\t\tprocess();\n\t\t\t// Discard the text to free up memory.\n\t\t\tcontent.set(null);\n\t\t}\n\t}",
"public boolean processOutput();",
"private static String readInputStream(InputStream responseStream) {\n if (responseStream == null) {\n Log.e(LOG_TAG, \"Provided InputStream is null, exiting method early\");\n return null;\n }\n\n StringBuilder response = new StringBuilder();\n String line;\n\n InputStreamReader inputStreamReader = new InputStreamReader(responseStream);\n BufferedReader reader = new BufferedReader(inputStreamReader);\n\n try {\n line = reader.readLine();\n while (line != null) {\n response.append(line);\n line = reader.readLine();\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem occured while reading from response stream\");\n e.printStackTrace();\n }\n\n return response.toString();\n }",
"private void processRequest() throws Exception {\n\t\tString server_url = \"http://localhost:\" + socket.getPort() + \"/\";\n\t\tSystem.out.println(\"server \" + server_url);\n\t\tURL url = new URL(server_url);\n\t\tSystem.out.println(\"URL \" + url);\n\t\tInputStream in = socket.getInputStream();\n\t\tDataOutputStream op = new DataOutputStream(socket.getOutputStream());\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(in));\n\t\tString requestLine = br.readLine();\n\t\tSystem.out.println();\n\t\t// information from the connection objects,\n\t\tSystem.out.println(\"------------------------------------------\");\n\t\tSystem.out.println(\"Information from the connection objects\");\n\t\tSystem.out.println(\"------------------------------------------\");\n\t\tSystem.out.println(\"RequestLine \" + requestLine);\n\t\tSystem.out.println(\"Connection received from \" + socket.getInetAddress().getHostName());\n\t\tSystem.out.println(\"Port : \" + socket.getPort());\n\t\tSystem.out.println(\"Protocol : \" + url.getProtocol());\n\t\tSystem.out.println(\"TCP No Delay : \" + socket.getTcpNoDelay());\n\t\tSystem.out.println(\"Timeout : \" + socket.getSoTimeout());\n\t\tSystem.out.println(\"------------------------------------------\");\n\t\tSystem.out.println();\n\t\tString headerLine = null;\n\t\twhile ((headerLine = br.readLine()).length() != 0) {\n\t\t\tSystem.out.println(headerLine);\n\t\t}\n // Creating the StringTokenizer and passing requestline in constructor .\n\t\t//tokens object split the requestline and create the token \n\t\tStringTokenizer tokens = new StringTokenizer(requestLine);\n\n\t\ttokens.nextToken(); // skip over the method, which should be “GET”\n\t\tString fileName = tokens.nextToken();\n\t\t// Prepend a “.” so that file request is within the current directory.\n\t\tfileName = \".\" + fileName;\n\t\tSystem.out.println(\"FileName GET\" + fileName);\n\t\t// Open the requested file.\n\t\tFileInputStream fis = null;\n\t\tboolean fileExists = true;\n\t\ttry {\n\t\t\tfis = new FileInputStream(fileName);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tfileExists = false;\n\t\t}\n\t\t// Construct the response message.\n\t\tString statusLine = null;\n\t\tString contentTypeLine = null;\n\t\tString entityBody = null;\n\t\t//Check file exist in directory or not\n\t\tif (fileExists) {\n\t\t\tstatusLine = \"200 OK \";\n\t\t\tcontentTypeLine = \"Content-Type:\" + contentType(fileName) + CRLF;\n\t\t} else {\n\t\t\tstatusLine = \"HTTP/1.1 404 Not Found:\";\n\t\t\tcontentTypeLine = \"Content-Type: text/html\" + CRLF;\n\t\t\tentityBody = \"<HTML>\" + \"<HEAD> <TITLE> Not Found</TITLE></HEAD>\" + \"<BODY> Not Found</BODY><HTML>\";\n\t\t}\n\t\t// Send the status line.\n\t\top.writeBytes(statusLine);\n\t\top.writeBytes(CRLF);\n\t\t// Send the content type line.\n\t\top.writeBytes(contentTypeLine);\n\n\t\t// Send a blank line to indicate the end of the header lines.\n\t\top.writeBytes(CRLF);\n\t\t// Send the entity body.\n\t\tif (fileExists) {\n\n\t\t\tsendBytes(fis, op);\n\n\t\t\tfis.close();\n\t\t} else {\n\t\t\top.writeBytes(entityBody);\n\t\t}\n//close the open objects\n\t\top.close();\n\t\tbr.close();\n\t\tsocket.close();\n\n\t}",
"@Override\n public int read() throws IOException {\n if (stream.available() > 0) {\n return stream.read();\n } else {\n layer.receiveMoreDataForHint(getHint());\n // either the stream is now filled, or we ran into a timeout\n // or the next stream is available\n return stream.read();\n }\n }",
"public InputStream getIn() {\n\t\treturn proc.getInputStream();\n\t}",
"public Object handleRequest(P request) throws Exception;",
"public abstract InputStream stdout();",
"private synchronized String receiveResponse() {\n\t\t\n\t\tlog.debug(\"Waiting for response from the device.\");\n\t\t\n\t\t//Initialize the buffers\n\t\tStringBuffer recievedData = new StringBuffer();\n\t\tchar currentChar = ' ';\n\n\t\ttry {\n\t\t\tdo {\n\t\t\t\t\n\t\t\t\t//If there are bytes available, read them\n\t\t\t\tif (this.inputStream.available() > 0) {\n\t\t\t\t\t\n\t\t\t\t\t//Append the read byte to the buffer\n\t\t\t\t\tcurrentChar = (char)this.inputStream.read();\n\t\t\t\t\trecievedData.append(currentChar);\n\t\t\t\t}\n\t\t\t} while (currentChar != ASCII_COMMAND_PROMPT); //Continue until we reach a prompt character\n\n\t\t} catch (IOException ioe) {\n\t\t\tlog.error(\"Exception when receiving data from the device:\", ioe);\n\t\t}\n\n\t\tString recievedString = recievedData.toString();\n\t\t\n\t\t//Remove the echoed command if ECHO_COMMAND is true\n\t\tif (echoCommand) {\n\t\t\trecievedString = recievedString.replace(this.lastCommand, \"\");\n\t\t}\n\t\t\n\t\t//Remove extra characters and trim the string\n\t\trecievedString = recievedString.replace(\"\\r\", \"\");\n\t\trecievedString = recievedString.replace(\">\", \"\");\n\t\trecievedString = recievedString.trim();\n\t\n\t\tlog.info(\"Received string from device: \" + recievedString);\n\t\t\n\t\t//Return the received data\n\t\treturn recievedString;\n\t\n\t}",
"@Override\n public DataAttributes process(InputStream input) throws Ex {\n return null;\n }",
"private OlapResult parseFromResponse(OlapMessage.Response response) throws IOException{\n switch(response.getType()){\n case NOT_SUBMITTED:\n return new NotSubmittedResult();\n case FAILED:\n OlapMessage.FailedResponse fr=response.getExtension(OlapMessage.FailedResponse.response);\n throw Exceptions.rawIOException((Throwable)OlapSerializationUtils.decode(fr.getErrorBytes()));\n case IN_PROGRESS:\n OlapMessage.ProgressResponse pr=response.getExtension(OlapMessage.ProgressResponse.response);\n return new SubmittedResult(pr.getTickTimeMillis());\n case CANCELLED:\n return new CancelledResult();\n case COMPLETED:\n OlapMessage.Result r=response.getExtension(OlapMessage.Result.response);\n return OlapSerializationUtils.decode(r.getResultBytes());\n default:\n throw new IllegalStateException(\"Programmer error: unexpected response type\");\n }\n }",
"int postProcessREPLResponse(String received, Appendable error) {\n if (DEBUG) {\n System.out.println(\"Received from phone: \\\"\" + received + \"\\\"\");\n }\n int responsesFound = 0; // Just for sanity testing\n leftOver.append(received);\n String candidate = leftOver.toString();\n while (true) {\n Matcher completeResponse = grossResponseP.matcher(candidate);\n if (!completeResponse.find()) {\n leftOver.setLength(0);\n leftOver.append(candidate);\n return responsesFound;\n }\n responsesFound++;\n candidate = candidate.substring(completeResponse.end());\n checkNoise(completeResponse.group(1), error);\n parseAndSendResponse(completeResponse.group(2), error);\n }\n }",
"@Override\n public void run() {\n try {\n this.in = new BufferedReader(new InputStreamReader(\n clientSocket.getInputStream()));\n this.out = clientSocket.getOutputStream();\n\n\n String str = \"\";\n while (!(str != null && !str.equals(\"\"))) {\n str = in.readLine();\n }\n\n handleRequest(str);\n } catch (Exception e) {\n System.out.println(\"Error: \" + e);\n e.printStackTrace();\n }\n }",
"public abstract Object decode(InputStream is) ;",
"public String decode(InputStream is)\n throws DataProcessingException, IOException {\n sendRecognition();\n streamAudioSource.setInputStream(is);\n sendData();\n String result = readResult();\n return result;\n }",
"public void handleRequest(ExtractionRequest request);",
"private void processIn() throws IOException {\n for (; ; ) {\n var status = fr.process(bbin);\n switch (status) {\n case ERROR:\n silentlyClose();\n return;\n case REFILL:\n return;\n case DONE:\n Frame frame = fr.get();\n fr.reset();\n treatFrame(frame);\n break;\n }\n }\n }",
"@Override\n public Ini read(InputStream in) throws IOException {\n return read(new InputStreamReader(in));\n }",
"public abstract SeekInputStream getRawInput();",
"Optional<String> getResult(Input in) {\n for (final var response : responses) {\n if (response.matches(in)) {\n if (response.infinite) {\n return Optional.of(response.text);\n }\n if (response.repeat > 0) {\n response.repeat--;\n return Optional.of(response.text);\n }\n }\n }\n return Optional.empty();\n }",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tinput = new DataInputStream(socket.getInputStream());\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttry {\n\n\t\t\t\t\t\t\twhile (input != null) {\n\t\t\t\t\t\t\t\tsynchronized (this) {\n\t\t\t\t\t\t\t\t\tdecode(input.readUTF());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\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\tSystem.exit(1);\n\t\t\t\t\t\t\te.printStackTrace();\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}",
"public abstract boolean canDecodeInput(BufferedInputStream stream) throws IOException;",
"public boolean run() throws IOException {\n SapMessage inMsg = null;\n boolean done;\n for(SeqStep step : sequence) {\n\n /* Write all requests - if any */\n if(step.requests != null) {\n for(SapMessage request : step.requests) {\n if(request != null) {\n Log.i(TAG, \"Writing request: \" +\n SapMessage.getMsgTypeName(request.getMsgType()));\n writeSapMessage(request, false); // write the message without flushing\n }\n }\n writeSapMessage(null, true); /* flush the pipe */\n }\n\n /* Handle and validate all responses - if any */\n if(step.hasResponse() == true) {\n done = false;\n boolean foundMatch = false;\n SapMessage responseMatch;\n while(!done) {\n for(SapMessage response : step.responses) {\n if(response != null)\n Log.i(TAG, \"Waiting for the response: \" +\n SapMessage.getMsgTypeName(response.getMsgType()));\n }\n inMsg = readSapMessage();\n if(inMsg != null)\n Log.i(TAG, \"Read message: \" +\n SapMessage.getMsgTypeName(inMsg.getMsgType()));\n else\n assertTrue(\"Failed to read message.\", false);\n\n responseMatch = null;\n for(SapMessage response : step.responses) {\n if(response != null\n && inMsg.getMsgType() == response.getMsgType()\n && compareSapMessages(inMsg, response) == true) {\n foundMatch = true;\n responseMatch = response;\n break;\n }\n }\n\n if(responseMatch != null)\n step.responses.remove(responseMatch);\n\n /* If we are expecting no more responses for this step, continue. */\n if(step.hasResponse() != true) {\n done = true;\n }\n /* Ensure what we received was expected */\n assertTrue(\"wrong message received.\", foundMatch);\n }\n }\n }\n return true;\n }",
"private void listen() {\n\t\tString message;\n\t\twhile(true){\n\t\t\ttry {\n\t\t\t\tmessage = input.readLine();\n\t\t\t\tif (message == null) continue;\n\n\t\t\t\tif(message.equals(\"disconnect\")){\n\t\t\t\t\tThread t = new Thread(this::disconnect);\n\t\t\t\t\tt.start();\n\t\t\t\t\treturn;\n\t\t\t\t} else if(message.contains(\"PUSH\")) {\n\t\t\t\t\tparseMessage(message);\n\t\t\t\t} else if (message.equals(\"pong\")){\n\t\t\t\t\tponged = true;\n\t\t\t\t} else if(!validResponse) {\n\t\t\t\t\tsynchronized (this) {\n\t\t\t\t\t\tresponse = message;\n\t\t\t\t\t\tvalidResponse = true;\n\t\t\t\t\t\tnotifyAll();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} catch (IOException e) {\n\t\t\t\tThread t = new Thread(this::disconnect);\n\t\t\t\tt.start();\n\t\t\t\ttry {\n\t\t\t\t\tt.join();\n\t\t\t\t} catch (InterruptedException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tsynchronized (this) {\n\t\t\t\t\tresponse = null;\n\t\t\t\t\tvalidResponse = true;\n\t\t\t\t\tnotifyAll();\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"application/json;charset=utf-8\");\n try (PrintWriter out = response.getWriter()) {\n\n String file = request.getParameter(\"file\");\n String className = file.substring(0, file.indexOf(\".\"));\n\n try {\n \n JSONObject obj = new JSONObject();\n JSONArray errArray = new JSONArray();\n JSONArray outArray = new JSONArray();\n \n for(String aError : execErroutput(Config.DATA_PATH, Config.CMD_ENCODE, className)){\n errArray.put(aError);\n }\n for(String aOutput : execOutput(Config.DATA_PATH, Config.CMD_ENCODE, className)){\n outArray.put(aOutput);\n }\n \n obj.put(\"Error\", errArray);\n obj.put(\"Output\", outArray);\n \n out.println(obj.toString(4));\n \n } catch (Exception e) {\n System.err.println(e);\n }\n\n }\n }",
"public void handleResponse(byte[] result, Command originalCommand);",
"private ReadProcessResponse convertReadProcess(ReadProcess readProcess) {\n ReadProcessResponse response = new ReadProcessResponse();\n BeanUtils.copyProperties(readProcess, response);\n return response;\n }",
"public void parse(InputStream stream, ContentHandler handler, Metadata metadata, ParseContext context)\n\t\tthrows IOException,SAXException,TikaException {\n\n\t\t// Get metadata\n\t\tthis.mdata = metadata;\n\n\t\t// Read in all text\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(stream));\n\t\tString line = reader.readLine();\n\t\tString text = \"\";\n\t\twhile (line != null) {\n\t\t\ttext += line;\n\t\t\tline = reader.readLine();\n\t\t}\n\t\treader.close();\n\n\t\ttry {\n\t\t\t// Get NER results from each NER toolkit.\n\t\t\tthis.openNLPEntities = this.openNLPParse(text);\t\n\t\t\tthis.coreNLPEntities = this.coreNLPParse(text);\t\n\t\t\tthis.nltkEntities = this.nltkParse(text);\n\t\t\tthis.gQMeasurements = this.gQParse(text);\n\n\t\t\t// Combine results and add to metadata.\n\t\t\tMap<String, Map<String,Integer>> combo = combineResults();\n\t\t\tString json = mapToJSON(combo);\n\t\t\tString openNLPJSON = mapToJSON(this.openNLPEntities);\n\t\t\tString coreNLPJSON = mapToJSON(this.coreNLPEntities);\n\t\t\tString nltkJSON = mapToJSON(this.nltkEntities);\n\t\t\tpushToMetadata(\"openNLP entities\", openNLPJSON);\n\t\t\tpushToMetadata(\"coreNLP entities\", coreNLPJSON);\n\t\t\tpushToMetadata(\"nltk entities\", nltkJSON);\n\t\t\tpushToMetadata(\"maxJointAgreement\",json);\n\t\t\tpushToMetadata(\"quantities\", this.gQMeasurements);\n\t\t\n\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public int read() throws IOException {\n if (closed)\n throw new IOException(\"requestStream.read.closed\");\n\n // Have we read the specified content length already?\n if ((length >= 0) && (count >= length))\n return (-1); // End of file indicator\n\n // Read and count the next byte, then return it\n int b = stream.read();\n if (b >= 0)\n count++;\n return (b);\n }",
"public static String readResponse(HttpURLConnection request) throws IOException {\r\n\t ByteArrayOutputStream os;\r\n\t try (InputStream is = request.getInputStream()) {\r\n\t os = new ByteArrayOutputStream();\r\n\t int b;\r\n\t while ((b = is.read()) != -1) {\r\n\t os.write(b);\r\n\t }\r\n\t }\r\n\t return new String(os.toByteArray());\r\n\t}",
"@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 }"
]
| [
"0.6499499",
"0.63371223",
"0.632738",
"0.6046973",
"0.5966191",
"0.5951957",
"0.5850333",
"0.58165526",
"0.57652354",
"0.57404196",
"0.5695427",
"0.56848234",
"0.5622982",
"0.5617081",
"0.55952597",
"0.5563664",
"0.556185",
"0.55603576",
"0.55585796",
"0.5530946",
"0.5510251",
"0.54980254",
"0.5476224",
"0.54636383",
"0.54337645",
"0.54181814",
"0.5414229",
"0.5412548",
"0.53999096",
"0.5389319",
"0.5386089",
"0.53843343",
"0.5378812",
"0.5376202",
"0.53665805",
"0.5366259",
"0.53639656",
"0.53610003",
"0.5360318",
"0.5354842",
"0.53458965",
"0.5322096",
"0.5286203",
"0.52638954",
"0.5253331",
"0.52506524",
"0.52502626",
"0.52421147",
"0.52367866",
"0.52243537",
"0.52227134",
"0.5207026",
"0.5196913",
"0.51939166",
"0.51906025",
"0.518345",
"0.5182878",
"0.5177695",
"0.51697725",
"0.51560885",
"0.514086",
"0.512976",
"0.51263887",
"0.51207846",
"0.51151115",
"0.5111662",
"0.5108304",
"0.508831",
"0.5081509",
"0.5080087",
"0.507278",
"0.50717014",
"0.5065732",
"0.5060245",
"0.504592",
"0.5045113",
"0.5016153",
"0.5015928",
"0.5013568",
"0.50097066",
"0.50007004",
"0.49993256",
"0.49950635",
"0.49796873",
"0.49725148",
"0.4969768",
"0.49656072",
"0.49636528",
"0.49630758",
"0.49610117",
"0.49516115",
"0.49508154",
"0.4947198",
"0.49462628",
"0.49454752",
"0.49440336",
"0.49430943",
"0.494147",
"0.49402884",
"0.4935441"
]
| 0.5947374 | 6 |
World sets this RenderManager's worldObj to the world provided | public void setWorld(@Nullable World worldIn)
{
this.world = worldIn;
if (worldIn == null)
{
this.field_78734_h = null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setWorld(World world) {\n this.world = world;\n }",
"public void setWorld(GameData world) {\r\n this.world = world;\r\n }",
"@Model\n\tprotected void setWorld(World world) {\n\t\tthis.world = world;\n\t}",
"protected void updateWorld(World world) {\r\n\t\tthis.world = world;\r\n\t\tsetup(); //Call setup again to re assign certain variables that depend\r\n\t\t\t\t // on the world\r\n\t\tbufferWorld(); //Buffer the new world\r\n\t}",
"public void setWorld(World world) {\n\t\tthis.world = world;\n\n\t\tsetPlaying(world.isPlayOnStart());\n\t}",
"public static void setWorld(World aWorld)\r\n/* */ {\r\n\t \tlogger.info(count++ + \" About to setWotld : \" + \"Agent\");\r\n/* 43 */ \tworldForAgent = aWorld;\r\n/* */ }",
"public void setWorldDisplay(Pane worldDisplay) {\n this.worldDisplay = worldDisplay;\n }",
"public WorldRenderer(WorldController worldController)\n {\n this.worldController = worldController;\n init();\n }",
"public void setWorldData(WorldData worldData)\n {\n this.worldData = worldData;\n }",
"public void setWorld(World world) throws IllegalStateException {\n\t\tif (!canHaveAsWorld(world))\n\t\t\tthrow new IllegalStateException(\"Invalid position in the world trying to assign this entity to.\");\n\t\n\t\t//If current world is null, don't try to remove 'this' from it\n\t\t//If world is null, don't try to add anything to it\n\t\t//This allows us to provide 'null' as an argument in case we want to \n\t\t//undo the association for this entity.\n\t\tif (!(this.getWorld() == null) && !(world == null)) {\n\t\t\tthis.getWorld().removeEntity(this);\n\t\t\tworld.addEntity(this);\n\t\t}\n\n\t\tthis.world = world;\n\t\t\n\t}",
"public World getWorld() {\n\t\treturn world;\n\t}",
"public void addToWorld(World world);",
"public World getWorld() {\n return world;\n }",
"public World getWorld() {\n return world;\n }",
"public GameFrame(final World world) {\n this.world = world;\n }",
"public static World getWorld() {\n\t\treturn world;\n\t}",
"public World getWorld () {\n\t\treturn world;\n\t}",
"@Override\n\tpublic World getWorld() { return world; }",
"@Override\n public void world() {\n super.world();\n }",
"public void setWorldPosition(int worldPosition) {\n\t\tcurrChunk = worldPosition / MapChunk.WIDTH;\n\t\tgrowMap();\n\t}",
"public World() {\n\t\tblockIDArray = new byte[WORLD_SIZE][WORLD_HEIGHT][WORLD_SIZE];\n\t\tentities\t = new ArrayList<Entity>();\n\t\trand\t\t = new Random();\n\t\t\n new GravityThread(this);\n\t\t\t\t\n\t\tgenerateWorld();\n\t}",
"public GameData getWorld() {\r\n return world;\r\n }",
"private void renderWorld(SpriteBatch batch)\n {\n worldController.cameraHelper.applyTo(camera);\n batch.setProjectionMatrix(camera.combined);\n batch.begin();\n worldController.level.render(batch);\n batch.end();\n }",
"public World (){\n\t\tpattern = new ShapePattern (PATTERN_SIZE);\n\t\tscroll = new ShapeScroll (SCROLL_SIZE);\n\t}",
"public void renderWorld (SpriteBatch batch)\n\t{\n\t\tworldController.cameraHelper.applyTo(camera);\n\t\tbatch.setProjectionMatrix(camera.combined);\n\t\tbatch.begin();\n\t\tworldController.level.render(batch);\n\t\tbatch.end();\n\t\t\n\t\tif (DEBUG_DRAW_BOX2D_WORLD)\n\t\t{\n\t\t\tb2debugRenderer.render(worldController.b2world, camera.combined);\n\t\t}\n\t}",
"@Basic\n\tpublic World getWorld() {\n\t\treturn this.world;\n\t}",
"@Basic\n\tpublic World getWorld() {\n\t\treturn this.world;\n\t}",
"public World()\n\t{\n\t\tinitWorld();\t\n\t}",
"public static void addWorld(World world) {\n\t\tworlds.add(world);\n\t}",
"public void newGameWorld()\r\n {\r\n addObject(new Blackout(\"Fade\"), getWidth() / 2, getHeight() / 2);\r\n removeAllObjects();\r\n\r\n GameWorld gameWorld = new GameWorld();\r\n Greenfoot.setWorld(gameWorld);\r\n }",
"public void renderWorld(boolean renderWithLight);",
"private void createWorld() {\n world = new World();\n world.setEventDeliverySystem(new BasicEventDeliverySystem());\n //world.setSystem(new MovementSystem());\n world.setSystem(new ResetPositionSystem());\n world.setSystem(new RenderingSystem(camera, Color.WHITE));\n\n InputSystem inputSystem = new InputSystem();\n InputMultiplexer inputMultiplexer = new InputMultiplexer();\n inputMultiplexer.addProcessor(inputSystem);\n inputMultiplexer.addProcessor(new GestureDetector(inputSystem));\n Gdx.input.setInputProcessor(inputMultiplexer);\n world.setSystem(inputSystem);\n world.setSystem(new MoveCameraSystem(camera));\n\n world.initialize();\n }",
"public void onWorldChanged(World world);",
"public long getWorldId() {\n return worldId_;\n }",
"@Override\r\n public void generateWorld(World world) {\r\n // create the static non-moving bodies\r\n this.creator.createWorld(world, this, COLLISIONLAYERS);\r\n // create the transition areas\r\n this.creator.createTransition(world, this, NORTHTRANSITION, NORTH);\r\n this.creator.createTransition(world, this, SOUTHTRANSITION, SOUTH);\r\n \r\n }",
"public WorldRegion(GameWorldEntity entity) {\n gameWorldEntities.add(entity);\n }",
"public void initializeWorld() {\n checkWorldAndGameManager();\n if (this.worldDisplay == null) {\n throw new GameSetupException(\"World display has not been passed to\" +\n \" WorldDisplayManager\");\n } if (this.renderer == null) {\n throw new GameSetupException(\"Renderer is not initialized\" +\n \" for WorldDisplayManager\");\n }\n // Instantiate the helper managers\n tilesManager = new TilesManager(this.world, this.worldDisplay);\n\n // render the tiles\n tilesManager.renderInitialWorld();\n\n // Load the rendering engine\n renderer.setTilesManager(tilesManager);\n renderer.setMainEntityManager(gameManager.getMainEntityManager());\n\n }",
"public void setRenderer(WorldDisplayRenderer renderer) {\n this.renderer = renderer;\n }",
"public long getWorldId() {\n return worldId_;\n }",
"public World(final BoundingBox bounds, final Peer peer) {\n \t\tmyVirtualWorldBounds = bounds;\n \t\tmyPeer = peer;\n \t\tmyPeer.addObserver(this);\n \t\t\n \t\tmyForces = new LinkedList<Force>();\n \t\tmyObjects = new LinkedList<PhysicalObject>();\n \t\t\n \t\t// TODO: Should this go here?\n \t\tmyScene = new BranchGroup();\n \t\tmyScene.setCapability(BranchGroup.ALLOW_CHILDREN_EXTEND);\n \t\tmyScene.setCapability(BranchGroup.ALLOW_CHILDREN_WRITE);\n \t\t\n \t\tBoundingLeaf originLeaf = new BoundingLeaf(new BoundingSphere());\n \t\tmyScene.addChild(originLeaf);\n \t\t\n \t\tmyScene.addChild(createVirtualWorldBoundsShape());\n \t\t\n \t\taddLights();\n \t\taddHalfspaces();\n \t\t\n \t\tmyScene.compile();\n \t}",
"public SimulationWorld( SimulationEngine engine )\n {\n this.engine = engine;\n this.gravity = new Vector3f( 0f, -9.81f, 0f );\n }",
"public World makeWorld() {\n World world = new World(1000, 1000);\n world.createEntity().addComponent(new CursorComponent());\n \n ProjectileSystem projectileSystem = new ProjectileSystem();\n world.addSystem(projectileSystem, 1);\n \n return world;\n }",
"public void resetWorld(){\r\n\t\tSystem.out.println(\"Resetting world\");\r\n\t\tengine.removeAllEntities();\r\n\t\tlvlFactory.resetWorld();\r\n\t\t\r\n\t\tplayer = lvlFactory.createPlayer(cam);\r\n\t\tlvlFactory.createFloor();\r\n lvlFactory.createWaterFloor();\r\n \r\n int wallWidth = (int) (1*RenderingSystem.PPM);\r\n int wallHeight = (int) (60*RenderingSystem.PPM);\r\n TextureRegion wallRegion = DFUtils.makeTextureRegion(wallWidth, wallHeight, \"222222FF\");\r\n lvlFactory.createWalls(wallRegion); //TODO make some damn images for this stuff \r\n \r\n // reset controller controls (fixes bug where controller stuck on directrion if died in that position)\r\n controller.left = false;\r\n controller.right = false;\r\n controller.up = false;\r\n controller.down = false;\r\n controller.isMouse1Down = false;\r\n controller.isMouse2Down = false;\r\n controller.isMouse3Down = false;\r\n\t\t\r\n\t}",
"public OdorWorldPanel getWorldPanel() {\n return worldPanel;\n }",
"public Level getWorld() {\r\n return this;\r\n }",
"public Builder setWorldId(long value) {\n \n worldId_ = value;\n onChanged();\n return this;\n }",
"public void updateWorldRegion()\n\t{\n\t\tif(!isVisible)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tL2WorldRegion newRegion = WorldManager.getInstance().getRegion(getWorldPosition());\n\t\tL2WorldRegion oldRegion = region;\n\t\tif(!newRegion.equals(oldRegion))\n\t\t{\n\t\t\tif(oldRegion != null)\n\t\t\t{\n\t\t\t\toldRegion.removeVisibleObject(object);\n\t\t\t}\n\n\t\t\tsetWorldRegion(newRegion);\n\n\t\t\t// Add the L2Object spawn to _visibleObjects and if necessary to all players of its L2WorldRegion\n\t\t\tnewRegion.addVisibleObject(object);\n\t\t}\n\t}",
"public void updateWorld(Location loc)\n {\n worldData = getPersistence().get(loc.getWorld().getName(), WorldData.class);\n }",
"World getWorld();",
"public void currentWorld(WumpusWorld world) throws RemoteException {\n\t\twidth = world.getWidth();\n\t\theight = world.getHeight();\n\t\tif (frame == null) {\n\t\t\tframe = new Frame();\n\t\t\tframe.addWindowListener(new WindowAdapter() {\n\t\t\t\tpublic void windowClosing(WindowEvent evt) {\n\t\t\t\t\tframe.dispose();\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t});\n\t\t\tframe.setTitle(\"The Wumpus Monitor\");\n\t\t\tframe.setLayout(new GridLayout(width * 2, height * 2));\n\t\t\tDimension d = Toolkit.getDefaultToolkit().getScreenSize();\n\t\t\tframe.setBounds(0, 0, d.width - 1, d.height - 1);\n\t\t} else {\n\t\t\tframe.removeAll();\n\t\t}\n\t\trooms = new DirectionalPanel[width][height][8];\n\t\tfor (int row = 0; row < width; row++) {\n\t\t\tfor (int col = 0; col < height; col++) {\n\t\t\t\trooms[row][col][0] = new DirectionalPanel(-1,\n\t\t\t\t\t\t\t\t\t\tImagePanel.NORTH | ImagePanel.WEST);\n\t\t\t\trooms[row][col][1] = new DirectionalPanel(-1,\n\t\t\t\t\t\t\t\t\t\tImagePanel.NORTH | ImagePanel.EAST);\n\t\t\t\trooms[row][col][2] = new DirectionalPanel(-1,\n\t\t\t\t\t\t\t\t\t\tImagePanel.SOUTH | ImagePanel.WEST);\n\t\t\t\trooms[row][col][3] = new DirectionalPanel(-1,\n\t\t\t\t\t\t\t\t\t\tImagePanel.SOUTH | ImagePanel.EAST);\n\t\t\t\tfor (int k = 4; k < 8; k++) {\n\t\t\t\t\trooms[row][col][k] = new DirectionalPanel(-1);\n\t\t\t\t}\n\t\t\t\tagentPositions.put(new Point(row, col), new HashSet());\n\t\t\t}\n\t\t}\n\t\tfor (int row = 0; row < world.getWidth(); row++) {\n\t\t\tfor (int turn = 0; turn < 2; turn++) {\n\t\t\t\tfor (int col = 0; col < world.getHeight(); col++) {\n\t\t\t\t\tframe.add(rooms[height - row - 1][col][2*turn]);\n\t\t\t\t\tframe.add(rooms[height - row - 1][col][2*turn + 1]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int row = 0; row < width; row++) {\n\t\t\tfor (int col = 0; col < height; col++) {\n\t\t\t\tRoom room = world.getRoom(row, col);\n\t\t\t\tif (room.getPit()) {\n\t\t\t\t\taddImage(row, col, PIT_FILE, PIT_FILE);\n\t\t\t\t}\n\t\t\t\tif (room.getGold()) {\n\t\t\t\t\taddImage(row, col, GOLD_FILE, GOLD_FILE);\n\t\t\t\t}\n\t\t\t\tWumpus w = room.getWumpus();\n\t\t\t\tif (w != null) {\n\t\t\t\t\taddImage(row, col, w.getName(), WUMPUS_FILE);\n\t\t\t\t\tsetDirection(row, col, w.getName(), w.getDirection());\n\t\t\t\t\tPoint pos = new Point(w.getRow(), w.getColumn());\n\t\t\t\t\tagents.put(w.getName(), pos);\n\t\t\t\t\tSet s = (Set) agentPositions.get(pos);\n\t\t\t\t\ts.add(w);\n\t\t\t\t\tcheckStench(row + 1, col - 1, row - 1, col + 1);\n\t\t\t\t}\n\t\t\t\tSet explorers = room.getExplorers();\n\t\t\t\tfor (Iterator it = explorers.iterator(); it.hasNext(); ) {\n\t\t\t\t\tExplorer e = (Explorer) it.next();\n\t\t\t\t\taddImage(row, col, e.getName(), EXPLORER_FILE);\n\t\t\t\t\tsetDirection(row, col, e.getName(), e.getDirection());\n\t\t\t\t\tPoint pos = new Point(e.getRow(), e.getColumn());\n\t\t\t\t\tagents.put(e.getName(), pos);\n\t\t\t\t\tSet s = (Set) agentPositions.get(pos);\n\t\t\t\t\ts.add(e);\n\t\t\t\t}\n\t\t\t\tboolean breeze = false;\n\t\t\t\tif (row > 0 && world.getRoom(row - 1, col).getPit()) {\n\t\t\t\t\tbreeze = true;\n\t\t\t\t} else if (row < world.getWidth() - 1 &&\n\t\t\t\t\t\t\t\t\tworld.getRoom(row + 1, col).getPit()) {\n\t\t\t\t\tbreeze = true;\n\t\t\t\t} else if (col > 0 && world.getRoom(row, col - 1).getPit()) {\n\t\t\t\t\tbreeze = true;\n\t\t\t\t} else if (col < world.getHeight() - 1 &&\n\t\t\t\t\t\t\t\t\tworld.getRoom(row, col + 1).getPit()) {\n\t\t\t\t\tbreeze = true;\n\t\t\t\t}\n\t\t\t\tif (breeze) {\n\t\t\t\t\taddImage(row, col, BREEZE_FILE, BREEZE_FILE);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tframe.show();\n\t\tthis.enabled = true;\n\t}",
"protected abstract void initializeWorld();",
"public World setCurrentWorld(int index) {\n\t\tassert index >= 0 && index < levels.size();\n\t\treturn levels.get(levelIndex = index);\n\t}",
"public void registerWorldChunkManager() {\n\t\tthis.worldChunkMgr = new WorldChunkManagerHell(BiomeGenBase.sky, 0.5F, 0.0F);\n\t\tthis.dimensionId = 1;\n\t\tthis.hasNoSky = true;\n\t}",
"public void addToWorld() {\n world().addObject(this, xPos, yPos);\n \n try{\n terrHex = MyWorld.theWorld.getObjectsAt(xPos, yPos, TerritoryHex.class).get(0);\n } catch(IndexOutOfBoundsException e){\n MessageDisplayer.showMessage(\"The new LinkIndic didn't find a TerritoryHex at this position.\");\n this.destroy();\n }\n \n }",
"public static void writeWorld(World world, CompoundTag compound) {\n UUID worldUuid = world.getUID();\n // world UUID used by Bukkit and code above\n compound.putLong(\"WorldUUIDMost\", worldUuid.getMostSignificantBits());\n compound.putLong(\"WorldUUIDLeast\", worldUuid.getLeastSignificantBits());\n // leave a Dimension value for possible Vanilla use\n compound.putInt(\"Dimension\", world.getEnvironment().getId());\n }",
"public MenuRenderer(MenuWorld world) {\n\t\t\tmyWorld = world;\n\t cam = new OrthographicCamera();\n\t cam.setToOrtho(true, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\n\t shapeRenderer = new ShapeRenderer();\n\t shapeRenderer.setProjectionMatrix(cam.combined);\n\t titleText = new Texture(\"colorSwitchTextMenu.png\");\n\t buttonPlay = new Texture(\"buttonPlay.png\");\n\t Texture buttonExitImg = new Texture(\"buttonExit.png\");\n\t buttonExit = new TextureRegion(buttonExitImg);\n\t Texture buttonSoundImg = new Texture(\"buttonSound.png\");\n\t buttonSound = new TextureRegion(buttonSoundImg);\n\t Texture buttonSoundOffImg = new Texture(\"buttonSoundOff.png\");\n\t buttonSoundOff = new TextureRegion(buttonSoundOffImg);\n\t Texture buttonMouseImg = new Texture(\"buttonMouseGameMode.png\");\n\t buttonGameMode1 = new TextureRegion(buttonMouseImg);\n\t Texture buttonChronoImg = new Texture(\"buttonLavaGameMode.png\");\n\t buttonGameMode2 = new TextureRegion(buttonChronoImg);\n\t angleButton = 0;\n\t batch = new SpriteBatch();\n\t}",
"public World render(ModelBatch modelBatch, World world, Environment environment){\n\r\n\t\t\r\n\t\tbound.render(modelBatch, environment);\r\n\t\t\r\n\t\tif(balls.size != 0){\r\n\t\t\tBall b;\r\n\t\t\tfor(int i = 0; i < balls.size; i++){\r\n\t\t\t\tb = balls.get(i);\t\r\n\t\t\t\tb.updateModel();\r\n\t\t\t\tmodelBatch.render(b.getModInst(), environment);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\r\n\t\tif(activeBlocks.size !=0){\r\n\t\t\tBlock block;\r\n\t\t\tfor (int i = 0; i < activeBlocks.size; i++) {\r\n\t\t\t\t\r\n\t\t\t\tblock = activeBlocks.get(i);\r\n\t\t\t\tblock.updateModel();\r\n\t\t\t\tmodelBatch.render(block.getModInst(), environment);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tCrystal crystal;\r\n\t\tfor(int i= 0; i < crystals.size; i++){\r\n\t\t\tcrystal = crystals.get(i);\r\n\t\t\tcrystal.updateModel();\r\n\t\t\tmodelBatch.render(crystal.getModInst(), environment);\r\n\t\t}\r\n\t\r\n\t\t\r\n\t\treturn world;\r\n\t}",
"public GameWorld(GameScreen gameScreen) {\n\n\t\thighScore = 0;\n\t\tfont = Assets.font;\n\t\tbigFont = Assets.bigFont;\n\t\t\n\t\tcamera = new OrthographicCamera();\n\t\tcamera.setToOrtho(true, 640, 480);\n\t\tbatch = new SpriteBatch();\n\t\t\n\t\tplayer = new Player();\n\t\treset();\n\t}",
"public void setWorldTime(long time)\n {\n worldTime = time;\n }",
"public void updateGameWorld() {\r\n\t\t//divide the user entered height by the height of the canvas to get a ratio\r\n\t\tfloat canvas_height = Window.getCanvas().getHeight();\r\n\t\tfloat new_height = EnvironmentVariables.getHeight();\r\n\t\tfloat ratio = new_height / canvas_height;\r\n\t\t\r\n\t\t//use this ration th=o set the new meter value\r\n\t\tEnvironmentVariables.setMeter(EnvironmentVariables.getMeter() * ratio);\r\n\t\t\r\n\t\t//use the ratio to set all objects new location\r\n\t\tfor(GameObject obj: EnvironmentVariables.getWorldObjects()) {\r\n\t\t\tobj.setX(obj.getX() * ratio);\r\n\t\t\tobj.setY(obj.getY() * ratio);\r\n\t\t}\r\n\t\t\r\n\t\tfor(GameObject obj: EnvironmentVariables.getTerrain()) {\r\n\t\t\tobj.setX(obj.getX() * ratio);\r\n\t\t\tobj.setY(obj.getY() * ratio);\r\n\t\t}\r\n\t\t\r\n\t\tif(EnvironmentVariables.getMainPlayer() != null) {\r\n\t\t\tEnvironmentVariables.getMainPlayer().setX(EnvironmentVariables.getMainPlayer().getX() * ratio);\r\n\t\t\tEnvironmentVariables.getMainPlayer().setY(EnvironmentVariables.getMainPlayer().getY() * ratio);\r\n\t\t}\r\n\t\t\r\n\t}",
"public void WorldRender() {\n\t\t int BlockX = (int) (Camera.CameraX/Game.TileSize);\n\t\t int BlockY = (int) (Camera.CameraY/Game.TileSize);\n\t\t \n\t\t //Tile.sky.draw(0, 0, Display.getWidth(), Display.getHeight());\n\t\t //Tile.voidBlock.startUse();\n\t\t for(int l = 0; l < this.worldLayers.size(); l++) {\n\t\t\t for(int x = BlockX; x < BlockX + Game.DisplayXBlk; x++) {\n\t\t\t\t for(int y = BlockY; y < BlockY + Game.DisplayYBlk; y++) {\n\t\t\t\t\t //try {\n\t\t\t\t\t //Tile.requestTiles(worldLayers.get(l).getBlock(x, y).id);\n\t\t\t\t\t //} catch (Exception e) { }\n\t\t\t\t\t \n\t\t\t\t\t worldLayers.get(l).renderBlock(x, y);\n\t\t\t\t\t \n\t\t\t\t }\n\t\t\t }\n\t\t }\n\t\t //Tile.voidBlock.endUse();\n\t }",
"public void drawWorld(Canvas canvas) {\n\t\tTransformation outerTransformation = canvas.getTransformation();\n\t\tcanvas.setTransformation(outerTransformation.with(transformation.inverse()));\n\t\tif (changedArea != null) {\n//\t\t\tcanvas.setColor(Color.random());\n//\t\t\tcanvas.drawRectangle(changedArea.insetBy(-0.01f));\n//\t\t\tcanvas.setClipping(changedArea.insetBy(-0.01f));//FIXME\n\t\t}\n\t\tchangedArea = null;\n\t\t(new DelegatingCanvas(canvas) {\n\t\t\tboolean draw = true;\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void drawMorph(Morph morph) {\n\t\t\t\t/* draw until this eye is reached, and then stop drawing\n\t\t\t\t * (since everything else is above it in Z-order and thus\n\t\t\t\t * not visible from this eye point of view)\n\t\t\t\t */\n\t\t\t\tif (morph == EyeMorph.this) {\n\t\t\t\t\tdraw = false;\n\t\t\t\t} else if (draw) {\n\t\t\t\t\tsuper.drawMorph(morph);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}).drawMorph(getWorld());\n\n\t\tcanvas.setTransformation(outerTransformation);\n\t\tdrawSubmorphs(canvas);\n\t}",
"public HashMap<String, Location> getWorld() {\r\n\t\treturn this.world;\r\n\t}",
"public String getWorldName() {\n\t\treturn world;\n\t}",
"public void removeFromWorld(World world);",
"public void renderWorld(GraphicsContext g, Actor[][] world) {\n g.clearRect(0, 0, width, height);\n int size = world.length;\n for (int row = 0; row < size; row++) {\n for (int col = 0; col < size; col++) {\n double x = dotSize * col + margin;\n double y = dotSize * row + margin;\n\n if (world[row][col] == Actor.RED) {\n g.setFill(Color.RED);\n } else if (world[row][col] == Actor.BLUE) {\n g.setFill(Color.BLUE);\n } else {\n g.setFill(Color.WHITE);\n }\n g.fillOval(x, y, dotSize, dotSize);\n }\n }\n }",
"public final World getWorld() {\n\t\treturn location.getWorld();\n\t}",
"public ThingNode getWorld()\n {\n return world;\n }",
"@Raw\n protected void setSuperWorld(World world) throws IllegalArgumentException{\n \tif(world == null || isValidSuperWorld(world))\t\tthis.superWorld = world;\n \telse throw new IllegalArgumentException(\"Isn't a valid world @setSuperWorld()\");\n }",
"public World getWorld()\n {\n if (worldData == null)\n {\n return null;\n }\n\n return worldData.getWorld();\n }",
"public final EObject entryRuleWorld() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleWorld = null;\n\n\n try {\n // InternalBoundingBox.g:64:46: (iv_ruleWorld= ruleWorld EOF )\n // InternalBoundingBox.g:65:2: iv_ruleWorld= ruleWorld EOF\n {\n newCompositeNode(grammarAccess.getWorldRule()); \n pushFollow(FOLLOW_1);\n iv_ruleWorld=ruleWorld();\n\n state._fsp--;\n\n current =iv_ruleWorld; \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public long getWorldid() {\n return worldid_;\n }",
"public long getWorldid() {\n return worldid_;\n }",
"public Builder setWorldid(long value) {\n bitField0_ |= 0x00000001;\n worldid_ = value;\n onChanged();\n return this;\n }",
"public Builder setWorldid(long value) {\n bitField0_ |= 0x00000001;\n worldid_ = value;\n onChanged();\n return this;\n }",
"public static World getWorld() {\n\t\treturn ModLoader.getMinecraftInstance().theWorld;\n\t}",
"public AclBuilder setWorld(Permission... permissions) {\n if (world == null) {\n world = new ACL();\n }\n world.setId(new Id(\"world\", \"anyone\"));\n world.setPerms(Permission.encode(permissions));\n return this;\n }",
"@Override\n public void afterWorldInit() {\n }",
"@Override\n\tpublic void update() {\n\t\tworld.update();\n\t}",
"public World getWorld() {\n return location.getWorld();\n }",
"@Override\n\tpublic void registerWorldChunkManager() {\n\t\tworldChunkMgr = new zei_WorldChunkManagerZeitgeist(giants, worldObj);\n\t\tworldType = 99;\n\t\thasNoSky = false;\n\t}",
"public long getWorldid() {\n return worldid_;\n }",
"public long getWorldid() {\n return worldid_;\n }",
"public World getWorld();",
"public void setPosWorldAge(GuiPositions posWorldAge) {\r\n\t\tthis.posWorldAge = posWorldAge;\r\n\t}",
"public void registerWorldChunkManager()\n\t{\n\t\tthis.worldChunkMgr = new WorldChunkMangerHeaven(worldObj.getSeed(), terrainType);\n\t\tthis.hasNoSky = false;\n\t}",
"public void loadWorld() {\n\t\tint[][] tileTypes = new int[100][100];\n\t\tfor (int x = 0; x < 100; x++) {\n\t\t\tfor (int y = 0; y < 100; y++) {\n\t\t\t\ttileTypes[x][y] = 2;\n\t\t\t\tif (x > 40 && x < 60 && y > 40 && y < 60) {\n\t\t\t\t\ttileTypes[x][y] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tEntityList entities = new EntityList(0);\n\t\tPlayer player = new Player(Direction.SOUTH_WEST, 50, 50);\n\t\tentities.addEntity(player);\n\t\tentities.addEntity(new Tree(Direction.SOUTH_WEST,49, 49));\n\t\tworld = new World(new Map(tileTypes), player, entities);\n\t}",
"public World getWorld ( ) {\n\t\treturn invokeSafe ( \"getWorld\" );\n\t}",
"public static World getInstance() {\n\t\tif (world == null) {\n\t\t\tworld = new World();\n\t\t}\n\t\treturn world;\n\t}",
"public OdorWorldFrameMenu(final OdorWorldDesktopComponent frame,\n OdorWorld world) {\n parent = frame;\n this.world = world;\n }",
"void update(Env world) throws Exception;",
"public World(int width, int height, Element bgElement)\n { \n // construct parent\n\n super(width, height, TYPE_INT_ARGB);\n\n // get world parameters\n\n this.background = bgElement.getValue();\n this.width = width;\n this.height = height;\n\n // fill background \n\n fill(background);\n\n // get the pixel array for the world\n\n pixels = ((DataBufferInt)getRaster().getDataBuffer()).getData();\n \n // fill random index array with lots of random indicies\n\n xRndIndex = new int[RND_INDEX_CNT][getWidth()];\n for (int[] row: xRndIndex)\n for (int i = 0; i < row.length; ++i)\n row[i] = rnd.nextInt(row.length);\n }",
"@Override\n\tpublic void show() {\n\t\tworld = new Worlds();\n\t\trenderer = new WorldRenderer(world, false);\n\t\tcontroller = new WorldController(world);\n\t\tGdx.input.setInputProcessor(this);\n\t}",
"public World(int width, int height, World other)\n {\n this(width, height, other, AIR_EL);\n }",
"public World getWorld() {\n\t\treturn Bukkit.getWorld(world);\n\t}",
"@NotNull\r\n World getWorld();",
"private void setGuiSizeToWorldSize() {\n worldPanel.setPreferredSize(new Dimension(worldPanel.getWorld()\n .getWidth(), worldPanel.getWorld().getHeight()));\n worldPanel.setSize(new Dimension(worldPanel.getWorld().getWidth(),\n worldPanel.getWorld().getHeight()));\n this.getParentFrame().pack();\n }",
"protected WorldWindow createWorldWindow() {\n\t\treturn new WorldWindowGLJPanel();\r\n\t\t//return new WorldWindow();\r\n\t}",
"public VirtualWorld(Node rootNode, AssetManager assetManager, ViewPort viewPort){\n sky = new Sky(rootNode, assetManager);\n water = new Water(rootNode, viewPort, assetManager);\n }",
"public WiuWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1xpixels.\n super(WIDTH_WORLD, HEIGHT_WORLD, 1); \n }"
]
| [
"0.8048662",
"0.7999648",
"0.7813439",
"0.71692747",
"0.695829",
"0.6913212",
"0.6824784",
"0.67853856",
"0.6413289",
"0.6360135",
"0.63073885",
"0.625723",
"0.6252197",
"0.6252197",
"0.6244998",
"0.6187882",
"0.618587",
"0.6155885",
"0.6142566",
"0.6119506",
"0.6114606",
"0.611212",
"0.6099812",
"0.60756403",
"0.5953721",
"0.5953071",
"0.5953071",
"0.59506685",
"0.59340763",
"0.59142303",
"0.59111005",
"0.5909683",
"0.59042484",
"0.58956015",
"0.58305293",
"0.5810084",
"0.58085656",
"0.5788158",
"0.57812834",
"0.57812595",
"0.57782346",
"0.57592237",
"0.5746737",
"0.57352203",
"0.572203",
"0.5717963",
"0.57152426",
"0.5703658",
"0.5688342",
"0.56728333",
"0.56688",
"0.5660002",
"0.5645487",
"0.5636773",
"0.56243384",
"0.56090325",
"0.56070644",
"0.55970234",
"0.55804294",
"0.5577132",
"0.55762476",
"0.55644464",
"0.554985",
"0.554877",
"0.554648",
"0.5545747",
"0.5545194",
"0.5535122",
"0.5531293",
"0.5526414",
"0.55263686",
"0.5524464",
"0.5524464",
"0.5502523",
"0.5502523",
"0.5499504",
"0.54964036",
"0.54957914",
"0.5480102",
"0.54782826",
"0.5474882",
"0.5472809",
"0.5472809",
"0.5468524",
"0.54573506",
"0.54546773",
"0.5430841",
"0.54164255",
"0.5415537",
"0.5415011",
"0.5409603",
"0.539322",
"0.53801596",
"0.53791696",
"0.53710514",
"0.5369562",
"0.5364512",
"0.5358231",
"0.53541464",
"0.5344609"
]
| 0.67233884 | 8 |
Returns the font renderer | public FontRenderer getFontRenderer()
{
return this.textRenderer;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public FontRenderer getFontRenderer()\r\n\t{\n\t\treturn this.fontRenderer;\r\n\t}",
"public FontRenderer getFontRenderer() {\n\t\treturn fontRenderer;\n\t}",
"public MinecraftFontRenderer getFont() {\n return fontRenderer;\n }",
"java.lang.String getRenderer();",
"@Override\n public String getFont() {\n return graphicsEnvironmentImpl.getFont(canvas);\n }",
"public String getFont() {\n return font;\n }",
"public RMFont getFont()\n {\n return getStyle().getFont();\n }",
"public String getFontName();",
"public String getFontName();",
"public String getFontName();",
"public Font getFont(\n )\n {return font;}",
"public String getFont()\n {\n return (String) getStateHelper().eval(PropertyKeys.font, null);\n }",
"public Font getFont() {\r\n if (font==null)\r\n return getDesktop().getDefaultFont();\r\n else\r\n return font;\r\n }",
"abstract Font getFont();",
"public Font getFont()\r\n\t{\r\n\t\treturn _g2.getFont();\r\n\t}",
"public static Font getFont() {\n return getFont(12);\n }",
"public Font getFont() {\n return GraphicsEnvironment.getLocalGraphicsEnvironment()\n .getAllFonts()[0];\n }",
"public FontFinder getFontFinder() {\n return NameFont;\n }",
"public String getFontName()\n {\n return font.getFontName();\n }",
"public Font getFont() {\r\n return font;\r\n }",
"public Font getFont() {\r\n return font;\r\n }",
"public abstract Font getFont();",
"public Font getFont() {\n return font;\n }",
"public String getMatchFontName();",
"public String getFontName() {\n return getFontName(Locale.getDefault());\n }",
"public Font getFont() {\n\t\treturn f;\n\t}",
"public Font getFont() {\n\treturn font;\n }",
"public Font getFont() {\n\treturn font;\n }",
"public Font font() {\n return font;\n }",
"public Font getFont() {\n return this.font;\n }",
"String getRendererType();",
"public IsFont getFont() {\n\t\treturn getOriginalFont();\n\t}",
"public FontType getFontType() {\n\t\treturn font;\n\t}",
"Font createFont();",
"public String getFontName() {\n Object value = library.getObject(entries, FONT_NAME);\n if (value instanceof Name) {\n return ((Name) value).getName();\n }\n return FONT_NAME;\n }",
"public static String getFontName() {\n return \"Comic Sans MS\";\n }",
"public String getName() {\n return fontName;\n }",
"public native Font getFont() /*-{\n\t\tvar jso = [email protected]::getJsObj()();\n\t\tvar obj = jso.font;\n\t\treturn @com.emitrom.ti4j.mobile.client.ui.style.Font::new(Lcom/google/gwt/core/client/JavaScriptObject;)(obj);\n }-*/;",
"private Typeface getFont() {\n Typeface fontText = Typeface.createFromAsset(SnapziApplication.getContext().getAssets(), \"fonts/GothamHTF-Book.ttf\");\n return fontText;\n }",
"public synchronized FontProvider getProvider() {\n/* 145 */ if (this.fontProvider == null)\n/* */ {\n/* 147 */ setProvider(DefaultFontProvider.INSTANCE);\n/* */ }\n/* 149 */ return this.fontProvider;\n/* */ }",
"public RMFont getFont() { return getParent()!=null? getParent().getFont() : null; }",
"public Renderer getRenderer()\n\t{\n\t\treturn getObject().getRenderer();\n\t}",
"public CanvasFont getFont() {\n return this.textFont;\n }",
"public String fontName() {\n\t\treturn fontName;\n\t}",
"public String getFontName() {\n\t\treturn this.fontName;\n\t}",
"public org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont getFont()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont)get_store().find_element_user(FONT$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public Font createFont() {\n\t\treturn null;\n\t}",
"public String getFontFamily() {\n Object value = library.getObject(entries, FONT_FAMILY);\n if (value instanceof StringObject) {\n StringObject familyName = (StringObject) value;\n return familyName.getDecryptedLiteralString(library.getSecurityManager());\n }\n return FONT_NAME;\n }",
"public Typeface getTypeface() {\n return mTextContainer.getTypeface();\n }",
"public String getFontFace() {\n\t\treturn _fontFace;\n\t}",
"public String getFontNameText()\r\n\t{\r\n\t\treturn fontNameTextField.getText(); // return the text in the Font Name text field\r\n\t}",
"public Font getLabelFont();",
"public Font GetFont(String name) { return FontList.get(name); }",
"public String getMyFont() {\n return myFont.font; /*Fault:: return \"xx\"; */\n }",
"public FontFile getEmbeddedFont() {\n return font;\n }",
"public final String getFontFamily() {\n return fontFamily;\n }",
"public FontStyle getStyle();",
"public Set<String> getFonts() {\n return generators.keySet();\n }",
"public Font getTextFont() {\r\n\t\treturn getJTextField().getFont();\r\n\t}",
"@Override\n public abstract String getRendererType();",
"FONT createFONT();",
"public String getEmbeddedFontName() throws PDFNetException {\n/* 795 */ return GetEmbeddedFontName(this.a);\n/* */ }",
"public final FontCallback<DatasetContext> getFontCallback() {\n\t\treturn fontCallback;\n\t}",
"public FontProps getFontProps() {\n\t\treturn mFont;\n\t}",
"public native final String fontFamily() /*-{\n\t\treturn this.fontFamily;\n\t}-*/;",
"private String getFontFile(){\n\t\tif (fontFile == null){\n\t\t\tfontFile = escapeForVideoFilter(ResourcesManager.getResourcesManager().getOpenSansResource().location);\n\t\t}\n\t\treturn fontFile;\n\t}",
"public Font[] getFonts() {\n return fonts;\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}",
"@NativeType(\"bgfx_renderer_type_t\")\n public static int bgfx_get_renderer_type() {\n long __functionAddress = Functions.get_renderer_type;\n return invokeI(__functionAddress);\n }",
"private String getFontTag()\n\t{\n\t\treturn \"<\" + getFontName() + \" \" + getFontValue() + \">\";\n\t}",
"public Font getJavaFont() {\n return javaFont;\n }",
"public FontUIResource getControlTextFont() { return fControlFont;}",
"public void GetFont (){\n fontBol = false;\n fontBolS = true;\n fontBolA = true;\n fontBolW = true;\n }",
"public final String getFontColor() {\n\t\treturn fontColor;\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 GLRenderer getRenderer()\n\t{\n\t\treturn renderer;\n\t}",
"public static Font getDefaultFont() {\r\n return defaultFont;\r\n }",
"public DirectShapeRenderer getRenderer() {\n \t\treturn renderer;\n \t}",
"private static native Font createFont(String name, GFontPeer peer, int gdkfont);",
"public OptionRenderer getRenderer() {\n return renderer;\n }",
"public static Font getFont(String name) {\r\n\t\treturn (Font) getInstance().addResource(name);\r\n\t}",
"private BufferedImage getFontImage() {\n\t\t\tfinal BufferedImage fontImage = new BufferedImage(64, 64, BufferedImage.TYPE_INT_ARGB);\n\n\t\t\tfinal Graphics2D gt = (Graphics2D) fontImage.getGraphics();\n\t\t\tgt.setFont(awtFont);\n\t\t\tgt.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t\t\tgt.setColor(Color.WHITE);\n\n\t\t\t// TODO: should really use MaxAscent here? Would likely waste space\n\t\t\tgt.drawString(String.valueOf(c), FontTextureHelper.padding, fontMetrics.getAscent() + FontTextureHelper.padding);\n\n\t\t\treturn fontImage;\n\t\t}",
"private void setFont() {\n\t}",
"public String getDefaultFontFamily() {\n return this.defaultFontFamily;\n }",
"com.google.protobuf.ByteString\n getRendererBytes();",
"public Font getStandardFont(DiagramContext context) {\n\t\treturn context.getResources().getSystemFont();\n\t}",
"public VolumeRenderer getRenderer() {\n\t\treturn renderer;\n\t}",
"public final Color getFontColour() {\n return fontColour;\n }",
"@Deprecated\r\n public String getFont()\r\n {\r\n return this.font;\r\n }",
"public int getRenderType()\r\n {\r\n return mod_FCBetterThanWolves.iCustomPlatformRenderID;\r\n }",
"public String getSelectedFontName()\r\n\t{\r\n\t\treturn fontNamesList.getSelectedValue(); // return the currently selected font name\r\n\t}",
"public FontDisplay()\r\n\t{\r\n\t\t// Get all Fonts from the System\r\n\t\tGraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();\r\n\t\tFont[] fonts = ge.getAllFonts();\r\n\r\n\t\t// Build a list of styled Font Names\r\n\t\tStringBuilder sb = new StringBuilder(\"<html><body style='font-size: 18px'>\");\r\n\t\tfor (Font font : fonts)\r\n\t\t{\r\n\t\t\tsb.append(\"<p style='font-family: \");\r\n\t\t\tsb.append(font.getFontName());\r\n\t\t\tsb.append(\"'>\");\r\n\t\t\tsb.append(font.getFontName());\r\n\t\t\tsb.append(\"</p>\");\r\n\t\t}\r\n\r\n\t\t// Add built list to EditorPane\r\n\t\tJEditorPane fontEP = new JEditorPane();\r\n\t\tfontEP.setMargin(new Insets(10, 10, 10, 10));\r\n\t\tfontEP.setContentType(\"text/html\");\r\n\t\tfontEP.setText(sb.toString());\r\n\t\tfontEP.setEditable(false);\r\n\r\n\t\t// Add EditorPane to ScrollPane\r\n\t\tJScrollPane scrollPane = new JScrollPane(fontEP);\r\n\t\tscrollPane.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));\r\n\r\n\t\t// Create a Label for the EditorPane\r\n\t\tJLabel titleLabel = new JLabel(\"Available Fonts on System\",\r\n SwingConstants.CENTER);\r\n\t\ttitleLabel.setFont(new Font(titleLabel.getFont().getName(), Font.BOLD, 17));\r\n\t\ttitleLabel.setForeground(new Color(21, 149, 211));\r\n\r\n\t\tImageIcon logo = new ImageIcon(\"Snowbound_Software_logo_full_2012.png\");\r\n\t\tJLabel logoLabel = new JLabel();\r\n\t\tlogoLabel.setIcon(logo);\r\n\t\tJPanel logoPane = new JPanel();\r\n\t\tlogoPane.setLayout(new BoxLayout(logoPane, BoxLayout.X_AXIS));\r\n\t\tlogoPane.add(logoLabel);\r\n\t\tlogoPane.add(Box.createHorizontalStrut(12));\r\n\t\tlogoPane.add(new JSeparator(JSeparator.VERTICAL));\r\n\t\tlogoPane.add(Box.createHorizontalStrut(6));\r\n\t\t// Add Label to Panel\r\n\t\tJPanel labelPane = new JPanel(new BorderLayout(0, 10));\r\n\t\tlabelPane.setBorder(BorderFactory.createEmptyBorder(12, 12, 0, 12));\r\n\t\tlabelPane.add(logoPane, BorderLayout.WEST);\r\n\t\tlabelPane.add(titleLabel, BorderLayout.CENTER);\r\n\t\tlabelPane.add(new JSeparator(), BorderLayout.SOUTH);\r\n\r\n\t\t// Add Panels to Frame\r\n\t\tthis.getContentPane().setLayout(new BorderLayout());\r\n\t\tthis.add(labelPane, BorderLayout.NORTH);\r\n\t\tthis.add(scrollPane, BorderLayout.CENTER);\r\n\r\n\t\t// Initialize Frame\r\n\t\tthis.setTitle(\"Snowbound Software :: Font Display\");\r\n\t\tthis.setSize(500, 650);\r\n\t\tthis.setVisible(true);\r\n\t\tthis.setDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t}",
"public Font getCellFont() {\n return cellFont;\n }",
"public String getFont(String id)\n\t{\n\t\tString font = fontElementMap.get(id);\n\t\tif (font == null)\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn font;\n\t\t}\n\t}",
"public interface VisualFont extends VisualResource {\n /**\n * May be set to cause fonts with the corresponding name to be matched.\n */\n public String getMatchFontName();\n /**\n * May be set to cause fonts with the corresponding name to be matched.\n */\n public void setMatchFontName(String matchFontName);\n\n /**\n * Returns true result if the desired font was located, or false if it was \n * not. If this value is set to false, no other results are set. If this \n * value is set to true, all other results are set.\n */\n public boolean getExists();\n\n /**\n * When a font is matched, the name of the font is returned here.\n */\n public String getFontName();\n\n /**\n * Fetches the results of the next matching <code>VisualFont</code>, if \n * any.\n * @return \n */\n public boolean getNext();\n\n}",
"private SpriteFont getSpriteFontInstance() {\r\n\t\t// called by the seed batch upon making a batch\r\n\t\t// only needs docPoint if an influenceImage is set\r\n\t\t//System.out.println(\"SpriteFontBiome::getSpriteFontInstance ... num biomeItems = \" + biomeItems.size());\r\n\t\tif (probabilitiesNormalised == false) normaliseProbabilities();\r\n\r\n\t\tif (biomeItems.size() == 1) {\r\n\t\t\treturn biomeItems.get(0);\r\n\t\t}\r\n\r\n\t\t\r\n\t\tfloat r = randomStream.randRangeF(0f, 1f);\r\n\t\treturn getSpriteFontFromProbabilityStack(r);\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n public TF addFont() {\n final ParameterizedType pt = (ParameterizedType) getClass()\n .getGenericSuperclass();\n final ParameterizedType paramType = (ParameterizedType) pt\n .getActualTypeArguments()[2];\n final Class<TF> fontClass = (Class<TF>) paramType.getRawType();\n try {\n final Constructor<TF> c = fontClass\n .getDeclaredConstructor(ACellStyle.class);\n return c.newInstance(this);\n }\n catch (final Exception e) {\n throw new ReportBuilderException(e);\n }\n }",
"public TextRenderModeEnum getRenderMode(\n )\n {return renderMode;}",
"public void setFont(RMFont aFont) { }",
"public native final String fontColor() /*-{\n\t\treturn this.fontColor;\n\t}-*/;"
]
| [
"0.83336383",
"0.82188576",
"0.8109636",
"0.7644329",
"0.75765395",
"0.7483639",
"0.7462137",
"0.7421812",
"0.7421812",
"0.7421812",
"0.7346058",
"0.73012674",
"0.723417",
"0.71914494",
"0.7186465",
"0.717671",
"0.7116908",
"0.7086287",
"0.70722395",
"0.7070558",
"0.7070558",
"0.7059084",
"0.7057033",
"0.7041453",
"0.7010687",
"0.6995599",
"0.6963179",
"0.6963179",
"0.69285333",
"0.68459815",
"0.68336236",
"0.6831283",
"0.6829195",
"0.6819616",
"0.67971337",
"0.67819065",
"0.67705685",
"0.6764783",
"0.67549455",
"0.67316025",
"0.6717373",
"0.6701194",
"0.663694",
"0.65708756",
"0.6562518",
"0.65464157",
"0.653923",
"0.65039396",
"0.6493748",
"0.6492373",
"0.6479092",
"0.64681756",
"0.64550316",
"0.64254165",
"0.6419528",
"0.6367773",
"0.6355549",
"0.6351624",
"0.63425916",
"0.6330053",
"0.63074726",
"0.6303892",
"0.63037133",
"0.628124",
"0.62620133",
"0.62370086",
"0.6216219",
"0.62049",
"0.6195101",
"0.6151055",
"0.6146585",
"0.6139442",
"0.61370856",
"0.61278963",
"0.6118615",
"0.6117092",
"0.6102812",
"0.6084584",
"0.60527366",
"0.605024",
"0.6033905",
"0.6019031",
"0.60094345",
"0.6007252",
"0.60034144",
"0.59812623",
"0.59700876",
"0.596217",
"0.59544045",
"0.5936269",
"0.5920525",
"0.59149885",
"0.58963686",
"0.5881124",
"0.5871865",
"0.58444643",
"0.5838919",
"0.5830908",
"0.5826479",
"0.5821472"
]
| 0.8316474 | 1 |
Interact with camera module and manager sub detection features. | public interface IDetectionManager {
/**
* Interface used for get and change a capture request.
*/
public interface IDetectionListener {
/**
* Get the current repeating request type {@link RequestType}.
*
* @return The current type of capture request.
*/
public RequestType getRepeatingRequestType();
/**
* Request change capture request.
*
* @param sync
* Whether should respond this request immediately, true request
* immediately,false wait all requests been submitted and remove the same request
* current design is only for
* {@link ISettingChangedListener#onSettingChanged(java.util.Map)}.
* @param requestType
* The required request, which is one of the {@link RequestType}.
* @param captureType
* The required capture, which is one of the {@link CaptureType}.
*/
public void requestChangeCaptureRequest(boolean sync, RequestType requestType,
CaptureType captureType);
}
/**
* The life cycle corresponding to camera activity onCreate.
*
* @param activity
* Camera activity.
* @param parentView
* The root view of camera activity.
* @param isCaptureIntent
* {@link com.android.camera.v2.CameraActivityBridge #isCaptureIntent()}.
*/
void open(Activity activity, ViewGroup parentView, boolean isCaptureIntent);
/**
* The life cycle corresponding to camera activity onResume.
*/
void resume();
/**
* The life cycle corresponding to camera activity onPause.
*/
void pause();
/**
* The life cycle corresponding to camera activity onDestory.
*/
void close();
/**
* {@link com.android.camera.v2.app.GestureManager.GestureNotifier
* #onSingleTapUp(float, float)}.
*
* @param x
* The x-coordinate.
* @param y
* The y-coordinate.
*/
void onSingleTapUp(float x, float y);
/**
* {@link com.android.camera.v2.app.GestureManager.GestureNotifier #onLongPress(float, float)}.
*
* @param x
* The x-coordinate.
* @param y
* The y-coordinate.
*/
void onLongPressed(float x, float y);
/**
* {@link PreviewStatusListener
* #onPreviewLayoutChanged(android.view.View, int, int, int, int, int, int, int, int)}.
*
* @param previewArea
* The preview area.
*/
void onPreviewAreaChanged(RectF previewArea);
/**
* {@link com.android.camera.v2.CameraActivityBridge #onOrientationChanged(int)}.
*
* @param orientation
* The current G-sensor orientation.
*/
void onOrientationChanged(int orientation);
/**
* Configuring capture requests.
*
* @param requestBuilders The builders of capture requests.
* @param captureType {@link CaptureType}.
*/
void configuringSessionRequests(Map<RequestType, CaptureRequest.Builder> requestBuilders,
CaptureType captureType);
/**
* This method is called when the camera device has started capturing the output image for the
* request, at the beginning of image exposure.
*
* @param request
* The request for the capture that just begun.
* @param timestamp
* The time stamp at start of capture, in nanoseconds.
* @param frameNumber
* The frame number for this capture.
*/
void onCaptureStarted(CaptureRequest request, long timestamp, long frameNumber);
/**
* This method is called when an image capture has fully completed and all the result metadata
* is available.
*
* @param request
* The request that was given to the CameraDevice
*
* @param result
* The total output metadata from the capture, including the final capture parameters
* and the state of the camera system during capture.
*/
void onCaptureCompleted(CaptureRequest request, TotalCaptureResult result);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void openCamera() {\n \n\n }",
"public void camera(){\n System.out.println(\"I am taking pictures...\");\r\n }",
"void cameraSetup();",
"public void onCamera();",
"void cameraInOperation(boolean in_operation, boolean is_video);",
"public ToggleCameraMode() {\n requires(Robot.vision);\n }",
"public CameraPanel() {\n initComponents();\n jLabel1.setText(\"<html>Select Camera one<br>by one & press<br>Capture Button.\");\n System.loadLibrary(\"opencv_java330\"); \n facedetector = new CascadeClassifier(\"haarcascade_frontalface_alt.xml\");\n facedetections = new MatOfRect();\n \n }",
"@Override\n public void run() {\n cameraDetector.setDetectJoy(true);\n cameraDetector.setDetectAnger(true);\n cameraDetector.setDetectSadness(true);\n cameraDetector.setDetectSurprise(true);\n cameraDetector.setDetectFear(true);\n cameraDetector.setDetectDisgust(true);\n }",
"@Override\n public void runOpMode() {\n frontLeftWheel = hardwareMap.dcMotor.get(\"frontLeft\");\n backRightWheel = hardwareMap.dcMotor.get(\"backRight\");\n frontRightWheel = hardwareMap.dcMotor.get(\"frontRight\");\n backLeftWheel = hardwareMap.dcMotor.get(\"backLeft\");\n\n //telemetry sends data to robot controller\n telemetry.addData(\"Output\", \"hardwareMapped\");\n\n // The TFObjectDetector uses the camera frames from the VuforiaLocalizer, so we create that\n // first.\n initVuforia();\n\n if (ClassFactory.getInstance().canCreateTFObjectDetector()) {\n initTfod();\n } else {\n telemetry.addData(\"Sorry!\", \"This device is not compatible with TFOD\");\n }\n\n /**\n * Activate TensorFlow Object Detection before we wait for the start command.\n * Do it here so that the Camera Stream window will have the TensorFlow annotations visible.\n **/\n if (tfod != null) {\n tfod.activate();\n }\n\n /** Wait for the game to begin */\n telemetry.addData(\">\", \"Press Play to start op mode\");\n telemetry.update();\n waitForStart();\n\n if (opModeIsActive()) {\n while (opModeIsActive()) {\n if (tfod != null) {\n // getUpdatedRecognitions() will return null if no new information is available since\n // the last time that call was made\n List<Recognition> updatedRecognitions = tfod.getUpdatedRecognitions();\n if(updatedRecognitions == null) {\n frontLeftWheel.setPower(0);\n frontRightWheel.setPower(0);\n backLeftWheel.setPower(0);\n backRightWheel.setPower(0);\n } else if (updatedRecognitions != null) {\n telemetry.addData(\"# Object Detected\", updatedRecognitions.size());\n // step through the list of recognitions and display boundary info.\n int i = 0;\n\n\n for (Recognition recognition : updatedRecognitions) {\n float imageHeight = recognition.getImageHeight();\n float blockHeight = recognition.getHeight();\n\n //-----------------------\n// stoneCX = (recognition.getRight() + recognition.getLeft())/2;//get center X of stone\n// screenCX = recognition.getImageWidth()/2; // get center X of the Image\n// telemetry.addData(\"screenCX\", screenCX);\n// telemetry.addData(\"stoneCX\", stoneCX);\n// telemetry.addData(\"width\", recognition.getImageWidth());\n //------------------------\n\n telemetry.addData(\"blockHeight\", blockHeight);\n telemetry.addData(\"imageHeight\", imageHeight);\n telemetry.addData(String.format(\"label (%d)\", i), recognition.getLabel());\n telemetry.addData(String.format(\" left,top (%d)\", i), \"%.03f , %.03f\", recognition.getLeft(), recognition.getTop());\n telemetry.addData(String.format(\" right,bottom (%d)\", i), \"%.03f , %.03f\", recognition.getRight(), recognition.getBottom());\n\n\n if(hasStrafed == false) {\n float midpoint = (recognition.getLeft() + recognition.getRight()) /2;\n float multiplier ;\n if(midpoint > 500) {\n multiplier = -(((int)midpoint - 500) / 100) - 1;\n log = \"Adjusting Right\";\n sleep(200);\n } else if(midpoint < 300) {\n multiplier = 1 + ((500 - midpoint) / 100);\n log = \"Adjusting Left\";\n sleep(200);\n } else {\n multiplier = 0;\n log = \"In acceptable range\";\n hasStrafed = true;\n }\n frontLeftWheel.setPower(-0.1 * multiplier);\n backLeftWheel.setPower(0.1 * multiplier);\n frontRightWheel.setPower(-0.1 * multiplier);\n backRightWheel.setPower(0.1 * multiplier);\n } else {\n if( blockHeight/ imageHeight < .5) {\n frontLeftWheel.setPower(-.3);\n backLeftWheel.setPower(.3);\n frontRightWheel.setPower(.3);\n backRightWheel.setPower(-.3);\n telemetry.addData(\"detecting stuff\", true);\n } else {\n frontLeftWheel.setPower(0);\n backLeftWheel.setPower(0);\n frontRightWheel.setPower(0);\n backRightWheel.setPower(0);\n telemetry.addData(\"detecting stuff\", false);\n }\n }\n\n telemetry.addData(\"Angle to unit\", recognition.estimateAngleToObject(AngleUnit.DEGREES));\n telemetry.addData(\"Log\", log);\n\n }\n telemetry.update();\n }\n\n }\n }\n }\n if (tfod != null) {\n tfod.shutdown();\n }\n }",
"public void runOpMode() throws InterruptedException {\n robot.init(hardwareMap);\n BNO055IMU.Parameters parameters1 = new BNO055IMU.Parameters();\n parameters1.angleUnit = BNO055IMU.AngleUnit.DEGREES;\n imu = hardwareMap.get(BNO055IMU.class, \"imu\");\n imu.initialize(parameters1);\n int cameraMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\"cameraMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n robot.arm.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.arm.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n //P.S. if you're using the latest version of easyopencv, you might need to change the next line to the following:\n phoneCam = OpenCvCameraFactory.getInstance().createInternalCamera(OpenCvInternalCamera.CameraDirection.BACK, cameraMonitorViewId);\n //phoneCam = new OpenCvInternalCamera(OpenCvInternalCamera.CameraDirection.BACK, cameraMonitorViewId);//remove this\n\n phoneCam.openCameraDevice();//open camera\n phoneCam.setPipeline(new StageSwitchingPipeline());//different stages\n phoneCam.startStreaming(rows, cols, OpenCvCameraRotation.SIDEWAYS_LEFT);//display on RC\n //width, height\n //width = height in this case, because camera is in portrait mode.\n\n runtime.reset();\n while (!isStarted()) {\n for (int i = 0; i <= 7; i++) {\n telemetry.addData(\"Values\", vals[i]);\n }\n for (int i = 0; i <= 7; i++) {\n totals = totals + vals[i];\n }\n totals = totals / 255;\n telemetry.addData(\"total\", totals);\n\n telemetry.addData(\"Height\", rows);\n telemetry.addData(\"Width\", cols);\n\n telemetry.update();\n sleep(100);\n\n if (totals >= 4) {\n StartAngle = 30;\n StartDistance = 105;\n StartBack = -40;\n ReturnAngle = 28;\n ReturnDistance = -85;\n drop2 = 112;\n mid = 0;\n backup2 = -33;\n } else if (totals <= 0) {\n StartAngle = 55;\n StartDistance= 85;\n StartBack = -5;\n ReturnAngle = 38;\n ReturnDistance = -60;\n drop2 = 65;\n mid = -2;\n backup2 = -31;\n } else {\n StartAngle = 17;\n StartDistance = 75;\n StartBack = -20;\n ReturnAngle = 22;\n ReturnDistance = -49;\n drop2 = 95;\n mid = -18;\n backup2 = -41;\n }\n totals = 0;\n }\n\n\n\n gyroDrive(DRIVE_SPEED,6,0,30,0);\n gyroDrive(DRIVE_SPEED,36,-45,30,0);\n gyroDrive(DRIVE_SPEED,StartDistance,StartAngle,30,0);\n\n //robot.arm.setTargetPosition(-450);\n //robot.arm.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n /*robot.arm.setPower(-.1);\n //robot.arm.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n gyroHold(DRIVE_SPEED,0,2);\n robot.claw.setPosition(0);\n robot.arm.setPower(.05);\n gyroHold(DRIVE_SPEED,0,1);\n gyroDrive(DRIVE_SPEED,-10,0,5,0);\n gyroTurn(TURN_SPEED,90);\n gyroDrive(DRIVE_SPEED,-20,90,5,0);\n\n */\n gyroTurn(TURN_SPEED,ReturnAngle);\n robot.LWheel.setPower(-.9);\n robot.RWheel.setPower(-.9);\n gyroDrive(DRIVE_SPEED, ReturnDistance,ReturnAngle, 30,0);\n gyroHold(TURN_SPEED,3,1);\n robot.lock.setPosition(1);\n robot.RTrack.setPosition(1);\n robot.LTrack.setPosition(0);\n gyroHold(TURN_SPEED,0,2);\n gyroHold(TURN_SPEED,-3,2);\n robot.LWheel.setPower(0);\n robot.RWheel.setPower(0);\n robot.RTrack.setPosition(.5);\n robot.LTrack.setPosition(.5);\n gyroTurn(TURN_SPEED,ReturnAngle);\n gyroDrive(DRIVE_SPEED, backup2, ReturnAngle, 30,0);\n\n gyroTurn(TURN_SPEED,90);\n gyroDrive(DRIVE_SPEED,52,80,5,0);\n gyroTurn(TURN_SPEED,65);\n gyroDrive(DRIVE_SPEED,drop2,2 + mid,10,0);\n robot.RDrop.setPosition(.23);\n robot.LDrop.setPosition(.23);\n gyroDrive(DRIVE_SPEED,StartBack,0,5,0);\n robot.arm.setPower(-.2);\n\n gyroHold(TURN_SPEED,0,1.7);\n robot.arm.setPower(0);\n }",
"public void onCameraOpened() {\n openCameraCommon();\n initializeControlByIntent();\n new Thread() {\n public void run() {\n try {\n Thread.sleep(500);\n PhotoModule.this.mIsCameraOpened = true;\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }.start();\n }",
"public void getCameraInstance() {\n newOpenCamera();\n }",
"@Override\n public void init() {\n startCamera();\n }",
"public void startFrontCam() {\n }",
"public void updateCamera() {\n\t}",
"public void startGearCam() {\n }",
"public void startCameraProcessing() {\n this.checkCameraPermission();\n\n try {\n cameraManager.openCamera(cameraId, new CameraDevice.StateCallback() {\n @Override\n public void onOpened(@NonNull CameraDevice camera) {\n cameraDevice = camera;\n onCameraOpened();\n }\n\n @Override\n public void onDisconnected(@NonNull CameraDevice camera) {\n\n }\n\n @Override\n public void onError(@NonNull CameraDevice camera, int error) {\n System.out.println(\"CAMERA ERROR OCCURRED: \" + error);\n }\n\n @Override\n public void onClosed(@NonNull CameraDevice camera) {\n super.onClosed(camera);\n }\n }, null);\n }\n catch (Exception e) {\n System.out.println(\"CAMERA FAILED TO OPEN\");\n e.printStackTrace();\n }\n }",
"private void checkCameraPermission() {\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.CAMERA)\n != PackageManager.PERMISSION_GRANTED) {\n\n // Permission is not granted\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.CAMERA)) {\n\n // Show an explanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n\n } else {\n\n // No explanation needed; request the permission\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.CAMERA},\n 0);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n } else {\n cameraView = (JavaCameraView) findViewById(R.id.camera);\n cameraView.setVisibility(SurfaceView.VISIBLE);\n cameraView.setCvCameraViewListener(this);\n\n mLoaderCallback = new BaseLoaderCallback(this) {\n\n @Override\n public void onManagerConnected(int status) {\n switch (status) {\n case LoaderCallbackInterface.SUCCESS: {\n Log.i(\"\", \"Opencv loading success.\");\n cameraView.enableView();\n break;\n }\n default: {\n Log.i(\"OPENCV\", \"Opencv loading failed!\");\n super.onManagerConnected(status);\n }\n break;\n }\n }\n };\n }\n }",
"public MultiCameraModule(AppController app) {\n super(app);\n mDetectionManager = new DetectionManager(app, this, null);\n mAaaControl = new ControlImpl(app, this, true, null);\n mRemoteTouchFocus = new RemoteTouchFocus(app.getServices().getSoundPlayback(), app,\n new RemoteAaaListener(), app.getCameraAppUi().getModuleLayoutRoot());\n mCameraIdManager = new CameraIdManager();\n mFocusStateListenerMangaer = new FocusStateListenerMangaer();\n mCameraSemaphoreCtrl = new CameraSemaphoreCtrl();\n }",
"@Override\n\tpublic void robotInit() {\n\t\t\n\t\t//CameraServer.getInstance().startAutomaticCapture(); //Minimum required for camera\n\t\t\n\t\t//new Thread(() -> {\n UsbCamera camera = CameraServer.getInstance().startAutomaticCapture();\n camera.setResolution(640, 480);\n camera.setWhiteBalanceAuto();\n camera.setFPS(20);\n \n //CvSink cvSink = CameraServer.getInstance().getVideo();\n //CvSource outputStream = CameraServer.getInstance().putVideo(\"Blur\", 640, 480);\n /* \n Mat source = new Mat();\n Mat output = new Mat();\n \n while(!Thread.interrupted()) {\n cvSink.grabFrame(source);\n Imgproc.cvtColor(source, output, Imgproc.COLOR_BGR2GRAY);\n outputStream.putFrame(output);\n }*/\n //}).start();\n\t\t\n\t\t\n\t\t\n\t\t/**\n\t\t * 7780 long run\n\t\t */\n\t\t\n\t\tdriverStation = DriverStation.getInstance();\n\t\t// Initialize all subsystems\n\t\tm_drivetrain = new DriveTrain();\n\t\tm_pneumatics = new Pneumatics();\n\t\t\n\t\tm_pneumatics.createSolenoid(RobotMap.PNEUMATICS.GEARSHIFT_SOLENOID, \n\n\t\t\t\tRobotMap.PNEUMATICS.SOLENOID_ID_1, \n\n\t\t\t\tRobotMap.PNEUMATICS.SOLENOID_ID_2);\n\t\t\n\t\tm_pneumatics.createSolenoid(RobotMap.PNEUMATICS.FORKLIFT_SOLENOID, RobotMap.PNEUMATICS.SOLENOID_ID_3, RobotMap.PNEUMATICS.SOLENOID_ID_4);\n\t\t\n\t\tm_forklift = new ForkLift();\n\t\tm_intake = new Intake();\n\t\tm_oi = new OI();\n\n\t\t// instantiate the command used for the autonomous period\n\t\tm_autonomousCommand = new Autonomous();\n\t\tdriverXbox = m_oi.getDriverXboxControl();\n\t\toperatorXbox = m_oi.getDriverXboxControl();\n\t\tsetupAutoCommands();\n\t\t\n\t\t//chooser.addDefault(\"Left Long\",new LeftLong());\n\t\t\n\t\t//SmartDashboard.putData(\"Auto\",chooser);\n\n\t\t// Show what command your subsystem is running on the SmartDashboard\n\t\tSmartDashboard.putData(m_drivetrain);\n\t\tSmartDashboard.putData(m_forklift);\n\t\t\n\t}",
"public void startCamera()\n {\n startCamera(null);\n }",
"public static void main(String[] args) {\n\t\tSystem.loadLibrary(\"opencv_java310\");\n\n // Connect NetworkTables, and get access to the publishing table\n\t\tNetworkTable.setClientMode();\n\t\tNetworkTable.setTeam(4662);\n\t\tNetworkTable.initialize();\n\t\tNetworkTable visionTable = NetworkTable.getTable(\"Vision\");\n\t\n\t//gpio for relay light control\n\t\tfinal GpioController gpio = GpioFactory.getInstance();\n\t\tfinal GpioPinDigitalOutput gearLight = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_00, \"Gear\", PinState.LOW);\n\t\tgearLight.setShutdownOptions(true, PinState.LOW);\n\t\tfinal GpioPinDigitalOutput fuelLight = gpio.provisionDigitalOutputPin(RaspiPin.GPIO_01, \"Fuel\", PinState.LOW);\n\t\tfuelLight.setShutdownOptions(true, PinState.LOW);\n\n \n // This is the network port you want to stream the raw received image to\n // By rules, this has to be between 1180 and 1190, so 1185 is a good choice\n// \tint streamPort = 1185;\n// \tint streamPort2 = 1187;\n // This stores our reference to our mjpeg server for streaming the input image\n // \tMjpegServer inputStream = new MjpegServer(\"MJPEG Server\", streamPort);\n // \tMjpegServer inputStream2 = new MjpegServer(\"MJPEG Server2\", streamPort2);\n// \tUsbCamera camera = setUsbCamera(\"GearCam\",0, inputStream);\n// \tUsbCamera cam2 = setUsbCamera(\"ShootCam\",1, inputStream2);\n\t\tUsbCamera camera = setUsbCamera(\"GearCam\",0);\n\t\tUsbCamera cam2 = setUsbCamera(\"ShootCam\",1);\n\n // This creates a CvSink for us to use. This grabs images from our selected camera, \n // and will allow us to use those images in opencv\n\t\tCvSink imageSink = new CvSink(\"CV Image Grabber\");\n\t\timageSink.setSource(camera);\n\n // This creates a CvSource to use. This will take in a Mat image that has had OpenCV operations\n // operations \n\t\tCvSource imageSource = new CvSource(\"CV Image Source\", VideoMode.PixelFormat.kMJPEG, 640, 480, 15);\n\t\tMjpegServer cvStream = new MjpegServer(\"CV Image Stream\", 1186);\n\t\tcvStream.setSource(imageSource);\n\n // All Mats and Lists should be stored outside the loop to avoid allocations\n // as they are expensive to create\n\t\tMat inputImage = new Mat();\n// Mat hsv = new Mat();\n\t\tPegFilter gearTarget = new PegFilter();\n\t\tBoilerPipeLine shootTarget = new BoilerPipeLine();\n\n\t\tdo {\n\t\t\tvisionTable.putBoolean(\"Take Pic\", bVisionInd);\n\t\t\tvisionTable.putBoolean(\"Keep Running\", bCameraLoop);\n\t\t\tvisionTable.putBoolean(\"IsGearDrive\", bGearDrive);\n\t\t\tvisionTable.putBoolean(\"IsVisionOn\", bVisionOn);\n\t\t} while (!visionTable.isConnected());\n\t\t\n\t\t\n\t\n\t\tdouble r1PixelX = -1;\n\t\tdouble r1PixelY = -1;\n\t\tdouble r1PixelH = -1;\n\t\tdouble r1PixelW = -1;\n\t\tboolean bIsTargetFound = false;\n\n\t\t// Infinitely process image\n\t int i=0;\n\t\twhile (bCameraLoop) {\n\t\n\t\t\tbGearDrive = visionTable.getBoolean(\"IsGearDrive\", bGearDrive);\n\t\t\tbVisionOn = visionTable.getBoolean(\"IsVisionOn\", bVisionOn);\n\t\n\t \tif (bVisionOn) {\n\t \t\tif (bGearDrive) {\n\t \t\t\tgearLight.high();\n\t \t\t\tfuelLight.low();\n\t \t\t} else {\n\t \t\t\tfuelLight.high();\n\t \t\t\tgearLight.low();\n\t \t\t}\n\t \t} else {\n\t \t\tgearLight.low();\n\t \t\tfuelLight.low();\n\t \t}\n\t \t\tif (bGearDrive) {\n\t \t\t imageSink.setSource(camera);\n\t \t\t} else {\n\t \t\t imageSink.setSource(cam2);\n\t \t\t}\n\t \t\n\t // Grab a frame. If it has a frame time of 0, there was an error.\n\t // Just skip and continue\n\t \t\tlong frameTime = imageSink.grabFrame(inputImage);\n\t \t\tif (frameTime == 0) continue;\n\t\n\t // Below is where you would do your OpenCV operations on the provided image\n\t // The sample below just changes color source to HSV\n\t// Imgproc.cvtColor(inputImage, hsv, Imgproc.COLOR_BGR2HSV);\n\t\t\tbIsTargetFound = false;\n\t\t\tint objectsFound = 0;\n\t\t\tif (bGearDrive) {\n\t\t\t\tgearTarget.process(inputImage);\n\t\t\t \tobjectsFound = gearTarget.filterContoursOutput().size();\n\t\t\t} else {\n\t\t\t\tobjectsFound = 0;\n\t\t\t\tshootTarget.process(inputImage);\n\t\t\t\tobjectsFound = shootTarget.filterContoursOutput().size();\n\t\t\t}\n\t \n\t\t \tif (objectsFound >= 1) {\n\t\t \t\tbIsTargetFound = true;\n\t\t \tif (bGearDrive) {\n\t\t \t\tRect r1 = Imgproc.boundingRect(gearTarget.filterContoursOutput().get(0));\n\t\t \t\tr1PixelX = r1.x;\n\t\t\t \tr1PixelY = r1.y;\n\t\t\t \tr1PixelW = r1.width;\n\t\t\t \tr1PixelH = r1.height;\n\t\t \t\t} else {\n\t\t \t\t\tRect r1 = Imgproc.boundingRect(shootTarget.filterContoursOutput().get(0));\t\n\t\t \t\t\tr1PixelX = r1.x;\n\t\t\t \tr1PixelY = r1.y;\n\t\t\t \tr1PixelW = r1.width;\n\t\t\t \tr1PixelH = r1.height;\n\t\t \t\t}\n\t\t \t\n\t\t \t} else {\n\t\t \tr1PixelX = -1;\n\t\t \tr1PixelY = -1;\n\t\t \tr1PixelW = -1;\n\t\t \tr1PixelH = -1;\n\t\t \t}\n\t\t \t\n\t\t \tif (bGearDrive) {\n\t\t \t\tImgproc.rectangle(inputImage, GEAR_TRGT_UPPER_LEFT, GEAR_TRGT_LOWER_RIGHT,\n\t\t \t\t\t\tRECT_COLOR, RECT_LINE_WIDTH);\n\t\t \t} else {\n\t\t \t\tImgproc.rectangle(inputImage, BOILER_TRGT_UPPER_LEFT, BOILER_TRGT_LOWER_RIGHT,\n\t\t \t\t\t\tRECT_COLOR, RECT_LINE_WIDTH);\n\t\t \t}\n\t\n\t\t \tvisionTable.putBoolean(\"IsTargetFound\", bIsTargetFound);\n\t\t visionTable.putNumber(\"Target1X\", r1PixelX);\n\t\t visionTable.putNumber(\"Target1Y\", r1PixelY);\n\t\t visionTable.putNumber(\"Target1Width\", r1PixelW);\n\t\t visionTable.putNumber(\"Target1Height\", r1PixelH);\n\t\n\t \tvisionTable.putNumber(\"Next Pic\", i);\n\t \tbVisionInd = visionTable.getBoolean(\"Take Pic\", bVisionInd);\n\t \tif (bVisionInd) {\n\t \t\tchar cI = Character.forDigit(i, 10);\n\t \t\tImgcodecs.imwrite(\"/home/pi/vid\" + cI + \".jpg\", inputImage);\n//\t \t\tString fileTmst = new SimpleDateFormat(\"yyyyMMddhhmmssSSS\").format(new Date().getTime());\n//\t \t\tImgcodecs.imwrite(\"/home/pi/vid\" + fileTmst + \".jpg\", inputImage);\n\t \t\tSystem.out.println(\"loop\" + i);\n\t \t\ti++;\n\t \t\tbVisionInd = false;\n\t \t\tvisionTable.putBoolean(\"Take Pic\", bVisionInd);\n\t \t}\n\t \tbCameraLoop = visionTable.getBoolean(\"Keep Running\", bCameraLoop);\n\t \timageSource.putFrame(inputImage);\n\t }\n\t\n gpio.shutdown();\n\n\t}",
"public static void main(String[] args) {\n System.loadLibrary(Core.NATIVE_LIBRARY_NAME);\n VideoCapture VC = new VideoCapture();\n if(!VC.open(0)) {\n System.out.println(\"Open Video Error\");\n }\n while (true){\n Mat img = new Mat();\n if(!VC.read(img)){\n return;\n }\n Mat rgb = new Mat();\n Mat gray = new Mat();\n Imgproc.cvtColor(img,rgb,Imgproc.COLOR_BGRA2RGB);\n Imgproc.cvtColor(rgb,gray,Imgproc.COLOR_BGR2GRAY);\n CascadeClassifier CC = new CascadeClassifier(\"E:/2020/opencv/opencv/build/etc/haarcascades/haarcascade_frontalface_default.xml\");\n MatOfRect rect = new MatOfRect();\n CC.detectMultiScale(gray,rect);\n for(Rect r : rect.toArray()){\n Imgproc.rectangle(img,new Point(r.x,r.y),new Point(r.x + r.width,r.y + r.height),new Scalar(255,0,0));\n }\n HighGui.imshow(\"imshow\",img);\n HighGui.waitKey(10);\n }\n }",
"public interface IVisionManager {\n public void enable();\n public void disable();\n public void setRoi(Size frameSize, Rect rect);\n// public void startDetecting();\n// public void stopDetecting();\n public void release();\n}",
"public void onCameraViewStarted(int width, int height) {\n m_lastOutput = new Mat(height, width, CvType.CV_8UC4);\n\n m_draw = new Mat(height, width, CvType.CV_8UC4);\n\n m_gray = new Mat(height, width, CvType.CV_8UC1);\n\n\n // area detection size mat\n calculateDetectArea(width, height);\n m_sub_draw = new Mat(m_draw, r_detectArea);\n m_sub_gray = new Mat(m_gray, r_detectArea);\n\n m_gui_area = new Mat(r_detectArea.height, r_detectArea.width, CvType.CV_8UC4);\n createGuiSdk();\n\n m_AT_finished = new Mat(r_detectArea.height, r_detectArea.width, CvType.CV_8UC4);\n m_AT_pending = new Mat(r_detectArea.height, r_detectArea.width, CvType.CV_8UC4);\n m_sdk = new Mat(r_detectArea.height, r_detectArea.width, CvType.CV_8UC4);\n\n at_findSdk = new AT_findSdk();\n\n\n sdkFound = false;\n outputChoice = false;\n }",
"boolean useCamera2();",
"protected void cameraClicked() {\n\t\tif (this.pictureFromCameraString != null\n\t\t\t\t&& !\"\".equals(this.pictureFromCameraString)) {\n\t\t\timageAvailable();\n\t\t} else {\n\t\t\timageUnavailable();\n\t\t}\n\t\tthis.cameraIsActive = true;\n\t\tthis.camera.addStyleDependentName(\"highlighted\");\n\t\tthis.upload.removeStyleDependentName(\"highlighted\");\n\t\tthis.inputPanel.setWidget(this.cameraPanel);\n\t\tgetCameraPictureNative();\n\t}",
"@Override\n\tpublic boolean isCameraRelated() {\n\t\treturn true;\n\t}",
"public void configureCamera(){\n try{\n camera = Camera.open(findBackFacingCamera());\n } catch (Exception e){}\n\n if(camera != null) {\n cameraView = new CameraView(this.getApplicationContext(), camera);\n FrameLayout camera_view = (FrameLayout)findViewById(R.id.CameraView);\n camera_view.addView(cameraView);\n }\n }",
"protected void setupCameraAndPreview() {\n\n //\n // always release\n //\n releaseImageObjects();\n releaseVideoCapturebjects(true);\n\n // now setup...\n if (isImageButtonSelected) {\n\n //\n // Image Camera can be fetched here\n //\n if (!isBackCameraSelected) {\n mCamera = getCameraInstance(frontCamera);\n } else {\n mCamera = getCameraInstance(backCamera);\n }\n\n if (mImageCapture == null) {\n // Initiate MImageCapture\n mImageCapture = new MImageCapture(MCameraActivity.this);\n }\n\n //\n // Set Orientation\n //\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR);\n // Create our Preview view and set it as the content of our activity.\n // Add the copyright as an overlay...\n if (mImageCapture.mCameraPreview == null) {\n previewView = (LinearLayout) findViewById(R.id.camera_preview);\n mImageCapture.setCameraPreview(this, mCamera);\n previewView.addView(mImageCapture.mCameraPreview);\n }\n } else {\n //\n // Set Orientation\n //\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);\n\n /** handle video here... */\n if (mVideoCapture == null) {\n // now start over\n mVideoCapture = new MVideoCapture(this);\n }\n // Create our Preview view and set it as the content of our activity.\n // Add the copyright as an overlay...\n if (mVideoCapture.mTextureView != null) {\n previewView = (LinearLayout) findViewById(R.id.camera_preview);\n previewView.addView(mVideoCapture.mTextureView);\n }\n }\n\n }",
"private void setUpAndConfigureCamera() {\n\t\t// Open and configure the camera\n\t\tmCamera = selectAndOpenCamera();\n\n\t\tCamera.Parameters param = mCamera.getParameters();\n\n\t\t// Smaller images are recommended because some computer vision operations are very expensive\n\t\tList<Camera.Size> sizes = param.getSupportedPreviewSizes();\n\t\tCamera.Size s = sizes.get(closest(sizes,640,360));\n\t\tparam.setPreviewSize(s.width,s.height);\n\t\tmCamera.setParameters(param);\n\n\t\t// start image processing thread\n\n\t\t// Start the video feed by passing it to mPreview\n\t\tmPreview.setCamera(mCamera);\n\t}",
"@Override\n public void runOpMode() {\n detector = new modifiedGoldDetector(); //Create detector\n detector.init(hardwareMap.appContext, CameraViewDisplay.getInstance(), DogeCV.CameraMode.BACK); //Initialize it with the app context and camera\n detector.enable(); //Start the detector\n\n //Initialize the drivetrain\n motorFL = hardwareMap.get(DcMotor.class, \"motorFL\");\n motorFR = hardwareMap.get(DcMotor.class, \"motorFR\");\n motorRL = hardwareMap.get(DcMotor.class, \"motorRL\");\n motorRR = hardwareMap.get(DcMotor.class, \"motorRR\");\n motorFL.setDirection(DcMotor.Direction.REVERSE);\n motorFR.setDirection(DcMotor.Direction.FORWARD);\n motorRL.setDirection(DcMotor.Direction.REVERSE);\n motorRR.setDirection(DcMotor.Direction.FORWARD);\n\n //Reset encoders\n motorFL.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorFR.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorRL.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorRR.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorFL.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n motorFR.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n motorRL.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n motorRR.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n telemetry.addData(\"IsFound: \", detector.isFound());\n telemetry.addData(\">\", \"Waiting for start\");\n telemetry.update();\n\n\n //TODO Pass skystone location to storage\n\n //Wait for the game to start (driver presses PLAY)\n waitForStart();\n\n /**\n * *****************\n * OpMode Begins Here\n * *****************\n */\n\n //Disable the detector\n if(detector != null) detector.disable();\n\n //Start the odometry processing thread\n odometryPositionUpdate positionUpdate = new odometryPositionUpdate(motorFL, motorFR, motorRL, motorRR, inchPerCount, trackWidth, wheelBase, 75);\n Thread odometryThread = new Thread(positionUpdate);\n odometryThread.start();\n runtime.reset();\n\n //Run until the end of the match (driver presses STOP)\n while (opModeIsActive()) {\n\n absPosnX = startPosnX + positionUpdate.returnOdometryX();\n absPosnY = startPosnY + positionUpdate.returnOdometryY();\n absPosnTheta = startPosnTheta + positionUpdate.returnOdometryTheta();\n\n telemetry.addData(\"X Position [in]\", absPosnX);\n telemetry.addData(\"Y Position [in]\", absPosnY);\n telemetry.addData(\"Orientation [deg]\", absPosnTheta);\n telemetry.addData(\"Thread Active\", odometryThread.isAlive());\n telemetry.update();\n\n//Debug: Drive forward for 3.0 seconds and make sure telemetry is correct\n if (runtime.seconds() < 3.0) {\n motorFL.setPower(0.25);\n motorFR.setPower(0.25);\n motorRL.setPower(0.25);\n motorRR.setPower(0.25);\n }else {\n motorFL.setPower(0);\n motorFR.setPower(0);\n motorRL.setPower(0);\n motorRR.setPower(0);\n }\n\n\n }\n //Stop the odometry processing thread\n odometryThread.interrupt();\n }",
"private void addWithCamera() {\n if (PermissionUtils.isPermissionGranted(Manifest.permission.CAMERA)) {\n startCameraPage();\n } else {\n PermissionUtils.requestPermission(\n this,\n Manifest.permission.CAMERA,\n CAMERA_PERMISSION_REQUEST);\n }\n }",
"@Override\n public void onCameraPreviewStarted() {\n enableTorchButtonIfPossible();\n }",
"public CameraManager(HardwareMap hardwareMap) {\n int cameraMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\"cameraMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n phoneCam = OpenCvCameraFactory.getInstance().createInternalCamera(OpenCvInternalCamera.CameraDirection.BACK, cameraMonitorViewId);\n pipeline = new CvPipeline();\n phoneCam.setPipeline(pipeline);\n }",
"Camera getCamera();",
"private boolean hasCamera(){\n return getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA_ANY);\n }",
"void connectToCameraSystem(@NonNull CameraSystem cameraSystem);",
"public void vision()\n {\n NIVision.IMAQdxGrab(session, colorFrame, 1);\t\t\t\t\n RETRO_HUE_RANGE.minValue = (int)SmartDashboard.getNumber(\"Retro hue min\", RETRO_HUE_RANGE.minValue);\n\t\tRETRO_HUE_RANGE.maxValue = (int)SmartDashboard.getNumber(\"Retro hue max\", RETRO_HUE_RANGE.maxValue);\n\t\tRETRO_SAT_RANGE.minValue = (int)SmartDashboard.getNumber(\"Retro sat min\", RETRO_SAT_RANGE.minValue);\n\t\tRETRO_SAT_RANGE.maxValue = (int)SmartDashboard.getNumber(\"Retro sat max\", RETRO_SAT_RANGE.maxValue);\n\t\tRETRO_VAL_RANGE.minValue = (int)SmartDashboard.getNumber(\"Retro val min\", RETRO_VAL_RANGE.minValue);\n\t\tRETRO_VAL_RANGE.maxValue = (int)SmartDashboard.getNumber(\"Retro val max\", RETRO_VAL_RANGE.maxValue);\n\t\tAREA_MINIMUM = SmartDashboard.getNumber(\"Area min %\");\n\t\t//MIN_RECT_WIDTH = SmartDashboard.getNumber(\"Min Rect Width\", MIN_RECT_WIDTH);\n\t\t//MAX_RECT_WIDTH = SmartDashboard.getNumber(\"Max Rect Width\", MAX_RECT_WIDTH);\n\t\t//MIN_RECT_HEIGHT = SmartDashboard.getNumber(\"Min Rect Height\", MIN_RECT_HEIGHT);\n\t\t//MAX_RECT_HEIGHT= SmartDashboard.getNumber(\"Max Rect Height\", MAX_RECT_HEIGHT);\n\t\t\n\t\t//SCALE_RANGE.minValue = (int)SmartDashboard.getNumber(\"Scale Range Min\");\n\t\t//SCALE_RANGE.maxValue = (int)SmartDashboard.getNumber(\"Scale Range Max\");\n\t\t//MIN_MATCH_SCORE = (int)SmartDashboard.getNumber(\"Min Match Score\");\n //Look at the color frame for colors that fit the range. Colors that fit the range will be transposed as a 1 to the binary frame.\n\t\t\n\t\tNIVision.imaqColorThreshold(binaryFrame, colorFrame, 255, ColorMode.HSV, RETRO_HUE_RANGE, RETRO_SAT_RANGE, RETRO_VAL_RANGE);\n\t\t//Send the binary image to the cameraserver\n\t\tif(cameraView.getSelected() == BINARY)\n\t\t{\n\t\t\tCameraServer.getInstance().setImage(binaryFrame);\n\t\t}\n\n\t\tcriteria[0] = new NIVision.ParticleFilterCriteria2(NIVision.MeasurementType.MT_AREA_BY_IMAGE_AREA, AREA_MINIMUM, 100.0, 0, 0);\t\t\n\t\t\n NIVision.imaqParticleFilter4(binaryFrame, binaryFrame, criteria, filterOptions, null);\n\n // NIVision.RectangleDescriptor rectangleDescriptor = new NIVision.RectangleDescriptor(MIN_RECT_WIDTH, MAX_RECT_WIDTH, MIN_RECT_HEIGHT, MAX_RECT_HEIGHT);\n// \n// //I don't know\n// NIVision.CurveOptions curveOptions = new NIVision.CurveOptions(NIVision.ExtractionMode.NORMAL_IMAGE, 0, NIVision.EdgeFilterSize.NORMAL, 0, 1, 1, 100, 1,1);\n// NIVision.ShapeDetectionOptions shapeDetectionOptions = new NIVision.ShapeDetectionOptions(1, rectAngleRanges, SCALE_RANGE, MIN_MATCH_SCORE);\n// NIVision.ROI roi = NIVision.imaqCreateROI();\n//\n// NIVision.DetectRectanglesResult result = NIVision.imaqDetectRectangles(binaryFrame, rectangleDescriptor, curveOptions, shapeDetectionOptions, roi);\n// //Dummy rectangle to start\n// \n// NIVision.RectangleMatch bestMatch = new NIVision.RectangleMatch(new PointFloat[]{new PointFloat(0.0, 0.0)}, 0, 0, 0, 0);\n// \n// //Find the best matching rectangle\n// for(NIVision.RectangleMatch match : result.array)\n// {\n// \tif(match.score > bestMatch.score)\n// \t{\n// \t\tbestMatch = match;\n// \t}\n// }\n// SmartDashboard.putNumber(\"Rect height\", bestMatch.height);\n// SmartDashboard.putNumber(\"Rect Width\", bestMatch.width);\n// SmartDashboard.putNumber(\"Rect rotation\", bestMatch.rotation);\n// SmartDashboard.putNumber(\"Rect Score\", bestMatch.score);\n \n //Report how many particles there are\n\t\tint numParticles = NIVision.imaqCountParticles(binaryFrame, 1);\n\t\tSmartDashboard.putNumber(\"Masked particles\", numParticles);\n\t\t\n \n\t\tif(numParticles > 0)\n\t\t{\n\t\t\t//Measure particles and sort by particle size\n\t\t\tVector<ParticleReport> particles = new Vector<ParticleReport>();\n\t\t\tfor(int particleIndex = 0; particleIndex < numParticles; particleIndex++)\n\t\t\t{\n\t\t\t\tParticleReport par = new ParticleReport();\n\t\t\t\tpar.Area = NIVision.imaqMeasureParticle(binaryFrame, particleIndex, 0, NIVision.MeasurementType.MT_AREA);\n\t\t\t\tpar.AreaByImageArea = NIVision.imaqMeasureParticle(binaryFrame, particleIndex, 0, NIVision.MeasurementType.MT_AREA_BY_IMAGE_AREA);\n\t\t\t\tpar.BoundingRectTop = NIVision.imaqMeasureParticle(binaryFrame, particleIndex, 0, NIVision.MeasurementType.MT_BOUNDING_RECT_TOP);\n\t\t\t\tpar.BoundingRectLeft = NIVision.imaqMeasureParticle(binaryFrame, particleIndex, 0, NIVision.MeasurementType.MT_BOUNDING_RECT_LEFT);\n\t\t\t\tpar.BoundingRectHeight = NIVision.imaqMeasureParticle(binaryFrame, particleIndex, 0, NIVision.MeasurementType.MT_BOUNDING_RECT_HEIGHT);\n\t\t\t\tpar.BoundingRectWidth = NIVision.imaqMeasureParticle(binaryFrame, particleIndex, 0, NIVision.MeasurementType.MT_BOUNDING_RECT_WIDTH);\n\t\t\t\tparticles.add(par);\n\n\t\t\t}\n\t\t\tparticles.sort(null);\n\n\t\t\t//This example only scores the largest particle. Extending to score all particles and choosing the desired one is left as an exercise\n\t\t\t//for the reader. Note that this scores and reports information about a single particle (single L shaped target). To get accurate information \n\t\t\t//about the location of the tote (not just the distance) you will need to correlate two adjacent targets in order to find the true center of the tote.\n//\t\t\tscores.Aspect = AspectScore(particles.elementAt(0));\n//\t\t\tSmartDashboard.putNumber(\"Aspect\", scores.Aspect);\n//\t\t\tscores.Area = AreaScore(particles.elementAt(0));\n//\t\t\tSmartDashboard.putNumber(\"Area\", scores.Area);\n//\t\t\tboolean isTote = scores.Aspect > SCORE_MIN && scores.Area > SCORE_MIN;\n//\n\t\t\tParticleReport bestParticle = particles.elementAt(0);\n\t\t NIVision.Rect particleRect = new NIVision.Rect((int)bestParticle.BoundingRectTop, (int)bestParticle.BoundingRectLeft, (int)bestParticle.BoundingRectHeight, (int)bestParticle.BoundingRectWidth);\n\t\t \n\t\t //NIVision.imaqOverlayRect(colorFrame, particleRect, new NIVision.RGBValue(0, 0, 0, 255), DrawMode.PAINT_VALUE, \"a\");//;(colorFrame, colorFrame, particleRect, DrawMode.DRAW_VALUE, ShapeMode.SHAPE_OVAL, 20);\n\t\t NIVision.imaqDrawShapeOnImage(colorFrame, colorFrame, particleRect, NIVision.DrawMode.DRAW_VALUE, ShapeMode.SHAPE_RECT, 0.0f);\n\t\t SmartDashboard.putNumber(\"Rect Top\", bestParticle.BoundingRectTop);\n\t\t SmartDashboard.putNumber(\"Rect Left\", bestParticle.BoundingRectLeft);\n\t\t SmartDashboard.putNumber(\"Rect Width\", bestParticle.BoundingRectWidth);\n\t\t SmartDashboard.putNumber(\"Area by image area\", bestParticle.AreaByImageArea);\n\t\t SmartDashboard.putNumber(\"Area\", bestParticle.Area);\n\t\t double bestParticleMidpoint = bestParticle.BoundingRectLeft + bestParticle.BoundingRectWidth/2.0;\n\t\t double bestParticleMidpointAimingCoordnates = pixelCoordnateToAimingCoordnate(bestParticleMidpoint, CAMERA_RESOLUTION_X);\n\t\t angleToTarget = aimingCoordnateToAngle(bestParticleMidpointAimingCoordnates, VIEW_ANGLE);\n\t\t \n\t\t}\n\t\telse\n\t\t{\n\t\t\tangleToTarget = 0.0;\n\t\t}\n\n if(cameraView.getSelected() == COLOR)\n {\n \tCameraServer.getInstance().setImage(colorFrame);\n }\n\t SmartDashboard.putNumber(\"Angle to target\", angleToTarget);\n\n }",
"@Override\n public void robotInit() {\n // Hardware.getInstance().init();\n hardware.init();\n\n controllerMap = ControllerMap.getInstance();\n controllerMap.controllerMapInit();\n\n controllerMap.intake.IntakeInit();\n\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n\n intakeCam = CameraServer.getInstance().startAutomaticCapture(\"Driver Camera :)\", 0);\n intakeCam.setPixelFormat(PixelFormat.kMJPEG);\n intakeCam.setResolution(160, 120);\n intakeCam.setFPS(15);\n // climberCam = CameraServer.getInstance().startAutomaticCapture(1);\n\n }",
"@Override\n public void startCamera() {\n super.startCamera();\n\n if(cameraListener != null)\n cameraListener.onCameraStart();\n }",
"private void startCamera() {\n PreviewConfig previewConfig = new PreviewConfig.Builder().setTargetResolution(new Size(640, 480)).build();\n Preview preview = new Preview(previewConfig);\n preview.setOnPreviewOutputUpdateListener(output -> {\n ViewGroup parent = (ViewGroup) dataBinding.viewFinder.getParent();\n parent.removeView(dataBinding.viewFinder);\n parent.addView(dataBinding.viewFinder, 0);\n dataBinding.viewFinder.setSurfaceTexture(output.getSurfaceTexture());\n updateTransform();\n });\n\n\n // Create configuration object for the image capture use case\n // We don't set a resolution for image capture; instead, we\n // select a capture mode which will infer the appropriate\n // resolution based on aspect ration and requested mode\n ImageCaptureConfig imageCaptureConfig = new ImageCaptureConfig.Builder().setCaptureMode(ImageCapture.CaptureMode.MIN_LATENCY).build();\n\n // Build the image capture use case and attach button click listener\n ImageCapture imageCapture = new ImageCapture(imageCaptureConfig);\n dataBinding.captureButton.setOnClickListener(v -> {\n File file = new File(getExternalMediaDirs()[0], System.currentTimeMillis() + \".jpg\");\n imageCapture.takePicture(file, executor, new ImageCapture.OnImageSavedListener() {\n @Override\n public void onImageSaved(@NonNull File file) {\n String msg = \"Photo capture succeeded: \" + file.getAbsolutePath();\n Log.d(\"CameraXApp\", msg);\n dataBinding.viewFinder.post(\n () -> Toast.makeText(CameraXDemo.this, msg, Toast.LENGTH_SHORT).show()\n );\n }\n\n @Override\n public void onError(@NonNull ImageCapture.ImageCaptureError\n imageCaptureError, @NonNull String message, @Nullable Throwable cause) {\n String msg = \"Photo capture failed: \" + message;\n Log.e(\"CameraXApp\", msg, cause);\n dataBinding.viewFinder.post(\n () -> Toast.makeText(CameraXDemo.this, msg, Toast.LENGTH_SHORT).show()\n );\n }\n });\n });\n\n\n // Setup image analysis pipeline that computes average pixel luminance\n ImageAnalysisConfig analyzerConfig = new ImageAnalysisConfig.Builder().setImageReaderMode(\n ImageAnalysis.ImageReaderMode.ACQUIRE_LATEST_IMAGE).build();\n // Build the image analysis use case and instantiate our analyzer\n ImageAnalysis analyzerUseCase = new ImageAnalysis(analyzerConfig);\n analyzerUseCase.setAnalyzer(executor, new LuminosityAnalyzer());\n\n CameraX.bindToLifecycle(this, preview, imageCapture, analyzerUseCase);\n }",
"public void camera360() {\n\n }",
"@FXML\r\n protected void startCamera() {\r\n // set a fixed width for the frame\r\n this.currentFrame.setFitWidth(600);\r\n // preserve image ratio\r\n this.currentFrame.setPreserveRatio(true);\r\n\r\n if (!this.cameraActive) {\r\n\r\n // start the video capture\r\n //this.capture.open(0);\r\n //Read the video (Chage video)\r\n this.capture.open(\"Faruri.m4v\");\r\n\r\n\r\n System.out.println(\"start capture...\");\r\n // is the video stream available?\r\n if (this.capture.isOpened()) {\r\n System.out.println(\"inif\");\r\n this.cameraActive = true;\r\n\r\n // grab a frame every 33 ms (30 frames/sec)\r\n Runnable frameGrabber = new Runnable() {\r\n\r\n @Override\r\n public void run() {\r\n // effectively grab and process a single frame\r\n Mat frame = grabFrame();\r\n\r\n//\t\t\t\t\t\t// convert and show the frame\r\n//\t\t\t\t\t\tImage imageToShow = Utils.mat2Image(frame);\r\n//\t\t\t\t\t\tupdateImageView(currentFrame, imageToShow);\r\n }\r\n };\r\n\r\n this.timer = Executors.newSingleThreadScheduledExecutor();\r\n this.timer.scheduleAtFixedRate(frameGrabber, 0, 33, TimeUnit.MILLISECONDS);\r\n\r\n // update the button content\r\n this.button.setText(\"Stop Video\");\r\n } else {\r\n // log the error\r\n System.err.println(\"Impossible to open the video...\");\r\n }\r\n } else {\r\n // the camera is not active at this point\r\n this.cameraActive = false;\r\n // update again the button content\r\n this.button.setText(\"Start Video\");\r\n\r\n // stop the timer\r\n this.stopAcquisition();\r\n }\r\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n Log.i(TAG, \"called onCreate\");\n super.onCreate(savedInstanceState);\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);\n\n setContentView(R.layout.activity_main);\n\n //Ask for permission to use the camera\n //https://developer.android.com/training/permissions/requesting.html\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA)\n != PackageManager.PERMISSION_GRANTED) {\n Toast toast = Toast.makeText(this, \"Permission is not granted\", Toast.LENGTH_LONG);\n toast.show();\n\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.CAMERA)) {\n\n } else {\n // No explanation needed; request the permission\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.CAMERA},\n 1);\n\n }\n }\n\n if(checkCameraHardware(this)) {\n mOpenCvCameraView = findViewById(R.id.mis_opencv_camera_view);\n mOpenCvCameraView.setVisibility(SurfaceView.VISIBLE);\n mOpenCvCameraView.setCvCameraViewListener(this);\n //Create Object in here intead of onFrame function makes the app don't crush\n }else{\n Toast toast = Toast.makeText(this, \"No Camera Found\", Toast.LENGTH_SHORT);\n toast.show();\n }\n\n //add some extra functionality to show the nose or the rectangular trackers\n //It was fun to play with those\n final Button circleBtn = findViewById(R.id.circleOpenCv);\n circleBtn.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n if(paintNose){\n paintNose=false;\n }else{\n paintNose=true;\n }\n }\n });\n\n final Button rectBtn = findViewById(R.id.rectOpenCv);\n rectBtn.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n if(paintFace){\n paintFace=false;\n }else{\n paintFace=true;\n }\n }\n });\n }",
"private void setUpBridges() {\n \tmLoaderCallback = new BaseLoaderCallback(this) {\n @Override\n public void onManagerConnected(int status) {\n switch (status) {\n case LoaderCallbackInterface.SUCCESS:\n {\n Log.i(tag, \"OpenCV loaded successfully\");\n MADN3SCamera.isOpenCvLoaded = true;\n mOpenCvCameraView.enableView();\n mOpenCvCameraView.setOnTouchListener(MainActivity.this);\n } break;\n default:\n {\n super.onManagerConnected(status);\n } break;\n }\n }\n };\n\n //Received Message Callback\n \tHiddenMidgetReader.bridge = new UniversalComms() {\n\t\t\t@Override\n\t\t\tpublic void callback(Object msg) {\n\t\t\t\tfinal String msgFinal = (String) msg;\n\t\t\t\tmActivity.getWindow().getDecorView().post(\n\t\t\t\t\tnew Runnable() {\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tconfigTextView.setText(msgFinal);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\tIntent williamWallaceIntent = new Intent(getBaseContext(), BraveheartMidgetService.class);\n\t\t\t\twilliamWallaceIntent.putExtra(Consts.EXTRA_CALLBACK_MSG, (String) msg);\n\t\t\t\tstartService(williamWallaceIntent);\n\t\t\t}\n\t\t};\n\n /**\n * Punto de entrada desde el Service\n */\n\t\tBraveheartMidgetService.cameraCallback = new UniversalComms() {\n\t\t\t@Override\n\t\t\tpublic void callback(Object msg) {\n setCaptureMode(false, true);\n config = (JSONObject) msg;\n\t\t\t\tLog.d(tag, \"takePhoto. config == null? \" + (config == null));\n\t\t\t}\n\t\t};\n\t}",
"@Override\n\tpublic void robotInit() //starts once when the code is started\n\t{\n\t\tm_oi = new OI(); //further definition of OI\n\t\t\n\t\t// chooser.addObject(\"My Auto\", new MyAutoCommand());\n\t\t//SmartDashboard.putData(\"Auto mode\", m_chooser);\n\t\t\n\t\tnew Thread(() -> {\n\t\t\tUsbCamera camera1 = CameraServer.getInstance().startAutomaticCapture();\n\t\t\tcamera1.setResolution(640, 480);\n\t\t\tcamera1.setFPS(30);\n\t\t\tcamera1.setExposureAuto();\n\t\t\t\n\t\t\tCvSink cvSink = CameraServer.getInstance().getVideo();\n\t\t\tCvSource outputStream = CameraServer.getInstance().putVideo(\"Camera1\", 640, 480); \n\t\t\t//set up a new camera with this name in SmartDashboard (Veiw->Add->CameraServer Stream Viewer)\n\t\t\t\n\t\t\tMat source = new Mat();\n\t\t\tMat output = new Mat();\n\t\t\t\n\t\t\twhile(!Thread.interrupted())\n\t\t\t{\n\t\t\t\tcvSink.grabFrame(source);\n\t\t\t\tImgproc.cvtColor(source, output, Imgproc.COLOR_BGR2RGB);//this will show the video in black and white \n\t\t\t\toutputStream.putFrame(output);\n\t\t\t}\t\t\t\t\t\n\t\t}).start();//definition of camera, runs even when disabled\n\t\t\n\t\tdriveStick = new Joystick(0); //further definition of joystick\n\t\tgyroRotate.gyroInit(); //initializing the gyro - in Rotate_Subsystem\n\t\tultrasonic = new Ultrasonic_Sensor(); //further definition of ultrasonic\n\t\tRobotMap.encoderLeft.reset();\n\t\tRobotMap.encoderRight.reset();\n\t\tdriveToDistance.controllerInit();\n\t}",
"public void openCamera(View view) {\n //do something here\n dispatchTakePictureIntent();\n\n }",
"@Override\n public void robotInit() {\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n //starts the dual cameras\n CameraServer.getInstance().startAutomaticCapture(0);\n CameraServer.getInstance().startAutomaticCapture(1);\n //auto start (disabled atm)\n //pressBoy.setClosedLoopControl(true);\n pressBoy.setClosedLoopControl(false);\n \n \n }",
"public void startCamera()\n \t{\n\t\t// start the video capture\n\t\t//this.capture.open(0);\n\t\tcapture.open(cameraNumber);\n\n\n\n\t\t// is the video stream available?\n\t\tif (capture.isOpened())\n\t\t{\n\t\t\t// grab a frame every 33 ms (30 frames/sec)\n\t\t\tRunnable frameGrabber = new Runnable() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run()\n\t\t\t\t{\n\t\t\t\t\tgrabFrame();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\ttimer = Executors.newSingleThreadScheduledExecutor();\n\t\t\ttimer.scheduleAtFixedRate(frameGrabber, 0, 500, TimeUnit.MILLISECONDS);\n\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// log the error\n\t\t\tSystem.err.println(\"Impossible to open the camera connection...\");\n\t\t}\n \t}",
"private void openCamera() {\n CameraManager manager = (CameraManager) getSystemService(Context.CAMERA_SERVICE);\n try {\n String mCameraId = manager.getCameraIdList()[0];\n CameraCharacteristics characteristics = manager.getCameraCharacteristics(mCameraId);\n StreamConfigurationMap map = characteristics.\n get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);\n assert map != null;\n mImageDimension = map.getOutputSizes(SurfaceTexture.class)[0];\n // Add permission for camera and let user grant the permission\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA) !=\n PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(this,\n Manifest.permission.WRITE_EXTERNAL_STORAGE) !=\n PackageManager.PERMISSION_GRANTED) {\n\n ActivityCompat.requestPermissions(CameraActivity.this, new\n String[]{Manifest.permission.CAMERA,\n Manifest.permission.WRITE_EXTERNAL_STORAGE},\n REQUEST_CAMERA_PERMISSION);\n }\n manager.openCamera(mCameraId, mStateCallback, null);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }",
"private void requestCameraPermission() {\r\n Dexter.withActivity(this)\r\n .withPermission(Manifest.permission.CAMERA)\r\n .withListener(new PermissionListener() {\r\n @Override\r\n public void onPermissionGranted(PermissionGrantedResponse response) {\r\n // permission is granted\r\n Toast.makeText(getApplicationContext(), \"Camera permission are granted!\", Toast.LENGTH_SHORT).show();\r\n\r\n Intent camera_intent=new Intent(MainActivity.this,CameraActivity.class);\r\n startActivity(camera_intent);\r\n }\r\n\r\n @Override\r\n public void onPermissionDenied(PermissionDeniedResponse response) {\r\n // check for permanent denial of permission\r\n if (response.isPermanentlyDenied()) {\r\n showSettingsDialog();\r\n }\r\n }\r\n\r\n @Override\r\n public void onPermissionRationaleShouldBeShown(PermissionRequest permission, PermissionToken token) {\r\n token.continuePermissionRequest();\r\n }\r\n }).check();\r\n }",
"public interface ICamera {\n\n /**\n * Return frame access interface for client usage\n *\n * @param interface_index\n * @return\n */\n public long getFrameAccessIfc(int interface_index);\n\n /**\n * Start the camera stream\n */\n public void start();\n\n /**\n * Stop the camera stream\n */\n public void stop();\n\n public String prepare(final UsbMonitor.UsbConnectionData connectionData);\n\n /**\n * Register json status callback\n *\n * @param callback\n */\n public void setStatusCallback(final IStatusCallback callback);\n\n /**\n * Queries camera for supported mode\n *\n * @return supported video modes String\n */\n public String getSupportedVideoModes();\n\n// /**\n// * Select camera capture mode\n// *\n// * @param width\n// * @param height\n// * @param frameFormat\n// */\n// public void setCaptureMode(final int width, final int height, final int frameFormat);\n\n /**\n * Select camera capture mode\n *\n * @param width\n * @param height\n * @param min_fps\n * @param max_fps\n * @param frameFormat\n */\n public void setCaptureMode(final int width, final int height, final int min_fps, final int max_fps, final int frameFormat);\n}",
"public void init(HardwareMap hwMap){\n int cameraMonitorViewID = hwMap.appContext.getResources().getIdentifier(\"cameraMonitorViewId\", \"id\", hwMap.appContext.getPackageName());\n phoneCam = OpenCvCameraFactory.getInstance().createInternalCamera(OpenCvInternalCamera.CameraDirection.BACK,cameraMonitorViewID);\n phoneCam.openCameraDevice();\n phoneCam.setPipeline(counter);\n phoneCam.openCameraDeviceAsync(new OpenCvCamera.AsyncCameraOpenListener()\n {\n @Override\n public void onOpened()\n {\n phoneCam.startStreaming(320, 240, OpenCvCameraRotation.UPRIGHT);\n }\n });\n }",
"public void openCamera() {\n Toast.makeText(this, \"Coming soon...\", Toast.LENGTH_SHORT).show();\n }",
"public Vision() {\n\n visionCam = CameraServer.getInstance().startAutomaticCapture(\"HatchCam\", 0);\n visionCam.setVideoMode(PixelFormat.kMJPEG, 320, 240, 115200);\n \n int retry = 0;\n while(cam == null && retry < 10) {\n try {\n System.out.println(\"Connecting to jevois serial port ...\");\n cam = new SerialPort(115200, SerialPort.Port.kUSB1);\n System.out.println(\"Success!!!\");\n } catch (Exception e) {\n System.out.println(\"We all shook out\");\n e.printStackTrace();\n sleep(500);\n System.out.println(\"Retry\" + Integer.toString(retry));\n retry++;\n }\n }\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n }",
"private void newOpenCamera() {\n if (mThread == null) {\n mThread = new CameraHandlerThread();\n }\n\n synchronized (mThread) {\n mThread.openCamera();\n }\n }",
"public interface CameraOpenListener {\n void onCameraError(Exception exc);\n\n void onCameraOpened(CameraController cameraController, int i, int i2);\n}",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_camera_preview);\n\t\tmCamSV = (SurfaceView) findViewById(R.id.camera_preview_surface_cam);\n\n\t\tmCamSV.getHolder().setFixedSize(VisionConfig.getWidth(),\n\t\t\t\tVisionConfig.getHeight());\n\n\t\tLog.i(\"MyLog\", \"CAP: onCreate\");\n\n\t\t// Setup Bind Service\n\t\tVisionConfig.bindService(this, mConnection);\n\t\ttakeAPictureReceiver = new TakeAPictureReceiver();\n\t\tIntentFilter filterOverlayVision = new IntentFilter(\n\t\t\t\tRobotIntent.CAM_TAKE_PICKTURE);\n\t\tHandlerThread handlerThreadOverlay = new HandlerThread(\n\t\t\t\t\"MyNewThreadOverlay\");\n\t\thandlerThreadOverlay.start();\n\t\tLooper looperOverlay = handlerThreadOverlay.getLooper();\n\t\thandlerOverlay = new Handler(looperOverlay);\n\t\tregisterReceiver(takeAPictureReceiver, filterOverlayVision, null,\n\t\t\t\thandlerOverlay);\n\t\t\n\t\tfaceDetectionReceiver = new FaceDetectionReceiver();\n\t\tIntentFilter filterFaceDetection = new IntentFilter(RobotIntent.CAM_FACE_DETECTION);\n\t\tHandlerThread handlerThreadFaceDetectionOverlay = new HandlerThread(\n\t\t\t\t\"MyNewThreadFaceDetectionOverlay\");\n\t\thandlerThreadFaceDetectionOverlay.start();\n\t\tLooper looperFaceDetectionOverlay = handlerThreadFaceDetectionOverlay.getLooper();\n\t\thandleFaceDetection = new Handler(looperFaceDetectionOverlay);\n\t\tregisterReceiver(faceDetectionReceiver, filterFaceDetection, null,\n\t\t\t\thandleFaceDetection);\n\t\t\n\t\t\n//\t\tfaceDetectionReceiver2 = new FaceDetectionReceiver2();\n//\t\tIntentFilter filterFaceDetection2 = new IntentFilter(\"hhq.face\");\n//\t\tHandlerThread handlerThreadFaceDetectionOverlay2 = new HandlerThread(\n//\t\t\t\t\"MyNewThreadFaceDetectionOverlay2\");\n//\t\thandlerThreadFaceDetectionOverlay2.start();\n//\t\tLooper looperFaceDetectionOverlay2 = handlerThreadFaceDetectionOverlay2.getLooper();\n//\t\thandleFaceDetection2 = new Handler(looperFaceDetectionOverlay2);\n//\t\tregisterReceiver(faceDetectionReceiver2, filterFaceDetection2, null,\n//\t\t\t\thandleFaceDetection2);\t\t\n\n\t\t\t\t\n\t\tpt.setColor(Color.GREEN);\n\t\tpt.setTextSize(50);\n\t\tpt.setStrokeWidth(3);\n\t\tpt.setStyle(Paint.Style.STROKE);\n\t\t\n//\t\tpt2.setColor(Color.BLUE);\n//\t\tpt2.setTextSize(50);\n//\t\tpt2.setStrokeWidth(3);\n//\t\tpt2.setStyle(Paint.Style.STROKE);\n\t}",
"private void fetchCameras() {\n\n mCameraManager = (CameraManager) getSystemService(Context.CAMERA_SERVICE);\n String[] cameraInfo = null;\n try {\n cameraInfo = mCameraManager.getCameraIdList();\n if (cameraInfo != null) {\n if (cameraInfo[0] != null) {\n backCamera = Integer.valueOf(cameraInfo[0]);\n isBackCameraSelected = true;\n imgviewCameraSelect.setTag(\"backCamera\");\n mCameraCharactersticsBack = fetchCameraCharacteristics(backCamera);\n hasBackCamera = true;\n }\n if (cameraInfo[1] != null) {\n frontCamera = Integer.valueOf(cameraInfo[1]);\n mCameraCharactersticsFront = fetchCameraCharacteristics(frontCamera);\n hasFrontCamera = true;\n }\n\n }\n } catch (CameraAccessException e) {\n Log.e(TAG, \"CameraAccessException\" + e.getMessage());\n }\n }",
"private void requestCameraPermission() {\n\t\tLog.d(TAG, \"Requesting CAMERA permission\");\n\t\tActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA}, PERMISSION_REQUEST_CAMERA);\n\t}",
"private void openCamera() {\n CameraManager manager = (CameraManager) getSystemService(Context.CAMERA_SERVICE);\n try {\n String cameraId = manager.getCameraIdList()[0];\n CameraCharacteristics characteristics = manager.getCameraCharacteristics(cameraId);\n StreamConfigurationMap map = characteristics.get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);\n assert map != null;\n imageDimension = map.getOutputSizes(SurfaceTexture.class)[0];\n // Add permission for camera and let user grant the permission\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(MainActivity.this, new String[]{Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE}, REQUEST_CAMERA_PERMISSION);\n return;\n }\n manager.openCamera(cameraId, stateCallback, null);\n } catch (CameraAccessException e) {\n Toast.makeText(this, \"Camera failed to open.\", Toast.LENGTH_SHORT).show();\n e.printStackTrace();\n }\n }",
"public void onCameraPicked(String newCameraId);",
"void onBind(String cameraId);",
"public void startFaceDetection() {\n /*\n r4 = this;\n r0 = r4.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x0036;\n L_0x0004:\n r0 = r4.mCameraDevice;\n if (r0 == 0) goto L_0x0036;\n L_0x0008:\n r0 = r4.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x0036;\n L_0x000f:\n r0 = r4.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0035;\n L_0x0017:\n r0 = 1;\n r4.mFaceDetectionStarted = r0;\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r4.mCameraDevice;\n r2 = r4.mHandler;\n r3 = 0;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r4.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0035:\n return;\n L_0x0036:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.VideoModule.startFaceDetection():void\");\n }",
"private native void iniciarCamara(int idCamera);",
"public void prepareVisionProcessing(){\n usbCamera = CameraServer.getInstance().startAutomaticCapture();\n /*\n MjpegServer mjpegServer1 = new MjpegServer(\"serve_USB Camera 0\", 1181);\n mjpegServer1.setSource(usbCamera);\n\n // Creates the CvSink and connects it to the UsbCamera\n CvSink cvSink = new CvSink(\"opencv_USB Camera 0\");\n cvSink.setSource(usbCamera);\n\n // Creates the CvSource and MjpegServer [2] and connects them\n CvSource outputStream = new CvSource(\"Blur\", PixelFormat.kMJPEG, 640, 480, 30);\n MjpegServer mjpegServer2 = new MjpegServer(\"serve_Blur\", 1182);\n mjpegServer2.setSource(outputStream);\n */\n }",
"private boolean hasCamera(Context context) {\n return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA);\n }",
"public void checkPermissionsCamera() {\n PackageManager packageManager = EditProfile.this.getPackageManager();\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n //Checking the permissions for using the camera.\n if (checkSelfPermission(Manifest.permission.CAMERA)\n != PackageManager.PERMISSION_GRANTED) {\n requestPermissions(new String[]{Manifest.permission.CAMERA},\n MY_PERMISSIONS_REQUEST_CAMERA);\n } else if (packageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA_ANY) == false) {\n Toast.makeText(EditProfile.this, \"This device does not have a camera.\", Toast.LENGTH_LONG)\n .show();\n return;\n }\n }\n }",
"private void clickpic() {\n if (getApplicationContext().getPackageManager().hasSystemFeature(\n PackageManager.FEATURE_CAMERA)) {\n // Open default camera\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);\n\n // start the image capture Intent\n startActivityForResult(intent, 100);\n\n\n } else {\n Toast.makeText(getApplication(), \"Camera not supported\", Toast.LENGTH_LONG).show();\n }\n }",
"private void getCamera() {\n if (camera == null) {\n try {\n camera = Camera.open();\n params = camera.getParameters();\n } catch (RuntimeException e) {\n\n }\n }\n }",
"public boolean isCameraAvailable() {\n PackageManager pm = getPackageManager();\n return pm.hasSystemFeature(PackageManager.FEATURE_CAMERA);\n }",
"private void requestPermission() {\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) !=\n PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this, new String[]{\n Manifest.permission.CAMERA}, 1);\n //if not permitted by the user ,send a message to the user to get the right\n } else {\n opencamera();\n //if permitted by the user already ,then start open the camera directly\n }\n }",
"private boolean hasCamera(){\n\n return getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA_ANY); // provjera da li postji bilo koja kamera\n }",
"void initCameraManager(){\n\t\tcameraManager = new CameraManager(getApplication());\n\t}",
"private boolean isDeviceSupportCamera() {\n // this device has a camera\n// no camera on this device\n return getActivity().getApplicationContext().getPackageManager().hasSystemFeature(\n PackageManager.FEATURE_CAMERA);\n }",
"@Override\n public void onClick(View view) {\n try {\n if (ActivityCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n cameraManager.openCamera(cameraManager.getCameraIdList()[0],\n new CameraState(cameraView), null);\n } catch (CameraAccessException e) {\n Log.d(\"msg\",\"CameraAccessException\");\n e.printStackTrace();\n }\n\n }",
"@Override\n public void onClick(View view) {\n if (ContextCompat.checkSelfPermission(MainActivity.this,\n Manifest.permission.CAMERA)\n != PackageManager.PERMISSION_GRANTED) {\n\n\n ActivityCompat.requestPermissions(MainActivity.this,\n new String[]{Manifest.permission.CAMERA},\n MY_PERMISSIONS_REQUEST_CAMERA);\n\n } else {\n // Permission has already been granted\n Intent intent = new Intent(MainActivity.this, ActScanner.class);\n startActivity(intent);\n }\n\n }",
"public void onCreateCameraPipeline(com.arashivision.onestream.pipeline.ICameraPreviewPipeline r20) {\n /*\n r19 = this;\n r0 = r19\n com.arashivision.insta360.basemedia.log.MediaLogger r1 = com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView.LL1IL\n java.lang.String r2 = \"onCreateCameraPipeline\"\n r1.d(r2)\n com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView r1 = r0.f577a\n r2 = r20\n r1.f73l = r2\n com.arashivision.insta360.basemedia.ui.player.capture.ICaptureParams r1 = r1.IL1Iii\n com.arashivision.insta360.basemedia.model.FileType r1 = r1.getFileType()\n com.arashivision.insta360.basemedia.model.FileType r2 = com.arashivision.insta360.basemedia.model.FileType.FISH_EYE\n r3 = 1\n r4 = 0\n if (r1 != r2) goto L_0x0059\n com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView r1 = r0.f577a\n com.arashivision.insta360.basemedia.ui.player.capture.ICaptureParams r1 = r1.IL1Iii\n com.arashivision.insta360.basemedia.model.viewconstraint.Constraint r1 = r1.getConstraint()\n com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView r2 = r0.f577a\n com.arashivision.insta360.basemedia.ui.player.capture.ICaptureParams r2 = r2.IL1Iii\n int[] r2 = r2.getConstraintRatio()\n if (r1 == 0) goto L_0x0059\n com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView r5 = r0.f577a\n com.arashivision.arvbmg.previewer.BMGCameraPreviewerSessionRender r6 = r5.I11L\n float r5 = r1.getDefaultDistance()\n double r9 = (double) r5\n float r5 = r1.getDefaultFov()\n double r11 = (double) r5\n r5 = r2[r3]\n float r5 = (float) r5\n r2 = r2[r4]\n float r2 = (float) r2\n float r5 = r5 / r2\n double r13 = (double) r5\n float r2 = r1.getXScale()\n double r7 = (double) r2\n float r1 = r1.getYScale()\n double r1 = (double) r1\n r15 = 4607182418800017408(0x3ff0000000000000, double:1.0)\n r17 = r7\n r7 = r15\n r15 = r17\n r17 = r1\n r6.setGyroStabilizerFovDistance2(r7, r9, r11, r13, r15, r17)\n L_0x0059:\n com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView r1 = r0.f577a\n r1.setLoading(r4)\n com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView r1 = r0.f577a\n if (r1 == 0) goto L_0x00cf\n com.arashivision.insta360.basemedia.ui.player.capture.IPlayCaptureParams r2 = r1.ILil\n if (r2 == 0) goto L_0x006d\n com.arashivision.insta360.basemedia.ui.player.capture.CameraRenderSurfaceInfo r2 = r2.getCameraRenderSurfaceInfo()\n if (r2 == 0) goto L_0x006d\n r4 = r3\n L_0x006d:\n if (r4 != 0) goto L_0x0077\n com.arashivision.insta360.basemedia.log.MediaLogger r1 = com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView.LL1IL\n java.lang.String r2 = \"startCameraRenderSurface return. Custom surface is null\"\n L_0x0073:\n r1.e(r2)\n goto L_0x00c5\n L_0x0077:\n com.arashivision.arvbmg.previewer.BMGCameraPreviewerSessionRender r2 = r1.I11L\n if (r2 != 0) goto L_0x0080\n com.arashivision.insta360.basemedia.log.MediaLogger r1 = com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView.LL1IL\n java.lang.String r2 = \"startCameraRenderSurface return. Render is null\"\n goto L_0x0073\n L_0x0080:\n boolean r2 = r1.llliI\n if (r2 == 0) goto L_0x0089\n com.arashivision.insta360.basemedia.log.MediaLogger r1 = com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView.LL1IL\n java.lang.String r2 = \"startCameraRenderSurface return. Already render surface\"\n goto L_0x0073\n L_0x0089:\n com.arashivision.arvbmg.previewer.BMGCameraPreviewerSessionRender$CameraRenderSurfaceInfo r2 = new com.arashivision.arvbmg.previewer.BMGCameraPreviewerSessionRender$CameraRenderSurfaceInfo\n r2.<init>()\n com.arashivision.insta360.basemedia.ui.player.capture.IPlayCaptureParams r4 = r1.ILil\n com.arashivision.insta360.basemedia.ui.player.capture.CameraRenderSurfaceInfo r4 = r4.getCameraRenderSurfaceInfo()\n int r4 = r4.renderWidth\n r2.renderWidth = r4\n com.arashivision.insta360.basemedia.ui.player.capture.IPlayCaptureParams r4 = r1.ILil\n com.arashivision.insta360.basemedia.ui.player.capture.CameraRenderSurfaceInfo r4 = r4.getCameraRenderSurfaceInfo()\n int r4 = r4.renderHeight\n r2.renderHeight = r4\n a.a.a.a.e.a.e.l r4 = r1.f60IL\n com.arashivision.insta360.basemedia.ui.player.capture.IPlayCaptureParams r5 = r1.ILil\n int r5 = r5.getRenderModelType()\n com.arashivision.graphicpath.render.rendermodel.RenderModelType r4 = r4.a(r5)\n int r4 = r4.getType()\n r2.renderModeType = r4\n com.arashivision.insta360.basemedia.ui.player.capture.IPlayCaptureParams r4 = r1.ILil\n com.arashivision.insta360.basemedia.ui.player.capture.CameraRenderSurfaceInfo r4 = r4.getCameraRenderSurfaceInfo()\n android.view.Surface r4 = r4.mSurface\n r2.mSurface = r4\n com.arashivision.arvbmg.previewer.BMGCameraPreviewerSessionRender r4 = r1.I11L\n r4.startCameraRenderSurface(r2)\n r1.llliI = r3\n L_0x00c5:\n com.arashivision.insta360.basemedia.ui.player.capture.CapturePlayerView r1 = r0.f577a\n com.arashivision.insta360.basemedia.ui.player.listener.IBasePlayerViewListener r1 = r1.f741\n if (r1 == 0) goto L_0x00ce\n r1.onLoadingFinish()\n L_0x00ce:\n return\n L_0x00cf:\n r1 = 0\n throw r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.a.a.a.e.a.f.h.onCreateCameraPipeline(com.arashivision.onestream.pipeline.ICameraPreviewPipeline):void\");\n }",
"public void onCameraViewStarted(int width, int height) {\n //https://docs.opencv.org/2.4/modules/core/doc/basic_structures.html\n mRgba = new Mat(height, width, CvType.CV_8UC4);\n\n String pathCascadeNoseFile=initAssetFile(fileName);\n File file =new File(pathCascadeNoseFile);\n if(file.exists()) {\n System.out.println(\"File Exist\");\n cascadeClassifier = new CascadeClassifier(pathCascadeNoseFile);\n }else{\n System.out.println(\"File Don't Exist\");\n }\n\n //I have problem with memory use, create this ones outside the OnCamera frame function\n //But still having some problem with memory use\n //https://answers.opencv.org/question/61516/android-app-force-closed-by-memory-leak/\n matOfRect= new MatOfRect();\n gray= new Mat();\n result = new Mat();\n }",
"private void requestCameraPermission(){\n requestPermissions(cameraPermissions, CAMERA_REQUESTED_CODE);\n }",
"private void getControls() {\n mCameraView = findViewById(R.id.camView);\n mCameraButton = findViewById(R.id.cameraBtn);\n mCameraButtonCloud = findViewById(R.id.cameraBtnCloud);\n mGraphicOverlay = findViewById(R.id.graphic_overlay);\n }",
"@Override\n public void onFrameAvailable(int cameraId) {\n }",
"@Override\n public void onFrameAvailable(int cameraId) {\n }",
"@Override\n public void onNearByCamera(BNRGNearByCameraInfo arg0) {\n Log.d(BNRemoteConstants.MODULE_TAG, \"onNearByCamera...... \");\n }",
"public void startFaceDetection() {\n /*\n r6 = this;\n r0 = r6.mFaceDetectionStarted;\n if (r0 != 0) goto L_0x004a;\n L_0x0004:\n r0 = r6.mCameraDevice;\n if (r0 == 0) goto L_0x004a;\n L_0x0008:\n r0 = r6.needFaceDetection();\n if (r0 != 0) goto L_0x000f;\n L_0x000e:\n goto L_0x004a;\n L_0x000f:\n r0 = r6.mCameraCapabilities;\n r0 = r0.getMaxNumOfFacesSupported();\n if (r0 <= 0) goto L_0x0049;\n L_0x0017:\n r0 = 1;\n r6.mFaceDetectionStarted = r0;\n r1 = r6.mCameraDevice;\n r2 = r6.mHandler;\n r3 = r6.mUI;\n r1.setFaceDetectionCallback(r2, r3);\n r1 = r6.mUI;\n r2 = r6.mDisplayOrientation;\n r3 = r6.isCameraFrontFacing();\n r4 = r6.mCameraId;\n r4 = r6.cropRegionForZoom(r4);\n r5 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r1.onStartFaceDetection(r2, r3, r4, r5);\n r1 = TAG;\n r2 = \"startFaceDetection\";\n com.hmdglobal.app.camera.debug.Log.w(r1, r2);\n r1 = r6.mCameraDevice;\n r1.startFaceDetection();\n r1 = com.hmdglobal.app.camera.util.SessionStatsCollector.instance();\n r1.faceScanActive(r0);\n L_0x0049:\n return;\n L_0x004a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.PhotoModule.startFaceDetection():void\");\n }",
"public void onSwitchCameraClicked(View view) {\n // Switch the camera\n mRtcEngine.switchCamera();\n }",
"public void openCamera(View view){\n if (isInspecting) {\n Context context = App.getContext();\n Intent intent = new Intent(Inspector.this, PhotoManager.class);\n intent.putExtra(\"blueprint\", blueprint);\n intent.putExtra(\"isInspecting\", isInspecting);\n intent.putExtra(\"filename\", filename);\n View parent = (View) view.getParent();\n String tag = parent.getTag().toString();\n intent.putExtra(\"cameraID\", tag);\n LogManager.reportStatus(context, \"INSPECTOR\", \"parent tag = \" + tag);\n startActivity(intent);\n }\n }",
"@Override\n public void onCameraViewStarted(int width, int height){\n mRgba = new Mat(height, width, CvType.CV_8UC4);\n mGray = new Mat(height, width, CvType.CV_8UC1);\n mDrawingLayer = new Mat(height,width,CvType.CV_8UC4);\n mMixed = new Mat(height,width,CvType.CV_8UC4);\n mOutput = new Mat(width,height,CvType.CV_8UC4);\n mGaussianMask = new Mat();\n\n Mat horizontal = Imgproc.getGaussianKernel(width * 2, staticConfig.vignetteLevel,CvType.CV_32F);\n Mat vertical = Imgproc.getGaussianKernel(height * 2, staticConfig.vignetteLevel, CvType.CV_32F);\n Mat matrix = new Mat();\n Core.gemm(vertical,horizontal,1,new Mat(),0,matrix,Core.GEMM_2_T);\n Core.MinMaxLocResult mmr = Core.minMaxLoc(matrix);\n Core.divide(matrix,new Scalar(mmr.maxVal),mGaussianMask);\n\n /* initialising mats that are necessary for frame processing */\n mEdges = new Mat(height, width, CvType.CV_8UC1);\n mTemplateTargetPoints = new MatOfPoint2f(new Point(0, 0), new Point(0, staticConfig.templateSize),new Point(staticConfig.templateSize,staticConfig.templateSize),new Point(staticConfig.templateSize,0));\n mFrameBox = new MatOfPoint2f();\n /* mTemplateTargetPoints.fromArray(new Point(0, 0), new Point(0, staticConfig.templateSize),new Point(staticConfig.templateSize,staticConfig.templateSize),new Point(staticConfig.templateSize,0)); */\n\n /* loading template */\n /* the template is a 200 x 50 png image */\n /* containing the template in 4 different orientations */\n\n mTemplate = new Mat();\n InputStream stream = null;\n Uri uri = Uri.parse(\"android.resource://au.com.pandamakes.www.pureblacktea/drawable/templatelg7\");\n try{\n stream = getContentResolver().openInputStream(uri);\n }catch(FileNotFoundException e){\n e.printStackTrace();\n }\n BitmapFactory.Options bmpFactoryOptions = new BitmapFactory.Options();\n bmpFactoryOptions.inPreferredConfig = Bitmap.Config.ARGB_8888;\n Bitmap bmp = BitmapFactory.decodeStream(stream,null,bmpFactoryOptions);\n Utils.bitmapToMat(bmp, mTemplate);\n mTemplateGray = new Mat();\n Imgproc.cvtColor(mTemplate, mTemplateGray, Imgproc.COLOR_RGB2GRAY);\n\n /* setting up feature detectors */\n mDetector = FeatureDetector.create(FeatureDetector.ORB);\n mExtractor = DescriptorExtractor.create(DescriptorExtractor.ORB);\n mMatcher = DescriptorMatcher.create(DescriptorExtractor.ORB);\n\n /* detect key points */\n mKeyPoints = new MatOfKeyPoint();\n mDescriptor = new Mat();\n mDetector.detect(mTemplateGray, mKeyPoints);\n mExtractor.compute(mTemplateGray, mKeyPoints, mDescriptor);\n List<KeyPoint> listKeyPoint = mKeyPoints.toList();\n mArrayListTemplateKP = new ArrayList<>();\n for(int i = 0; i<listKeyPoint.size(); i++){\n mArrayListTemplateKP.add(listKeyPoint.get(i).pt);\n }\n mFrameKP = new MatOfPoint2f();\n mKpMat = new MatOfKeyPoint();\n\n /* setting up templates */\n Imgproc.resize(mTemplateGray, mTemplateGray, new Size(staticConfig.templateSize, staticConfig.templateSize));\n\n mTemplate90 = new Mat();\n Core.transpose(mTemplateGray, mTemplate90);\n Core.flip(mTemplate90, mTemplate90, 0);\n\n mTemplate180 = new Mat();\n Core.flip(mTemplateGray,mTemplate180,-1);\n\n mTemplate270 = new Mat();\n Core.flip(mTemplate90,mTemplate270,-1);\n\n /* options associated with rendering */\n mCameraCaliberation = new Mat(3,3,CvType.CV_32F);\n float data[] = {3284,0,(float) width/2,0,3284,(float) height/2,0,0,1};\n mCameraCaliberation.put(0,0,data);\n mRefCoord = new MatOfPoint3f();\n mRefBox = new MatOfPoint3f(new Point3(-50,-50,0),new Point3(-50,50,0),new Point3(50,50,0),new Point3(50,-50,0));\n mRVec = new Mat();\n mTVec = new Mat();\n mCaptureAreaAdjusted = new MatOfPoint2f();\n\n /* helper class */\n mXAxis = new visualisation();\n mXAxis.start = new Point3(0,0,0);\n mXAxis.end = new Point3(30,0,0);\n mXAxis.width = 3;\n mXAxis.color = new Scalar(155,55,55);\n\n mYAxis = new visualisation();\n mYAxis.start = new Point3(0,0,0);\n mYAxis.end = new Point3(0,30,0);\n mYAxis.width = 3;\n mYAxis.color = new Scalar(55,155,55);\n\n mZAxis = new visualisation();\n mZAxis.start = new Point3(0,0,0);\n mZAxis.end = new Point3(0,0,-30);\n mZAxis.width = 3;\n mZAxis.color = new Scalar(55,55,155);\n\n /* other misc settings */\n mScanCenter = new Point(width/2,height/2);\n mBoxCenter = new Point(width/2,height/2);\n mScanWidth = staticConfig.scanWidth;\n mRectBorder = new Scalar(200,200,50);\n mLostTrackCounter = 0;\n\n mMostRight = width;\n mMostBottom = height;\n\n adjustROI(mScanCenter,mDetectionBoxSize);\n\n /* init visualisation parameters */\n if(staticConfig.showMolecule){\n mMolecule = new ArrayList<>();\n Boolean flag1 = false,\n flag2 = false;\n File molFile = new File(getFilesDir()+\"/mol.mol\");\n try{\n BufferedReader reader = new BufferedReader(new FileReader(molFile));\n String line;\n while((line=reader.readLine())!=null){\n if(line.contains(\"END\")){\n break;\n }else if(flag2){\n\n }else if(flag1){\n if(line.replace(\" \",\"\").contains(\"000000000000\")) {\n visualisation newAtom = new visualisation();\n try{\n newAtom.initAtom(line);\n }catch (NumberFormatException e){\n /* if a double parsing error occurred */\n mMolecule = new ArrayList<>();\n boolean deleted = molFile.delete();\n if(deleted){\n Toast.makeText(getApplicationContext(),\"Coordinates NaN. For the healthiness of the app, the mol file was deleted.\",Toast.LENGTH_LONG).show();\n }else{\n Toast.makeText(getApplicationContext(),\"Coordinates NaN. The file was not able to be deleted somehow.\",Toast.LENGTH_LONG).show();\n }\n break;\n }\n mMolecule.add(newAtom);\n }else{\n flag2 = true;\n }\n }else if(line.contains(\"V2000\")){\n flag1 = true;\n }\n }\n }catch (IOException e){\n e.printStackTrace();\n }\n }\n }",
"void Initialize(MainActivity mainActivity_, FrameLayout frameLayout_){\n mainActivity = mainActivity_;\n cameraPreviewLayout = frameLayout_;\n\n if (ContextCompat.checkSelfPermission(mainActivity, Manifest.permission.CAMERA) == PackageManager.PERMISSION_DENIED)\n ActivityCompat.requestPermissions(mainActivity, new String[] {Manifest.permission.CAMERA}, MY_CAMERA_REQUEST_CODE);\n else\n Setup();\n }",
"private /* varargs */ void onViewFinderStateChanged(StateMachine.CaptureState captureState, Object ... arrobject) {\n switch (.$SwitchMap$com$sonyericsson$android$camera$fastcapturing$StateMachine$CaptureState[captureState.ordinal()]) {\n default: {\n return;\n }\n case 3: {\n super.resumeView();\n this.mSurfaceView.setVisibility(0);\n return;\n }\n case 4: {\n this.mCurrentDisplayingUiComponent = null;\n super.changeToPhotoIdleView(false);\n if (arrobject != null && arrobject.length != 0) {\n if ((BaseFastViewFinder.UiComponentKind)arrobject[0] == BaseFastViewFinder.UiComponentKind.ZOOM_BAR) return;\n this.requestToDimSystemUi();\n return;\n }\n this.requestToDimSystemUi();\n return;\n }\n case 5: {\n super.changeToPhotoSelftimerView();\n return;\n }\n case 6: \n case 7: {\n super.changeToPhotoZoomingView();\n return;\n }\n case 8: {\n this.mCurrentDisplayingUiComponent = (BaseFastViewFinder.UiComponentKind)arrobject[0];\n super.changeToPhotoDialogView(this.mCurrentDisplayingUiComponent);\n this.requestToRecoverSystemUi();\n return;\n }\n case 9: \n case 10: {\n this.requestToRemoveSystemUi();\n super.changeToPhotoFocusSearchView();\n return;\n }\n case 11: {\n super.changeToPhotoFocusSearchView();\n return;\n }\n case 12: \n case 13: {\n super.changeToPhotoFocusDoneView((Boolean)arrobject[0]);\n return;\n }\n case 14: {\n super.changeToPhotoCaptureWaitForAfDoneView();\n return;\n }\n case 15: {\n super.changeToPhotoCaptureView();\n return;\n }\n case 16: \n case 17: {\n super.changeToPhotoBurstView((Boolean)arrobject[0]);\n return;\n }\n case 18: {\n if (this.mFocusRectangles != null) {\n this.mFocusRectangles.clearExceptTouchFocus();\n }\n this.getBaseLayout().showContentsViewController();\n return;\n }\n case 19: {\n super.changeToVideoRecordingView();\n this.requestToDimSystemUi();\n return;\n }\n case 20: {\n super.changeToVideoRecordingView();\n if (arrobject != null && arrobject.length != 0) {\n if ((BaseFastViewFinder.UiComponentKind)arrobject[0] == BaseFastViewFinder.UiComponentKind.ZOOM_BAR) return;\n this.requestToDimSystemUi();\n return;\n }\n this.requestToDimSystemUi();\n return;\n }\n case 24: \n case 25: {\n super.changeToVideoZoomingWhileRecordingView();\n return;\n }\n case 26: {\n super.hideTakePictureFeedbackView();\n this.mSurfaceView.setVisibility(8);\n super.pauseView();\n super.changeToPauseView();\n return;\n }\n case 27: {\n if (this.mFocusRectangles != null) {\n this.mFocusRectangles.clearAllFocus();\n }\n super.changeToPhotoIdleView(false);\n this.requestToDimSystemUi();\n return;\n }\n case 28: {\n this.mSurfaceView.getHolder().removeCallback((SurfaceHolder.Callback)this);\n this.mSurfaceView = null;\n super.hideTakePictureFeedbackView();\n this.mSurfaceBlinderView = null;\n this.mKeyEventTranslator = null;\n this.release();\n super.getDownHeadUpDisplay();\n return;\n }\n case 29: {\n super.changeToVideoRecordingPauseView();\n return;\n }\n case 30: {\n this.mVideoAutoReviewSetting = null;\n return;\n }\n case 31: \n }\n this.requestToRemoveSystemUi();\n super.changeToReadyForRecordView();\n }",
"@Override\n public void runOpMode() {\n robot.init(hardwareMap);\n\n telemetry.addData(\"Status\", \"DogeCV 2018.0 - Gold Align Example\");\n // Set up our telemetry dashboard\n composeTelemetry();\n\n detector = new GoldAlignDetector();\n detector.init(hardwareMap.appContext, CameraViewDisplay.getInstance());\n detector.useDefaults();\n\n // Optional Tuning\n detector.alignSize = 100; // How wide (in pixels) is the range in which the gold object will be aligned. (Represented by green bars in the preview)\n detector.alignPosOffset = 0; // How far from center frame to offset this alignment zone.\n detector.downscale = 0.4; // How much to downscale the input frames\n\n detector.areaScoringMethod = DogeCV.AreaScoringMethod.MAX_AREA; // Can also be PERFECT_AREA\n detector.maxAreaScorer.weight = 0.005;\n\n detector.ratioScorer.weight = 5;\n detector.ratioScorer.perfectRatio = 1.0;\n\n detector.enable();\n\n // Ensure the robot it stationary, then reset the encoders and calibrate the gyro.\n robot.leftDrive.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.rightDrive.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n\n ;\n // Wait for the game to start (Display Gyro value), and reset gyro before we move..\n while (!isStarted()) {\n telemetry.update();\n }\n\n // Wait for the game to start (driver presses PLAY)\n waitForStart();\n\n //----------------------------------------------------\n // analyze the camera image to locate gold\n //----------------------------------------------------\n\n double goldLocation = detector.getXPosition();\n\n char targetLocation = 'X';\n //X = error\n //L = Left\n //R = Right\n //C = Center\n\n // Left, Right, And Center Values\n if ((goldLocation > 5) && (goldLocation < 120)){\n telemetry.addLine(\"Gold is LEFT\");\n targetLocation = 'L';\n }\n else if ((goldLocation > 350)){\n telemetry.addLine(\"Gold is RIGHT\");\n targetLocation = 'R';\n }\n else if ((goldLocation > 120) && (goldLocation < 350)){\n telemetry.addLine(\"Gold is Center\");\n targetLocation = 'C';\n }\n else{\n telemetry.addLine(\"ERROR no location detected\");\n targetLocation = 'X';\n }\n\n\n // Update telemetry\n telemetry.update();\n // turn off DogeCV\n detector.disable();\n\n\n //----------------------------------------------------\n // Drop down from the Lander\n //----------------------------------------------------\n\n\n\n //----------------------------------------------------\n // Based on where the Gold mineral is decide\n // where to drive\n //----------------------------------------------------\n\n switch (targetLocation){\n case 'R':\n //code here for gold on right\n\n break;\n case 'C':\n //code here for gold in the center\n encoderDrive(0.4, 38, 38, 5.0);\n encoderDrive(0.4, -11, -11, 5.0);\n gyroTurn(0.4, 90, 2.0);\n encoderDrive(0.4, 30, 30, 5.0);\n gyroTurn(0.4, 45, 2.0);\n encoderDrive(0.4, 12, 12, 5.0);\n gyroTurn(0.4, 130, 2.0 );\n encoderDrive(0.4, 45, 45, 5.0);\n //servo dump the marker\n eTime.reset();\n while (opModeIsActive() && (eTime.seconds() < 2.0)) {\n robot.markerDeploy.setPosition(1);\n }\n gyroTurn(0.4, 140, 2.0);\n encoderDrive(0.4, -78, -78, 5.0);\n //parked at crater - DONE!\n robot.markerDeploy.setPosition(0);\n break;\n case 'L':\n //code here for gold on left\n\n break;\n case 'X': default:\n //code here error case\n\n break;\n }\n\n //----------------------------------------------------\n // Drive to Depot to Drop off Team Marker\n //----------------------------------------------------\n\n\n\n }",
"public interface TakeFrameListener {\n void onTake(Mat mat);\n}",
"@Override\n public void runOpMode() throws InterruptedException {\n distanceSensorInRange = false;\n myGlyphLift = new glyphLift(hardwareMap.dcMotor.get(\"glyph_lift\"));\n myColorSensorArm = new colorSensorArm(hardwareMap.servo.get(\"color_sensor_arm\"),hardwareMap.colorSensor.get(\"sensor_color\"), hardwareMap.servo.get(\"color_sensor_arm_rotate\"));\n myMechDrive = new mechDriveAuto(hardwareMap.dcMotor.get(\"front_left_motor\"), hardwareMap.dcMotor.get(\"front_right_motor\"), hardwareMap.dcMotor.get(\"rear_left_motor\"), hardwareMap.dcMotor.get(\"rear_right_motor\"));\n myGlyphArms = new glyphArms(hardwareMap.servo.get(\"top_left_glyph_arm\"), hardwareMap.servo.get(\"bottom_left_glyph_arm\"), hardwareMap.servo.get(\"top_left_glyph_arm\"), hardwareMap.servo.get(\"bottom_right_glyph_arm\"));\n myBoardArm = new boardArm(hardwareMap.dcMotor.get(\"board_arm\"));\n myRevColorDistanceSensor = new revColorDistanceSensor(hardwareMap.get(ColorSensor.class, \"rev_sensor_color_distance\"), hardwareMap.get(DistanceSensor.class, \"rev_sensor_color_distance\"));\n\n\n myColorSensorArm.colorSensorArmUpSlow();\n myColorSensorArm.colorRotateResting();\n //myGlyphArms.openRaisedGlyphArms(); //ensures robot is wihin 18\" by 18\" parameters\n\n int cameraMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\"cameraMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(cameraMonitorViewId);\n parameters.vuforiaLicenseKey = \"ASmjss3/////AAAAGQGMjs1d6UMZvrjQPX7J14B0s7kN+rWOyxwitoTy9i0qV7D+YGPfPeeoe/RgJjgMLabjIyRXYmDFLlJYTJvG9ez4GQSI4L8BgkCZkUWpAguRsP8Ah/i6dXIz/vVR/VZxVTR5ItyCovcRY+SPz3CP1tNag253qwl7E900NaEfFh6v/DalkEDppFevUDOB/WuLZmHu53M+xx7E3x35VW86glGKnxDLzcd9wS1wK5QhfbPOExe97azxVOVER8zNNF7LP7B+Qeticfs3O9pGXzI8lj3zClut/7aDVwZ10IPVk4oma6CO8FM5UtNLSb3sicoKV5QGiNmxbbOlnPxz9qD38UAHshq2/y0ZjI/a8oT+doCr\";\n parameters.cameraDirection = VuforiaLocalizer.CameraDirection.BACK;\n this.vuforia = ClassFactory.createVuforiaLocalizer(parameters);\n VuforiaTrackables relicTrackables = this.vuforia.loadTrackablesFromAsset(\"RelicVuMark\");\n VuforiaTrackable relicTemplate = relicTrackables.get(0);\n relicTemplate.setName(\"relicVuMarkTemplate\"); // can help in debugging; otherwise not necessary\n\n waitForStart();\n\n relicTrackables.activate();\n\n while (opModeIsActive()) {\n myGlyphArms.closeGlyphArms();\n sleep(2000);\n myMechDrive.vuforiaLeft(myGlyphArms);\n sleep(1000);\n requestOpModeStop();\n }\n }",
"private void setCamera() {\n\t\tCamera.CameraInfo cameraInfo = new Camera.CameraInfo();\n\t\tint cameraCount = Camera.getNumberOfCameras();\n\t\tLog.i(TAG, \"count = \" + cameraCount);\n\t\tLog.i(TAG, \"isBack = \" + isBack);\n\t\tint id = 0;\n\n\t\tfor (int camIdx = 0; camIdx < cameraCount; camIdx++) {\n\t\t\tCamera.getCameraInfo(camIdx, cameraInfo);\n\t\t\tLog.i(TAG, \"cameraInfoFacing = \" + cameraInfo.facing);\n\t\t\tif (cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_BACK\n\t\t\t\t\t&& isBack) {\n\t\t\t\ttry {\n\t\t\t\t\tLog.i(TAG, \"SETTING mCamera\");\n\t\t\t\t\tmCamera = Camera.open(camIdx);\n\t\t\t\t\tid = camIdx;\n\t\t\t\t} catch (RuntimeException e) {\n\t\t\t\t\tLog.e(TAG,\n\t\t\t\t\t\t\t\"Camera failed to open: \" + e.getLocalizedMessage());\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t} else if (cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_FRONT\n\t\t\t\t\t&& !isBack){\n\t\t\t\ttry {\n\t\t\t\t\tLog.i(TAG, \"SETTING mCamera\");\n\t\t\t\t\tmCamera = Camera.open(camIdx);\n\t\t\t\t\tid = camIdx;\n\t\t\t\t} catch (RuntimeException e) {\n\t\t\t\t\tLog.e(TAG,\n\t\t\t\t\t\t\t\"Camera failed to open: \" + e.getLocalizedMessage());\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (mCamera != null) {\n\t\t\tCamera.Parameters cameraParameters = mCamera.getParameters();\n\t\t\tDisplay display = getActivity().getWindowManager().getDefaultDisplay();\n\t\t\tPoint size = new Point();\n\t\t\tdisplay.getSize(size);\n\t\t\tint screenWidth = size.x;\n\t\t\tint width = Integer.MAX_VALUE;\n\t\t\tint height = 0;\n\t\t\tLog.i(TAG, \"SCREENWIDTH: \" + screenWidth);\n\t\t\tList<Camera.Size> sizes = cameraParameters.getSupportedPreviewSizes();\n\t\t\tfor (Camera.Size cSize : sizes) {\n\t\t\t\tif (cSize.width >= screenWidth && cSize.width <= width) {\n\t\t\t\t\twidth = cSize.width;\n\t\t\t\t\theight = cSize.height;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tLog.i(TAG, \"Width: \" + width + \" HEIGHT: \" + height);\n\n\t\t\tif (mPreview != null) {\n\t\t\t\tmPreview.switchCamera(mCamera, id, width, height);\n\t\t\t} else {\n\t\t\t\tmPreview = new CameraPreview(getActivity(), mCamera, id, width, height);\n\t\t\t\tFrameLayout preview = (FrameLayout) view\n\t\t\t\t\t\t.findViewById(R.id.camera_preview);\n\t\t\t\tpreview.addView(mPreview);\n\t\t\t}\n\t\t\tmCamera.startPreview();\n\t\t}\n\t}",
"@Override\n public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {\n// steering = (TextView) findViewById(R.id.steering_angle);\n\n\n Mat frame = inputFrame.rgba();\n steering_angle_ = get_steering_prediction(frame.clone());\n Mat displayMat = null;\n// if(counterFrme % 10 == 0 || counterFrme %10 ==1 || counterFrme %10 ==2 || counterFrme %10 ==3 || counterFrme %10 ==4 ) {\n displayMat = draw_LaneLines(frame.clone());\n// displayMat = CarDetect(displayMat);\n// displayMat = PedestrainDet(frame.clone());\n\n// }else{\n// displayMat = frame;\n// }\n\n counterFrme ++;\n if(steering_angle_< 0 ) {\n Imgproc.putText(\n displayMat, // Matrix obj of the image\n \"turn left \" + steering_angle_ * -1 + \"% of the wheel\", // Text to be added\n new Point(10, 50), // point\n Core.FONT_HERSHEY_SIMPLEX, // front face\n 1, // front scale\n new Scalar(255, 0, 0), // Scalar object for color\n 6 // Thickness\n );\n }\n if(steering_angle_ > 0 ) {\n Imgproc.putText(\n displayMat, // Matrix obj of the image\n \"turn right \" + steering_angle_ + \"% of the wheel\", // Text to be added\n new Point(10, 50), // point\n Core.FONT_HERSHEY_SIMPLEX, // front face\n 1, // front scale\n new Scalar(255, 0, 0), // Scalar object for color\n 6 // Thickness\n );\n }\n\n return displayMat;\n\n }",
"private boolean checkCameraHardware(Context context) {\r\n if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)){\r\n return true; // Tiene camara\r\n } else {\r\n return false;// No tiene camara\r\n }\r\n }",
"@Override\r\n public void simpleInitApp() {\r\n\r\n customCam = new GraphicalUserInterface.CustomCam(cam);\r\n if (customCam != null) {\r\n flyCam.setEnabled(false);\r\n customCam.registerWithInput(inputManager);\r\n customCam.setZoomSpeed(10f);\r\n customCam.setRotationSpeed(10f);\r\n customCam.setMoveSpeed(3f);\r\n customCam.setDistance(50.0f);\r\n }\r\n setDisplayStatView(false); // to hide the statistics\r\n setDisplayFps(false);\r\n viewPort.setBackgroundColor(ColorRGBA.Black);\r\n ambient.setColor(new ColorRGBA(0.7f, 0.7f, 0.8f, 1.0f));\r\n rootNode.addLight(ambient);\r\n // Set up the directional light\r\n light1.setColor(ColorRGBA.White);\r\n\r\n rootNode.addLight(light1);\r\n\r\n createSceneGraph();\r\n\r\n }",
"private void askCameraPermission(){\n /** {@PERMISSION_GRANTED} value is 0 that means if permission is granted then checkSelfPermission will inform us by int\n * and if {@checkSelfPermission} is not 0 that means permission is not granted so we need to ask the permission at run time\n * only for API above 23*/\n if(ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED){\n ActivityCompat.requestPermissions(this,new String[]{Manifest.permission.CAMERA},CAMERA_CAPTURE_IMAGE_PERMISSION_CODE);\n }else{\n // if permission is granted then open camera directly\n dispatchTakePictureIntent();\n }\n }",
"@Override\n public void runOpMode() {\n\n //PUTS THE NAMES OF THE MOTORS INTO THE CODE\n\n //DRIVE Motors\n aDrive = hardwareMap.get(DcMotor.class, \"aDrive\");\n bDrive = hardwareMap.get(DcMotor.class, \"bDrive\");\n cDrive = hardwareMap.get(DcMotor.class, \"cDrive\");\n dDrive = hardwareMap.get(DcMotor.class, \"dDrive\");\n cDrive.setDirection(DcMotor.Direction.REVERSE);\n dDrive.setDirection(DcMotor.Direction.REVERSE);\n\n //FUNCTIONS Motors\n Arm = hardwareMap.get(DcMotor.class, \"Arm\");\n ArmExtender = hardwareMap.get(DcMotor.class, \"ArmExtender\");\n Spindle = hardwareMap.get(DcMotor.class, \"Spindle\");\n Lift = hardwareMap.get(DcMotor.class, \"Lift\");\n\n //SERVOS\n Cover = hardwareMap.get(Servo.class, \"Cover\");\n\n //Vuforia\n telemetry.addData(\"Status\", \"DogeCV 2018.0 - Gold Align Example\");\n\n detector = new GoldAlignDetector();\n detector.init(hardwareMap.appContext, CameraViewDisplay.getInstance());\n detector.useDefaults();\n\n // Phone Stuff\n detector.alignSize = 100; // How wide (in pixels) is the range in which the gold object will be aligned. (Represented by green bars in the preview)\n detector.alignPosOffset = 0; // How far from center frame to offset this alignment zone.\n detector.downscale = 0.4; // How much to downscale the input frames\n detector.areaScoringMethod = DogeCV.AreaScoringMethod.MAX_AREA; // Can also be PERFECT_AREA\n //detector.perfectAreaScorer.perfectArea = 10000; // if using PERFECT_AREA scoring\n detector.maxAreaScorer.weight = 0.005;\n detector.ratioScorer.weight = 5;\n detector.ratioScorer.perfectRatio = 1.0;\n detector.enable();\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update();\n\n waitForStart();\n\n telemetry.addData(\"IsAligned\" , detector.getAligned()); // Is the bot aligned with the gold mineral\n\n goldPos = detector.getXPosition(); // Gets gold block posistion\n\n sleep(1000); // Waits to make sure it is correct\n\n // Move Depending on gold position\n if(goldPos < 160){\n driftleft();\n sleep(1500);\n }else if (goldPos > 500) {\n driftright();\n sleep(1500);\n }else{\n forward();\n }\n\n forward(); //Drives into crater\n sleep(4000);\n\n detector.disable();\n\n }"
]
| [
"0.696778",
"0.657628",
"0.6564822",
"0.6481218",
"0.6463913",
"0.6444631",
"0.64373744",
"0.6410469",
"0.635578",
"0.6340328",
"0.63274723",
"0.6320379",
"0.6296723",
"0.6289235",
"0.62575686",
"0.62525237",
"0.62240773",
"0.615196",
"0.6148908",
"0.61233556",
"0.60959786",
"0.60728514",
"0.60512936",
"0.60426176",
"0.6017452",
"0.6002029",
"0.598615",
"0.59776247",
"0.5969309",
"0.59497833",
"0.59392834",
"0.5905073",
"0.58989143",
"0.58951694",
"0.5887625",
"0.5882344",
"0.58743894",
"0.58656883",
"0.5859924",
"0.5858977",
"0.58434844",
"0.5830293",
"0.5828687",
"0.58169514",
"0.5816721",
"0.58114684",
"0.5803669",
"0.57858706",
"0.578567",
"0.57767713",
"0.5775247",
"0.5772365",
"0.57602215",
"0.5755758",
"0.5754268",
"0.57502085",
"0.5748594",
"0.57392174",
"0.57324994",
"0.57270557",
"0.57212764",
"0.5719229",
"0.5713095",
"0.57049924",
"0.5689195",
"0.5688172",
"0.56807625",
"0.5680591",
"0.5679423",
"0.5675025",
"0.56693107",
"0.56580764",
"0.56511426",
"0.5647196",
"0.56370944",
"0.56351244",
"0.5633678",
"0.5627035",
"0.5619618",
"0.5615528",
"0.5612157",
"0.56116986",
"0.56077415",
"0.56077415",
"0.5606485",
"0.56057477",
"0.5604962",
"0.5599203",
"0.5593158",
"0.5589917",
"0.55897856",
"0.55870354",
"0.5584682",
"0.5581768",
"0.5573823",
"0.5572667",
"0.55691767",
"0.55664647",
"0.5564199",
"0.55618477"
]
| 0.60337937 | 24 |
Interface used for get and change a capture request. | public interface IDetectionListener {
/**
* Get the current repeating request type {@link RequestType}.
*
* @return The current type of capture request.
*/
public RequestType getRepeatingRequestType();
/**
* Request change capture request.
*
* @param sync
* Whether should respond this request immediately, true request
* immediately,false wait all requests been submitted and remove the same request
* current design is only for
* {@link ISettingChangedListener#onSettingChanged(java.util.Map)}.
* @param requestType
* The required request, which is one of the {@link RequestType}.
* @param captureType
* The required capture, which is one of the {@link CaptureType}.
*/
public void requestChangeCaptureRequest(boolean sync, RequestType requestType,
CaptureType captureType);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface ICapture {\n public Handler getHandler();\n\n Rect getCropRect();\n\n void handleDecode(Result rawResult, Bundle bundle);\n\n CameraManager getCameraManager();\n}",
"void onCaptureCompleted(CaptureRequest request, TotalCaptureResult result);",
"public interface IDetectionManager {\n /**\n * Interface used for get and change a capture request.\n */\n public interface IDetectionListener {\n /**\n * Get the current repeating request type {@link RequestType}.\n *\n * @return The current type of capture request.\n */\n public RequestType getRepeatingRequestType();\n\n /**\n * Request change capture request.\n *\n * @param sync\n * Whether should respond this request immediately, true request\n * immediately,false wait all requests been submitted and remove the same request\n * current design is only for\n * {@link ISettingChangedListener#onSettingChanged(java.util.Map)}.\n * @param requestType\n * The required request, which is one of the {@link RequestType}.\n * @param captureType\n * The required capture, which is one of the {@link CaptureType}.\n */\n public void requestChangeCaptureRequest(boolean sync, RequestType requestType,\n CaptureType captureType);\n }\n\n /**\n * The life cycle corresponding to camera activity onCreate.\n *\n * @param activity\n * Camera activity.\n * @param parentView\n * The root view of camera activity.\n * @param isCaptureIntent\n * {@link com.android.camera.v2.CameraActivityBridge #isCaptureIntent()}.\n */\n void open(Activity activity, ViewGroup parentView, boolean isCaptureIntent);\n\n /**\n * The life cycle corresponding to camera activity onResume.\n */\n void resume();\n\n /**\n * The life cycle corresponding to camera activity onPause.\n */\n void pause();\n\n /**\n * The life cycle corresponding to camera activity onDestory.\n */\n void close();\n\n /**\n * {@link com.android.camera.v2.app.GestureManager.GestureNotifier\n * #onSingleTapUp(float, float)}.\n *\n * @param x\n * The x-coordinate.\n * @param y\n * The y-coordinate.\n */\n void onSingleTapUp(float x, float y);\n\n /**\n * {@link com.android.camera.v2.app.GestureManager.GestureNotifier #onLongPress(float, float)}.\n *\n * @param x\n * The x-coordinate.\n * @param y\n * The y-coordinate.\n */\n void onLongPressed(float x, float y);\n\n /**\n * {@link PreviewStatusListener\n * #onPreviewLayoutChanged(android.view.View, int, int, int, int, int, int, int, int)}.\n *\n * @param previewArea\n * The preview area.\n */\n void onPreviewAreaChanged(RectF previewArea);\n\n /**\n * {@link com.android.camera.v2.CameraActivityBridge #onOrientationChanged(int)}.\n *\n * @param orientation\n * The current G-sensor orientation.\n */\n void onOrientationChanged(int orientation);\n\n /**\n * Configuring capture requests.\n *\n * @param requestBuilders The builders of capture requests.\n * @param captureType {@link CaptureType}.\n */\n void configuringSessionRequests(Map<RequestType, CaptureRequest.Builder> requestBuilders,\n CaptureType captureType);\n\n /**\n * This method is called when the camera device has started capturing the output image for the\n * request, at the beginning of image exposure.\n *\n * @param request\n * The request for the capture that just begun.\n * @param timestamp\n * The time stamp at start of capture, in nanoseconds.\n * @param frameNumber\n * The frame number for this capture.\n */\n void onCaptureStarted(CaptureRequest request, long timestamp, long frameNumber);\n\n /**\n * This method is called when an image capture has fully completed and all the result metadata\n * is available.\n *\n * @param request\n * The request that was given to the CameraDevice\n *\n * @param result\n * The total output metadata from the capture, including the final capture parameters\n * and the state of the camera system during capture.\n */\n void onCaptureCompleted(CaptureRequest request, TotalCaptureResult result);\n}",
"public interface CaptureImgService {\n\n String captureImg(HttpServletRequest re, String url, String size) throws IOException;\n}",
"void onCaptureStarted(CaptureRequest request, long timestamp, long frameNumber);",
"@Override\n public void capture() {\n }",
"public interface IShotRequest {\n\n /**\n * start request\n */\n void notifyStart();\n\n /**\n * notify on finish success\n *\n * @param response\n */\n void notifySuccess(final List<ShotBO> response);\n\n /**\n * notify error\n *\n * @param errorResponse\n */\n void notifyFailure(final ErrorResponse errorResponse);\n}",
"public interface CamAPI {\n\n\n public String getPath();\n\n public String up();\n\n public String left();\n\n public String right();\n\n public String down();\n\n public String center();\n\n public String img();\n\n\n}",
"void setRequest(Request req);",
"public interface ICamera {\n\n /**\n * Return frame access interface for client usage\n *\n * @param interface_index\n * @return\n */\n public long getFrameAccessIfc(int interface_index);\n\n /**\n * Start the camera stream\n */\n public void start();\n\n /**\n * Stop the camera stream\n */\n public void stop();\n\n public String prepare(final UsbMonitor.UsbConnectionData connectionData);\n\n /**\n * Register json status callback\n *\n * @param callback\n */\n public void setStatusCallback(final IStatusCallback callback);\n\n /**\n * Queries camera for supported mode\n *\n * @return supported video modes String\n */\n public String getSupportedVideoModes();\n\n// /**\n// * Select camera capture mode\n// *\n// * @param width\n// * @param height\n// * @param frameFormat\n// */\n// public void setCaptureMode(final int width, final int height, final int frameFormat);\n\n /**\n * Select camera capture mode\n *\n * @param width\n * @param height\n * @param min_fps\n * @param max_fps\n * @param frameFormat\n */\n public void setCaptureMode(final int width, final int height, final int min_fps, final int max_fps, final int frameFormat);\n}",
"public interface CaptureHandleImpl {\n\n ViewfinderView getViewfinderView();\n\n void handleDecode(Result obj, Bitmap barcode);\n\n void setResult(int resultOk, Intent obj);\n\n void startActivity(Intent intent);\n\n void finish();\n\n void drawViewfinder();\n\n Handler getHandler();\n}",
"public interface OnRequestDetailsListen {\n}",
"public void captureEvent(Capture c) {\n c.read();\n }",
"public interface RequestItemListener extends ImageObtainable {\n\n\t\t/**\n\t\t * Request detail information to be presented\n\t\t * about the specific request.\n\t\t * @param request request to get detail \n\t\t */\n\t\tpublic void onRequestSelected(CustomerRequest request);\n\n\t\t/**\n\t\t * Assign the staffmember to handle the request.\n\t\t * @param request request to handle \n\t\t * @param staff staff member to assign to request\n\t\t */\n\t\tpublic void onAssignStaffToRequest(CustomerRequest request, String staff);\n\n\t\t/**\n\t\t * Removes a request. Request is removed completely from this \n\t\t * list. This is a notification method \n\t\t * @param request String\n\t\t */\n\t\tpublic void onRemoveRequest(CustomerRequest request);\n\n\t\t/**\n\t\t * Used to get the most recent up to date list of items to show.\n\t\t * Cannot return null\n\t\t * @return List of requests to show\n\t\t */\n\t\tpublic List<CustomerRequest> getCurrentRequests();\n\n\t}",
"public interface CaptureViewer {\n public void displayImage(Bitmap image);\n\n public void imageCleared();\n}",
"public GrizzletRequest getRequest();",
"@Override\n\tpublic void receiveRequest() {\n\n\t}",
"public static Recorder getHttpRecorder() {\n return currentRecorder.get(); \n }",
"private void changeRequest(InstanceRequest request) {\r\n\t\t\r\n\t}",
"void notifyCapture(Pit capturedPit);",
"public Camera getCam() {\n return this.cam;\n }",
"public interface Request {\n}",
"public interface CameraStorage {\n\n /**\n * Lists all of support storage's type\n */\n public static enum STORAGE_TYPE {\n LOCAL_DEFAULT,\n REMOTE_DEFAULT //not implemented\n }\n\n /**\n * Sets the root path which can be a file description, uri, url for storage accessing\n *\n * @param root\n */\n public void setRoot(String root);\n\n /**\n * Gets the root path which is a file path, uri, url etc.\n *\n * @return\n */\n public String getRoot();\n\n /**\n * Saves a record to storage\n *\n * @param record\n * @return\n */\n public boolean save(CameraRecord record);\n\n /**\n * Gets a list of thumbnails which are used to represent the record that accessing from storage\n *\n * @return\n */\n public List<CameraRecord> loadThumbnail();\n\n /**\n * Loads a resource of record which can be a image or video\n *\n * @param record\n * @return\n */\n public Object loadResource(CameraRecord record);\n\n}",
"public interface ICloudRequest {\n \n public int getOp();\n public void incrementRetries();\n public void resetRetries();\n public int getRetries();\n \n /**\n * Retrieve the data unit associated with this request\n * @return {@link DepSkyDataUnit}\n */\n public DepSkyDataUnit getDataUnit();\n \n /**\n * Determine when this procedure started originally\n * @return long - start time of this procedure\n */\n public long getStartTime();\n \n /**\n * Determine the sequence of this request\n * @return long\n */\n public long getSequenceNumber();\n \n /**\n * Get the data resulting from this request\n * @return byte[] consisting of the data\n */\n public byte[] getData();\n \n \n}",
"public abstract SnapShot GetSnapshot();",
"@Override\n public void receiveRequest(final Request request) {\n\n }",
"public interface Request {\n public String toXml();\n\n\n public String getHandlerId();\n\n\n public String getRequestId();\n}",
"public REQ getRequest() {\n return request;\n }",
"@Override\n\tpublic Request request() {\n\t\treturn originalRequest;\n\t}",
"@Override\n\tpublic void setRequest(Map<String, Object> arg0) {\n\t\tthis.request = arg0;\n\t}",
"public interface NetRecordingRequestHandler {\r\n\r\n /**\r\n * Notifies this NetRecordingRequestHandler that a device on the home\r\n * network has requested that a recording be scheduled. Handler applications\r\n * MAY inspect any metadata associated with the NetRecordingEntry passed\r\n * with the method invocation, and translate such metadata in one or\r\n * more local DVR recordings. Applications SHOULD associate such\r\n * recordings with the NetRecordingEntry by adding the recordings\r\n * to the entry using the <i>NetRecordingEntry.addRecordingContentItem() </i>\r\n * method.\r\n * \r\n * @param address\r\n * IP address of the device on the home network which has issues this request\r\n * @param spec\r\n * the NetRecordingEntry which describes the requested recording\r\n * \r\n * @return true if the schedule request can be successfully processed, or\r\n * false if the request will not be processed.\r\n * \r\n * @see NetRecordingEntry#addRecordingContentItem(RecordingContentItem) \r\n */\r\n boolean notifySchedule(InetAddress address, NetRecordingEntry spec);\r\n\r\n /**\r\n * Notifies this NetRecordingRequestHandler that a device on the home\r\n * network has requested that a recording be rescheduled. Handler\r\n * applications MAY inspec any metadata contained within the \r\n * NetRecordingEntry passed into this method, and utilize such metadata\r\n * to reschedule the local DVR recording represented by the given \r\n * ContentEntry. This ContentEntry may represent an individual recording\r\n * as a RecordingContentItem, or may represent a collection of recordings\r\n * contained within a NetRecordingEntry object.\r\n * \r\n * @param address\r\n * the IP address of the device on the home network which has issues this request\r\n * @param recording\r\n * the RecordingContentItem or NetRecordingEntry to be\r\n * rescheduled\r\n * @param spec\r\n * the NetRecordingEntry object containing the metadata to be used\r\n * to reschedule the recording\r\n * \r\n * @return true if the reschedule request can be successfully processed,or\r\n * false if the request will not be processed.\r\n */\r\n boolean notifyReschedule(InetAddress address, ContentEntry recording,\r\n NetRecordingEntry spec);\r\n\r\n /**\r\n * Notifies this NetRecordingRequestHandler that a device on the home\r\n * network has requested that a recording be disabled. If the recording is\r\n * in progress, this is a request to stop the recording. If the recording is\r\n * pending, this is a request to cancel the recording. Applications MAY\r\n * cancel or stop the given recording in response to this request.\r\n * \r\n * @param address\r\n * the IP address of the device on the home network which has issues this request\r\n * @param recording\r\n * the RecordingContentItem or RecordingNetEntry to be disabled\r\n * \r\n * @return true if the disable request can be successfully processed,or\r\n * false if the request will not be processed.\r\n */\r\n boolean notifyDisable(InetAddress address, ContentEntry recording);\r\n\r\n /**\r\n * Notifies this NetRecordingRequestHandler that a device on the home\r\n * network has requested that metadata associated with a recording be\r\n * deleted. Applications MAY delete the given recording in response\r\n * to this request.\r\n * \r\n * @param address\r\n * the IP address of the device on the home network which has issues this request\r\n * @param recording\r\n * the RecordingContentItem or NetRecordingEntry to be\r\n * deleted\r\n * \r\n * @return true if the delete request can be successfully processed,or\r\n * false if the request will not be processed.\r\n */\r\n boolean notifyDelete(InetAddress address, ContentEntry recording);\r\n\r\n /**\r\n * Notifies this NetRecordingRequestHandler that a device on the home\r\n * network has requested that content associated with a recorded service be\r\n * deleted. Applications MAY delete the content associated with the given\r\n * recording in response to this request.\r\n * \r\n * @param address\r\n * the IP address of the device on the home network which has issues this request\r\n * @param recording\r\n * requested the RecordingContentItem or NetRecordingEntry\r\n * \r\n * @return true if the delete request can be successfully processed,or\r\n * false if the request will not be processed.\r\n */\r\n boolean notifyDeleteService(InetAddress address, ContentEntry recording);\r\n\r\n /**\r\n * Notifies this NetRecordingRequestHandler that a device on the home\r\n * network has requested that a group of recordings be re-prioritized.\r\n * The requested prioritization is represented by the ordering of \r\n * the NetRecordingEntry objects in the given array, with the highest\r\n * priority at index 0 of the array. Applications MAY prioritize some \r\n * or all of the local DVR recordings contained within the NetRecordingEntry\r\n * array.\r\n * \r\n * @param address\r\n * the IP address of the device on the home network which has issues this request\r\n * @param recordings\r\n * the NetRecordingEntrys to be prioritized\r\n * \r\n * @return true if the prioritization request can be successfully processed,or\r\n * false if the request will not be processed.\r\n */\r\n boolean notifyPrioritization(InetAddress address, NetRecordingEntry recordings[]);\r\n \r\n /**\r\n * Notifies this NetRecordingRequestHandler that a device on the home\r\n * network has requested that a group of individual recordings be \r\n * re-prioritized. The requested prioritization is represented by the \r\n * ordering of the RecordingContentItem objects in the given array, with\r\n * the highest priority at index 0 of the array. Applications MAY prioritize \r\n * the local DVR recordings contained within the RecordingContentItem\r\n * array.\r\n * \r\n * @param address IP address of the device on the home network which has\r\n * issued this request.\r\n * @param recordings The recording content items associated with the recordings to\r\n * be prioritized.\r\n * \r\n * @return True if the prioritization request can be successfully processed,or\r\n * false if the request will not be processed.\r\n */\r\n boolean notifyPrioritization(InetAddress address,\r\n RecordingContentItem recordings[]);\r\n}",
"public void request() {\n }",
"void onCaptureStart();",
"public interface IRobotDeviceRequest {\n\n /**\n * Returns the device name.\n * \n * @return the device name\n */\n String getDeviceName();\n\n /**\n * Returns the priority of the request.\n * \n * @return the priority of the request\n */\n int getPriority();\n\n /**\n * Returns the time-stamp of this request.\n * \n * @return the time-stamp of this request\n */\n long getTimeStamp();\n\n /**\n * Uid to differentiate the device requests.\n * \n * @return\n */\n long getUID();\n}",
"public interface IRequest<T, O> {\r\n /**\r\n * Call back interface method for processing the Server Request\r\n *\r\n * @param requestInfo - RequestInfo Object which holds all the required Request Details\r\n */\r\n void processRequest(RequestInfo<T, O> requestInfo, Class<T> TClass, Class<O> OClass, boolean invalidateCache);\r\n\r\n void registerListener(INetworkListener networkListener);\r\n\r\n boolean cancelRequest();\r\n}",
"@Override\n\tpublic void setRequest(Map<String, Object> arg0) {\n\n\t}",
"interface DmaRequestRead extends DmaRequest\n{\n\t/**\n\t * Set the value from memory to the peripheral.\n\t */\n\tpublic void setDmaValue(int value);\n}",
"public DataHolder processRequest(DataHolder indataholder) throws java.rmi.RemoteException;",
"public interface InterfaceWebRequest {\n void dispatchRequest();\n}",
"public interface IHttpRequest {\n Map<String, String> getHeaders();\n\n Map<String, String> getBodyParams();\n\n Map<String, String> getCookies();\n\n String getMethod();\n\n void setMethod(String method);\n\n String getUrl();\n\n void setUrl(String url);\n\n void addHeader(String header, String value);\n\n void addBodyParam(String bodyParam, String value);\n\n boolean isResource();\n}",
"public void setRequest(REQ request) {\n this.request = request;\n }",
"public RoeImage takePicture() \r\n {\r\n // return variable\r\n RoeImage result = new RoeImage();\r\n \r\n // take picture \r\n this.cam.read(this.frame);\r\n \r\n // update timestamp for image capturing\r\n this.timestamp = System.currentTimeMillis();\r\n \r\n // add picture to result\r\n result.SetImage(this.frame);\r\n \r\n // add timestamp of captured image\r\n result.setTimeStamp(this.timestamp);\r\n\r\n // the image captured with properties\r\n return result;\r\n }",
"protected abstract HttpUriRequest getHttpUriRequest();",
"public interface CameraSetting {\n}",
"public void getRequest(Request request, Response response) {\n\t\tretrieveObject(request, response);\n\t}",
"@Override\r\n\t\t\tpublic void onRequest() {\n\t\t\t\t\r\n\t\t\t}",
"Object handle(Object request);",
"public String getCaptureDevice();",
"public Object handleRequest(P request) throws Exception;",
"public interface HttpRequest extends Serializable {\n\n\tpublic HttpResponse send() throws BackendConnectionException;\n\t\n\tpublic GoalContext getGoalContext();\n\t\n\tpublic HttpRequest setGoalContext(GoalContext _ctx);\n\n\tpublic void saveToDisk() throws IOException;\n\n\tpublic void savePayloadToDisk() throws IOException;\n\t\n\tpublic void loadFromDisk() throws IOException;\n\t\n\tpublic void loadPayloadFromDisk() throws IOException;\n\n\tpublic void deleteFromDisk() throws IOException;\n\n\tpublic void deletePayloadFromDisk() throws IOException;\n\n\tpublic String getFilename();\n}",
"public interface IDynamicRequestGET {\n public MultivaluedMap<String, String> getPathParams();\n public ContainerRequestContext getRequestContext();\n}",
"public T getRequestData();",
"public DiskRequest getRequest () { return this.request; }",
"interface SessionRecordingCallback {\n\n /**\n * Called when recording URI is required for playback.\n *\n * @param channelUri for which recording URI is requested.\n */\n Uri getRecordingUri(Uri channelUri);\n }",
"public interface AlexaHttpRequest {\n /**\n * @return the signature, base64 encoded.\n */\n String getBaseEncoded64Signature();\n\n /**\n * @return URL for the certificate chain needed to verify the request signature.\n */\n String getSigningCertificateChainUrl();\n\n /**\n * @return the request envelope, in serialized form.\n */\n byte[] getSerializedRequestEnvelope();\n\n /**\n * @return the request envelope, in deserialized form.\n */\n RequestEnvelope getDeserializedRequestEnvelope();\n}",
"com.czht.face.recognition.Czhtdev.Request getRequest();",
"public interface EditMatchInfoView extends RestView {\n\n void onUpdatedMatch(Match match);\n}",
"private void requestRecord() throws IOException {\n\n String targetCamCode = dis.readUTF();\n\n Cam targetCam = CamRegister.findRegisteredCam(targetCamCode);\n\n try {\n DataOutputStream targetDos = new DataOutputStream(targetCam.getCamSocket().getOutputStream());\n targetDos.writeInt(RECORD_CAM_COMMAND);\n targetDos.flush();\n\n dos.writeInt(SUCCESS_CODE);\n dos.flush();\n } catch (Exception e) {\n dos.writeInt(NOT_FOUND_CODE);\n dos.flush();\n }\n }",
"interface LockssGetMethod extends HttpMethod {\n long getResponseContentLength();\n }",
"public interface PostRequest {}",
"void requestReceived( C conn ) ;",
"public interface IProbeRequestFrame {\n\n\tpublic List<IWlanElement> getTaggedParameter();\n\t\n}",
"public void setRequest(Map<String, Object> request)\r\n\t{\n\t\tthis.request = request;\r\n\t}",
"public interface IRequest {\n\n void onRequestStart();\n void onRequestEnd();\n}",
"public interface IRequest {\n void onRequestStart();\n\n void onRequestEnd();\n\n}",
"public interface RequestFunction {}",
"public interface Requestable {\n\n /**\n * In our TicTacToe game server sends get methods\n *\n * @return an json sting of the request\n */\n public String post();\n\n /**\n * In TicTacToe game client sends post methods\n *\n * @return an json string of the request;\n */\n public String get();\n\n}",
"ChangeHeadpic.Req getChangeHeadpicReq();",
"Camera getCamera();",
"interface Retrieve {}",
"public interface PirasoRequest {\n\n Preferences getPreferences();\n\n String getRemoteAddr();\n\n String getWatchedAddr();\n\n String getActivityUuid();\n}",
"@Override\n protected Map<String, String> getParams() {\n return requestParams;\n }",
"@Override\n protected Map<String, String> getParams() {\n return requestParams;\n }",
"public interface Request extends RegistryTask {\n\n}",
"public void grab();",
"public String getRequestRecordReference() {\n return requestRecordReference;\n }",
"public interface TakePhotoListener {\n void onTake(PictureSelectorActivity.PicItem picItem);\n}",
"EReqOrCap getReq_cap();",
"public interface IMainScm {\n\n void getImage(String url,ImageView view);\n\n void getImagePath(HttpListener<String[]> httpListener);\n}",
"public interface Data {\n\n String getRequest();\n\n}",
"public interface TrackGPListerner {\n public void onTrackSuccess(ReferData referData);\n public void onTrackFailed();\n}",
"public interface GetMovieListener\n{\n void movieGet(Movie movie);\n}",
"@Override\r\n\tpublic void run() {\r\n\t\tbyte[] myIntent = new byte[] {'J', 'O', 'I', 'N'};\r\n\t\ttry {\r\n\t\t\tmOutputStream.write(myIntent);\r\n\t\t} catch (IOException e1) {\r\n\t\t\tLog.d(\"Conn\", \"IOException in RequestMonitoring\");\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tint highbyte = 0;\r\n\t\tint lowbyte = 0;\r\n\t\t\r\n\t\ttry {\r\n\t\t\thighbyte = mInputStream.read();\r\n\t\t\tlowbyte = mInputStream.read();\r\n\t\t} catch (IOException e) {\r\n\t\t\tLog.d(\"Conn\", \"IOException in RequestMonitoring\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tshowResponse(\"mTextView2\", \"getting Capture end information\");\r\n\t\tLog.d(\"Conn\", \" \" + highbyte + \" \" + lowbyte);\r\n\t\t\r\n\t\tint captureEndInfolen = (highbyte << 8) + lowbyte;\r\n\t\t\r\n\t\tbyte[] captureEndInfo = new byte[captureEndInfolen];\r\n\t\t\r\n\t\ttry {\r\n\t\t\tmInputStream.read(captureEndInfo, 0, captureEndInfolen);\r\n\t\t} catch (IOException e) {\r\n\t\t\tLog.d(\"Conn\", \"IOException in RequestMonitoring\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t * process the available capture end name and add them to list\r\n\t\t */\r\n\t\tByteArrayInputStream inputStream = new ByteArrayInputStream(captureEndInfo);\r\n\t\twhile(true) {\r\n\t\t\tint captureEndNameLen = inputStream.read();\r\n\t\t\tif(captureEndNameLen < 0)\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tbyte[] captureEndName = new byte[captureEndNameLen];\r\n\t\t\tinputStream.read(captureEndName, 0, captureEndNameLen);\r\n\t\t\tString strCapName = null;\r\n\t\t\ttry {\r\n\t\t\t\tstrCapName = new String(captureEndName, \"ISO-8859-1\");\r\n\t\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\t\tLog.d(\"Debug\", \"UnsupportedEncodingException in RequestMonitoring\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tif(strCapName.length()>0)\r\n\t\t\t\tmAvailableCaptureEndList.add(strCapName);\r\n\t\t}\r\n\t\t\r\n\t\tLog.d(\"Debug\", \"available cap num: \" + mAvailableCaptureEndList.size());\r\n\t\t\r\n\t\tshowResponse(\"Button\", \"update\");\r\n\t\t\r\n\t\tgetMonitorEndChoice();\r\n\t\t\r\n\t\tif( null == mMonitorEndChoice ) {\r\n\t\t\ttry {\r\n\t\t\t\tmSocket.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tLog.d(\"Debug\", \"IOException in RequestMonitoring\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t * send the choice of monitor end\r\n\t\t */\r\n\t\ttry {\r\n\t\t\tbyte[] monitorEndChoice = mMonitorEndChoice.getBytes(\"ISO-8859-1\");\r\n\t\t\tmOutputStream.write(monitorEndChoice.length);\r\n\t\t\tmOutputStream.write(monitorEndChoice);\r\n\t\t} catch (IOException e) {\r\n\t\t\tLog.d(\"Conn\", \"IOException in RequestMonitoring\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n//\t\t/*\r\n//\t\t * get the multicast address\r\n//\t\t */\r\n//\t\tString multicastAddress = null;\r\n//\t\tbyte[] multicastAddr = null;\r\n//\t\ttry {\r\n//\t\t\tint multicastAddrLen = mInputStream.read();\r\n//\t\t\tmulticastAddr = new byte[multicastAddrLen];\r\n//\t\t\tmInputStream.read(multicastAddr, 0, multicastAddrLen);\r\n//\t\t\t\r\n//\t\t} catch (IOException e) {\r\n//\t\t\tLog.d(\"Conn\", \"IOException in ConnectCenterServer\");\r\n//\t\t\te.printStackTrace();\r\n//\t\t}\r\n//\t\t\r\n//\t\ttry {\r\n//\t\t\tmulticastAddress = new String(multicastAddr, \"ISO-8859-1\");\r\n//\t\t} catch (UnsupportedEncodingException e) {\r\n//\t\t\tLog.d(\"Conn\", \"UnsupportedEncodingException in ConnectCenterServer\");\r\n//\t\t\te.printStackTrace();\r\n//\t\t}\r\n\t\t\r\n\t\tMyApp mMyApp = (MyApp) mActivity.getApplicationContext();\t\r\n\t\tmMyApp.setSocket(mSocket);\r\n//\t\tmIntent.putExtra(\"multicastAddress\", multicastAddress);\r\n\t\t\r\n\t\tmActivity.startActivityForResult(mIntent, MainAct.REQ_CODE_FINISHED);\r\n\t}",
"public interface CarInputCaptureCallback {\n /**\n * Key events were captured.\n */\n void onKeyEvents(int targetDisplayId, @NonNull List<KeyEvent> keyEvents);\n\n /**\n * Rotary events were captured.\n */\n void onRotaryEvents(int targetDisplayId, @NonNull List<RotaryEvent> events);\n\n /**\n * Capture state for the display has changed due to other client making requests or\n * releasing capture. Client should check {@code activeInputTypes} for which input types\n * are currently captured.\n */\n void onCaptureStateChanged(int targetDisplayId,\n @NonNull @InputTypeEnum int[] activeInputTypes);\n }",
"public interface RequestModifier {\n\n /**\n * Set HTTP request method, only support get, post,put , delete method.\n *\n * @param method\n *\n */\n public void setMethod(HTTPMethod method);\n\n /**\n * Set HTTP Protocol.\n *\n * @param protocol\n *\n */\n public void setProtocol(String protocol);\n\n /**\n * Set HTTP version , such as HTTP1.1.\n *\n * @param version\n *\n */\n public void setVersion(String version);\n\n /**\n * Set HTTP domain.\n *\n * @param domain\n *\n */\n public void setDomain(String domain);\n\n /**\n * Set path in the url.\n *\n * @param path\n *\n */\n public void setPath(String path);\n\n /**\n * Set web server port\n *\n * @param port\n *\n */\n public void setPort(int port);\n\n /**\n * Set HTTP url\n *\n * @param url\n *\n */\n public void setUrl(URL url);\n\n /**\n * Set HTTP url string\n *\n * @param url\n *\n */\n public void setUrl(String url);\n\n /**\n * Modify the exist argument in url.\n *\n * @param urlArg\n *\n * @return boolean, if success to modfiy this argument, return true.\n * if fail to modfiy this argument, return false.\n */\n public boolean modifyURIArgContent(URLArg urlArg);\n\n /**\n * Modify the exist header in HTTP request headers.\n *\n * @param header\n *\n * @return boolean, if success to modfiy this argument, return true.\n * if fail to modfiy this argument, return false.\n */\n public boolean modifyHeaderContent(Header header);\n\n /**\n * Add the request header, if this header is exist, modfiy this value.\n *\n * @param key\n *\n * @param header\n *\n */\n public void addHeader(String key, String header);\n\n /**\n * Add the request header, if this header is exist, modfiy this value.\n *\n * @param key\n *\n * @param header\n *\n */\n public void delHeader(String key);\n\n /**\n * Add the post arg in request header, if this argument is exist, modfiy this value.\n *\n * @param key\n *\n * @param value\n *\n */\n public void addPostArg(String key, String value);\n\n /**\n * Add the url arg in request url, if this argument is exist, modfiy this value.\n *\n * @param key\n *\n * @param value\n *\n */\n public void addUrlArg(String key, String value);\n}",
"@Override\r\n\tprotected String getAlgorithmName() {\n\t\treturn \"capture\";\r\n\t}",
"@Override\n \t\tpublic void customizeRequest(SipRequest request, SipConnection connection)\n \t\t{\n \t\t\t\n \t\t}",
"public DataCaptureContext getDataCaptureContext() {\n return dataCaptureContext;\n }",
"public GhRequest getRequest() {\r\n return localRequest;\r\n }",
"public GhRequest getRequest() {\r\n return localRequest;\r\n }",
"@Override\n public Type getType() {\n return Type.TypeRequest;\n }",
"public interface ResProcessingDetails {\n\n void setContentType(String contentType);\n\n boolean requiresCache();\n\n void setCache(boolean cache);\n\n String getContentType();\n\n\n}",
"public interface GetFeatureRequest extends Request{\n\n /**\n * @return QName : requested type name, can be null\n * if not yet configured.\n */\n QName getTypeName();\n\n /**\n * @param type : requested type name, must not be null\n */\n void setTypeName(QName type);\n\n /**\n * @return Filter : the request filter, null for no filter\n */\n Filter getFilter();\n\n /**\n * @param filter : the request filter, null for no filter\n */\n void setFilter(Filter filter);\n\n /**\n * @return Integer : maximum features returned by this request,\n * null for no limit.\n */\n Integer getMaxFeatures();\n\n /**\n * @param max : maximum features returned by this request,\n * null for no limit.\n */\n void setMaxFeatures(Integer max);\n\n /**\n * @return String[] : array of requested properties,\n * null if all properties, empty for only the id.\n */\n GenericName[] getPropertyNames();\n\n /**\n * @param properties : array of requested properties,\n * null if all properties, empty for only the id.\n */\n void setPropertyNames(GenericName[] properties);\n\n /**\n * Return the output format to use for the response.\n * text/xml; subtype=gml/3.1.1 must be supported.\n * Other output formats are possible as well as long as their MIME\n * type is advertised in the capabilities document.\n *\n * @return The current outputFormat\n */\n String getOutputFormat();\n\n /**\n * Set the output format to use for the response.\n * text/xml; subtype=gml/3.1.1 must be supported.\n * Other output formats are possible as well as long as their MIME\n * type is advertised in the capabilities document.\n *\n * @param outputFormat The current outputFormat\n */\n void setOutputFormat(String outputFormat);\n}",
"void onHTTPRequest(HTTPRequest request, HTTPResponse response);",
"public interface Requestor {\r\n \r\n /**\r\n * Marshal the given operation and its parameters into a request object, send\r\n * it to the remote component, and interpret the answer and convert it back\r\n * into the return type of generic type T\r\n * \r\n * @param <T>\r\n * generic type of the return value\r\n * @param objectId\r\n * the object that this request relates to; not that this may not\r\n * necessarily just be the object that the method is called upon\r\n * @param operationName\r\n * the operation (=method) to invoke\r\n * @param typeOfReturnValue\r\n * the java reflection type of the returned type\r\n * @param argument\r\n * the arguments to the method call\r\n * @return the return value of the type given by typeOfReturnValue\r\n */\r\n <T> T sendRequestAndAwaitReply(String objectId, String operationName, Type typeOfReturnValue, String accessToken, Object... argument);\r\n\r\n}",
"public interface CameraPreview {\n\n /**\n * Set the camera system this will act as the preview for.\n * <p/>\n * The preview will update the camera system as necessary for certain events, such as\n * setting the surface holder, or pausing/restarting the preview when reconfiguring the surface.\n *\n * @param cameraSystem the camera system to connect to\n */\n void connectToCameraSystem(@NonNull CameraSystem cameraSystem);\n\n}",
"void setQueryParam(DriveRequest<?> request, String queryParam);",
"public interface OnApiRequestListener {\n\n void onApiRequestBegin(final String action);\n void onApiRequestSuccess(final String action, final Object result);\n void onApiRequestFailed(final String action, final Throwable t);\n}",
"public interface CameraUIContainerHolder {\n void mo1129a(Uri uri);\n\n void mo1130a(List<Size> list, List<Size> list2, PreviewAndPictureSize previewAndPictureSize, Point point);\n\n void mo1131a(byte[] bArr, int i);\n\n void mo1132b(int i);\n\n void mo1133d(int i);\n\n Activity mo1134j();\n\n Context mo1135k();\n\n void mo1136l();\n }",
"protected TrellisRequest getRequest() {\n return request;\n }"
]
| [
"0.6377007",
"0.6327781",
"0.6287438",
"0.6120796",
"0.6005976",
"0.59987944",
"0.5956642",
"0.5741332",
"0.56903774",
"0.56801564",
"0.56472385",
"0.55746835",
"0.55667067",
"0.5482714",
"0.5474533",
"0.546055",
"0.5456741",
"0.54369324",
"0.5428885",
"0.5424866",
"0.5372723",
"0.53087354",
"0.5307082",
"0.5297183",
"0.52970654",
"0.5268229",
"0.525225",
"0.525177",
"0.5245481",
"0.5222682",
"0.52151364",
"0.521315",
"0.52044195",
"0.5192522",
"0.5180572",
"0.5178345",
"0.5158745",
"0.5157886",
"0.51388806",
"0.51337004",
"0.51247007",
"0.5123656",
"0.5116108",
"0.51059264",
"0.5094135",
"0.5082113",
"0.50770587",
"0.50762856",
"0.5074898",
"0.5066112",
"0.5059523",
"0.50561535",
"0.505092",
"0.5048039",
"0.5043709",
"0.5037795",
"0.5030628",
"0.5025206",
"0.50229007",
"0.5011893",
"0.5008172",
"0.5007138",
"0.50050294",
"0.4992006",
"0.49863866",
"0.49828553",
"0.4982135",
"0.49747914",
"0.49741358",
"0.49727765",
"0.4970668",
"0.4962342",
"0.4962342",
"0.49620348",
"0.49474877",
"0.49452257",
"0.4944343",
"0.49426666",
"0.493912",
"0.4932903",
"0.49317044",
"0.49230164",
"0.49228024",
"0.49164873",
"0.49163002",
"0.49127612",
"0.49123973",
"0.49106038",
"0.4909752",
"0.4909752",
"0.49036548",
"0.4898041",
"0.48973906",
"0.48947167",
"0.4892692",
"0.4892471",
"0.48920885",
"0.4890997",
"0.48909378",
"0.48900586"
]
| 0.52760303 | 25 |
The life cycle corresponding to camera activity onResume. | void resume(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onResume() {\n if (mCamera == null) {\n obtainCameraOrFinish();\n }\n }",
"@Override\n protected void onResume() {\n super.onResume();\n cameraLiveView.onResume();\n }",
"public final void \n onResume() {\n \t\n \tthis.isPaused = false;\n \tthis.isResumed = true;\n \tthis.mLastTextureId = 0;\n \tsuper.onResume();\n }",
"protected void onResume()\n {\n super.onResume();\n\n // Resumen específico de QCAR\n QCAR.onResume();\n\n // Si la cámara ya se ha iniciado alguna vez la volvemos a iniciar\n if (mEstadoActualAPP == EstadoAPP.CAMERA_STOPPED)\n {\n actualizarEstadoAplicacion(EstadoAPP.CAMERA_RUNNING);\n }\n\n // Resumen específico del OpenGL ES View\n if (mGlView != null)\n {\n mGlView.setVisibility(View.VISIBLE);\n mGlView.onResume();\n }\n }",
"public void onResume();",
"public void onResume() {\n }",
"@Override\n protected void onResume() {\n super.onResume();\n cameraView.start();\n }",
"protected abstract void onResume();",
"@Override\n public void onResume() {\n }",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\n\t\tOpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_3_0_0,\n\t\t\t\tgetApplicationContext(), mLoaderCallback);\n\t\tLog.i(\"TAG\", \"onResume sucess load OpenCV...\");\n\t}",
"@Override\n public void onResume(Activity activity) {\n }",
"@Override\r\n\tpublic void onResume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onResume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onResume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onResume() {\n\t\t\r\n\t}",
"void onResume();",
"@Override\n\tprotected void onResume() {\n\t\t\n\t\tinit();\n\t\tsuper.onResume();\n\n\t}",
"public void onResume() {\n super.onResume();\n C8006j.m18079r();\n }",
"public void onResume() {\n super.onResume();\n }",
"public void onResume() {\n super.onResume();\n }",
"@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t\tLog.i(TAG, \"onResume\");\n\t}",
"public void resume() {\n // This must be safe to call multiple times\n Util.validateMainThread();\n Log.d(TAG, \"resume()\");\n\n // initCamera() does nothing if called twice, but does log a warning\n initCamera();\n\n if (currentSurfaceSize != null) {\n // The activity was paused but not stopped, so the surface still exists. Therefore\n // surfaceCreated() won't be called, so init the camera here.\n startPreviewIfReady();\n } else if(surfaceView != null) {\n // Install the callback and wait for surfaceCreated() to init the camera.\n surfaceView.getHolder().addCallback(surfaceCallback);\n } else if(textureView != null && Build.VERSION.SDK_INT >= 14) {\n textureView.setSurfaceTextureListener(surfaceTextureListener());\n }\n\n // To trigger surfaceSized again\n requestLayout();\n rotationListener.listen(getContext(), rotationCallback);\n }",
"@Override\n\tpublic void onResume() {\n\n\t}",
"@Override\n\tpublic void onResume() {\n\n\t}",
"@Override\r\n\tprotected void onResume() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onResume() {\n\t\tsuper.onResume();\r\n\t}",
"@Override\r\n\tpublic void onResume() {\n\t\tsuper.onResume();\r\n\t}",
"@Override\r\n\tpublic void onResume() {\n\t\tsuper.onResume();\r\n\t}",
"public void onResume()\n {\n lastTime = System.currentTimeMillis();\n }",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tourSurfaceView.onResume();\n\t}",
"@Override\r\n protected void onResume() {\n super.onResume();\r\n Log.i(TAG, \"onResume\");\r\n\r\n }",
"@Override\r\n\tpublic void onResume() {\n\t\tsuper.onResume();\r\n\t\t\r\n\t}",
"protected void onResume ()\n\t{\n\t\tsuper.onResume ();\n\t}",
"@Override\n\t\tprotected void onResume() {\n\t\t\tsuper.onResume();\n\t\t}",
"@Override\n \tprotected void onResume() {\n \t\tsuper.onResume();\n \t\tLog.d(TAG, \"onResume\");\n \t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tLogUtils.d(\"onResume() is in\");\n\t}",
"@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\n\t}",
"@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tLog.v(TAG, \"onCreate\");\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tresources = getResources();\n\t\t//必须调用以下方法,不然管理的子activity会不调用onResume\n\t\tmanager.dispatchResume();\n\t\tinitPagerViewer();\n\t}",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\r\n\t}",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\r\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tLog.e(TAG, \"onResume\");\n\t}",
"@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\r\n protected void onResume() {\r\n Log.i(TAG, \"onResume()\");\r\n \r\n super.onResume();\r\n }",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tLog.v(\"tag\",\"onResume\" );\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tLog.i(TAG, module + \" Entra por onResume\");\n\t}",
"@Override\n protected void onResume() {\n super.onResume();\n Log.d(msg, \"The onResume() event\");\n }",
"@Override\n protected void onResume() {\n super.onResume();\n Log.d(msg, \"The onResume() event\");\n }",
"@Override\n\tprotected void onResume() {\n\n\t\tsuper.onResume();\n\t\tApplicationStatus.activityResumed();\n\t}",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}",
"@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t\tStatService.onResume(context);\n\t}",
"@Override\n\tprotected void onResume() {\n\n\t\tsuper.onResume();\n\t}",
"@Override\n protected void onResume() {\n super.onResume();\n\n Log.d(LOG_TAG, \"onResume()\");\n\n\n\n }",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t\t\r\n\t}",
"@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t\t\r\n\t}",
"@Override\n protected void onResume() {\n super.onResume();\n Log.v(TAG, \"Invoked onResume()\");\n\n }",
"@Override\n protected void onResume() {\n Log.i(\"G53MDP\", \"Main onResume\");\n super.onResume();\n }",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\t \n\t}",
"@Override\n protected void onResume() {\n super.onResume();\n Log.d(TAG, \"onResume() called\");\n }",
"@Override\n\tprotected void onResume() \n\t{\n\t\tsuper.onResume();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\t\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\t\t\t\n\t\t\t\t\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\n\t}",
"@Override\n public void onResume() {\n \tsuper.onResume();\n mGLSurfaceView.onResume();\n }",
"@Override\n\tprotected void onResume()\n\t{\n\t\tsuper.onResume();\n\n\t}",
"@Override\n public void onResume() {\n\n super.onResume();\n }",
"@Override\r\n public void onResume() {\r\n NexLog.d(LOG_TAG, \"onResume called\");\r\n activityPaused = false;\r\n }",
"@Override\n protected void onResume()\n {\n super.onResume();\n mGLSurfaceView.onResume();\n }",
"@Override\n protected void onResume()\n {\n super.onResume();\n mGLSurfaceView.onResume();\n }",
"@Override\n protected void onResume() {\n super.onResume();\n mGLSurfaceView.onResume();\n }",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}",
"@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}"
]
| [
"0.77368164",
"0.7729995",
"0.7379479",
"0.735283",
"0.72692806",
"0.7248482",
"0.7157578",
"0.7124034",
"0.71159214",
"0.7113974",
"0.7070074",
"0.7058357",
"0.7058357",
"0.7058357",
"0.7058357",
"0.7053546",
"0.7033476",
"0.6989022",
"0.69791704",
"0.69791704",
"0.6978023",
"0.69588804",
"0.6932658",
"0.6932658",
"0.691199",
"0.6892541",
"0.6892541",
"0.6892541",
"0.68858665",
"0.6885471",
"0.68751466",
"0.6869666",
"0.6865527",
"0.685964",
"0.684569",
"0.68405217",
"0.6838566",
"0.6838566",
"0.68252254",
"0.6824687",
"0.68235564",
"0.68235564",
"0.68134034",
"0.68129796",
"0.68129796",
"0.68129796",
"0.68129796",
"0.68129796",
"0.68129796",
"0.68129796",
"0.6812896",
"0.6811059",
"0.68053186",
"0.679782",
"0.679782",
"0.6796271",
"0.6789788",
"0.6789788",
"0.6789788",
"0.6789788",
"0.6789788",
"0.6789788",
"0.6789788",
"0.6789788",
"0.6789788",
"0.6789788",
"0.6781403",
"0.67791224",
"0.67747396",
"0.6768998",
"0.6768998",
"0.6764301",
"0.67480034",
"0.67445886",
"0.6744049",
"0.67428327",
"0.67420477",
"0.67368764",
"0.6735279",
"0.6735279",
"0.6735279",
"0.67246324",
"0.6723818",
"0.67231154",
"0.67197764",
"0.6719639",
"0.6719639",
"0.67186266",
"0.67127794",
"0.67127794",
"0.67127794",
"0.67127794",
"0.67127794",
"0.67127794",
"0.67127794",
"0.67127794",
"0.67127794",
"0.67127794",
"0.67127794",
"0.67127794",
"0.67127794"
]
| 0.0 | -1 |
The life cycle corresponding to camera activity onPause. | void pause(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void onPause() {\n releaseCamera();\n }",
"@Override\n protected void onPause() {\n ReleaseCamera();\n super.onPause();\n }",
"@Override\n protected void onPause() {\n super.onPause();\n releaseCamera();\n }",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\treleaseCamera();\n\t}",
"@Override\n\tpublic void onPause() {\n mVideoPositionHandler.removeCallbacks(mVideoPositionRunnable);\n\n // Stop camera animation.\n mCameraAnimationHandler.removeCallbacks(mCameraAnimationRunnable);\n if (null != mCameraAnimator) {\n mCameraAnimator.cancel();\n }\n\n // Propagate activity lifecycle events to Orion360 video view.\n\t\tmOrionVideoView.onPause();\n\n\t\tsuper.onPause();\n\t}",
"@SuppressWarnings(\"deprecation\")\n @Override\n protected void onDestroy() {\n super.onDestroy();\n isPaused = true;\n }",
"@Override\n public void onPause() {\n mCameraView.stop();\n super.onPause();\n }",
"@Override\n protected void onPause() {\n closeCamera();\n\n stopBackgroundThread();\n super.onPause();\n }",
"@Override\n public void onPause(Activity activity) {\n }",
"protected void onPause(Bundle savedInstanceState) {\r\n\t\t\r\n\t}",
"@Override\n protected void onPause() {\n super.onPause();\n Log.i(\"ActivityLifecycle\", getLocalClassName() + \"-onPause\");\n }",
"protected void onPause()\n {\n super.onPause();\n\n if (mGlView != null)\n {\n mGlView.setVisibility(View.INVISIBLE);\n mGlView.onPause();\n }\n\n if (mEstadoActualAPP == EstadoAPP.CAMERA_RUNNING)\n {\n actualizarEstadoAplicacion(EstadoAPP.CAMERA_STOPPED);\n }\n\n if (mFlash)\n {\n mFlash = false;\n setFlash(mFlash);\n }\n\n QCAR.onPause();\n }",
"@Override\n protected void onPause() {\n super.onPause();\n if (theCamera != null){\n theCamera.stopPreview();\n theCamera.release();\n theCamera = null;\n }\n }",
"public void onPause();",
"@Override\n protected void onPause() {\n super.onPause();\n releaseCamera();\n mGLView.queueEvent(new Runnable() {\n @Override public void run() {\n // Tell the renderer that it's about to be paused so it can clean up.\n mRenderer.notifyPausing();\n }\n });\n mGLView.onPause();\n// Log.d(TAG, \"onPause complete\");\n }",
"public void onPause() {\n }",
"public void onPause()\n {\n\n }",
"@Override\n public void onPause() {\n super.onPause();\n zXingScannerView.stopCamera();\n }",
"@Override\n public void onPause() {\n super.onPause();\n Log.d(\"Interface\", \"MyoControlActivity onPause\");\n }",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tApplicationStatus.activityPaused();\n\t}",
"public void onPause() {\n LOG.mo8825d(\"[onPause]\");\n super.onPause();\n }",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tisFlag = false;\n\t}",
"@Override\n public void onPause() {\n isFromPreviousRun = true;\n // Handle case: Pause view when flashing the torch\n if (isAlreadyFlashed && isCameraRecording) {\n\n // Double if here because sometimes the condition is right, but the timer had been cancel, prevent crash\n checkTimer();\n\n isAlreadyFlashed = false;\n }\n\n checkTimer();\n\n // Handle case: Pause view when camera is recording video //old code\n if (isCameraRecording) {\n\n // Temporary disable\n isCameraRecording = false;\n\n // Stop camera\n cameraView.stopRecording();\n\n isCameraRecording = true; // Restore\n }\n\n sensorManager.unregisterListener(this);\n super.onPause();\n }",
"protected void onPause() {\n\t\tsuper.onPause();\n\t\tsensorManager.unregisterListener(this);\n\t}",
"@Override\r\n public void onPause() {\r\n NexLog.d(LOG_TAG, \"onPause called\");\r\n activityPaused = true;\r\n }",
"@Override\n protected void onPause() {\n super.onPause();\n stopAllListeners();\n }",
"public void onPause () {\n\t\t\n\t}",
"@SuppressLint(\"NewApi\")\n public void onPause() {\n Log.d(TAG, \"onPause\");\n try {\n mCameraOpenCloseLock.acquire();\n if (null != mCameraDevice) {\n mCameraDevice.close();\n mCameraDevice = null;\n Log.d(TAG, \"CameraDevice Close\");\n }\n } catch (InterruptedException e) {\n throw new RuntimeException(\"Interrupted while trying to lock camera closing.\");\n } finally {\n mCameraOpenCloseLock.release();\n }\n }",
"@Override\n\tpublic void onPause() {\n\t\tmSsorManager.unregisterListener(this);\n\t\tsuper.onPause();\n\t}",
"@Override\r\n\tpublic void onPause() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onPause() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onPause() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onPause() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onPause() {\n\t\tsuper.onPause();\r\n\t}",
"@Override\r\n\tpublic void onPause() {\n\t\tsuper.onPause();\r\n\t}",
"@Override\r\n\tpublic void onPause() {\n\t\tsuper.onPause();\r\n\t}",
"public void onPause() {\n super.onPause();\r\n }",
"@Override\n\tpublic void onPause() {\n\n\t}",
"protected abstract void onPause();",
"@Override\n protected void onPause() {\n isRunning = false;\n super.onPause();\n }",
"@OnLifecycleEvent(ON_PAUSE)\n public void onPause() {\n mContext.unregisterReceiver(mReceiver);\n }",
"@Override\n protected void onPause() {\n super.onPause();\n active = false;\n }",
"@Override\n protected void onPause() {\n super.onPause();\n active = false;\n }",
"public void onPause() {\n super.onPause();\n }",
"public void onPause() {\n super.onPause();\n }",
"public void onPause() {\n super.onPause();\n }",
"public void onPause() {\n super.onPause();\n }",
"public void onPause() {\n super.onPause();\n }",
"@Override\n\tpublic void onPause() \n\t{\n\t\tsuper.onPause();\n\t\tgyroscope.onPause();\n\t}",
"@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t\tStatService.onPause(context);\n\t}",
"public void onPause() {\n\n mSensorManager.unregisterListener(mListener);\n super.onPause();\n }",
"@Override\r\n\tprotected void onPause() {\n\t\t\r\n\t}",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tLogger.d(TAG, \"onStop.....\");\n\t}",
"@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t}",
"@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t}",
"@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t}",
"@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t}",
"@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t}",
"@Override\n\t\tprotected void onPause() {\n\t\t\tsuper.onPause();\n\t\t}",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n//\t\tStatService.onResume(mContext);\n\t}",
"@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t}",
"@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t}",
"@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t}",
"@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t}",
"@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t}",
"@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t}",
"@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t}",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tSystem.gc();\n\t}",
"protected void onPause() {\r\n super.onPause();\r\n if(zxScan != null) {\r\n zxScan.stopCamera();\r\n alreadyScanning = 1;\r\n }\r\n else\r\n alreadyScanning = 0;\r\n }",
"@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t\tStatService.onPause(this);\r\n\r\n\t\tif(facade.hasMediator(NAME))\r\n\t\t\tfacade.removeMediator(NAME);\r\n\t\t\r\n\t\tisTop_ = false;\r\n\t}",
"@Override\n protected void onPause() {\n super.onPause();\n FirebaseUtil.detachListener(); //detaches the listener so that it doesn't have to keep checking for updates from database\n }",
"protected void onPause ()\n\t{\n\t\tsuper.onPause ();\n\t}",
"protected void onPause() {\n super.onPause();\n sensorManager.unregisterListener(this);\n start = false;\n }",
"protected void onPause() {\n super.onPause();\n }",
"public void onPause() {\n Log.d(TAG, \"onResume\");\n super.onPause();\n\n }",
"@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\n\t}",
"@Override\n\tpublic void onPause() {\n\t\tmOrionVideoView.onPause();\n\n\t\tsuper.onPause();\n\t}",
"@Override\n\tpublic void onPause() {\n\t\tmOrionVideoView.onPause();\n\n\t\tsuper.onPause();\n\t}",
"public void onPause() {\n sensorManager.unregisterListener(this);\n }",
"@Override\n protected void onPause() {\n Log.i(\"G53MDP\", \"Main onPause\");\n super.onPause();\n }",
"@Override\r\n\tprotected void onPause() {\r\n\t\tsuper.onPause();\r\n\t\t\r\n\t\t\t\t\r\n\t}",
"@Override\n\tprotected void onPause()\n\t{\n\t\tsuper.onPause();\n\t}",
"@Override\n \tprotected void onPause() {\n \t\tsuper.onPause();\n \t}",
"@Override\n \tprotected void onPause() {\n \t\tsuper.onPause();\n \t}",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t}"
]
| [
"0.7639693",
"0.74497133",
"0.73781115",
"0.7352864",
"0.69692826",
"0.69625515",
"0.6950067",
"0.6935038",
"0.6922456",
"0.6896787",
"0.68862104",
"0.68577456",
"0.6796747",
"0.67404747",
"0.6711859",
"0.6682447",
"0.6643112",
"0.66245836",
"0.65933996",
"0.6584775",
"0.6580347",
"0.657422",
"0.6568748",
"0.6557822",
"0.65560645",
"0.65528244",
"0.6527077",
"0.65200996",
"0.651841",
"0.65144914",
"0.65144914",
"0.65144914",
"0.65144914",
"0.65101105",
"0.65101105",
"0.65101105",
"0.6506101",
"0.6499705",
"0.64961743",
"0.64927167",
"0.64899224",
"0.6481525",
"0.6481525",
"0.6470794",
"0.6470794",
"0.6470794",
"0.6470794",
"0.6470794",
"0.6464523",
"0.64638287",
"0.64530414",
"0.6450194",
"0.64416903",
"0.6438715",
"0.6438715",
"0.6438715",
"0.6438715",
"0.6438715",
"0.6431027",
"0.642411",
"0.6423454",
"0.6423454",
"0.6423454",
"0.6423454",
"0.6423454",
"0.6423454",
"0.6423454",
"0.6422661",
"0.6417895",
"0.6417551",
"0.641031",
"0.6408643",
"0.64018667",
"0.6399114",
"0.6397631",
"0.63948363",
"0.63905877",
"0.63905877",
"0.63891953",
"0.63863814",
"0.63816285",
"0.63747156",
"0.637124",
"0.637124",
"0.6362616",
"0.6362616",
"0.6362616",
"0.6362616",
"0.6362616",
"0.6362616",
"0.6362616",
"0.6362616",
"0.6362616",
"0.6362616",
"0.6362616",
"0.6362616",
"0.6362616",
"0.6362616",
"0.6362616",
"0.6362616",
"0.6362616"
]
| 0.0 | -1 |
The life cycle corresponding to camera activity onDestory. | void close(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void onDestory() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tLog.e(TAG, \"ondestory\");\r\n\t}",
"@Override\r\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tLog.e(TAG, \"ondestory\");\r\n\t}",
"public void destroy() {\n Logger.d(TAG, \"onDestroy() entry\");\n if (mActivity != null) {\n mActivity = null;\n }\n if (mListener != null) {\n mListener = null;\n }\n if (mData != null) {\n mData.clear();\n }\n Logger.d(TAG, \"onDestroy() exit\");\n }",
"@Override\n protected void onDestroy() {\n \tsuper.onDestroy();\n \tmActivities.removeActivity(\"AddCamera\");\n \tunregisterReceiver(receiver);\n }",
"@Override\n public void destroy() {\n super.destroy();\n logger.log(Level.INFO, \"destory() Invoked\");\n }",
"@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\t//\t\tLog.e(\"destroy\", \"CameraActivity ���\");\n\t\t//\t\tsendMessage(\"exit\");\n\t\t//\t\tmodeEasyActivity.finish();\n\t}",
"@Override\n\tprotected void onDestroy() {\n\t\tFilmOnService.getInstance().stopLoopKeepAlive(getApplicationContext());\n\t\tFilmOnService.release();\n\t\tChannelManagement manager = ChannelManagement.getInstance();\n\t\tmanager.deleteObserver(this);\n\t\tmanager.release();\n\t\tsuper.onDestroy();\n\t}",
"@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tActivityCollector.removeActivity(this);\n\t}",
"@Override\n\tprotected void onDestroy() {\n\t\tSystem.out.println(\"----->main activity onDestory!\");\n\t\tsuper.onDestroy();\n\t}",
"@Override\n\tpublic void onDestroy() {\n\t\tquitAllFocus();\n\t\timg.setImageBitmap(null);\n\t\tclearMemory();\n\t\tsuper.onDestroy();\n\t\ttry {\n\t\t\t//GARBAGE COLLECTOR\n\t\t\tSystem.gc();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t}",
"public void onDestroy();",
"public void onDestroy();",
"@Override\r\n\tpublic void onDestroy() {\n\t\tSystem.out.println(\"Service onDestory\");\r\n\t\tsuper.onDestroy();\r\n\t}",
"public void onDestroy() {\n LOG.mo8825d(\"[onDestroy]\");\n super.onDestroy();\n }",
"public void onDestroy() {\r\n }",
"@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\t\r\n\t\tImemberApplication.getInstance().getLogonSuccessManager().removeLogonSuccessListener(this);\r\n\t\tImemberApplication.getInstance().getLoginSuccessManager().removeLoginSuccessListener(this);\r\n\t\t\r\n\t\tSystem.out.println(\"MyCardListActivity---------kill\");\r\n\t}",
"@Override\r\n protected void onDestroy() {\n \r\n \r\n \r\n if(DJIDrone.getDjiCamera() != null)\r\n DJIDrone.getDjiCamera().setReceivedVideoDataCallBack(null);\r\n mDjiGLSurfaceView.destroy();\r\n super.onDestroy();\r\n }",
"@Override\n\tpublic void onDestroy() {\n\t\tLog.i(TAG, \"service on destory\");\n\t\tsuper.onDestroy();\n\t}",
"public final void destroy(){\n stop();\n LIBRARY.CLEyeDestroyCamera(camera_);\n camera_ = null;\n PS3_LIST_.remove(this);\n }",
"@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tSystem.gc();\r\n\t}",
"@Override\n\tpublic void onDestroy() {\n\t\t\n\t\tLog.d(TAG,\"onDestroy\");\n\t\tif(mCameraDevices!=null){\n\t\t\tmCameraDevices.release();\n\t\t}\n\t\tshowFloatTool(false);\n\t\tsuper.onDestroy();\n\t}",
"abstract void onDestroy();",
"public void onDestroy() {\n }",
"@Override\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\n\n\t\tif (D)\n\t\t\tLog.e(TAG, \"--- ON DESTROY ---\");\n\t}",
"@Override\n public void surfaceDestroyed(SurfaceHolder holder)\n {\n this.releaseCamera();\n }",
"protected void onDestroy() {\n }",
"@Override\n\tpublic void onDestroy() {\n\t\tmOrionVideoView.onDestroy();\n\n\t\tsuper.onDestroy();\n\t}",
"@Override\n\tpublic void onDestroy() {\n\t\tmOrionVideoView.onDestroy();\n\n\t\tsuper.onDestroy();\n\t}",
"@Override\n\tpublic void onDestroy() {\n\t\tmOrionVideoView.onDestroy();\n\n\t\tsuper.onDestroy();\n\t}",
"@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tCleanup();\r\n\t}",
"@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tmovingArea = null;\r\n\t}",
"@Override\r\n\tpublic void onDestroy() {\n\t\t\r\n\t}",
"void onDestroy();",
"void onDestroy();",
"void onDestroy();",
"void onDestroy();",
"public void destroy() {\n this.mCallback.asBinder().unlinkToDeath(this, 0);\n }",
"public void destroy() {\n this.mCallback.asBinder().unlinkToDeath(this, 0);\n }",
"@Override\n\tprotected void onDestroy() {\n\t\tcontroller.onDestroy();\n\t\tsuper.onDestroy();\n\n\t}",
"protected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t}",
"@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\t// 结束Activity从堆栈中移除\r\n//\t\tActivityManagerUtil.getActivityManager().finishActivity(this);\r\n\t}",
"@Override\r\n public void onDestroy() {\n }",
"@Override\n public void onDestroy(){\n Log.d(TAG,\"onDestroy(): ref count = \" + sRealmRefCount.get());\n if(sRealmRefCount.decrementAndGet() == 0) {\n //trimData();\n if (mAllUsed != null) {\n mAllUsed.removeAllChangeListeners();\n mAllUsed = null;\n }\n if (mAllUnUsed != null) {\n mAllUnUsed.removeAllChangeListeners();\n mAllUnUsed = null;\n }\n if(mAllFavor != null){\n mAllFavor.removeAllChangeListeners();\n mAllFavor = null;\n }\n if(mAllWallpaper != null){\n mAllWallpaper.removeAllChangeListeners();\n mAllWallpaper = null;\n }\n if (realm != null) {\n realm.close();\n realm = null;\n }\n }\n // cancel transaction\n if(mAsyncTask != null && !mAsyncTask.isCancelled()){\n mAsyncTask.cancel();\n }\n }",
"@Override\n protected void onDestroy() {\n super.onDestroy();\n Log.i(\"Lifecycle\", \"onDestroy is called\");\n }",
"@Override\n public void onDestroy() {\n }",
"public void onDestroy() {\n super.onDestroy();\n }",
"public void onDestroy() {\n super.onDestroy();\n }",
"public void onDestroy() {\n super.onDestroy();\n }",
"public void destroy(){\n destroyed = true;\n }",
"@Override\n\tprotected void onDestroy() {\n\t\tflag=false;\n\t\tsuper.onDestroy();\n\t}",
"public void onDestroy() {\n Log.d(TAG, \"onDestroy\");\n\n if (videoSource != null) {\n Log.d(TAG, \"VideoSource dispose\");\n videoSource.dispose();\n videoSource = null;\n }\n\n if (factory != null) {\n Log.d(TAG, \"PeerConnectionFactory dispose\");\n factory.dispose();\n factory = null;\n }\n\n\n if (mSocket != null) {\n Log.d(TAG, \"Socket dispose\");\n closeSocket();\n mSocket = null;\n }\n\n\n }",
"@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\trunActivity = 0;\r\n\t}",
"public void onDestroy () {\n\t\tmVibrator = null;\n\t}",
"public void onDestroy(){\n }",
"@Override\n\tprotected void onDestroy() {\n\t\t\n\t\tsuper.onDestroy();\n\t}",
"@Override\r\n\tpublic void onDestroyView() {\n\t\tsuper.onDestroyView();\r\n\t\tLog.e(TAG, \"ondestoryView\");\r\n\t}",
"@Override\r\n\tpublic void onDestroyView() {\n\t\tsuper.onDestroyView();\r\n\t\tLog.e(TAG, \"ondestoryView\");\r\n\t}",
"protected void onDestroy ()\n\t{\n\t\tsuper.onDestroy ();\n\t}",
"@Override\n protected void onDestroy() {\n Initialization.exit(this);\n super.onDestroy();\n }",
"@Override\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\n\t\treleaseScanner();\n\t}",
"@Override\r\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t}",
"@Override\r\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t}",
"@Override\r\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t}",
"@Override\r\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t}",
"@Override\r\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tvideoView.release();\r\n\t}",
"@Override\n public void onDestroy() {\n sensorManager.unregisterListener(SensorService.this, accelerometerSensor);\n unregisterReceiver(powerConnectionReceiver);\n notificationManager.cancel(1);\n super.onDestroy();\n }",
"protected void onDestroy()\n {\n super.onDestroy();\n\n // Cancelar las tareas asíncronas que pueden estar en segundo plano:\n // inicializar QCAR y cargar los Trackers\n if (mIniciarQCARTask != null &&\n mIniciarQCARTask.getStatus() != IniciarQCARTask.Status.FINISHED)\n {\n mIniciarQCARTask.cancel(true);\n mIniciarQCARTask = null;\n }\n\n if (mCargarTrackerTask != null &&\n mCargarTrackerTask.getStatus() != CargarTrackerTask.Status.FINISHED)\n {\n mCargarTrackerTask.cancel(true);\n mCargarTrackerTask = null;\n }\n\n // Se utiliza este cerrojo para asegurar que no se están ejecutando\n // aún las dos tareas asíncronas para inicizalizar QCAR y para\n // cargar los Trackers.\n synchronized (mCerrojo) \n {\n destruirAplicacionNativa();\n \n mTextures.clear();\n mTextures = null;\n\n destruirDatosTracker();\n destruirTracker();\n\n QCAR.deinit();\n }\n \n // Se limpia la memoría generada por el soundPool\n if(mReproductor != null)\n \tmReproductor.limpiar();\n \n System.gc();\n }",
"public void surfaceDestroyed(SurfaceHolder holder) {\n \tif(CameraActivity.mCamera == null) return; \n \tCameraActivity.mCamera.release();\n \tCameraActivity.mCamera = null;\n }",
"@Override\n \tprotected void onDestroy() {\n \t\tsuper.onDestroy();\n \t\tLog.d(TAG, \"onDestroy\");\n \t}",
"@Override\r\n protected void onDestroy() {\n super.onDestroy();\r\n Log.i(TAG, \"onDestroy\");\r\n\r\n }",
"public void onDestroy() {\n super.onDestroy();\n getDelegate().g();\n }",
"public void onDestroy() {\n super.onDestroy();\n C0938a.m5006c(\"SR/SoundRecorder\", \"~~~~~~~~~~~~~~~~~~~~~~~~~~~~onDestroy\");\n m6659t();\n ServiceConnection serviceConnection = this.f5403W;\n if (serviceConnection != null) {\n unbindService(serviceConnection);\n }\n }",
"@Override\n public void onDestroy() {\n }",
"@Override\n public void onDestroy() {\n }",
"@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\t//destroy all running hardware/db etc.\n\t}",
"@Override\n protected void onDestroy() {\n super.onDestroy();\n // IF still in a call\n if (!mCallEnd) {\n leaveChannel();\n }\n // Calling static method that destroys the RtcEngine instance\n RtcEngine.destroy();\n }",
"@Override\r\n public void onDestroy() {\n super.onDestroy();\r\n }",
"@Override\r\n public void onDestroy() {\n super.onDestroy();\r\n }",
"@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\t MainService.allActivity.remove(this);\n\t}",
"@Override\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\n\t\t\n\t}",
"@Override\n protected void onDestroy() {\n super.onDestroy();\n if (mediaPlayer != null){\n setViewOnFinish();\n mediaPlayer.release();\n }\n\n Intent intent = new Intent(this, VoIpCallDetection.class);\n stopService(intent);\n log(\"VoIpCallDetection Service Stopped.\");\n }",
"@Override\n protected void onDestroy() {\n super.onDestroy();\n Log.d(TAG, \"onDestroy\");\n// mPhotoLoader.stop();\n if (mMatrixCursor != null)\n mMatrixCursor.close();\n }",
"@Override\n\tpublic void onDestroySensor() {\n\n\t}",
"@Override\n\tprotected void onDestroy() {\n\t\tif (bitmap!=null) {\n\t\t\tif (!bitmap.isRecycled()) {\n\t\t\t\tbitmap.recycle();\n\t\t\t}\n\t\t}\n\t\tsuper.onDestroy();\n\t}",
"@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t}",
"@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t}",
"@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t}",
"@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t}",
"@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tLog.e(TAG, \"onDestroy\");\r\n\t}",
"@Override\r\n\tpublic void onDestroy() {\n\t}",
"@Override\n protected void onDestroy() {\n super.onDestroy();\n cleanUp();\n }",
"@Override\n public void onDestroy() {\n super.onDestroy();\n Log.d(msg, \"The onDestroy() event\");\n }",
"@Override\n public void onDestroy() {\n super.onDestroy();\n Log.d(msg, \"The onDestroy() event\");\n }",
"@Override\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\n\t}",
"@Override\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\n\t}",
"@Override\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\n\t}",
"@Override\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\n\t}",
"@Override\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\n\t}",
"@Override\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\n\t}",
"@Override\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\n\t}"
]
| [
"0.7388904",
"0.7200849",
"0.7200849",
"0.7166901",
"0.70678836",
"0.7045106",
"0.70358557",
"0.7001712",
"0.6983879",
"0.69509655",
"0.6937614",
"0.69284755",
"0.69284755",
"0.6918614",
"0.6900608",
"0.6900074",
"0.6877549",
"0.68457884",
"0.6837609",
"0.6820352",
"0.6788677",
"0.6785964",
"0.6778804",
"0.67754453",
"0.67745733",
"0.67407155",
"0.67329",
"0.6725534",
"0.6725534",
"0.6725534",
"0.67213583",
"0.66928375",
"0.66841775",
"0.6655494",
"0.6655494",
"0.6655494",
"0.6655494",
"0.6645378",
"0.6645378",
"0.66331804",
"0.66329074",
"0.66318315",
"0.66249895",
"0.6620704",
"0.66164917",
"0.6615225",
"0.6602214",
"0.6602214",
"0.6602214",
"0.6598098",
"0.65945375",
"0.65887326",
"0.6582365",
"0.65766245",
"0.65454316",
"0.65386707",
"0.6538035",
"0.6538035",
"0.6533221",
"0.65318334",
"0.6528835",
"0.6525371",
"0.6525371",
"0.6525371",
"0.6525371",
"0.6511829",
"0.651062",
"0.6510602",
"0.6509583",
"0.6508297",
"0.6504945",
"0.6504883",
"0.6504213",
"0.6503555",
"0.6503555",
"0.6498248",
"0.6496635",
"0.6494829",
"0.6494829",
"0.6494515",
"0.6493093",
"0.64922434",
"0.6488211",
"0.64852875",
"0.6480876",
"0.64763063",
"0.64763063",
"0.64763063",
"0.64763063",
"0.6474122",
"0.6468707",
"0.6466586",
"0.64662796",
"0.64662796",
"0.646259",
"0.646259",
"0.646259",
"0.646259",
"0.646259",
"0.646259",
"0.646259"
]
| 0.0 | -1 |
This method is called when the camera device has started capturing the output image for the request, at the beginning of image exposure. | void onCaptureStarted(CaptureRequest request, long timestamp, long frameNumber); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void onCaptureStart();",
"private void captureImage() {\n camera.takePicture(null, null, jpegCallback);\r\n }",
"private void startCamera() {\n PreviewConfig previewConfig = new PreviewConfig.Builder().setTargetResolution(new Size(640, 480)).build();\n Preview preview = new Preview(previewConfig);\n preview.setOnPreviewOutputUpdateListener(output -> {\n ViewGroup parent = (ViewGroup) dataBinding.viewFinder.getParent();\n parent.removeView(dataBinding.viewFinder);\n parent.addView(dataBinding.viewFinder, 0);\n dataBinding.viewFinder.setSurfaceTexture(output.getSurfaceTexture());\n updateTransform();\n });\n\n\n // Create configuration object for the image capture use case\n // We don't set a resolution for image capture; instead, we\n // select a capture mode which will infer the appropriate\n // resolution based on aspect ration and requested mode\n ImageCaptureConfig imageCaptureConfig = new ImageCaptureConfig.Builder().setCaptureMode(ImageCapture.CaptureMode.MIN_LATENCY).build();\n\n // Build the image capture use case and attach button click listener\n ImageCapture imageCapture = new ImageCapture(imageCaptureConfig);\n dataBinding.captureButton.setOnClickListener(v -> {\n File file = new File(getExternalMediaDirs()[0], System.currentTimeMillis() + \".jpg\");\n imageCapture.takePicture(file, executor, new ImageCapture.OnImageSavedListener() {\n @Override\n public void onImageSaved(@NonNull File file) {\n String msg = \"Photo capture succeeded: \" + file.getAbsolutePath();\n Log.d(\"CameraXApp\", msg);\n dataBinding.viewFinder.post(\n () -> Toast.makeText(CameraXDemo.this, msg, Toast.LENGTH_SHORT).show()\n );\n }\n\n @Override\n public void onError(@NonNull ImageCapture.ImageCaptureError\n imageCaptureError, @NonNull String message, @Nullable Throwable cause) {\n String msg = \"Photo capture failed: \" + message;\n Log.e(\"CameraXApp\", msg, cause);\n dataBinding.viewFinder.post(\n () -> Toast.makeText(CameraXDemo.this, msg, Toast.LENGTH_SHORT).show()\n );\n }\n });\n });\n\n\n // Setup image analysis pipeline that computes average pixel luminance\n ImageAnalysisConfig analyzerConfig = new ImageAnalysisConfig.Builder().setImageReaderMode(\n ImageAnalysis.ImageReaderMode.ACQUIRE_LATEST_IMAGE).build();\n // Build the image analysis use case and instantiate our analyzer\n ImageAnalysis analyzerUseCase = new ImageAnalysis(analyzerConfig);\n analyzerUseCase.setAnalyzer(executor, new LuminosityAnalyzer());\n\n CameraX.bindToLifecycle(this, preview, imageCapture, analyzerUseCase);\n }",
"void onCaptureCompleted(CaptureRequest request, TotalCaptureResult result);",
"private void captureImage() {\n //Information about intents: http://developer.android.com/reference/android/content/Intent.html\n //Basically used to start up activities or send data between parts of a program\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n //Obtains the unique URI which sets up and prepares the image file to be taken, where it is to be placed,\n //and errors that may occur when taking the image.\n fileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE);\n //Stores this information in the Intent (which can be usefully passed on to the following Activity)\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);\n // start the image capture Intent (opens up the camera application)\n startActivityForResult(intent, CAMERA_CAPTURE_IMAGE_REQUEST_CODE);\n }",
"private void startCapture() {\n if (checkAudioPermissions()) {\n requestScreenCapture();\n }\n }",
"private void captureImage() {\n\t\tIntent intent = new Intent( MediaStore.ACTION_IMAGE_CAPTURE );\n\t\tmFileUri = getOutputMediaFileUri(); // create a file to save the image\n\t\tintent.putExtra(MediaStore.EXTRA_OUTPUT, mFileUri); // set the image file name\n\t\t// start the image capture Intent\n\t\tstartActivityForResult( intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE );\n\t}",
"protected void startCamera() {\n profileImageCaptured = new File(\n Environment.getExternalStorageDirectory() + \"/\" + \"temp.png\");\n if (profileImageCaptured.exists())\n profileImageCaptured.delete();\n\n outputFileUri = Uri.fromFile(profileImageCaptured);\n Intent intent = new Intent(\n android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);\n intent.putExtra(\"return-data\", true);\n startActivityForResult(intent, CAMERA_REQUEST);\n\n }",
"public Bitmap startCapture() {\n if (mMediaProjection == null) {\n return null;\n }\n Image image = mImageReader.acquireLatestImage();\n int width = image.getWidth();\n int height = image.getHeight();\n final Image.Plane[] planes = image.getPlanes();\n final ByteBuffer buffer = planes[0].getBuffer();\n int pixelStride = planes[0].getPixelStride();\n int rowStride = planes[0].getRowStride();\n int rowPadding = rowStride - pixelStride * width;\n Bitmap bitmap = Bitmap.createBitmap(width + rowPadding / pixelStride, height, Bitmap.Config.ARGB_8888);\n bitmap.copyPixelsFromBuffer(buffer);\n bitmap = Bitmap.createBitmap(bitmap, 0, 0, width, height ); //按范围截取图片\n image.close();\n Log.i(TAG, \"image data captured\");\n\n //Write local\n// final Bitmap finalBitmap = bitmap;\n// new Thread(){\n// @Override\n// public void run() {\n// super.run();\n// if( finalBitmap != null) {\n// try{\n// File fileImage = new File(getLocalPath());\n// if(!fileImage.exists()){\n// fileImage.createNewFile();\n// Log.i(TAG, \"image file created\");\n// }\n// FileOutputStream out = new FileOutputStream(fileImage);\n// if(out != null){\n// finalBitmap.compress(Bitmap.CompressFormat.PNG, 100, out);\n// out.flush();\n// out.close();\n// //发送广播刷新图库\n// Intent media = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);\n// Uri contentUri = Uri.fromFile(fileImage);\n// media.setData(contentUri);\n// mContext.sendBroadcast(media);\n// Log.i(TAG, \"screen image saved\");\n// }\n// }catch(Exception e) {\n// e.printStackTrace();\n// }\n// }\n// }\n// }.start();\n return bitmap;\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n\n super.onActivityResult(requestCode, resultCode, data);\n\n if (resultCode == Activity.RESULT_OK) {\n\n if (requestCode == REQUEST_CAMERA) {\n\n onCaptureImageResult(data);\n\n }\n\n }\n\n }",
"@Override\n public void onOpened(@NonNull CameraDevice cameraDevice) {\n Log.d(TAG, \"Camera opened\");\n\n mImageReader = ImageReader.newInstance(\n CAMERA_RESOLUTION_WIDTH,\n CAMERA_RESOLUTION_HEIGHT,\n ImageFormat.YUV_420_888,\n 1);\n\n mImageReader.setOnImageAvailableListener(mImageAvailableListener, null);\n mCaptureSurface = mImageReader.getSurface();\n try {\n cameraDevice.createCaptureSession(\n Collections.singletonList(mCaptureSurface),\n mCameraCaptureSessionStateCallback,\n null);\n } catch (CameraAccessException cae) {\n throw new RuntimeException(\"Error encountered creating camera capture session\", cae);\n }\n }",
"public void startCameraProcessing() {\n this.checkCameraPermission();\n\n try {\n cameraManager.openCamera(cameraId, new CameraDevice.StateCallback() {\n @Override\n public void onOpened(@NonNull CameraDevice camera) {\n cameraDevice = camera;\n onCameraOpened();\n }\n\n @Override\n public void onDisconnected(@NonNull CameraDevice camera) {\n\n }\n\n @Override\n public void onError(@NonNull CameraDevice camera, int error) {\n System.out.println(\"CAMERA ERROR OCCURRED: \" + error);\n }\n\n @Override\n public void onClosed(@NonNull CameraDevice camera) {\n super.onClosed(camera);\n }\n }, null);\n }\n catch (Exception e) {\n System.out.println(\"CAMERA FAILED TO OPEN\");\n e.printStackTrace();\n }\n }",
"private void onImageProcessed() {\n /* creating random bitmap and then using in TextureView.getBitmap(bitmap) instead of simple TextureView.getBitmap() will not cause lags & memory leaks */\n if (captureBitmap == null) {\n captureBitmap = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888);\n }\n captureBitmap = Bitmap.createScaledBitmap(targetView.getBitmap(captureBitmap), captureW, captureH, false);\n\n if (captureProcessor != null) {\n if (isThreadingEnabled) {\n cameraThreadHandler.Queue(captureBitmap);\n }\n else {\n captureProcessor.process(captureBitmap, targetView, parentActivity);\n }\n /*\n else if (!skipNextFrame){\n long time = System.currentTimeMillis();\n captureProcessor.process(captureBitmap, targetView, parentActivity);\n time = System.currentTimeMillis() - time;\n if (time > 0.035)\n skipNextFrame = true;\n }\n else {\n skipNextFrame = false;\n }*/\n }\n }",
"public void onPreviewStarted() {\n if (!this.mPaused) {\n Log.w(TAG, \"KPI photo preview started\");\n this.mAppController.onPreviewStarted();\n this.mAppController.setShutterEnabled(true);\n this.mAppController.setShutterButtonLongClickable(this.mIsImageCaptureIntent ^ 1);\n this.mAppController.getCameraAppUI().enableModeOptions();\n this.mUI.clearEvoPendingUI();\n if (this.mEvoFlashLock != null) {\n this.mAppController.getButtonManager().enableButtonWithToken(0, this.mEvoFlashLock.intValue());\n this.mEvoFlashLock = null;\n }\n if (this.mCameraState == 7) {\n setCameraState(5);\n } else {\n setCameraState(1);\n }\n if (isCameraFrontFacing()) {\n this.mUI.setZoomBarVisible(false);\n } else {\n this.mUI.setZoomBarVisible(true);\n }\n if (this.mActivity.getCameraAppUI().isNeedBlur() || onGLRenderEnable()) {\n new Handler().postDelayed(new Runnable() {\n public void run() {\n PhotoModule.this.startFaceDetection();\n }\n }, 1500);\n } else {\n startFaceDetection();\n }\n BoostUtil.getInstance().releaseCpuLock();\n if (this.mIsGlMode) {\n this.mActivity.getCameraAppUI().hideImageCover();\n if (this.mActivity.getCameraAppUI().getBeautyEnable()) {\n this.mActivity.getCameraAppUI().getCameraGLSurfaceView().queueEvent(new Runnable() {\n public void run() {\n PhotoModule.this.mActivity.getButtonManager().setSeekbarProgress((int) PhotoModule.this.mActivity.getCameraAppUI().getBeautySeek());\n PhotoModule.this.updateBeautySeek(PhotoModule.this.mActivity.getCameraAppUI().getBeautySeek() / 20.0f);\n }\n });\n }\n if (this.mActivity.getCameraAppUI().getEffectEnable()) {\n this.mActivity.getCameraAppUI().getCameraGLSurfaceView().queueEvent(new Runnable() {\n public void run() {\n if (TextUtils.isEmpty(PhotoModule.this.mActivity.getCameraAppUI().getCurrSelect())) {\n BeaurifyJniSdk.preViewInstance().nativeDisablePackage();\n } else {\n BeaurifyJniSdk.preViewInstance().nativeChangePackage(PhotoModule.this.mActivity.getCameraAppUI().getCurrSelect());\n }\n }\n });\n }\n }\n }\n }",
"private void captureImage(){\n\t\t\n\t\t//Setup location\n\t\tLocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE);\n\t\tLocation location = lm.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);\n\t\t\n\t\tdouble latitude = location.getLatitude();\n\t\tdouble longitude = location.getLongitude();\n\t\t\n\t\tIntent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n\t\t\n\t\tfileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE, latitude, longitude);\n\t\t\n\t\tintent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);\n\t\t\n\t\t//Start the image capture Intent\n\t\tstartActivityForResult(intent, CAMERA_CAPTURE_IMAGE_REQUEST_CODE);\n\t}",
"public void onCameraOpened() {\n openCameraCommon();\n initializeControlByIntent();\n new Thread() {\n public void run() {\n try {\n Thread.sleep(500);\n PhotoModule.this.mIsCameraOpened = true;\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }.start();\n }",
"@Override\n public void onOpened(@NonNull CameraDevice cameraDevice) {\n\n mCameraDevice = cameraDevice;\n\n\n try {\n captureRequestBuilder = mCameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_PREVIEW);\n captureRequestBuilder.set(CaptureRequest.CONTROL_MODE, CaptureRequest.CONTROL_MODE_OFF);\n\n } catch(CameraAccessException e) {\n e.printStackTrace();\n }\n\n }",
"@Override\n public void onOpened(CameraDevice camera) {\n Log.e(TAG, \"onOpened\");\n mCameraDevice = camera;\n startPreview();\n }",
"@Override\n public void onOpened(CameraDevice camera) {\n Log.e(TAG, \"onOpened\");\n cameraDevice = camera;\n createCameraPreview();\n }",
"@Override\n public void onOpened(CameraDevice camera) {\n Log.e(TAG, \"onOpened\");\n cameraDevice = camera;\n createCameraPreview();\n }",
"@Override\n public void onOpened(CameraDevice camera) {\n cameraDevice = camera;\n createCameraPreview();\n }",
"@Override\n public void onOpened(CameraDevice camera) {\n cameraDevice = camera;\n createCameraPreview();\n }",
"public void onLaunchCamera(View view) {\n Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n\n\n data.insertAnImage(OptionID.get(alg), null);\n Cursor imageCursor = data.getImageData(OptionID.get(alg));\n imageCursor.moveToNext();\n intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(getPhotoFileUri(imageCursor.getString(0))))); // set the image file name\n\n // If you call startActivityForResult() using an intent that no app can handle, your app will crash.\n // So as long as the result is not null, it's safe to use the intent.\n if (intent.resolveActivity(getPackageManager()) != null) {\n // Start the image capture intent to take photo\n startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);\n }\n }",
"@Override\n public void startCameraIntent() {\n Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n startActivityForResult(cameraIntent, PICK_FROM_CAMERA_REQUEST_CODE);\n }",
"private void captureImage() {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);\n\n if (intent.resolveActivity(getPackageManager()) != null) {\n try {\n mImageFile = createImageFile();\n } catch (IOException ex) {\n Log.e(TAG, ex.getLocalizedMessage(), ex);\n }\n\n // Continue only if the File was successfully created\n if (mImageFile != null) {\n// intent.putExtra(MediaStore.EXTRA_OUTPUT,\n// Uri.fromFile(mImageFile));\n startActivityForResult(intent, IMAGE_CAPTURE_REQ_CODE);\n } else {\n Toast.makeText(this, R.string.error_capture_image, Toast.LENGTH_SHORT).show();\n }\n } else {\n Toast.makeText(this, R.string.no_cam_app, Toast.LENGTH_SHORT).show();\n }\n }",
"@Override\n public void imageFromCamera() {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if (takePictureIntent.resolveActivity(getPackageManager()) != null) {\n startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE);\n }\n }",
"@Override\n public void onOpened(@NonNull CameraDevice cameraDevice) {\n mCameraOpenCloseLock.release();\n mCameraDevice = cameraDevice;\n if (null != mTextureView) {\n configureTransform(mTextureView.getWidth(), mTextureView.getHeight());\n }\n createCameraPreviewSession();\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == CAMERA_CAPTURE_IMAGE_REQUEST_CODE) {\n if (resultCode == RESULT_OK) {\n // successfully captured the image\n // display it in image view\n Utils.previewCapturedImage(this, realm, Integer.valueOf(station.getId()));\n //Toast.makeText(getApplicationContext(),intent.getStringExtra(\"id_station\"), Toast.LENGTH_SHORT).show();\n } else if (resultCode == RESULT_CANCELED) {\n // user cancelled Image capture\n Toast.makeText(getApplicationContext(),\n \"User cancelled image capture\", Toast.LENGTH_SHORT)\n .show();\n } else {\n // failed to capture image\n Toast.makeText(getApplicationContext(),\n \"Sorry! Failed to capture image\", Toast.LENGTH_SHORT)\n .show();\n }\n }\n }",
"@Override\n public void startCamera() {\n super.startCamera();\n\n if(cameraListener != null)\n cameraListener.onCameraStart();\n }",
"private void takePicture() {\n\n captureStillPicture();\n }",
"@Override\n public void onOpened(CameraDevice cameraDevice) {\n mCameraOpenCloseLock.release();\n mCameraDevice = cameraDevice;\n createCameraPreviewSession();\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (resultCode == RESULT_OK) {\n if (requestCode == CAMERA_CAPTURE_IMAGE_PREVIEW) {\n previewCapturedImage();\n }\n } else if (resultCode == RESULT_CANCELED) {\n // user cancelled Image capture\n Toast.makeText(this, \"Image capture cancelled.\", Toast.LENGTH_LONG).show();\n } else {\n // failed to capture image\n Toast.makeText(getApplicationContext(), \"Image capture failed.\", Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n protected void onStart() {\n camera_ = getCameraInstance();\n Parameters params;\n\n if (camera_ != null) {\n params = camera_.getParameters();\n params.setPreviewFormat(ImageFormat.NV21);\n getSmallestPreviewSize(params);\n params.setPreviewSize(width_, height_);\n //params.setFlashMode(Parameters.FLASH_MODE_TORCH);\n params.setWhiteBalance(Parameters.WHITE_BALANCE_AUTO);\n camera_.setParameters(params);\n\n frame_ = new RGB[width_ * height_];\n for (int i = 0; i < frame_.length; ++i) {\n frame_[i] = new RGB();\n }\n\n camera_.setPreviewCallback(new PreviewCallback() {\n @Override\n public void onPreviewFrame(byte[] data, Camera camera) {\n synchronized (frame_) {\n decodeYUV420SP(frame_, data, width_, height_);\n }\n }\n });\n SurfaceTexture texture_ = new SurfaceTexture(0);\n try {\n camera_.setPreviewTexture(texture_);\n } catch (IOException e) {\n e.printStackTrace();\n }\n camera_.startPreview();\n }\n\n super.onStart();\n }",
"@Override\n public void onConfigured(\n CameraCaptureSession cameraCaptureSession) {\n if (null == mCameraDevice) {\n return;\n }\n\n // When the session is ready, we start displaying the preview.\n mCaptureSession = cameraCaptureSession;\n\n try {\n // 自动对焦\n // Auto focus should be continuous for camera preview.\n mPreviewRequestBuilder.set(\n CaptureRequest.CONTROL_AF_MODE,\n CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE);\n\n // Flash is automatically enabled when necessary.\n setAutoFlash(mPreviewRequestBuilder);\n\n // Finally, we start displaying the camera preview.\n mPreviewRequest = mPreviewRequestBuilder.build();\n mCaptureSession.setRepeatingRequest(\n mPreviewRequest,\n // 如果想要拍照,那么绝不能设置为null\n // 如果单纯预览,那么可以设置为null\n mCaptureCallback,\n mBackgroundHandler);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }",
"private void startPreview() {\n if (cameraConfigured && camera!=null) {\n camera.startPreview();\n inPreview=true;\n }\n }",
"protected void startReport(){\n Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n startActivityForResult(cameraIntent,REQUEST_CODE);\n }",
"@Override\n public void onConfigured(@NonNull CameraCaptureSession cameraCaptureSession) {\n if (null == mCameraDevice) {\n return;\n }\n // Auto focus should be continuous for camera preview.\n mCaptureRequestBuilder.set(CaptureRequest.CONTROL_AF_MODE,\n CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE);\n\n // Finally, we start displaying the camera preview.\n mPreviewRequest = mCaptureRequestBuilder.build();\n mPreviewCaptureSession = cameraCaptureSession;\n\n // preview is a video, so we set a repeating request\n try {\n mPreviewCaptureSession.setRepeatingRequest(mCaptureRequestBuilder.build(), mPreviewCaptureCallback, mBackgroundHandler);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void onConfigured(@NonNull CameraCaptureSession cameraCaptureSession) {\n if (null == mCameraDevice) {\n return;\n }\n // When the session is ready, we start displaying the preview.\n mCameraCaptureSessions = cameraCaptureSession;\n updatePreview();\n }",
"@Override\n public void onConfigured(@NonNull CameraCaptureSession cameraCaptureSession) {\n if (null == cameraDevice) {\n return;\n }\n // When the session is ready, we start displaying the preview.\n cameraCaptureSessions = cameraCaptureSession;\n updatePreview();\n }",
"@Override\n public void onConfigured(@NonNull CameraCaptureSession cameraCaptureSession) {\n if (null == cameraDevice) {\n return;\n }\n // When the session is ready, we start displaying the preview.\n cameraCaptureSessions = cameraCaptureSession;\n updatePreview();\n }",
"@Override\n public void onConfigured(@NonNull CameraCaptureSession cameraCaptureSession) {\n if (null == cameraDevice) {\n return;\n }\n // When the session is ready, we start displaying the preview.\n cameraCaptureSessions = cameraCaptureSession;\n updatePreview();\n }",
"@Override\n public void onConfigured(@NonNull CameraCaptureSession cameraCaptureSession) {\n if (null == cameraDevice) {\n return;\n }\n // When the session is ready, we start displaying the preview.\n cameraCaptureSessions = cameraCaptureSession;\n updatePreview();\n }",
"@Override // com.master.cameralibrary.CameraViewImpl\n public void takePicture() {\n if (!isCameraOpened()) {\n throw new IllegalStateException(\"Camera is not ready. Call start() before takePicture().\");\n } else if (getAutoFocus()) {\n this.mCamera.cancelAutoFocus();\n this.mCamera.autoFocus(new Camera.AutoFocusCallback() {\n /* class com.master.cameralibrary.Camera1.AnonymousClass2 */\n\n public void onAutoFocus(boolean z, Camera camera) {\n Camera1.this.takePictureInternal();\n }\n });\n } else {\n takePictureInternal();\n }\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent intent)\n {\n if(requestCode==REQUEST_IMAGE_CAPTURE && resultCode==RESULT_OK)\n {\n mCurFaceImg.process();\n }\n super.onActivityResult(requestCode, resultCode, intent);\n }",
"private void startRecord() {\n try {\n if (mIsRecording) {\n setupMediaRecorder();\n } else if (mIsTimelapse) {\n setupTimelapse();\n }\n SurfaceTexture surfaceTexture = mTextureView.getSurfaceTexture();\n surfaceTexture.setDefaultBufferSize(mPreviewSize.getWidth(), mPreviewSize.getHeight());\n Surface previewSurface = new Surface(surfaceTexture);\n Surface recordSurface = mMediaRecorder.getSurface();\n mCaptureRequestBuilder = mCameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_RECORD);\n mCaptureRequestBuilder.addTarget(previewSurface);\n mCaptureRequestBuilder.addTarget(recordSurface);\n\n mCameraDevice.createCaptureSession(Arrays.asList(previewSurface, recordSurface, mImageReader.getSurface()),\n new CameraCaptureSession.StateCallback() {\n\n\n @Override\n public void onConfigured(CameraCaptureSession session) {\n\n mRecordCaptureSession = session;\n\n try {\n mRecordCaptureSession.setRepeatingRequest(mCaptureRequestBuilder.build(), null, null);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onConfigureFailed(@NonNull CameraCaptureSession session) {\n\n }\n }, null);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\n protected void onResume() {\n super.onResume();\n cameraView.start();\n }",
"@Override\n public void onOpened(@NonNull CameraDevice cameraDevice) {\n mCameraOpenCloseLock.release();\n mCameraDevice = cameraDevice;\n createCameraPreviewSession();\n }",
"@Override\n public boolean capture() {\n if (mCameraState == SNAPSHOT_IN_PROGRESS || mCameraDevice == null) {\n return false;\n }\n setCameraState(SNAPSHOT_IN_PROGRESS);\n\n return true;\n }",
"public void startCamera()\n {\n startCamera(null);\n }",
"public void onPreviewStarted() {\n Log.w(TAG, \"KPI video preview started\");\n this.mAppController.setShutterEnabled(true);\n this.mAppController.onPreviewStarted();\n this.mUI.clearEvoPendingUI();\n if (this.mFocusManager != null) {\n this.mFocusManager.onPreviewStarted();\n }\n if (isNeedStartRecordingOnSwitching()) {\n onShutterButtonClick();\n }\n }",
"public void onStart() {\n\n mVideoFolder = createVideoFolder();\n mImageFolder = createImageFolder();\n mMediaRecorder = new MediaRecorder();\n\n startBackgroundThread();\n\n if (mTextureView.isAvailable()) {\n // TODO: see Google Example add comments\n // pause and resume\n openCamera(mTextureView.getWidth(), mTextureView.getHeight());\n\n } else {\n // first time\n mTextureView.setSurfaceTextureListener(mSurfaceTextureListener);\n }\n }",
"@Override\n public void init() {\n startCamera();\n }",
"public void cameraIntent() {\n startActivityForResult(new Intent(\"android.media.action.IMAGE_CAPTURE\"), 1);\n }",
"@SuppressLint(\"NewApi\")\n protected void startPreview() {\n if(null == mCameraDevice || !mTextureView.isAvailable() || null == mPreviewSize) {\n Log.e(TAG, \"startPreview fail, return\");\n }\n\n SurfaceTexture texture = mTextureView.getSurfaceTexture();\n if(null == texture) {\n Log.e(TAG,\"texture is null, return\");\n return;\n }\n\n texture.setDefaultBufferSize(mPreviewSize.getWidth(), mPreviewSize.getHeight());\n Surface surface = new Surface(texture);\n\n try {\n mPreviewBuilder = mCameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_PREVIEW);\n } catch (CameraAccessException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n mPreviewBuilder.addTarget(surface);\n\n try {\n mCameraDevice.createCaptureSession(Arrays.asList(surface), new CameraCaptureSession.StateCallback() {\n\n @Override\n public void onConfigured(CameraCaptureSession session) {\n // TODO Auto-generated method stub\n mPreviewSession = session;\n updatePreview();\n }\n\n @Override\n public void onConfigureFailed(CameraCaptureSession session) {\n // TODO Auto-generated method stub\n Toast.makeText(mContext, \"onConfigureFailed\", Toast.LENGTH_LONG).show();\n }\n }, null);\n } catch (CameraAccessException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }",
"@Override\n public void onOpened(@NonNull CameraDevice camera) {\n cameraDevice = camera;\n createCameraPreview();\n }",
"public void startFrontCam() {\n }",
"private void runPrecaptureSequence() {\n try {\n // This is how to tell the camera to trigger.\n mPreviewRequestBuilder.set(CaptureRequest.CONTROL_AE_PRECAPTURE_TRIGGER,\n CaptureRequest.CONTROL_AE_PRECAPTURE_TRIGGER_START);\n // Tell #mCaptureCallback to wait for the precapture sequence to be set.\n mState = STATE_WAITING_PRECAPTURE;\n mCaptureSession.capture(mPreviewRequestBuilder.build(), mCaptureCallback,\n mBackgroundHandler);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void onClick(View v) {\n Cam.takePicture(shutterCallback, null, mPicture);\n// Cam.takePicture();\n }",
"void onCaptureEnd();",
"private void handleCaptureCompleted(CaptureResult result) {\n if (MyDebug.LOG)\n Log.d(TAG, \"capture request completed\");\n test_capture_results++;\n modified_from_camera_settings = false;\n\n handleRawCaptureResult(result);\n\n if (previewBuilder != null) {\n previewBuilder.set(CaptureRequest.CONTROL_AF_TRIGGER, CameraMetadata.CONTROL_AF_TRIGGER_CANCEL);\n String saved_flash_value = camera_settings.flash_value;\n if (use_fake_precapture_mode && fake_precapture_torch_performed) {\n camera_settings.flash_value = \"flash_off\";\n }\n // if not using fake precapture, not sure if we need to set the ae mode, but the AE mode is set again in Camera2Basic\n camera_settings.setAEMode(previewBuilder, false);\n // n.b., if capture/setRepeatingRequest throw exception, we don't call the take_picture_error_cb.onError() callback, as the photo should have been taken by this point\n try {\n capture();\n } catch (CameraAccessException e) {\n if (MyDebug.LOG) {\n Log.e(TAG, \"failed to cancel autofocus after taking photo\");\n Log.e(TAG, \"reason: \" + e.getReason());\n Log.e(TAG, \"message: \" + e.getMessage());\n }\n e.printStackTrace();\n }\n if (use_fake_precapture_mode && fake_precapture_torch_performed) {\n // now set up the request to switch to the correct flash value\n camera_settings.flash_value = saved_flash_value;\n camera_settings.setAEMode(previewBuilder, false);\n }\n previewBuilder.set(CaptureRequest.CONTROL_AF_TRIGGER, CameraMetadata.CONTROL_AF_TRIGGER_IDLE); // ensure set back to idle\n try {\n setRepeatingRequest();\n } catch (CameraAccessException e) {\n if (MyDebug.LOG) {\n Log.e(TAG, \"failed to start preview after taking photo\");\n Log.e(TAG, \"reason: \" + e.getReason());\n Log.e(TAG, \"message: \" + e.getMessage());\n }\n e.printStackTrace();\n preview_error_cb.onError();\n }\n }\n fake_precapture_torch_performed = false;\n\n if (burst_type == BurstType.BURSTTYPE_FOCUS && previewBuilder != null) { // make sure camera wasn't released in the meantime\n if (MyDebug.LOG)\n Log.d(TAG, \"focus bracketing complete, reset manual focus\");\n camera_settings.setFocusDistance(previewBuilder);\n try {\n setRepeatingRequest();\n } catch (CameraAccessException e) {\n if (MyDebug.LOG) {\n Log.e(TAG, \"failed to set focus distance\");\n Log.e(TAG, \"reason: \" + e.getReason());\n Log.e(TAG, \"message: \" + e.getMessage());\n }\n e.printStackTrace();\n }\n }\n final Activity activity = (Activity) context;\n activity.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (MyDebug.LOG)\n Log.d(TAG, \"processCompleted UI thread call checkImagesCompleted()\");\n synchronized (background_camera_lock) {\n done_all_captures = true;\n if (MyDebug.LOG)\n Log.d(TAG, \"done all captures\");\n }\n checkImagesCompleted();\n }\n });\n }",
"@Override\n public void onOpened(@NonNull CameraDevice camera) {\n mCameraDevice = camera;\n createCameraPreview();\n }",
"@Override\n public void onCameraPreviewStopped() {\n }",
"void cameraSetup();",
"@Override\n public void onConfigured(@NonNull CameraCaptureSession cameraCaptureSession) {\n if (null == cameraDevice) {\n return;\n }\n\n // When the session is ready, we start displaying the preview.\n cameraCaptureSessions = cameraCaptureSession;\n updatePreview(cameraCaptureSessionListener);\n }",
"private void previewCapturedImage() {\n try {\n imageProfile.setVisibility(View.VISIBLE);\n Log.d(\"preview\", currentPhotoPath);\n final Bitmap bitmap = CameraUtils.scaleDownAndRotatePic(currentPhotoPath);\n imageProfile.setImageBitmap(bitmap);\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void onFrameAvailable(int cameraId) {\n }",
"@Override\n public void onFrameAvailable(int cameraId) {\n }",
"public void onCameraViewStarted(int width, int height) {\n m_lastOutput = new Mat(height, width, CvType.CV_8UC4);\n\n m_draw = new Mat(height, width, CvType.CV_8UC4);\n\n m_gray = new Mat(height, width, CvType.CV_8UC1);\n\n\n // area detection size mat\n calculateDetectArea(width, height);\n m_sub_draw = new Mat(m_draw, r_detectArea);\n m_sub_gray = new Mat(m_gray, r_detectArea);\n\n m_gui_area = new Mat(r_detectArea.height, r_detectArea.width, CvType.CV_8UC4);\n createGuiSdk();\n\n m_AT_finished = new Mat(r_detectArea.height, r_detectArea.width, CvType.CV_8UC4);\n m_AT_pending = new Mat(r_detectArea.height, r_detectArea.width, CvType.CV_8UC4);\n m_sdk = new Mat(r_detectArea.height, r_detectArea.width, CvType.CV_8UC4);\n\n at_findSdk = new AT_findSdk();\n\n\n sdkFound = false;\n outputChoice = false;\n }",
"@Override\n public void onConfigured(@NonNull CameraCaptureSession session) {\n if (MyDebug.LOG) {\n Log.d(TAG, \"onConfigured: \" + session);\n Log.d(TAG, \"captureSession was: \" + captureSession);\n }\n if (camera == null) {\n if (MyDebug.LOG) {\n Log.d(TAG, \"camera is closed\");\n }\n synchronized (background_camera_lock) {\n callback_done = true;\n background_camera_lock.notifyAll();\n }\n return;\n }\n synchronized (background_camera_lock) {\n captureSession = session;\n Surface surface = getPreviewSurface();\n previewBuilder.addTarget(surface);\n if (video_recorder != null)\n previewBuilder.addTarget(video_recorder_surface);\n try {\n setRepeatingRequest();\n } catch (CameraAccessException e) {\n if (MyDebug.LOG) {\n Log.e(TAG, \"failed to start preview\");\n Log.e(TAG, \"reason: \" + e.getReason());\n Log.e(TAG, \"message: \" + e.getMessage());\n }\n e.printStackTrace();\n // we indicate that we failed to start the preview by setting captureSession back to null\n // this will cause a CameraControllerException to be thrown below\n captureSession = null;\n }\n }\n synchronized (background_camera_lock) {\n callback_done = true;\n background_camera_lock.notifyAll();\n }\n }",
"private void startPreview(CameraCaptureSession session) throws CameraAccessException{\n mPreviewBuilder.addTarget(mSurface);\n mPreviewBuilder.addTarget(mImageReader.getSurface());\n session.setRepeatingRequest(mPreviewBuilder.build(), mSessionCaptureCallback, mCamSessionHandler);\n }",
"public void saveFinalPhoto(byte[] jpegData, NamedEntity name, ExifInterface exif, CameraProxy camera, Map<String, Object> externalInfo) {\n byte[] bArr = jpegData;\n NamedEntity namedEntity = name;\n ExifInterface exifInterface = exif;\n int orientation = Exif.getOrientation(exif);\n float zoomValue = 1.0f;\n if (PhotoModule.this.mCameraCapabilities.supports(Feature.ZOOM)) {\n zoomValue = PhotoModule.this.mCameraSettings.getCurrentZoomRatio();\n }\n float zoomValue2 = zoomValue;\n boolean hdrOn = SceneMode.HDR == PhotoModule.this.mSceneMode;\n String flashSetting = PhotoModule.this.mActivity.getSettingsManager().getString(PhotoModule.this.mAppController.getCameraScope(), Keys.KEY_FLASH_MODE);\n boolean gridLinesOn = Keys.areGridLinesOn(PhotoModule.this.mActivity.getSettingsManager());\n UsageStatistics instance = UsageStatistics.instance();\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(namedEntity.title);\n stringBuilder.append(Storage.JPEG_POSTFIX);\n instance.photoCaptureDoneEvent(10000, stringBuilder.toString(), exifInterface, camera.getCharacteristics().isFacingFront(), hdrOn, zoomValue2, flashSetting, gridLinesOn, Float.valueOf((float) PhotoModule.this.mTimerDuration), PhotoModule.this.mShutterTouchCoordinate, Boolean.valueOf(PhotoModule.this.mVolumeButtonClickedFlag));\n PhotoModule.this.mShutterTouchCoordinate = null;\n PhotoModule.this.mVolumeButtonClickedFlag = false;\n int orientation2;\n if (PhotoModule.this.mIsImageCaptureIntent) {\n orientation2 = orientation;\n PhotoModule.this.mJpegImageData = bArr;\n PhotoModule.this.mUI.disableZoom();\n if (PhotoModule.this.mQuickCapture) {\n PhotoModule.this.onCaptureDone();\n } else {\n Log.v(PhotoModule.TAG, \"showing UI\");\n PhotoModule.this.mUI.showCapturedImageForReview(bArr, orientation2, false);\n PhotoModule.this.mIsInIntentReviewUI = true;\n }\n } else {\n int width;\n int height;\n int width2;\n int DEPTH_H;\n Integer exifWidth = exifInterface.getTagIntValue(ExifInterface.TAG_PIXEL_X_DIMENSION);\n Integer exifHeight = exifInterface.getTagIntValue(ExifInterface.TAG_PIXEL_Y_DIMENSION);\n if (!PhotoModule.this.mShouldResizeTo16x9 || exifWidth == null || exifHeight == null) {\n Size s = PhotoModule.this.mCameraSettings.getCurrentPhotoSize();\n if ((PhotoModule.this.mJpegRotation + orientation) % MediaProviderUtils.ROTATION_180 == 0) {\n width = s.width();\n height = s.height();\n } else {\n width2 = s.height();\n height = s.width();\n width = width2;\n }\n } else {\n width = exifWidth.intValue();\n height = exifHeight.intValue();\n }\n String title = namedEntity == null ? null : namedEntity.title;\n if (PhotoModule.this.mDebugUri != null) {\n PhotoModule.this.saveToDebugUri(bArr);\n if (title != null) {\n StringBuilder stringBuilder2 = new StringBuilder();\n stringBuilder2.append(PhotoModule.DEBUG_IMAGE_PREFIX);\n stringBuilder2.append(title);\n title = stringBuilder2.toString();\n }\n }\n if (title == null) {\n Log.e(PhotoModule.TAG, \"Unbalanced name/data pair\");\n orientation2 = orientation;\n } else {\n StringBuilder stringBuilder3;\n if (namedEntity.date == -1) {\n namedEntity.date = PhotoModule.this.mCaptureStartTime;\n }\n if (PhotoModule.this.mHeading >= 0) {\n ExifTag directionRefTag = exifInterface.buildTag(ExifInterface.TAG_GPS_IMG_DIRECTION_REF, \"M\");\n ExifTag directionTag = exifInterface.buildTag(ExifInterface.TAG_GPS_IMG_DIRECTION, new Rational((long) PhotoModule.this.mHeading, 1));\n exifInterface.setTag(directionRefTag);\n exifInterface.setTag(directionTag);\n }\n if (externalInfo != null) {\n exifInterface.setTag(exifInterface.buildTag(ExifInterface.TAG_USER_COMMENT, CameraUtil.serializeToJson(externalInfo)));\n }\n if (PhotoModule.this.mCameraSettings.isMotionOn()) {\n stringBuilder3 = new StringBuilder();\n stringBuilder3.append(\"MV\");\n stringBuilder3.append(title);\n title = stringBuilder3.toString();\n }\n String title2 = title;\n Integer num;\n if (PhotoModule.this.isDepthEnabled()) {\n ArrayList<byte[]> bokehBytes = MpoInterface.generateXmpFromMpo(jpegData);\n if (bokehBytes != null) {\n Tag access$500 = PhotoModule.TAG;\n stringBuilder3 = new StringBuilder();\n stringBuilder3.append(\"bokehBytes.size()\");\n stringBuilder3.append(bokehBytes.size());\n Log.d(access$500, stringBuilder3.toString());\n }\n if (bokehBytes == null || bokehBytes.size() <= 2) {\n Log.v(PhotoModule.TAG, \"save addImage\");\n orientation2 = orientation;\n PhotoModule.this.getServices().getMediaSaver().addImage(bArr, title2, namedEntity.date, this.mLocation, width, height, orientation, exifInterface, PhotoModule.this.mOnMediaSavedListener, PhotoModule.this.mContentResolver);\n } else {\n int DEPTH_W;\n GImage gImage = new GImage((byte[]) bokehBytes.get(1), \"image/jpeg\");\n Size photoSize = PhotoModule.this.mCameraSettings.getCurrentPhotoSize();\n int photoWidth = photoSize.width();\n width2 = photoSize.height();\n if (((float) photoWidth) / ((float) width2) == 1.3333334f) {\n DEPTH_W = 896;\n DEPTH_H = DepthUtil.DEPTH_HEIGHT_4_3;\n Log.d(PhotoModule.TAG, \"set width x height to 4:3 size by default\");\n } else if (((float) photoWidth) / ((float) width2) == 1.7777778f) {\n DEPTH_W = 896;\n DEPTH_H = DepthUtil.DEPTH_HEIGHT_16_9;\n Log.d(PhotoModule.TAG, \"set width x height to 16:9 size\");\n } else {\n DEPTH_W = 1000;\n DEPTH_H = 500;\n Log.d(PhotoModule.TAG, \"set width x height to 18:9 size\");\n }\n DepthMap depthMap = new DepthMap(DEPTH_W, DEPTH_H, MediaProviderUtils.ROTATION_180);\n depthMap.buffer = (byte[]) bokehBytes.get(bokehBytes.size() - 1);\n Tag access$5002 = PhotoModule.TAG;\n StringBuilder stringBuilder4 = new StringBuilder();\n stringBuilder4.append(\"depthMap.buffer = \");\n stringBuilder4.append(depthMap.buffer.length);\n Log.v(access$5002, stringBuilder4.toString());\n GDepth gDepth = GDepth.createGDepth(depthMap);\n float depthNear = ((Float) PhotoModule.this.mPreviewResult.get(DepthUtil.bokeh_gdepth_near)).floatValue();\n float depthFar = ((Float) PhotoModule.this.mPreviewResult.get(DepthUtil.bokeh_gdepth_far)).floatValue();\n byte depthFormat = ((Byte) PhotoModule.this.mPreviewResult.get(DepthUtil.bokeh_gdepth_format)).byteValue();\n gDepth.setNear(depthNear);\n gDepth.setFar(depthFar);\n gDepth.setFormat(depthFormat);\n Tag access$5003 = PhotoModule.TAG;\n StringBuilder stringBuilder5 = new StringBuilder();\n stringBuilder5.append(\"westalgo depth_near: \");\n stringBuilder5.append(depthNear);\n stringBuilder5.append(\"depth_far: \");\n stringBuilder5.append(depthFar);\n stringBuilder5.append(\"depth_format:\");\n stringBuilder5.append(depthFormat);\n Log.d(access$5003, stringBuilder5.toString());\n Log.v(PhotoModule.TAG, \"save addXmpImage\");\n exif.addMakeAndModelTag();\n PhotoModule.this.getServices().getMediaSaver().addXmpImage((byte[]) bokehBytes.get(0), gImage, gDepth, title2, namedEntity.date, null, width, height, orientation, exifInterface, XmpUtil.GDEPTH_TYPE, PhotoModule.this.mOnMediaSavedListener, PhotoModule.this.mContentResolver, \"jpeg\");\n Integer num2 = exifHeight;\n num = exifWidth;\n orientation2 = orientation;\n }\n } else {\n num = exifWidth;\n orientation2 = orientation;\n PhotoModule.this.getServices().getMediaSaver().addImage(bArr, title2, namedEntity.date, this.mLocation, width, height, orientation2, exif, PhotoModule.this.mOnMediaSavedListener, PhotoModule.this.mContentResolver);\n }\n }\n DEPTH_H = orientation2;\n }\n PhotoModule.this.getServices().getRemoteShutterListener().onPictureTaken(bArr);\n PhotoModule.this.mActivity.updateStorageSpaceAndHint(null);\n }",
"protected void updatePreview() {\n if(null == cameraDevice) {\n Log.e(TAG, \"updatePreview error, return\");\n }\n captureRequestBuilder.set(CaptureRequest.CONTROL_MODE, CameraMetadata.CONTROL_MODE_AUTO);\n try {\n cameraCaptureSessions.setRepeatingRequest(captureRequestBuilder.build(), null, mBackgroundHandler);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }",
"protected void updatePreview() {\n if (null == mCameraDevice) {\n Toast.makeText(CameraActivity.this, \"Couldn't find Camera\", Toast.LENGTH_SHORT).show();\n }\n mCaptureRequestBuilder.set(CaptureRequest.CONTROL_MODE, CameraMetadata.CONTROL_MODE_AUTO);\n try {\n mCameraCaptureSessions.setRepeatingRequest(mCaptureRequestBuilder.build(), null, null);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }",
"static void proceedWithOpenedCamera(final Context context, final CameraManager manager, final CameraDevice camera, final File outputFile, final Looper looper, final PrintWriter stdout) throws CameraAccessException, IllegalArgumentException {\n final List<Surface> outputSurfaces = new ArrayList<>();\n\n final CameraCharacteristics characteristics = manager.getCameraCharacteristics(camera.getId());\n\n int autoExposureMode = CameraMetadata.CONTROL_AE_MODE_OFF;\n for (int supportedMode : characteristics.get(CameraCharacteristics.CONTROL_AE_AVAILABLE_MODES)) {\n if (supportedMode == CameraMetadata.CONTROL_AE_MODE_ON) {\n autoExposureMode = supportedMode;\n }\n }\n final int autoExposureModeFinal = autoExposureMode;\n\n // Use largest available size:\n StreamConfigurationMap map = characteristics.get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);\n Comparator<Size> bySize = (lhs, rhs) -> {\n // Cast to ensure multiplications won't overflow:\n return Long.signum((long) lhs.getWidth() * lhs.getHeight() - (long) rhs.getWidth() * rhs.getHeight());\n };\n List<Size> sizes = Arrays.asList(map.getOutputSizes(ImageFormat.JPEG));\n Size largest = Collections.max(sizes, bySize);\n\n final ImageReader mImageReader = ImageReader.newInstance(largest.getWidth(), largest.getHeight(), ImageFormat.JPEG, 2);\n mImageReader.setOnImageAvailableListener(reader -> new Thread() {\n @Override\n public void run() {\n try (final Image mImage = reader.acquireNextImage()) {\n ByteBuffer buffer = mImage.getPlanes()[0].getBuffer();\n byte[] bytes = new byte[buffer.remaining()];\n buffer.get(bytes);\n try (FileOutputStream output = new FileOutputStream(outputFile)) {\n output.write(bytes);\n } catch (Exception e) {\n stdout.println(\"Error writing image: \" + e.getMessage());\n TermuxApiLogger.error(\"Error writing image\", e);\n } finally {\n closeCamera(camera, looper);\n }\n }\n }\n }.start(), null);\n final Surface imageReaderSurface = mImageReader.getSurface();\n outputSurfaces.add(imageReaderSurface);\n\n // create a dummy PreviewSurface\n SurfaceTexture previewTexture = new SurfaceTexture(1);\n Surface dummySurface = new Surface(previewTexture);\n outputSurfaces.add(dummySurface);\n\n camera.createCaptureSession(outputSurfaces, new CameraCaptureSession.StateCallback() {\n @Override\n public void onConfigured(final CameraCaptureSession session) {\n try {\n // create preview Request\n CaptureRequest.Builder previewReq = camera.createCaptureRequest(CameraDevice.TEMPLATE_PREVIEW);\n previewReq.addTarget(dummySurface);\n previewReq.set(CaptureRequest.CONTROL_AF_MODE, CameraMetadata.CONTROL_AF_MODE_CONTINUOUS_PICTURE);\n previewReq.set(CaptureRequest.CONTROL_AE_MODE, autoExposureModeFinal);\n\n // continous preview-capture for 1/2 second\n session.setRepeatingRequest(previewReq.build(), null, null);\n TermuxApiLogger.info(\"preview started\");\n Thread.sleep(500);\n session.stopRepeating();\n TermuxApiLogger.info(\"preview stoppend\");\n previewTexture.release();\n dummySurface.release();\n\n final CaptureRequest.Builder jpegRequest = camera.createCaptureRequest(CameraDevice.TEMPLATE_STILL_CAPTURE);\n // Render to our image reader:\n jpegRequest.addTarget(imageReaderSurface);\n // Configure auto-focus (AF) and auto-exposure (AE) modes:\n jpegRequest.set(CaptureRequest.CONTROL_AF_MODE, CameraMetadata.CONTROL_AF_MODE_CONTINUOUS_PICTURE);\n jpegRequest.set(CaptureRequest.CONTROL_AE_MODE, autoExposureModeFinal);\n jpegRequest.set(CaptureRequest.JPEG_ORIENTATION, correctOrientation(context, characteristics));\n\n saveImage(camera, session, jpegRequest.build());\n } catch (Exception e) {\n TermuxApiLogger.error(\"onConfigured() error in preview\", e);\n closeCamera(camera, looper);\n }\n }\n\n @Override\n public void onConfigureFailed(CameraCaptureSession session) {\n TermuxApiLogger.error(\"onConfigureFailed() error in preview\");\n closeCamera(camera, looper);\n }\n }, null);\n }",
"public void prepareCamera() {\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n\n autoFocusHandler = new Handler();\n mCamera = getCameraInstance();\n\n /* Instance barcode scanner */\n scanner = new ImageScanner();\n scanner.setConfig(0, Config.X_DENSITY, 3);\n scanner.setConfig(0, Config.Y_DENSITY, 3);\n\n mPreview = new CameraPreview(this, mCamera, previewCb, autoFocusCB);\n\n cameraPreview.addView(mPreview);\n\n }",
"@Override\n public void capture() {\n captureScreen();\n }",
"public synchronized void requestPreviewFrame(Camera.PreviewCallback cb) {\n OpenCamera theCamera = camera;\n if (theCamera != null && previewing) {\n theCamera.getCamera().setOneShotPreviewCallback(cb);\n }\n }",
"@Override\n public void onConfigured(@NonNull CameraCaptureSession cameraCaptureSession) {\n Log.d(TAG, \"Camera capture session configured\");\n mCameraCaptureSession = cameraCaptureSession;\n\n try {\n CaptureRequest.Builder captureRequestBuilder = mCameraCaptureSession.getDevice()\n .createCaptureRequest(CameraDevice.TEMPLATE_STILL_CAPTURE);\n captureRequestBuilder.set(CaptureRequest.CONTROL_AE_MODE, CaptureRequest.CONTROL_AE_MODE_ON);\n captureRequestBuilder.addTarget(mCaptureSurface);\n mCaptureRequest = captureRequestBuilder.build();\n mCameraCaptureSession.capture(mCaptureRequest, null, null);\n } catch (CameraAccessException cae) {\n throw new RuntimeException(\"Error encountered creating camera capture request\", cae);\n }\n setDisplayInt(mSmileCount);\n }",
"public void creatScreenCaptureIntent(Activity activity, int requestCode) {\n activity.startActivityForResult(mMediaProjectionManager.createScreenCaptureIntent(), requestCode);\n }",
"public void takePictureInternal() {\n if (!this.isPictureCaptureInProgress.getAndSet(true)) {\n this.mCamera.takePicture(null, null, null, new Camera.PictureCallback() {\n /* class com.master.cameralibrary.Camera1.AnonymousClass3 */\n\n public void onPictureTaken(byte[] bArr, Camera camera) {\n Camera1.this.isPictureCaptureInProgress.set(false);\n Camera1.this.mCallback.onPictureTaken(bArr);\n camera.cancelAutoFocus();\n camera.startPreview();\n }\n });\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == ACTIVITY_START_CAMERA_APP && resultCode == RESULT_OK){\n /*//Todo: Mensaje para mostrar al usuario al capturar la fotografia\n// Toast.makeText(this,\"Picture taken successfully\",Toast.LENGTH_LONG).show();\n\n //Todo: Se crea el objeto Bundle con el nombre extras\n Bundle extras = data.getExtras();\n //Todo: Devuelve el bundle que contenga el intent\n Bitmap photoCaptureBitmap = (Bitmap) extras.get(\"data\");\n //Todo: Se asigna a mPhotoCapturedImageView el valor que contenga el Bitmap photoCaptureBitmap\n mPhotoCapturedImageView.setImageBitmap(photoCaptureBitmap);\n*/\n //Bitmap photoCaptureBitmap = BitmapFactory.decodeFile(mImageFileLocation);\n //mPhotoCapturedImageView.setImageBitmap(photoCaptureBitmap);\n rotateImage(setReduceImageSize());\n }\n }",
"private void captureStillPicture() {\n try {\n final Activity activity = getActivity();\n if (null == activity || null == mCameraDevice) {\n return;\n }\n // This is the CaptureRequest.Builder that we use to take a picture.\n final CaptureRequest.Builder captureBuilder =\n mCameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_STILL_CAPTURE);\n captureBuilder.addTarget(mImageReader.getSurface());\n\n // Use the same AE and AF modes as the preview.\n captureBuilder.set(CaptureRequest.CONTROL_AF_MODE,\n CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE);\n setAutoFlash(captureBuilder);\n\n // Orientation\n int rotation = activity.getWindowManager().getDefaultDisplay().getRotation();\n captureBuilder.set(CaptureRequest.JPEG_ORIENTATION, getOrientation(rotation));\n\n CameraCaptureSession.CaptureCallback CaptureCallback\n = new CameraCaptureSession.CaptureCallback() {\n\n @Override\n public void onCaptureCompleted(@NonNull CameraCaptureSession session,\n @NonNull CaptureRequest request,\n @NonNull TotalCaptureResult result) {\n Log.e(TAG, \"Saved:\" + mFile);\n Log.d(TAG, mFile.toString());\n unlockFocus();\n }\n };\n\n mCaptureSession.stopRepeating();\n mCaptureSession.abortCaptures();\n mCaptureSession.capture(captureBuilder.build(), CaptureCallback, null);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }",
"private void startCameraSource() {\n\n if (cameraSource != null) {\n try {\n cameraPreview.start(cameraSource, graphicOverlay);\n } catch (IOException e) {\n Log.e(TAG, \"Unable to start camera source.\", e);\n cameraSource.release();\n cameraSource = null;\n }\n }\n\n }",
"public void StartVECapture() {\n Log.v(TAG, \"StartVECapture\");\n\n startVECapture();\n enableUpdateDynamicTex(true);\n\n }",
"public void onResume() {\n if (mCamera == null) {\n obtainCameraOrFinish();\n }\n }",
"void startCamera() throws IOException {\n if (ContextCompat.checkSelfPermission(this, WRITE_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED ||\n ContextCompat.checkSelfPermission(this, CAMERA) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this,\n new String[]{WRITE_EXTERNAL_STORAGE, CAMERA},\n WRITE_EXTERNAL_STORAGE_REQUEST);\n return;\n }\n dispatchTakePictureIntent();\n\n }",
"@Override\n public void onConfigured(CameraCaptureSession session) {\n mPreviewSession = session;\n updatePreview();\n }",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tif (requestCode == camera.IMAGE_CAPTURE) {\n\n\t\t\tif (resultCode == RESULT_OK){\n\t\t\t\tCommon.PATH=BitmapUtils.getAbsoluteImagePath(Preview.this, camera.getImageUri());\n\t\t\t\tIntent intent = new Intent(Preview.this,Preview.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\n\t\t\t}\n\t\n\t}",
"public void onLaunchCamera() {\n takePic.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // create Intent to take a picture and return control to the calling application\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n // Create a File reference to access to future access\n photoFile = getPhotoFileUri(photoFileName);\n\n // wrap File object into a content provider\n // required for API >= 24\n // See https://guides.codepath.com/android/Sharing-Content-with-Intents#sharing-files-with-api-24-or-higher\n Uri fileProvider = FileProvider.getUriForFile(Driver_License_Scan.this, \"com.codepath.fileprovider\", photoFile);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileProvider);\n\n // If you call startActivityForResult() using an intent that no app can handle, your app will crash.\n // So as long as the result is not null, it's safe to use the intent.\n if (intent.resolveActivity(getPackageManager()) != null) {\n // Start the image capture intent to take photo\n startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);\n }\n }\n });\n }",
"public void updateCam()\r\n {\n \ttry{\r\n \tSystem.out.println();\r\n \tNIVision.IMAQdxGrab(curCam, frame, 1);\r\n \tif(curCam == camCenter){\r\n \t\tNIVision.imaqDrawLineOnImage(frame, frame, NIVision.DrawMode.DRAW_VALUE, new Point(320, 0), new Point(320, 480), 120);\r\n \t}\r\n server.setImage(frame);}\n \tcatch(Exception e){}\r\n }",
"@Override\n public void capture() {\n }",
"private void openCamera() {\n CameraManager manager = (CameraManager) getSystemService(Context.CAMERA_SERVICE);\n try {\n String mCameraId = manager.getCameraIdList()[0];\n CameraCharacteristics characteristics = manager.getCameraCharacteristics(mCameraId);\n StreamConfigurationMap map = characteristics.\n get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);\n assert map != null;\n mImageDimension = map.getOutputSizes(SurfaceTexture.class)[0];\n // Add permission for camera and let user grant the permission\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA) !=\n PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(this,\n Manifest.permission.WRITE_EXTERNAL_STORAGE) !=\n PackageManager.PERMISSION_GRANTED) {\n\n ActivityCompat.requestPermissions(CameraActivity.this, new\n String[]{Manifest.permission.CAMERA,\n Manifest.permission.WRITE_EXTERNAL_STORAGE},\n REQUEST_CAMERA_PERMISSION);\n }\n manager.openCamera(mCameraId, mStateCallback, null);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }",
"protected void startPreview() {\n if (null == mCameraDevice || !mTextureView.isAvailable()) {\n return;\n }\n try {\n //\n // Media Recorder\n //\n setUpMediaRecorder();\n\n //\n // Preview Builder - Video Recording\n //\n mPreviewBuilder = mCameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_RECORD);\n\n //\n // Surfaces: Preview and Record\n //\n List<Surface> surfaces = new ArrayList<>();\n\n //\n // Preview Surface\n //\n SurfaceTexture texture = mTextureView.getSurfaceTexture();\n texture.setDefaultBufferSize(screenWidth, screenHeight);\n Surface previewSurface = new Surface(texture);\n surfaces.add(previewSurface);\n mPreviewBuilder.addTarget(previewSurface);\n\n\n //\n // Record Surface\n //\n Surface recorderSurface = mMediaRecorder.getSurface();\n surfaces.add(recorderSurface);\n mPreviewBuilder.addTarget(recorderSurface);\n\n //\n // Setup Capture Session\n //\n mCameraDevice.createCaptureSession(surfaces, new CameraCaptureSession.StateCallback() {\n\n @Override\n public void onConfigured(CameraCaptureSession cameraCaptureSession) {\n Log.e(TAG, \"onConfigured(CameraCaptureSession cameraCaptureSession) ...\");\n mPreviewSession = cameraCaptureSession;\n updatePreview();\n }\n\n @Override\n public void onSurfacePrepared(CameraCaptureSession session, Surface surface) {\n Log.e(TAG, \"onSurfacePrepared(CameraCaptureSession session, Surface surface) ...\");\n //previewView = (LinearLayout) findViewById(R.id.camera_preview);\n //previewView.addView(mVideoCapture.mTextureView);\n }\n\n @Override\n public void onConfigureFailed(CameraCaptureSession cameraCaptureSession) {\n Log.e(TAG, \"onConfigureFailed(CameraCaptureSession cameraCaptureSession) ...\");\n Toast.makeText(mCameraActivity, \"failed to configure video camera\", Toast.LENGTH_SHORT).show();\n onBackPressed();\n }\n }, mBackgroundHandler);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void capture()\r\n\t{ \r\n\t VideoCapture camera = new VideoCapture();\r\n\t \r\n\t camera.set(12, -20); // change contrast, might not be necessary\r\n\t \r\n\t //CaptureImage image = new CaptureImage();\r\n\t \r\n\t \r\n\t \r\n\t camera.open(0); //Useless\r\n\t if(!camera.isOpened())\r\n\t {\r\n\t System.out.println(\"Camera Error\");\r\n\t \r\n\t // Determine whether to use System.exit(0) or return\r\n\t \r\n\t }\r\n\t else\r\n\t {\r\n\t System.out.println(\"Camera OK\");\r\n\t }\r\n\t\t\r\n\t\t \r\n\t\tboolean success = camera.read(capturedFrame);\r\n\t\tif (success)\r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\t\tprocessWithContours(capturedFrame, processedFrame);\r\n\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\tSystem.out.println(e);\r\n\t\t\t}\r\n\t\t //image.processFrame(capturedFrame, processedFrame);\r\n\t\t // processedFrame should be CV_8UC3\r\n\t\t \r\n\t\t //image.findCaptured(processedFrame);\r\n\t\t \r\n\t\t //image.determineKings(capturedFrame);\r\n\t\t \r\n\t\t int bufferSize = processedFrame.channels() * processedFrame.cols() * processedFrame.rows();\r\n\t\t byte[] b = new byte[bufferSize];\r\n\t\t \r\n\t\t processedFrame.get(0,0,b); // get all the pixels\r\n\t\t // This might need to be BufferedImage.TYPE_INT_ARGB\r\n\t\t img = new BufferedImage(processedFrame.cols(), processedFrame.rows(), BufferedImage.TYPE_INT_RGB);\r\n\t\t int width = (int)camera.get(Highgui.CV_CAP_PROP_FRAME_WIDTH);\r\n\t\t int height = (int)camera.get(Highgui.CV_CAP_PROP_FRAME_HEIGHT);\r\n\t\t //img.getRaster().setDataElements(0, 0, width, height, b);\r\n\t\t byte[] a = new byte[bufferSize];\r\n\t\t System.arraycopy(b, 0, a, 0, bufferSize);\r\n\r\n\t\t Highgui.imwrite(\"camera.jpg\",processedFrame);\r\n\t\t System.out.println(\"Success\");\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Unable to capture image\");\r\n\t\t\r\n\t camera.release();\r\n\t}",
"private void startCameraSource() {\n if (cameraSource != null) {\n try {\n if (preview == null) {\n //Log.d(TAG, \"resume: Preview is null\");\n }\n if (graphicOverlay == null) {\n //Log.d(TAG, \"resume: graphOverlay is null\");\n }\n preview.start(cameraSource, graphicOverlay);\n } catch (IOException e) {\n Log.e(TAG, \"Unable to start camera source.\", e);\n cameraSource.release();\n cameraSource = null;\n }\n }\n }",
"private void openCamera() {\n CameraManager manager = (CameraManager) getSystemService(Context.CAMERA_SERVICE);\n try {\n String cameraId = manager.getCameraIdList()[0];\n CameraCharacteristics characteristics = manager.getCameraCharacteristics(cameraId);\n StreamConfigurationMap map = characteristics.get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);\n assert map != null;\n imageDimension = map.getOutputSizes(SurfaceTexture.class)[0];\n // Add permission for camera and let user grant the permission\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(MainActivity.this, new String[]{Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE}, REQUEST_CAMERA_PERMISSION);\n return;\n }\n manager.openCamera(cameraId, stateCallback, null);\n } catch (CameraAccessException e) {\n Toast.makeText(this, \"Camera failed to open.\", Toast.LENGTH_SHORT).show();\n e.printStackTrace();\n }\n }",
"@Override\n public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {\n /*apply image effects to new frame*/\n Mat mat= hangman.decapitate(inputFrame);\n\n /*check if users clicked the capture button and if external storage is writable for save it*/\n if(isToSaveBitmap && isExternalStorageWritable()){\n isToSaveBitmap=false;\n Bitmap bmp;\n try {\n bmp = Bitmap.createBitmap(mat.cols(), mat.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(mat, bmp);\n File dir = getAlbumStorageDir(\"hangman\");\n String path =dir.getPath()+File.separator+ \"hangman\" +System.currentTimeMillis() + \".JPG\";\n File capture= new File(path);\n\n OutputStream out = null;\n try {\n capture.createNewFile();\n out = new FileOutputStream(capture);\n bmp.compress(Bitmap.CompressFormat.JPEG, 90, out);\n out.flush();\n\n /*Inform the media store that a new image was saved*/\n ContentValues values = new ContentValues();\n values.put(MediaStore.Images.Media.DATE_TAKEN, System.currentTimeMillis());\n values.put(MediaStore.Images.Media.MIME_TYPE, \"image/jpeg\");\n values.put(MediaStore.MediaColumns.DATA, path);\n getBaseContext().getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);\n\n /*if app was called with intent image capture */\n if(intentImageCapture){\n Intent result = new Intent(\"com.example.RESULT_ACTION\");\n result.setData(Uri.fromFile(capture));\n result.putExtra(Intent.EXTRA_STREAM,capture);\n result.setType(\"image/jpg\");\n setResult(Activity.RESULT_OK, result);\n finish();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n finally {\n try {\n out.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n catch (CvException e) {\n Log.e(\"Exception\", e.getMessage());\n e.printStackTrace();\n }\n }\n return mat;\n }",
"@Override\r\n\tpublic void surfaceCreated(SurfaceHolder holder) {\n\t\tinitialCamera();\r\n\t}",
"private void startPreview() {\n if (null == mCameraDevice || !mVideoPreview.isAvailable() || null == mPreviewSize) {\n return;\n }\n try {\n closePreviewSession();\n SurfaceTexture texture = mVideoPreview.getSurfaceTexture();\n assert texture != null;\n texture.setDefaultBufferSize(mPreviewSize.getWidth(), mPreviewSize.getHeight());\n mPreviewBuilder = mCameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_PREVIEW);\n\n Surface previewSurface = new Surface(texture);\n mPreviewBuilder.addTarget(previewSurface);\n\n mCameraDevice.createCaptureSession(Arrays.asList(previewSurface), new CameraCaptureSession.StateCallback() {\n\n @Override\n public void onConfigured(CameraCaptureSession cameraCaptureSession) {\n mPreviewSession = cameraCaptureSession;\n updatePreview();\n }\n\n @Override\n public void onConfigureFailed(CameraCaptureSession cameraCaptureSession) {\n if (mVideoRecordListener != null) {\n mVideoRecordListener.onRecordingFailed(\"Capture session for previewing video failed.\");\n }\n }\n }, mBackgroundHandler);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }",
"public void camera(){\n System.out.println(\"I am taking pictures...\");\r\n }"
]
| [
"0.6867482",
"0.6549926",
"0.6458974",
"0.6384348",
"0.6364292",
"0.6359439",
"0.6327145",
"0.6302173",
"0.62926227",
"0.6273739",
"0.6221646",
"0.6213252",
"0.6206892",
"0.6194842",
"0.6191682",
"0.61857516",
"0.6161172",
"0.6112026",
"0.6105692",
"0.6105692",
"0.6103835",
"0.6103835",
"0.60762775",
"0.6076215",
"0.6065498",
"0.6027758",
"0.6025028",
"0.60201174",
"0.5998412",
"0.59951323",
"0.59842885",
"0.598155",
"0.5963217",
"0.592942",
"0.5926439",
"0.59005666",
"0.58995485",
"0.58888006",
"0.58775204",
"0.58775204",
"0.58775204",
"0.58775204",
"0.5866967",
"0.5855504",
"0.58459526",
"0.58455807",
"0.5845378",
"0.58387697",
"0.58284205",
"0.5827636",
"0.5827168",
"0.58217263",
"0.58046323",
"0.58045715",
"0.58029956",
"0.5802487",
"0.5802319",
"0.57930386",
"0.5784173",
"0.57775044",
"0.5772639",
"0.5765839",
"0.57655334",
"0.5764861",
"0.57548386",
"0.5753312",
"0.5753312",
"0.5737153",
"0.57349455",
"0.5728141",
"0.57238454",
"0.57181114",
"0.57044476",
"0.5703123",
"0.5697973",
"0.56941164",
"0.5686583",
"0.56833905",
"0.5654064",
"0.5651825",
"0.5648319",
"0.56432897",
"0.56277764",
"0.5621464",
"0.5616224",
"0.56125474",
"0.56120294",
"0.56108624",
"0.5598939",
"0.5593171",
"0.5590651",
"0.55846834",
"0.5580775",
"0.55694413",
"0.55632746",
"0.55627686",
"0.5548436",
"0.5545319",
"0.553446",
"0.55308026"
]
| 0.6399144 | 3 |
This method is called when an image capture has fully completed and all the result metadata is available. | void onCaptureCompleted(CaptureRequest request, TotalCaptureResult result); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void takePhotoCompleted() {\n if (MyDebug.LOG)\n Log.d(TAG, \"takePhotoCompleted\");\n // need to set jpeg_todo to false before calling onCompleted, as that may reenter CameraController to take another photo (if in auto-repeat burst mode) - see testTakePhotoRepeat()\n synchronized (background_camera_lock) {\n jpeg_todo = false;\n }\n checkImagesCompleted();\n }",
"void onPictureCompleted();",
"@Override\n\t\tprotected void onPostExecute(Void result) {\n\t\t\tToast.makeText(context, \"Capture completed!\", Toast.LENGTH_SHORT).show();\n\t\t\tloadingAlert.dismiss();\n\t\t\t((SpectroActivity)spectroFragment.getActivity()).updateLibraryFiles();\n\t\t}",
"private void captureImage() {\n camera.takePicture(null, null, jpegCallback);\r\n }",
"void onCaptureEnd();",
"void imFinished();",
"public void onPostExecute(ResizeBundle result) {\n JpegPictureCallback.this.saveFinalPhoto(result.jpegData, name, result.exif, cameraProxy);\n }",
"private void onImageProcessed() {\n /* creating random bitmap and then using in TextureView.getBitmap(bitmap) instead of simple TextureView.getBitmap() will not cause lags & memory leaks */\n if (captureBitmap == null) {\n captureBitmap = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888);\n }\n captureBitmap = Bitmap.createScaledBitmap(targetView.getBitmap(captureBitmap), captureW, captureH, false);\n\n if (captureProcessor != null) {\n if (isThreadingEnabled) {\n cameraThreadHandler.Queue(captureBitmap);\n }\n else {\n captureProcessor.process(captureBitmap, targetView, parentActivity);\n }\n /*\n else if (!skipNextFrame){\n long time = System.currentTimeMillis();\n captureProcessor.process(captureBitmap, targetView, parentActivity);\n time = System.currentTimeMillis() - time;\n if (time > 0.035)\n skipNextFrame = true;\n }\n else {\n skipNextFrame = false;\n }*/\n }\n }",
"private void handleRawCaptureResult(CaptureResult result) {\n if (test_wait_capture_result) {\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n\n if (onRawImageAvailableListener != null) {\n onRawImageAvailableListener.setCaptureResult(result);\n }\n }",
"public void onPostExecute(ResizeBundle result) {\n LongshotPictureCallback.this.saveFinalPhoto(result.jpegData, LongshotPictureCallback.this.mName, result.exif, camera, externalBundle);\n }",
"private void handleCaptureCompleted(CaptureResult result) {\n if (MyDebug.LOG)\n Log.d(TAG, \"capture request completed\");\n test_capture_results++;\n modified_from_camera_settings = false;\n\n handleRawCaptureResult(result);\n\n if (previewBuilder != null) {\n previewBuilder.set(CaptureRequest.CONTROL_AF_TRIGGER, CameraMetadata.CONTROL_AF_TRIGGER_CANCEL);\n String saved_flash_value = camera_settings.flash_value;\n if (use_fake_precapture_mode && fake_precapture_torch_performed) {\n camera_settings.flash_value = \"flash_off\";\n }\n // if not using fake precapture, not sure if we need to set the ae mode, but the AE mode is set again in Camera2Basic\n camera_settings.setAEMode(previewBuilder, false);\n // n.b., if capture/setRepeatingRequest throw exception, we don't call the take_picture_error_cb.onError() callback, as the photo should have been taken by this point\n try {\n capture();\n } catch (CameraAccessException e) {\n if (MyDebug.LOG) {\n Log.e(TAG, \"failed to cancel autofocus after taking photo\");\n Log.e(TAG, \"reason: \" + e.getReason());\n Log.e(TAG, \"message: \" + e.getMessage());\n }\n e.printStackTrace();\n }\n if (use_fake_precapture_mode && fake_precapture_torch_performed) {\n // now set up the request to switch to the correct flash value\n camera_settings.flash_value = saved_flash_value;\n camera_settings.setAEMode(previewBuilder, false);\n }\n previewBuilder.set(CaptureRequest.CONTROL_AF_TRIGGER, CameraMetadata.CONTROL_AF_TRIGGER_IDLE); // ensure set back to idle\n try {\n setRepeatingRequest();\n } catch (CameraAccessException e) {\n if (MyDebug.LOG) {\n Log.e(TAG, \"failed to start preview after taking photo\");\n Log.e(TAG, \"reason: \" + e.getReason());\n Log.e(TAG, \"message: \" + e.getMessage());\n }\n e.printStackTrace();\n preview_error_cb.onError();\n }\n }\n fake_precapture_torch_performed = false;\n\n if (burst_type == BurstType.BURSTTYPE_FOCUS && previewBuilder != null) { // make sure camera wasn't released in the meantime\n if (MyDebug.LOG)\n Log.d(TAG, \"focus bracketing complete, reset manual focus\");\n camera_settings.setFocusDistance(previewBuilder);\n try {\n setRepeatingRequest();\n } catch (CameraAccessException e) {\n if (MyDebug.LOG) {\n Log.e(TAG, \"failed to set focus distance\");\n Log.e(TAG, \"reason: \" + e.getReason());\n Log.e(TAG, \"message: \" + e.getMessage());\n }\n e.printStackTrace();\n }\n }\n final Activity activity = (Activity) context;\n activity.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (MyDebug.LOG)\n Log.d(TAG, \"processCompleted UI thread call checkImagesCompleted()\");\n synchronized (background_camera_lock) {\n done_all_captures = true;\n if (MyDebug.LOG)\n Log.d(TAG, \"done all captures\");\n }\n checkImagesCompleted();\n }\n });\n }",
"@Override\n public void imageComplete() throws IOException {\n\tif (done) throw new IOException(errorMsg(\"imageComplete\"));\n\tdone = true;\n\tsynchronized(recorder) {\n\t continueWriting = true;\n\t recorder.notify();\n\t}\n\tsynchronized(this) {\n\t try {\n\t\twhile (writingDone == false) {\n\t\t wait();\n\t\t}\n\t } catch(InterruptedException ie) {\n\t\twriteException = ie;\n\t } catch (IllegalMonitorStateException ime) {\n\t\twriteException = ime;\n\t }\n\t if (writeException != null) {\n\t\tString msg = errorMsg(\"cannotCreateFST\", getType());\n\t\tthrow new\n\t\t IOException(msg, writeException);\n\t }\n\t}\n }",
"private void takePicture() {\n\n captureStillPicture();\n }",
"public void takePictureInternal() {\n if (!this.isPictureCaptureInProgress.getAndSet(true)) {\n this.mCamera.takePicture(null, null, null, new Camera.PictureCallback() {\n /* class com.master.cameralibrary.Camera1.AnonymousClass3 */\n\n public void onPictureTaken(byte[] bArr, Camera camera) {\n Camera1.this.isPictureCaptureInProgress.set(false);\n Camera1.this.mCallback.onPictureTaken(bArr);\n camera.cancelAutoFocus();\n camera.startPreview();\n }\n });\n }\n }",
"private void onSuccessImageTransfer()\n {\n Log.d(TAG, \"onSuccessImageTransfer: finished.\");\n this.fragmentActivity.runOnUiThread(() -> Toast.makeText(this.fragmentActivity,\n \"Image transfer succeeded\", Toast.LENGTH_SHORT).show());\n\n switchToPickLayout();\n }",
"private void captureImage() {\n //Information about intents: http://developer.android.com/reference/android/content/Intent.html\n //Basically used to start up activities or send data between parts of a program\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n //Obtains the unique URI which sets up and prepares the image file to be taken, where it is to be placed,\n //and errors that may occur when taking the image.\n fileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE);\n //Stores this information in the Intent (which can be usefully passed on to the following Activity)\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);\n // start the image capture Intent (opens up the camera application)\n startActivityForResult(intent, CAMERA_CAPTURE_IMAGE_REQUEST_CODE);\n }",
"@Override\n public void completed(Integer result, String attachment)\n {\n }",
"@Override\n\t\tpublic void onCompleted() {\n\t\t}",
"@Override\n public void capture() {\n }",
"public void finishCapturing() {\n //YOUR CODE HERE\n\t pieceCaptured = false;\n\t \n }",
"@Override\n\tpublic void videoComplete() {\n\t\t\n\t}",
"public void onImageAvailable(android.media.ImageReader r15) {\n /*\n r14 = this;\n com.android.camera.imageprocessor.FrameProcessor r0 = com.android.camera.imageprocessor.FrameProcessor.this\n java.lang.Object r0 = r0.mAllocationLock\n monitor-enter(r0)\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ all -> 0x0172 }\n android.renderscript.Allocation r1 = r1.mOutputAllocation // Catch:{ all -> 0x0172 }\n if (r1 != 0) goto L_0x0011\n monitor-exit(r0) // Catch:{ all -> 0x0172 }\n return\n L_0x0011:\n android.media.Image r15 = r15.acquireLatestImage() // Catch:{ IllegalStateException -> 0x0170 }\n if (r15 != 0) goto L_0x0019\n monitor-exit(r0) // Catch:{ all -> 0x0172 }\n return\n L_0x0019:\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n boolean r1 = r1.mIsActive // Catch:{ IllegalStateException -> 0x0170 }\n if (r1 != 0) goto L_0x0026\n r15.close() // Catch:{ IllegalStateException -> 0x0170 }\n monitor-exit(r0) // Catch:{ all -> 0x0172 }\n return\n L_0x0026:\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n r2 = 1\n r1.mIsAllocationEverUsed = r2 // Catch:{ IllegalStateException -> 0x0170 }\n android.media.Image$Plane[] r1 = r15.getPlanes() // Catch:{ IllegalStateException -> 0x0170 }\n r3 = 0\n r1 = r1[r3] // Catch:{ IllegalStateException -> 0x0170 }\n java.nio.ByteBuffer r1 = r1.getBuffer() // Catch:{ IllegalStateException -> 0x0170 }\n android.media.Image$Plane[] r4 = r15.getPlanes() // Catch:{ IllegalStateException -> 0x0170 }\n r5 = 2\n r4 = r4[r5] // Catch:{ IllegalStateException -> 0x0170 }\n java.nio.ByteBuffer r11 = r4.getBuffer() // Catch:{ IllegalStateException -> 0x0170 }\n byte[] r4 = r14.yvuBytes // Catch:{ IllegalStateException -> 0x0170 }\n if (r4 == 0) goto L_0x0062\n int r4 = r14.width // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r6 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.util.Size r6 = r6.mSize // Catch:{ IllegalStateException -> 0x0170 }\n int r6 = r6.getWidth() // Catch:{ IllegalStateException -> 0x0170 }\n if (r4 != r6) goto L_0x0062\n int r4 = r14.height // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r6 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.util.Size r6 = r6.mSize // Catch:{ IllegalStateException -> 0x0170 }\n int r6 = r6.getHeight() // Catch:{ IllegalStateException -> 0x0170 }\n if (r4 == r6) goto L_0x009e\n L_0x0062:\n android.media.Image$Plane[] r4 = r15.getPlanes() // Catch:{ IllegalStateException -> 0x0170 }\n r4 = r4[r3] // Catch:{ IllegalStateException -> 0x0170 }\n int r4 = r4.getRowStride() // Catch:{ IllegalStateException -> 0x0170 }\n r14.stride = r4 // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r4 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.util.Size r4 = r4.mSize // Catch:{ IllegalStateException -> 0x0170 }\n int r4 = r4.getWidth() // Catch:{ IllegalStateException -> 0x0170 }\n r14.width = r4 // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r4 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.util.Size r4 = r4.mSize // Catch:{ IllegalStateException -> 0x0170 }\n int r4 = r4.getHeight() // Catch:{ IllegalStateException -> 0x0170 }\n r14.height = r4 // Catch:{ IllegalStateException -> 0x0170 }\n int r4 = r14.stride // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r6 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.util.Size r6 = r6.mSize // Catch:{ IllegalStateException -> 0x0170 }\n int r6 = r6.getHeight() // Catch:{ IllegalStateException -> 0x0170 }\n int r4 = r4 * r6\n r14.ySize = r4 // Catch:{ IllegalStateException -> 0x0170 }\n int r4 = r14.ySize // Catch:{ IllegalStateException -> 0x0170 }\n int r4 = r4 * 3\n int r4 = r4 / r5\n byte[] r4 = new byte[r4] // Catch:{ IllegalStateException -> 0x0170 }\n r14.yvuBytes = r4 // Catch:{ IllegalStateException -> 0x0170 }\n L_0x009e:\n com.android.camera.imageprocessor.FrameProcessor r4 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n java.util.ArrayList r4 = r4.mPreviewFilters // Catch:{ IllegalStateException -> 0x0170 }\n java.util.Iterator r12 = r4.iterator() // Catch:{ IllegalStateException -> 0x0170 }\n r13 = r3\n L_0x00a9:\n boolean r4 = r12.hasNext() // Catch:{ IllegalStateException -> 0x0170 }\n if (r4 == 0) goto L_0x0128\n java.lang.Object r4 = r12.next() // Catch:{ IllegalStateException -> 0x0170 }\n r5 = r4\n com.android.camera.imageprocessor.filter.ImageFilter r5 = (com.android.camera.imageprocessor.filter.ImageFilter) r5 // Catch:{ IllegalStateException -> 0x0170 }\n boolean r4 = r5.isFrameListener() // Catch:{ IllegalStateException -> 0x0170 }\n if (r4 == 0) goto L_0x00f0\n com.android.camera.imageprocessor.FrameProcessor r4 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor$ListeningTask r4 = r4.mListeningTask // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r6 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.util.Size r6 = r6.mSize // Catch:{ IllegalStateException -> 0x0170 }\n int r8 = r6.getWidth() // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r6 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.util.Size r6 = r6.mSize // Catch:{ IllegalStateException -> 0x0170 }\n int r9 = r6.getHeight() // Catch:{ IllegalStateException -> 0x0170 }\n int r10 = r14.stride // Catch:{ IllegalStateException -> 0x0170 }\n r6 = r1\n r7 = r11\n boolean r4 = r4.setParam(r5, r6, r7, r8, r9, r10) // Catch:{ IllegalStateException -> 0x0170 }\n if (r4 == 0) goto L_0x0121\n com.android.camera.imageprocessor.FrameProcessor r4 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.os.Handler r4 = r4.mListeningHandler // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r5 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor$ListeningTask r5 = r5.mListeningTask // Catch:{ IllegalStateException -> 0x0170 }\n r4.post(r5) // Catch:{ IllegalStateException -> 0x0170 }\n goto L_0x0121\n L_0x00f0:\n com.android.camera.imageprocessor.FrameProcessor r4 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.util.Size r4 = r4.mSize // Catch:{ IllegalStateException -> 0x0170 }\n int r4 = r4.getWidth() // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r6 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.util.Size r6 = r6.mSize // Catch:{ IllegalStateException -> 0x0170 }\n int r6 = r6.getHeight() // Catch:{ IllegalStateException -> 0x0170 }\n int r7 = r14.stride // Catch:{ IllegalStateException -> 0x0170 }\n int r8 = r14.stride // Catch:{ IllegalStateException -> 0x0170 }\n r5.init(r4, r6, r7, r8) // Catch:{ IllegalStateException -> 0x0170 }\n boolean r4 = r5 instanceof com.android.camera.imageprocessor.filter.BeautificationFilter // Catch:{ IllegalStateException -> 0x0170 }\n if (r4 == 0) goto L_0x0118\n java.lang.Boolean r4 = new java.lang.Boolean // Catch:{ IllegalStateException -> 0x0170 }\n r4.<init>(r3) // Catch:{ IllegalStateException -> 0x0170 }\n r5.addImage(r1, r11, r3, r4) // Catch:{ IllegalStateException -> 0x0170 }\n goto L_0x0120\n L_0x0118:\n java.lang.Boolean r4 = new java.lang.Boolean // Catch:{ IllegalStateException -> 0x0170 }\n r4.<init>(r2) // Catch:{ IllegalStateException -> 0x0170 }\n r5.addImage(r1, r11, r3, r4) // Catch:{ IllegalStateException -> 0x0170 }\n L_0x0120:\n r13 = r2\n L_0x0121:\n r1.rewind() // Catch:{ IllegalStateException -> 0x0170 }\n r11.rewind() // Catch:{ IllegalStateException -> 0x0170 }\n goto L_0x00a9\n L_0x0128:\n com.android.camera.imageprocessor.FrameProcessor r2 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n boolean r2 = r2.mIsFirstIn // Catch:{ IllegalStateException -> 0x0170 }\n if (r2 == 0) goto L_0x014e\n com.android.camera.imageprocessor.FrameProcessor r2 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n boolean r2 = r2.mIsVideoOn // Catch:{ IllegalStateException -> 0x0170 }\n if (r2 == 0) goto L_0x014e\n com.android.camera.imageprocessor.FrameProcessor r2 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n boolean r2 = r2.isFrameListnerEnabled() // Catch:{ IllegalStateException -> 0x0170 }\n if (r2 == 0) goto L_0x014e\n com.android.camera.imageprocessor.FrameProcessor r2 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n r2.mIsFirstIn = r3 // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r2 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.CaptureModule r2 = r2.mModule // Catch:{ IllegalStateException -> 0x0170 }\n r2.startMediaRecording() // Catch:{ IllegalStateException -> 0x0170 }\n L_0x014e:\n if (r13 == 0) goto L_0x016d\n byte[] r2 = r14.yvuBytes // Catch:{ IllegalStateException -> 0x0170 }\n int r4 = r1.remaining() // Catch:{ IllegalStateException -> 0x0170 }\n r1.get(r2, r3, r4) // Catch:{ IllegalStateException -> 0x0170 }\n byte[] r1 = r14.yvuBytes // Catch:{ IllegalStateException -> 0x0170 }\n int r2 = r14.ySize // Catch:{ IllegalStateException -> 0x0170 }\n int r3 = r11.remaining() // Catch:{ IllegalStateException -> 0x0170 }\n r11.get(r1, r2, r3) // Catch:{ IllegalStateException -> 0x0170 }\n com.android.camera.imageprocessor.FrameProcessor r1 = com.android.camera.imageprocessor.FrameProcessor.this // Catch:{ IllegalStateException -> 0x0170 }\n android.os.Handler r1 = r1.mOutingHandler // Catch:{ IllegalStateException -> 0x0170 }\n r1.post(r14) // Catch:{ IllegalStateException -> 0x0170 }\n L_0x016d:\n r15.close() // Catch:{ IllegalStateException -> 0x0170 }\n L_0x0170:\n monitor-exit(r0) // Catch:{ all -> 0x0172 }\n return\n L_0x0172:\n r14 = move-exception\n monitor-exit(r0) // Catch:{ all -> 0x0172 }\n throw r14\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.camera.imageprocessor.FrameProcessor.ProcessingTask.onImageAvailable(android.media.ImageReader):void\");\n }",
"@Override\n\tpublic void visitEnd() {\n\t\tresultReady = true;\n\t}",
"@Override\n\t\t\t\t\tpublic void onComplete() {\n\t\t\t\t\t}",
"private void captureImage() {\n\t\tIntent intent = new Intent( MediaStore.ACTION_IMAGE_CAPTURE );\n\t\tmFileUri = getOutputMediaFileUri(); // create a file to save the image\n\t\tintent.putExtra(MediaStore.EXTRA_OUTPUT, mFileUri); // set the image file name\n\t\t// start the image capture Intent\n\t\tstartActivityForResult( intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE );\n\t}",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n\n super.onActivityResult(requestCode, resultCode, data);\n\n if (resultCode == Activity.RESULT_OK) {\n\n if (requestCode == REQUEST_CAMERA) {\n\n onCaptureImageResult(data);\n\n }\n\n }\n\n }",
"@Override\r\n\t\t\tpublic void onComplete() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void onComplete() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n public void completed(Integer result, String attachment)\n {\n log.info(\"Successful read!\");\n }",
"public void awaitNewImage() {\n final int TIMEOUT_MS = 2500;\n\n synchronized (mFrameSyncObject) {\n while (!mFrameAvailable) {\n try {\n // Wait for onFrameAvailable() to signal us. Use a timeout to avoid\n // stalling the test if it doesn't arrive.\n mFrameSyncObject.wait(TIMEOUT_MS);\n if (!mFrameAvailable) {\n throw new RuntimeException(\"Camera frame wait timed out\");\n }\n } catch (InterruptedException ie) {\n // shouldn't happen\n throw new RuntimeException(ie);\n }\n }\n mFrameAvailable = false;\n }\n\n // Latch the data.\n mTextureRender.checkGlError(\"before updateTexImage\");\n mSurfaceTexture.updateTexImage();\n }",
"@AfterMethod\n\tpublic void end(ITestResult result){\n if(ITestResult.FAILURE==result.getStatus()){\n \t Utility.captureScreenShots(driver, result.getName());\n }\n\t}",
"public void scanningComplete() {\n\t\tif (!state.equals(ControlState.READY)) {\r\n\t\t\tthrow new RuntimeException(\"ReturnBookControl: cannot call scanningComplete except in READY state\");\r\n\t\t}\t\r\n\t\tuserInterface.setState(ReturnBookUI.UI_STATE.COMPLETED);\t\t\r\n\t}",
"@Override\n\tpublic void onImageDownloadFinish(Bitmap googleimagebitmap) {\n\n\t}",
"@Override\n public boolean capture() {\n if (mCameraState == SNAPSHOT_IN_PROGRESS || mCameraDevice == null) {\n return false;\n }\n setCameraState(SNAPSHOT_IN_PROGRESS);\n\n return true;\n }",
"@Override\n public void onCompleted() {\n }",
"@Override\n public void onCompleted() {\n }",
"public void onPostExecute(byte[] originalJpegData) {\n LongshotPictureCallback.this.updateExifAndSave(Exif.getExif(originalJpegData), originalJpegData, camera);\n }",
"@Override\n public void onComplete(Bitmap bitMap) {\n String localFileName = getLocalImageFileName(url);\n //Log.d(\"TAG\",\"save image to cache: \" + localFileName);\n\n saveImageToFile(bitMap,localFileName);\n //3. return the image using the listener\n listener.onComplete(bitMap);\n }",
"@Override\n\t\tpublic void onComplete() {\n\t\t\tSystem.out.println(\"onComplete\");\n\t\t}",
"@Override\n\tpublic void onComplete() {\n\t\tSystem.out.println(\"Its Done!!!\");\n\t}",
"@Override\n public void onComplete(String url) {\n String localName = getLocalImageFileName(url);\n //Log.d(\"TAG\",\"cach image: \" + localName);\n saveImageToFile(imageBitmap,localName); // synchronously save image locally\n //listener.oncomplete(url);\n listener.onComplete(url);\n }",
"public void saveFinalPhoto(byte[] jpegData, NamedEntity name, ExifInterface exif, CameraProxy camera, Map<String, Object> externalInfo) {\n byte[] bArr = jpegData;\n NamedEntity namedEntity = name;\n ExifInterface exifInterface = exif;\n int orientation = Exif.getOrientation(exif);\n float zoomValue = 1.0f;\n if (PhotoModule.this.mCameraCapabilities.supports(Feature.ZOOM)) {\n zoomValue = PhotoModule.this.mCameraSettings.getCurrentZoomRatio();\n }\n float zoomValue2 = zoomValue;\n boolean hdrOn = SceneMode.HDR == PhotoModule.this.mSceneMode;\n String flashSetting = PhotoModule.this.mActivity.getSettingsManager().getString(PhotoModule.this.mAppController.getCameraScope(), Keys.KEY_FLASH_MODE);\n boolean gridLinesOn = Keys.areGridLinesOn(PhotoModule.this.mActivity.getSettingsManager());\n UsageStatistics instance = UsageStatistics.instance();\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(namedEntity.title);\n stringBuilder.append(Storage.JPEG_POSTFIX);\n instance.photoCaptureDoneEvent(10000, stringBuilder.toString(), exifInterface, camera.getCharacteristics().isFacingFront(), hdrOn, zoomValue2, flashSetting, gridLinesOn, Float.valueOf((float) PhotoModule.this.mTimerDuration), PhotoModule.this.mShutterTouchCoordinate, Boolean.valueOf(PhotoModule.this.mVolumeButtonClickedFlag));\n PhotoModule.this.mShutterTouchCoordinate = null;\n PhotoModule.this.mVolumeButtonClickedFlag = false;\n int orientation2;\n if (PhotoModule.this.mIsImageCaptureIntent) {\n orientation2 = orientation;\n PhotoModule.this.mJpegImageData = bArr;\n PhotoModule.this.mUI.disableZoom();\n if (PhotoModule.this.mQuickCapture) {\n PhotoModule.this.onCaptureDone();\n } else {\n Log.v(PhotoModule.TAG, \"showing UI\");\n PhotoModule.this.mUI.showCapturedImageForReview(bArr, orientation2, false);\n PhotoModule.this.mIsInIntentReviewUI = true;\n }\n } else {\n int width;\n int height;\n int width2;\n int DEPTH_H;\n Integer exifWidth = exifInterface.getTagIntValue(ExifInterface.TAG_PIXEL_X_DIMENSION);\n Integer exifHeight = exifInterface.getTagIntValue(ExifInterface.TAG_PIXEL_Y_DIMENSION);\n if (!PhotoModule.this.mShouldResizeTo16x9 || exifWidth == null || exifHeight == null) {\n Size s = PhotoModule.this.mCameraSettings.getCurrentPhotoSize();\n if ((PhotoModule.this.mJpegRotation + orientation) % MediaProviderUtils.ROTATION_180 == 0) {\n width = s.width();\n height = s.height();\n } else {\n width2 = s.height();\n height = s.width();\n width = width2;\n }\n } else {\n width = exifWidth.intValue();\n height = exifHeight.intValue();\n }\n String title = namedEntity == null ? null : namedEntity.title;\n if (PhotoModule.this.mDebugUri != null) {\n PhotoModule.this.saveToDebugUri(bArr);\n if (title != null) {\n StringBuilder stringBuilder2 = new StringBuilder();\n stringBuilder2.append(PhotoModule.DEBUG_IMAGE_PREFIX);\n stringBuilder2.append(title);\n title = stringBuilder2.toString();\n }\n }\n if (title == null) {\n Log.e(PhotoModule.TAG, \"Unbalanced name/data pair\");\n orientation2 = orientation;\n } else {\n StringBuilder stringBuilder3;\n if (namedEntity.date == -1) {\n namedEntity.date = PhotoModule.this.mCaptureStartTime;\n }\n if (PhotoModule.this.mHeading >= 0) {\n ExifTag directionRefTag = exifInterface.buildTag(ExifInterface.TAG_GPS_IMG_DIRECTION_REF, \"M\");\n ExifTag directionTag = exifInterface.buildTag(ExifInterface.TAG_GPS_IMG_DIRECTION, new Rational((long) PhotoModule.this.mHeading, 1));\n exifInterface.setTag(directionRefTag);\n exifInterface.setTag(directionTag);\n }\n if (externalInfo != null) {\n exifInterface.setTag(exifInterface.buildTag(ExifInterface.TAG_USER_COMMENT, CameraUtil.serializeToJson(externalInfo)));\n }\n if (PhotoModule.this.mCameraSettings.isMotionOn()) {\n stringBuilder3 = new StringBuilder();\n stringBuilder3.append(\"MV\");\n stringBuilder3.append(title);\n title = stringBuilder3.toString();\n }\n String title2 = title;\n Integer num;\n if (PhotoModule.this.isDepthEnabled()) {\n ArrayList<byte[]> bokehBytes = MpoInterface.generateXmpFromMpo(jpegData);\n if (bokehBytes != null) {\n Tag access$500 = PhotoModule.TAG;\n stringBuilder3 = new StringBuilder();\n stringBuilder3.append(\"bokehBytes.size()\");\n stringBuilder3.append(bokehBytes.size());\n Log.d(access$500, stringBuilder3.toString());\n }\n if (bokehBytes == null || bokehBytes.size() <= 2) {\n Log.v(PhotoModule.TAG, \"save addImage\");\n orientation2 = orientation;\n PhotoModule.this.getServices().getMediaSaver().addImage(bArr, title2, namedEntity.date, this.mLocation, width, height, orientation, exifInterface, PhotoModule.this.mOnMediaSavedListener, PhotoModule.this.mContentResolver);\n } else {\n int DEPTH_W;\n GImage gImage = new GImage((byte[]) bokehBytes.get(1), \"image/jpeg\");\n Size photoSize = PhotoModule.this.mCameraSettings.getCurrentPhotoSize();\n int photoWidth = photoSize.width();\n width2 = photoSize.height();\n if (((float) photoWidth) / ((float) width2) == 1.3333334f) {\n DEPTH_W = 896;\n DEPTH_H = DepthUtil.DEPTH_HEIGHT_4_3;\n Log.d(PhotoModule.TAG, \"set width x height to 4:3 size by default\");\n } else if (((float) photoWidth) / ((float) width2) == 1.7777778f) {\n DEPTH_W = 896;\n DEPTH_H = DepthUtil.DEPTH_HEIGHT_16_9;\n Log.d(PhotoModule.TAG, \"set width x height to 16:9 size\");\n } else {\n DEPTH_W = 1000;\n DEPTH_H = 500;\n Log.d(PhotoModule.TAG, \"set width x height to 18:9 size\");\n }\n DepthMap depthMap = new DepthMap(DEPTH_W, DEPTH_H, MediaProviderUtils.ROTATION_180);\n depthMap.buffer = (byte[]) bokehBytes.get(bokehBytes.size() - 1);\n Tag access$5002 = PhotoModule.TAG;\n StringBuilder stringBuilder4 = new StringBuilder();\n stringBuilder4.append(\"depthMap.buffer = \");\n stringBuilder4.append(depthMap.buffer.length);\n Log.v(access$5002, stringBuilder4.toString());\n GDepth gDepth = GDepth.createGDepth(depthMap);\n float depthNear = ((Float) PhotoModule.this.mPreviewResult.get(DepthUtil.bokeh_gdepth_near)).floatValue();\n float depthFar = ((Float) PhotoModule.this.mPreviewResult.get(DepthUtil.bokeh_gdepth_far)).floatValue();\n byte depthFormat = ((Byte) PhotoModule.this.mPreviewResult.get(DepthUtil.bokeh_gdepth_format)).byteValue();\n gDepth.setNear(depthNear);\n gDepth.setFar(depthFar);\n gDepth.setFormat(depthFormat);\n Tag access$5003 = PhotoModule.TAG;\n StringBuilder stringBuilder5 = new StringBuilder();\n stringBuilder5.append(\"westalgo depth_near: \");\n stringBuilder5.append(depthNear);\n stringBuilder5.append(\"depth_far: \");\n stringBuilder5.append(depthFar);\n stringBuilder5.append(\"depth_format:\");\n stringBuilder5.append(depthFormat);\n Log.d(access$5003, stringBuilder5.toString());\n Log.v(PhotoModule.TAG, \"save addXmpImage\");\n exif.addMakeAndModelTag();\n PhotoModule.this.getServices().getMediaSaver().addXmpImage((byte[]) bokehBytes.get(0), gImage, gDepth, title2, namedEntity.date, null, width, height, orientation, exifInterface, XmpUtil.GDEPTH_TYPE, PhotoModule.this.mOnMediaSavedListener, PhotoModule.this.mContentResolver, \"jpeg\");\n Integer num2 = exifHeight;\n num = exifWidth;\n orientation2 = orientation;\n }\n } else {\n num = exifWidth;\n orientation2 = orientation;\n PhotoModule.this.getServices().getMediaSaver().addImage(bArr, title2, namedEntity.date, this.mLocation, width, height, orientation2, exif, PhotoModule.this.mOnMediaSavedListener, PhotoModule.this.mContentResolver);\n }\n }\n DEPTH_H = orientation2;\n }\n PhotoModule.this.getServices().getRemoteShutterListener().onPictureTaken(bArr);\n PhotoModule.this.mActivity.updateStorageSpaceAndHint(null);\n }",
"public final void saveFinalPhoto(byte[] jpegData, NamedEntity name, ExifInterface exif, CameraProxy camera, Map<String, Object> externalInfos) {\n byte[] bArr = jpegData;\n NamedEntity namedEntity = name;\n ExifInterface exifInterface = exif;\n int orientation = Exif.getOrientation(exif);\n float zoomValue = 1.0f;\n if (PhotoModule.this.mCameraCapabilities.supports(Feature.ZOOM)) {\n zoomValue = PhotoModule.this.mCameraSettings.getCurrentZoomRatio();\n }\n float zoomValue2 = zoomValue;\n boolean hdrOn = SceneMode.HDR == PhotoModule.this.mSceneMode;\n String flashSetting = PhotoModule.this.mActivity.getSettingsManager().getString(PhotoModule.this.mAppController.getCameraScope(), Keys.KEY_FLASH_MODE);\n boolean gridLinesOn = Keys.areGridLinesOn(PhotoModule.this.mActivity.getSettingsManager());\n UsageStatistics instance = UsageStatistics.instance();\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(namedEntity.title);\n stringBuilder.append(Storage.JPEG_POSTFIX);\n instance.photoCaptureDoneEvent(10000, stringBuilder.toString(), exifInterface, PhotoModule.this.isCameraFrontFacing(), hdrOn, zoomValue2, flashSetting, gridLinesOn, Float.valueOf((float) PhotoModule.this.mTimerDuration), PhotoModule.this.mShutterTouchCoordinate, Boolean.valueOf(PhotoModule.this.mVolumeButtonClickedFlag));\n PhotoModule.this.mShutterTouchCoordinate = null;\n PhotoModule.this.mVolumeButtonClickedFlag = false;\n int orientation2;\n if (PhotoModule.this.mIsImageCaptureIntent) {\n orientation2 = orientation;\n PhotoModule.this.mJpegImageData = bArr;\n if (PhotoModule.this.mQuickCapture) {\n PhotoModule.this.onCaptureDone();\n } else {\n Log.v(PhotoModule.TAG, \"showing UI\");\n PhotoModule.this.mUI.showCapturedImageForReview(bArr, orientation2, PhotoModule.this.mMirror);\n }\n } else {\n int width;\n int height;\n Integer exifWidth = exifInterface.getTagIntValue(ExifInterface.TAG_PIXEL_X_DIMENSION);\n Integer exifHeight = exifInterface.getTagIntValue(ExifInterface.TAG_PIXEL_Y_DIMENSION);\n if (!PhotoModule.this.mShouldResizeTo16x9 || exifWidth == null || exifHeight == null) {\n Size s = PhotoModule.this.mCameraSettings.getCurrentPhotoSize();\n if ((PhotoModule.this.mJpegRotation + orientation) % MediaProviderUtils.ROTATION_180 == 0) {\n width = s.width();\n height = s.height();\n } else {\n int width2 = s.height();\n height = s.width();\n width = width2;\n }\n } else {\n width = exifWidth.intValue();\n height = exifHeight.intValue();\n }\n String title = namedEntity == null ? null : namedEntity.title;\n long date = namedEntity == null ? -1 : namedEntity.date;\n if (PhotoModule.this.mDebugUri != null) {\n PhotoModule.this.saveToDebugUri(bArr);\n if (title != null) {\n StringBuilder stringBuilder2 = new StringBuilder();\n stringBuilder2.append(PhotoModule.DEBUG_IMAGE_PREFIX);\n stringBuilder2.append(title);\n title = stringBuilder2.toString();\n }\n }\n if (title == null) {\n Log.e(PhotoModule.TAG, \"Unbalanced name/data pair\");\n orientation2 = orientation;\n } else {\n long date2;\n if (date == -1) {\n date2 = PhotoModule.this.mCaptureStartTime;\n } else {\n date2 = date;\n }\n Integer exifHeight2;\n Integer exifWidth2;\n if (PhotoModule.this.mHeading >= 0) {\n ExifTag directionRefTag = exifInterface.buildTag(ExifInterface.TAG_GPS_IMG_DIRECTION_REF, \"M\");\n exifHeight2 = exifHeight;\n exifWidth2 = exifWidth;\n ExifTag directionTag = exifInterface.buildTag(ExifInterface.TAG_GPS_IMG_DIRECTION, new Rational((long) PhotoModule.this.mHeading, 1));\n exifInterface.setTag(directionRefTag);\n exifInterface.setTag(directionTag);\n } else {\n exifHeight2 = exifHeight;\n exifWidth2 = exifWidth;\n }\n if (externalInfos != null) {\n exifInterface.setTag(exifInterface.buildTag(ExifInterface.TAG_USER_COMMENT, CameraUtil.serializeToJson(externalInfos)));\n }\n StringBuilder stringBuilder3 = new StringBuilder();\n stringBuilder3.append(title);\n stringBuilder3.append(\"_BURST\");\n stringBuilder3.append(System.currentTimeMillis());\n PhotoModule.this.getServices().getMediaSaver().addImage(bArr, stringBuilder3.toString(), date2, this.mLocation, width, height, orientation, exifInterface, new BurstShotSaveListener(this.mLongshotCount), PhotoModule.this.mContentResolver);\n }\n }\n PhotoModule.this.getServices().getRemoteShutterListener().onPictureTaken(bArr);\n PhotoModule.this.mActivity.updateStorageSpaceAndHint(null);\n }",
"private void processAndSetImage() {\n\n // Resample the saved image to fit the ImageView\n mResultsBitmap = resamplePic(this, mTempPhotoPath);\n\n// tv.setText(base64conversion(photoFile));\n//\n// Intent intent = new Intent(Intent.ACTION_SEND);\n// intent.setType(\"text/plain\");\n// intent.putExtra(Intent.EXTRA_TEXT, base64conversion(photoFile));\n// startActivity(intent);\n\n /**\n * UPLOAD IMAGE USING RETROFIT\n */\n\n retroFitHelper(base64conversion(photoFile));\n\n // Set the new bitmap to the ImageView\n imageView.setImageBitmap(mResultsBitmap);\n }",
"public void finalize() {\r\n destImage = null;\r\n srcImage = null;\r\n mask = null;\r\n\r\n if (keepProgressBar == false) {\r\n disposeProgressBar();\r\n }\r\n\r\n try {\r\n super.finalize();\r\n } catch (Throwable er) { }\r\n }",
"public abstract void finished(Object result);",
"private void processCompleted(CaptureRequest request, CaptureResult result) {\n\n if (!has_received_frame) {\n has_received_frame = true;\n if (MyDebug.LOG)\n Log.d(TAG, \"has_received_frame now set to true\");\n }\n\n updateCachedCaptureResult(result);\n handleFaceDetection(result);\n\n if (push_repeating_request_when_torch_off && push_repeating_request_when_torch_off_id == request && previewBuilder != null) {\n if (MyDebug.LOG)\n Log.d(TAG, \"received push_repeating_request_when_torch_off\");\n Integer flash_state = result.get(CaptureResult.FLASH_STATE);\n if (MyDebug.LOG) {\n if (flash_state != null)\n Log.d(TAG, \"flash_state: \" + flash_state);\n else\n Log.d(TAG, \"flash_state is null\");\n }\n if (flash_state != null && flash_state == CaptureResult.FLASH_STATE_READY) {\n push_repeating_request_when_torch_off = false;\n push_repeating_request_when_torch_off_id = null;\n try {\n setRepeatingRequest();\n } catch (CameraAccessException e) {\n if (MyDebug.LOG) {\n Log.e(TAG, \"failed to set flash [from torch/flash off hack]\");\n Log.e(TAG, \"reason: \" + e.getReason());\n Log.e(TAG, \"message: \" + e.getMessage());\n }\n e.printStackTrace();\n }\n }\n }\n\n RequestTagType tag_type = getRequestTagType(request);\n if (tag_type == RequestTagType.CAPTURE) {\n handleCaptureCompleted(result);\n } else if (tag_type == RequestTagType.CAPTURE_BURST_IN_PROGRESS) {\n handleCaptureBurstInProgress(result);\n }\n }",
"@Override\n\t\tpublic void onFinish() {\n\t\t}",
"private void captureStillPicture() {\n try {\n final Activity activity = getActivity();\n if (null == activity || null == mCameraDevice) {\n return;\n }\n // This is the CaptureRequest.Builder that we use to take a picture.\n final CaptureRequest.Builder captureBuilder =\n mCameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_STILL_CAPTURE);\n captureBuilder.addTarget(mImageReader.getSurface());\n\n // Use the same AE and AF modes as the preview.\n captureBuilder.set(CaptureRequest.CONTROL_AF_MODE,\n CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE);\n setAutoFlash(captureBuilder);\n\n // Orientation\n int rotation = activity.getWindowManager().getDefaultDisplay().getRotation();\n captureBuilder.set(CaptureRequest.JPEG_ORIENTATION, getOrientation(rotation));\n\n CameraCaptureSession.CaptureCallback CaptureCallback\n = new CameraCaptureSession.CaptureCallback() {\n\n @Override\n public void onCaptureCompleted(@NonNull CameraCaptureSession session,\n @NonNull CaptureRequest request,\n @NonNull TotalCaptureResult result) {\n Log.e(TAG, \"Saved:\" + mFile);\n Log.d(TAG, mFile.toString());\n unlockFocus();\n }\n };\n\n mCaptureSession.stopRepeating();\n mCaptureSession.abortCaptures();\n mCaptureSession.capture(captureBuilder.build(), CaptureCallback, null);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n\tpublic void onFinish(ITestContext result) {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void onCompleted() {\n\r\n\t\t\t}",
"public void capture()\r\n\t{ \r\n\t VideoCapture camera = new VideoCapture();\r\n\t \r\n\t camera.set(12, -20); // change contrast, might not be necessary\r\n\t \r\n\t //CaptureImage image = new CaptureImage();\r\n\t \r\n\t \r\n\t \r\n\t camera.open(0); //Useless\r\n\t if(!camera.isOpened())\r\n\t {\r\n\t System.out.println(\"Camera Error\");\r\n\t \r\n\t // Determine whether to use System.exit(0) or return\r\n\t \r\n\t }\r\n\t else\r\n\t {\r\n\t System.out.println(\"Camera OK\");\r\n\t }\r\n\t\t\r\n\t\t \r\n\t\tboolean success = camera.read(capturedFrame);\r\n\t\tif (success)\r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\t\tprocessWithContours(capturedFrame, processedFrame);\r\n\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\tSystem.out.println(e);\r\n\t\t\t}\r\n\t\t //image.processFrame(capturedFrame, processedFrame);\r\n\t\t // processedFrame should be CV_8UC3\r\n\t\t \r\n\t\t //image.findCaptured(processedFrame);\r\n\t\t \r\n\t\t //image.determineKings(capturedFrame);\r\n\t\t \r\n\t\t int bufferSize = processedFrame.channels() * processedFrame.cols() * processedFrame.rows();\r\n\t\t byte[] b = new byte[bufferSize];\r\n\t\t \r\n\t\t processedFrame.get(0,0,b); // get all the pixels\r\n\t\t // This might need to be BufferedImage.TYPE_INT_ARGB\r\n\t\t img = new BufferedImage(processedFrame.cols(), processedFrame.rows(), BufferedImage.TYPE_INT_RGB);\r\n\t\t int width = (int)camera.get(Highgui.CV_CAP_PROP_FRAME_WIDTH);\r\n\t\t int height = (int)camera.get(Highgui.CV_CAP_PROP_FRAME_HEIGHT);\r\n\t\t //img.getRaster().setDataElements(0, 0, width, height, b);\r\n\t\t byte[] a = new byte[bufferSize];\r\n\t\t System.arraycopy(b, 0, a, 0, bufferSize);\r\n\r\n\t\t Highgui.imwrite(\"camera.jpg\",processedFrame);\r\n\t\t System.out.println(\"Success\");\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Unable to capture image\");\r\n\t\t\r\n\t camera.release();\r\n\t}",
"private void captureImage(){\n\t\t\n\t\t//Setup location\n\t\tLocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE);\n\t\tLocation location = lm.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);\n\t\t\n\t\tdouble latitude = location.getLatitude();\n\t\tdouble longitude = location.getLongitude();\n\t\t\n\t\tIntent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n\t\t\n\t\tfileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE, latitude, longitude);\n\t\t\n\t\tintent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);\n\t\t\n\t\t//Start the image capture Intent\n\t\tstartActivityForResult(intent, CAMERA_CAPTURE_IMAGE_REQUEST_CODE);\n\t}",
"@Override\n public void onFinish() {\n }",
"@Override\n\t\t\t\t\tpublic void onFinish() {\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onFinish() {\n\t\t\t\t\t}",
"public void onPostExecute(byte[] originalJpegData) {\n PhotoModule.this.mInHdrProcess = false;\n ExifInterface exif = Exif.getExif(originalJpegData);\n final NamedEntity name = PhotoModule.this.mNamedImages.getNextNameEntity();\n if (PhotoModule.this.mShouldResizeTo16x9) {\n ResizeBundle dataBundle = new ResizeBundle();\n dataBundle.jpegData = originalJpegData;\n dataBundle.targetAspectRatio = 1.7777778f;\n dataBundle.exif = exif;\n new AsyncTask<ResizeBundle, Void, ResizeBundle>() {\n /* Access modifiers changed, original: protected|varargs */\n public ResizeBundle doInBackground(ResizeBundle... resizeBundles) {\n return PhotoModule.this.cropJpegDataToAspectRatio(resizeBundles[0]);\n }\n\n /* Access modifiers changed, original: protected */\n public void onPostExecute(ResizeBundle result) {\n JpegPictureCallback.this.saveFinalPhoto(result.jpegData, name, result.exif, cameraProxy);\n }\n }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, new ResizeBundle[]{dataBundle});\n } else {\n JpegPictureCallback.this.saveFinalPhoto(originalJpegData, name, exif, cameraProxy);\n }\n if (PhotoModule.this.isOptimizeCapture && exif.hasThumbnail()) {\n PhotoModule.this.updateThumbnail(exif);\n }\n }",
"public Bitmap startCapture() {\n if (mMediaProjection == null) {\n return null;\n }\n Image image = mImageReader.acquireLatestImage();\n int width = image.getWidth();\n int height = image.getHeight();\n final Image.Plane[] planes = image.getPlanes();\n final ByteBuffer buffer = planes[0].getBuffer();\n int pixelStride = planes[0].getPixelStride();\n int rowStride = planes[0].getRowStride();\n int rowPadding = rowStride - pixelStride * width;\n Bitmap bitmap = Bitmap.createBitmap(width + rowPadding / pixelStride, height, Bitmap.Config.ARGB_8888);\n bitmap.copyPixelsFromBuffer(buffer);\n bitmap = Bitmap.createBitmap(bitmap, 0, 0, width, height ); //按范围截取图片\n image.close();\n Log.i(TAG, \"image data captured\");\n\n //Write local\n// final Bitmap finalBitmap = bitmap;\n// new Thread(){\n// @Override\n// public void run() {\n// super.run();\n// if( finalBitmap != null) {\n// try{\n// File fileImage = new File(getLocalPath());\n// if(!fileImage.exists()){\n// fileImage.createNewFile();\n// Log.i(TAG, \"image file created\");\n// }\n// FileOutputStream out = new FileOutputStream(fileImage);\n// if(out != null){\n// finalBitmap.compress(Bitmap.CompressFormat.PNG, 100, out);\n// out.flush();\n// out.close();\n// //发送广播刷新图库\n// Intent media = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);\n// Uri contentUri = Uri.fromFile(fileImage);\n// media.setData(contentUri);\n// mContext.sendBroadcast(media);\n// Log.i(TAG, \"screen image saved\");\n// }\n// }catch(Exception e) {\n// e.printStackTrace();\n// }\n// }\n// }\n// }.start();\n return bitmap;\n }",
"private void captureImage() {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);\n\n if (intent.resolveActivity(getPackageManager()) != null) {\n try {\n mImageFile = createImageFile();\n } catch (IOException ex) {\n Log.e(TAG, ex.getLocalizedMessage(), ex);\n }\n\n // Continue only if the File was successfully created\n if (mImageFile != null) {\n// intent.putExtra(MediaStore.EXTRA_OUTPUT,\n// Uri.fromFile(mImageFile));\n startActivityForResult(intent, IMAGE_CAPTURE_REQ_CODE);\n } else {\n Toast.makeText(this, R.string.error_capture_image, Toast.LENGTH_SHORT).show();\n }\n } else {\n Toast.makeText(this, R.string.no_cam_app, Toast.LENGTH_SHORT).show();\n }\n }",
"public void oncapture(CaptureEvent captureEvent) {\n\t\tFacesMessage msg = new FacesMessage();\n\n\t\t// recharger les parametres de la photo\n\t\ttry {\n\t\t\tloadParamPhoto();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tbyte[] data = captureEvent.getData();\n\n\t\tFile targetFolder = new File(folder_temp);\n\n\t\t// generer un nom de fichier unique\n\t\tString fileUrl = FileUtility.getUidFileName(\"photo-cam.png\");\n\n\t\t// ServletContext servletContext = (ServletContext)\n\t\t// FacesContext.getCurrentInstance().getExternalContext().getContext();\n\t\t// String arquivoFoto = servletContext.getRealPath(File.separator +\n\t\t// \"temp\" +File.separator + fileUrl);\n\n\t\t// System.err.println(\"handle: url----------\" + arquivoFoto);\n\n\t\tFileImageOutputStream imageOutput;\n\t\ttry {\n\t\t\timageOutput = new FileImageOutputStream(new File(targetFolder, fileUrl));\n\n\t\t\t// imageOutput = new FileImageOutputStream(new File(arquivoFoto));\n\n\t\t\timageOutput.write(data, 0, data.length);\n\t\t\timageOutput.close();\n\n\t\t\t//\n\t\t\tsetUrl(fileUrl);\n\t\t\tdossierEtudiantDto.setPhoto(fileUrl);\n\t\t\tthis.photo_attache_capture = true;\n\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_INFO);\n\t\t\tmsg.setSummary(bundleDocument.getString(\"document_success_upload_file\"));\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\n\t\t} catch (IOException e) {\n\t\t\tthis.photo_attache_capture = false;\n\n\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_ERROR);\n\t\t\tmsg.setSummary(bundleDocument.getString(\"document_error_in_writing_captured_image\"));\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void onComplete() {\r\n\r\n }",
"@Override\n \tpublic void finished()\n \t{\n \t}",
"private void frameProcessed(){\n if(DEBUG) Log.d(TAG, \"Frame Processed\");\n synchronized (mWaitFrame) {\n mWaitFrame.notifyAll();\n }\n }",
"public void finishCapturingLog() {\n if (logFileHandle_ == null) {\n // Either starting the capture failed, or we were erroneously called\n // when capture is not running.\n endCfg_ = getCurrentConfigFile();\n syncEndingConfig();\n return;\n }\n\n final String logFileName = logFileName_;\n\n core_.logMessage(\"Problem Report: End of log capture\");\n try {\n core_.stopSecondaryLogFile(logFileHandle_);\n } catch (Exception ignore) {\n // This is an unlikely error unless there are programming errors.\n // Let's continue and see if we can read the file anyway.\n }\n logFileHandle_ = null;\n logFileName_ = null;\n\n File logFile = new File(logFileName);\n capturedLogContent_ = null;\n try {\n capturedLogContent_ = readTextFile(logFile);\n } catch (IOException ioe) {\n ReportingUtils.logError(ioe);\n }\n if (capturedLogContent_ == null) {\n capturedLogContent_ = \"<<<Failed to read captured log file>>>\";\n }\n if (reportDir_ == null) { // We used an ad-hoc temporary file\n logFile.delete();\n }\n\n endCfg_ = getCurrentConfigFile();\n syncEndingConfig();\n }",
"@Override\n public void onFinished() {\n\n }",
"public void initializationComplete() {\n System.out.println(\"CPM Initialization Complete\");\n mInitCompleteTime = System.currentTimeMillis();\n }",
"@Override\n\t\t\t\t\tpublic void onFinish() {\n\n\t\t\t\t\t}",
"@Override\n public void onImageAvailable(final ImageReader reader) {\n //We need wait until we have some size from onPreviewSizeChosen\n if (previewWidth == 0 || previewHeight == 0) {\n return;\n }\n if (rgbBytes == null) {\n rgbBytes = new int[previewWidth * previewHeight];\n }\n try {\n final Image image = reader.acquireLatestImage();\n\n if (image == null) {\n return;\n }\n\n if (isProcessingFrame) {\n image.close();\n return;\n }\n isProcessingFrame = true;\n Trace.beginSection(\"imageAvailable\");\n final Plane[] planes = image.getPlanes();\n fillBytes(planes, yuvBytes);\n yRowStride = planes[0].getRowStride();\n final int uvRowStride = planes[1].getRowStride();\n final int uvPixelStride = planes[1].getPixelStride();\n\n imageConverter =\n new Runnable() {\n @Override\n public void run() {\n ImageUtils.convertYUV420ToARGB8888(\n yuvBytes[0],\n yuvBytes[1],\n yuvBytes[2],\n previewWidth,\n previewHeight,\n yRowStride,\n uvRowStride,\n uvPixelStride,\n rgbBytes);\n }\n };\n\n postInferenceCallback =\n new Runnable() {\n @Override\n public void run() {\n image.close();\n isProcessingFrame = false;\n }\n };\n\n processImage();\n } catch (final Exception e) {\n LOGGER.e(e, \"Exception!\");\n Trace.endSection();\n return;\n }\n Trace.endSection();\n }",
"public void onLoadComplete() {\n\t\t\r\n\t}",
"@Override\n\tpublic void complete()\n\t{\n\t}",
"@Override\r\n\tpublic void completed(HttpResponse message) {\n\t\tsuper.completed(message);\r\n\t\tif (message.getEntity().getContentType().getValue().equals(\"image/jpeg\")) {\r\n\t\t\ttry {\r\n\t\t\t\tByteArrayOutputStream output = new ByteArrayOutputStream();\r\n\t\t\t\tImageIO.write(ImageIO.read(message.getEntity().getContent()), \"jpeg\", output);\r\n\t\t\t\tTreeMap<String, byte[]> map = new TreeMap<String, byte[]>();\r\n\t\t\t\tmap.put(bundle.getHeaders().get(\"Video-Stream\").toString(), output.toByteArray());\r\n\t\t\t\tpublisher.addToReadQueue(ProtocolHelper.unmarshel(map));\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tlogger.error(e.getMessage());\r\n\t\t\t}\r\n\t\t} \r\n\t}",
"protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE) {\n if (resultCode == RESULT_OK) {\n\n Bitmap bp = (Bitmap) data.getExtras().get(\"data\");\n //iv.setImageBitmap(bp);\n storeImage(bp);\n\n Intent inte = new Intent(this, ScanResults.class);\n startActivity(inte);\n\n } else if (resultCode == RESULT_CANCELED) {\n // User cancelled the image capture\n } else {\n // Image capture failed, advise user\n }\n }\n\n\n }",
"@Override\n synchronized public void onTaskCompletionResult() {\n if (DataContainer.getInstance().pullValueBoolean(DataKeys.PLAY_REFERRER_FETCHED, context) && DataContainer.getInstance().pullValueBoolean(DataKeys.GOOGLE_AAID_FETCHED, context)) {\n deviceInformationUtils.prepareInformations();\n deviceInformationUtils.debugData();\n long lastLaunch = pullValueLong(ITrackingConstants.CONF_LAST_LAUNCH_INTERNAL, context);\n trackLaunchHandler(lastLaunch);\n }\n }",
"public RoeImage takePicture() \r\n {\r\n // return variable\r\n RoeImage result = new RoeImage();\r\n \r\n // take picture \r\n this.cam.read(this.frame);\r\n \r\n // update timestamp for image capturing\r\n this.timestamp = System.currentTimeMillis();\r\n \r\n // add picture to result\r\n result.SetImage(this.frame);\r\n \r\n // add timestamp of captured image\r\n result.setTimeStamp(this.timestamp);\r\n\r\n // the image captured with properties\r\n return result;\r\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == ACTIVITY_START_CAMERA_APP && resultCode == RESULT_OK){\n /*//Todo: Mensaje para mostrar al usuario al capturar la fotografia\n// Toast.makeText(this,\"Picture taken successfully\",Toast.LENGTH_LONG).show();\n\n //Todo: Se crea el objeto Bundle con el nombre extras\n Bundle extras = data.getExtras();\n //Todo: Devuelve el bundle que contenga el intent\n Bitmap photoCaptureBitmap = (Bitmap) extras.get(\"data\");\n //Todo: Se asigna a mPhotoCapturedImageView el valor que contenga el Bitmap photoCaptureBitmap\n mPhotoCapturedImageView.setImageBitmap(photoCaptureBitmap);\n*/\n //Bitmap photoCaptureBitmap = BitmapFactory.decodeFile(mImageFileLocation);\n //mPhotoCapturedImageView.setImageBitmap(photoCaptureBitmap);\n rotateImage(setReduceImageSize());\n }\n }",
"@Override\n public void onFinished() {\n\n }",
"void ProcessImage() {\n DoDescribe();\n }",
"@Override\n\t\tpublic void onPictureTaken(byte[] data, Camera camera) {\n\t\t\t\n\t\t}",
"@Override\n\tpublic void eventFinished() {\n\t\tstatus=EventCompleted;\n\t}",
"public void handleFinish()\n {\n }",
"public void onFinish(ITestContext context) {\n\t\tSystem.out.println(\"********** \tcompleted : \"+context.getName());\n\t\t\n\t\t\n\t}",
"public void processImage() {\n\n\n ++timestamp;\n final long currTimestamp = timestamp;\n byte[] originalLuminance = getLuminance();\n tracker.onFrame(\n previewWidth,\n previewHeight,\n getLuminanceStride(),\n sensorOrientation,\n originalLuminance,\n timestamp);\n trackingOverlay.postInvalidate();\n\n // No mutex needed as this method is not reentrant.\n if (computingDetection) {\n readyForNextImage();\n return;\n }\n computingDetection = true;\n LOGGER.i(\"Preparing image \" + currTimestamp + \" for detection in bg thread.\");\n\n rgbFrameBitmap.setPixels(getRgbBytes(), 0, previewWidth, 0, 0, previewWidth, previewHeight);\n\n if (luminanceCopy == null) {\n luminanceCopy = new byte[originalLuminance.length];\n }\n System.arraycopy(originalLuminance, 0, luminanceCopy, 0, originalLuminance.length);\n readyForNextImage();\n\n final Canvas canvas = new Canvas(croppedBitmap);\n canvas.drawBitmap(rgbFrameBitmap, frameToCropTransform, null);\n // For examining the actual TF input.\n if (SAVE_PREVIEW_BITMAP) {\n ImageUtils.saveBitmap(croppedBitmap);\n }\n\n runInBackground(\n new Runnable() {\n @Override\n public void run() {\n LOGGER.i(\"Running detection on image \" + currTimestamp);\n final long startTime = SystemClock.uptimeMillis();\n final List<Classifier.Recognition> results = detector.recognizeImage(croppedBitmap);\n lastProcessingTimeMs = SystemClock.uptimeMillis() - startTime;\n\n cropCopyBitmap = Bitmap.createBitmap(croppedBitmap);\n final Canvas canvas = new Canvas(cropCopyBitmap);\n final Paint paint = new Paint();\n paint.setColor(Color.RED);\n paint.setStyle(Paint.Style.STROKE);\n paint.setStrokeWidth(2.0f);\n\n float minimumConfidence = MINIMUM_CONFIDENCE_TF_OD_API;\n switch (MODE) {\n case TF_OD_API:\n minimumConfidence = MINIMUM_CONFIDENCE_TF_OD_API;\n break;\n }\n\n final List<Classifier.Recognition> mappedRecognitions =\n new LinkedList<Classifier.Recognition>();\n //boolean unknown = false, cervix = false, os = false;\n\n for (final Classifier.Recognition result : results) {\n final RectF location = result.getLocation();\n if (location != null && result.getConfidence() >= minimumConfidence) {\n\n //if (result.getTitle().equals(\"unknown\") && !unknown) {\n // unknown = true;\n canvas.drawRect(location, paint);\n cropToFrameTransform.mapRect(location);\n result.setLocation(location);\n mappedRecognitions.add(result);\n\n /*} else if (result.getTitle().equals(\"Cervix\") && !cervix) {\n canvas.drawRect(location, paint);\n cropToFrameTransform.mapRect(location);\n result.setLocation(location);\n mappedRecognitions.add(result);\n cervix = true;\n\n } else if (result.getTitle().equals(\"Os\") && !os) {\n canvas.drawRect(location, paint);\n cropToFrameTransform.mapRect(location);\n result.setLocation(location);\n mappedRecognitions.add(result);\n os = true;\n }*/\n\n\n }\n }\n\n tracker.trackResults(mappedRecognitions, luminanceCopy, currTimestamp);\n trackingOverlay.postInvalidate();\n\n\n computingDetection = false;\n\n }\n });\n\n\n }",
"@Override\n public void onSequenceFinish() {\n // Yay\n }",
"void onCaptureStart();",
"@Override\n\t\t\t\t\t\t\t\tpublic void complete(String key,\n\t\t\t\t\t\t\t\t\t\t\t\t\t ResponseInfo info, JSONObject response) {\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"上传图片成功了\");\n\t\t\t\t\t\t\t\t\tSystem.out.println(key + \" \" + info\n\t\t\t\t\t\t\t\t\t\t\t+ \" \" + response);\n\n\t\t\t\t\t\t\t\t\tfromToMessage.message = RequestUrl.QiniuHttp + imgFileKey;\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"图片在服务器上的位置是:\"+fromToMessage.message);\n\t\t\t\t\t\t\t\t\tMessageDao.getInstance().updateMsgToDao(fromToMessage);\n\t\t\t\t\t\t\t\t\t//发送新消息给服务器\n\t\t\t\t\t\t\t\t\tHttpManager.newMsgToServer(sp.getString(\"connecTionId\", \"\"),\n\t\t\t\t\t\t\t\t\t\t\tfromToMessage, new NewMessageResponseHandler(fromToMessage));\n\t\t\t\t\t\t\t\t}",
"@Override\n public void onCompleted() {\n logger.info(\"Forwarding for query {} complete.\", queryId);\n }",
"@Override\r\n\tpublic void onFinish(ITestContext Result) {\n\t\tSystem.out.println(\"onFinish :\"+ Result.getName());\r\n\t}",
"@Override\n\tpublic void onFinish(ITestContext arg0) {\n\t\tSystem.out.println(\"when finished\");\n\t\t\n\t}"
]
| [
"0.70293206",
"0.653749",
"0.650897",
"0.64627665",
"0.64579856",
"0.64489174",
"0.6424929",
"0.64122796",
"0.64018744",
"0.63232636",
"0.6260611",
"0.6194358",
"0.6052894",
"0.60363436",
"0.6032896",
"0.5992709",
"0.5932313",
"0.58749664",
"0.58693635",
"0.58192325",
"0.58092695",
"0.5797125",
"0.5783565",
"0.5766172",
"0.57508355",
"0.5736144",
"0.5732027",
"0.5732027",
"0.572483",
"0.5708005",
"0.5706321",
"0.5692112",
"0.565532",
"0.5644014",
"0.5640551",
"0.5640551",
"0.5639733",
"0.5639065",
"0.5632452",
"0.56311685",
"0.5623547",
"0.5613055",
"0.561",
"0.56086737",
"0.56082124",
"0.5600649",
"0.55951506",
"0.559457",
"0.5579505",
"0.5570196",
"0.5570196",
"0.5570196",
"0.5570196",
"0.5570196",
"0.5570196",
"0.5570196",
"0.5570196",
"0.5570196",
"0.5570196",
"0.5570196",
"0.5570196",
"0.55656594",
"0.556554",
"0.55612797",
"0.55553997",
"0.555536",
"0.55522543",
"0.55522543",
"0.5543279",
"0.55404997",
"0.5540362",
"0.55373734",
"0.55353004",
"0.5534407",
"0.55329186",
"0.552421",
"0.5519345",
"0.5511589",
"0.55037886",
"0.55007696",
"0.5497255",
"0.5491184",
"0.54853666",
"0.548412",
"0.54829395",
"0.5481853",
"0.54789776",
"0.5474903",
"0.5461884",
"0.5457868",
"0.54457355",
"0.5443727",
"0.54381615",
"0.54378325",
"0.54362446",
"0.54321873",
"0.5430731",
"0.5424168",
"0.542402",
"0.5420294"
]
| 0.7264452 | 0 |
Returns true if the player is loaded on the server | public boolean isLoaded(P player){
return playerMap.containsKey(player);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static boolean isLoaded() {\n\t\ttry {\n\t\t\tPlayer.getRSPlayer();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"boolean isLoaded();",
"public boolean isOnline()\n\t{\n\t\treturn PlayerManager.getPlayer(name)!=null;\n\t}",
"public boolean isLoaded();",
"public boolean loadPlayer(P player){\n\n //Is the player already loaded?\n if(playerMap.containsKey(player)){\n System.out.println(\"Tried to load player \" + player.getName() + \"'s data, even though it's already loaded!\");\n return false;\n } else {\n\n if(data.getConfig().contains(player.getUniqueId().toString())){\n //Load player\n PlayerProfile playerProfile = new PlayerProfile(false, data, player);\n playerMap.put(player, playerProfile);\n\n return true;\n } else {\n //Create player profile\n PlayerProfile playerProfile = new PlayerProfile(true, data, player);\n playerMap.put(player, playerProfile);\n\n return true;\n }\n }\n }",
"boolean hasPlayready();",
"@java.lang.Override\n public boolean hasPlayer() {\n return player_ != null;\n }",
"public boolean isPlayerAlive() {\r\n\t\treturn !(this.getRobotsAlive().isEmpty());\r\n\t}",
"public boolean isOnline ( ) {\n\t\treturn getBukkitPlayerOptional ( ).isPresent ( );\n\t}",
"public boolean isOnline() {\n \t\treturn (type == PLAYER_ONLINE);\n \t}",
"private void checkRemotePlayerReady(){\n String data = getJSON(hostUrl + \"retrieve_remote_ready.php?matchId=\" + matchId\n + \"&player=\" + oppositePlayer, 2000);\n\n System.out.println(\"Ready: \" + data);\n\n // Get first character, as, for some reason, it returns one extra character.\n int ready = Integer.parseInt(data.substring(0, 1));\n\n if (ready == 1){\n remotePlayerReady = true;\n }\n\n }",
"public boolean hasPlayLoad(Player player) {\n for (PayLoad payLoad : payLoadList) {\n if(payLoad.getPlayer().equals(player)){\n return true;\n }\n }\n return false;\n }",
"public boolean hasPlayerInfo()\n {\n return this.getPlayerInfo() != null;\n }",
"private boolean readyPlayer() {\n switch (this.state) {\n case MEDIA_NONE:\n if (this.player == null) {\n //TODO: Agregar buffer (this, audiobuffer, decoderbuffer).\n this.player = new MultiPlayer(this);\n this.setState(STATE.MEDIA_STARTING);\n return true;\n }\n case MEDIA_LOADING:\n //cordova js is not aware of MEDIA_LOADING, so we send MEDIA_STARTING instead\n LOG.d(LOG_TAG, \"StreamPlayer Loading: startPlaying() called during media preparation: \" + STATE.MEDIA_STARTING.ordinal());\n return false;\n case MEDIA_STARTING:\n case MEDIA_RUNNING:\n case MEDIA_PAUSED:\n case MEDIA_STOPPED:\n return true;\n default:\n LOG.d(LOG_TAG, \"StreamPlayer Error: startPlaying() called during invalid state: \" + this.state);\n sendErrorStatus(MEDIA_ERR_ABORTED);\n }\n return false;\n }",
"Boolean isPlaying() {\n return execute(\"player.playing\");\n }",
"public boolean isPlayer() {\n return player != null;\n }",
"@java.lang.Override\n public boolean hasPlayready() {\n return playready_ != null;\n }",
"public boolean isLoaded() {\n\t\treturn lib != null;\n\t}",
"boolean isPlayable();",
"public boolean checkPlays(Player player){\n return true;\n }",
"private boolean isTextureLoaded() {\n return loaded;\n }",
"public boolean hasPlayer() {\n return playerBuilder_ != null || player_ != null;\n }",
"public boolean isLoaded(){return true;}",
"public boolean isHasPlayer() {\n\t\treturn HasPlayer;\n\t}",
"private boolean isOnline(@NonNull final UUID playerID) {\n if(Bukkit.getPlayer(playerID) == null) {\n return false;\n } else {\n return true;\n }\n }",
"public boolean isAvailable(Player player) {\n return playerList.contains(player);\n }",
"boolean hasReplacePlayerResponse();",
"public boolean allPlayersReady() {\r\n for (Player player : players) {\r\n if (!player.isReady()) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"public boolean isLoaded() {\n return m_module.isLoaded();\n }",
"public boolean isHasPlayers() {\n\t\treturn HasPlayers;\n\t}",
"public boolean needPlayer() {\n\t\treturn false;\n\t}",
"public boolean isSetPlayer() {\n return this.player != null;\n }",
"boolean playerExists() {\n return this.game.h != null;\n }",
"private boolean allReady() {\n PlayerModel[] playersInLobby = this.lobbyModel.getPlayersInLobby();\n if (playersInLobby.length <= 1)\n return false;\n for (PlayerModel pl : playersInLobby) {\n if (!pl.isReady() && !(pl instanceof ClientPlayerModel))\n return false;\n }\n return true;\n }",
"boolean isForceLoaded();",
"public boolean loadGame(File file){\n\t\treturn true;\n\t}",
"public boolean isLoaded() {\n\t\treturn started;\n\t}",
"@Override\n\tpublic boolean isOnline() {\n\t\treturn bukkitPlayer != null && bukkitPlayer.isOnline();\n\t}",
"protected boolean isLoaded()\n {\n return m_fLoaded;\n }",
"@Override\r\n\t\tpublic boolean isPlayer() {\n\t\t\treturn state.isPlayer();\r\n\t\t}",
"boolean isPlayableInGame();",
"public final boolean mo30098d() {\n try {\n return this.f24822a.isLoaded();\n } catch (RemoteException e) {\n zzbad.m26360d(\"#007 Could not call remote method.\", e);\n return false;\n }\n }",
"boolean hasServer();",
"public boolean isLoaded() {\n\treturn loaded;\n }",
"public boolean isLoaded()\n {\n return m_syntheticKind == JCacheSyntheticKind.JCACHE_SYNTHETHIC_LOADED;\n }",
"public boolean allPlayersReady() {\n // Si un jugador esta offline, lo ignora\n for (Player p : players) {\n if (p.isOnline() && !p.isReady())\n return false;\n }\n return true;\n }",
"@Override\n public boolean isPlayer() {\n return super.isPlayer();\n }",
"public boolean isLoaded() {\n return loaded;\n }",
"public synchronized boolean isLoaded() {\n\t\treturn _resourceData != null;\n\t}",
"public boolean isLoaded() {\n return parser != null;\n }",
"public abstract boolean isPlayer();",
"public boolean isFirstPlayer()\r\n\t{\r\n\t\tgetStartGameDataFromServer();\r\n\t\treturn isFirstPlayer;\r\n\t}",
"public boolean isPlayerPlaying() {\n return this.player.getMasterMediaPlayer().isPlaying();\n }",
"public boolean hasOnlinePlayers() {\n for (Player p : players) {\n if (p.isOnline())\n return true;\n }\n return false;\n }",
"public boolean shouldLoad() {\n return load;\n }",
"boolean hasStartGameRequest();",
"@Override\n\tpublic boolean isLocallyLoaded(String instanceId)\n\t{\n\t\treturn m_models.isLocal(instanceId);\n\t}",
"public boolean isLoaded() {\n return _id != null;\n }",
"boolean isMultiplayer();",
"private boolean pluginLoading(String pluginName) {\n return pm.getPlugin(pluginName) != null;\n }",
"@Override\n\tpublic void loadPlayer() {\n\t\t\n\t}",
"public boolean isRunning ()\n {\n return server == null ? false : true;\n }",
"public boolean hasWG() {\n Plugin plugin = getServer().getPluginManager().getPlugin(\"WorldGuard\");\n return plugin != null;\n }",
"public boolean hasBeenLoaded () {\n return loaded;\n }",
"public boolean isFullyLoaded() {\n return fullyLoaded;\n }",
"boolean InitialisePlayer (String path_name);",
"public boolean hasLoadedFile() {\n return isSuccessfulFileLoad;\n }",
"private static boolean isServerReachable() {\n\t\treturn new PingRpcExample().pingServer();\n\t}",
"public boolean isLoadableWorld(String worldName);",
"public boolean isMainPlayerOpen() {\n return this.mainPlayer;\n }",
"private void getPlayerStatusFromServer()\r\n\t{\r\n\t\ttry {\r\n\t\t\t// Create data input stream\r\n\t\t\tDataInputStream playerStatusInputFromServer = new DataInputStream(\r\n\t\t\t\t\tsocket.getInputStream());\r\n\t\t\tisPlayerAlive = playerStatusInputFromServer.readBoolean();\r\n\t\t\thasPlayerWon = playerStatusInputFromServer.readBoolean();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public boolean isLoaded() {\n\t\treturn chestsLoaded;\r\n\t}",
"protected boolean areChunksAroundLoaded_EM() {\n if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(this) && getBaseMetaTileEntity().isServerSide()) {\n IGregTechTileEntity base = getBaseMetaTileEntity();\n return base.getWorld().doChunksNearChunkExist(base.getXCoord(), base.getYCoord(), base.getZCoord(), 3);\n //todo check if it is actually checking if chunks are loaded\n } else {\n return false;\n }\n }",
"private boolean playerDetection() {\n\t\tAxisAlignedBB axisalignedbb = new AxisAlignedBB(posX, posY, posZ, posX + 1, posY + 1, posZ + 1).grow(DETECTION_RANGE);\n\t\tList<EntityPlayer> list = world.getEntitiesWithinAABB(EntityPlayer.class, axisalignedbb);\n\n\t\treturn !list.isEmpty();\n\t}",
"public boolean isLoaded() \n\t{\n\t return htRecords != null ;\n\t}",
"public boolean isMetaDataAvailable()\n\t{\n\t\tboolean allLoaded = true;\n\t\ttry \n\t\t{\n\t\t\t// we need to ask the session since our fileinfocache will hide the exception\n\t\t\tSwfInfo[] swfs = m_session.getSwfs();\n\t\t\tfor(int i=0; i<swfs.length; i++)\n\t\t\t{\n\t\t\t\t// check if our processing is finished.\n\t\t\t\tSwfInfo swf = swfs[i];\n\t\t\t\tif (swf != null && !swf.isProcessingComplete())\n\t\t\t\t{\n\t\t\t\t\tallLoaded = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(NoResponseException nre)\n\t\t{\n\t\t\t// ok we still need to wait for player to read the swd in\n\t\t\tallLoaded = false;\n\t\t}\n\n\t\t// count the number of times we checked and it wasn't there\n\t\tif (!allLoaded)\n\t\t{\n\t\t\tint count = propertyGet(METADATA_NOT_AVAILABLE);\n\t\t\tcount++;\n\t\t\tpropertyPut(METADATA_NOT_AVAILABLE, count);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// success so we reset our attempt counter\n\t\t\tpropertyPut(METADATA_ATTEMPTS, METADATA_RETRIES);\n\t\t}\n\t\treturn allLoaded;\n\t}",
"private boolean canStartServer() {\n\n\t\tfinal ConnectivityManager connMgr = (ConnectivityManager) this\n\t\t\t\t.getSystemService(Context.CONNECTIVITY_SERVICE);\n\n\t\tfinal android.net.NetworkInfo wifi =\n\n\t\tconnMgr.getNetworkInfo(ConnectivityManager.TYPE_WIFI);\n\n\t\tfinal android.net.NetworkInfo mobile = connMgr\n\t\t\t\t.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);\n\n\t\treturn wifi.isAvailable() || mobile.isAvailable();\n\t}",
"public boolean unloadPlayer(P player){\n if(playerMap.containsKey(player)){\n //Player is safe to unload\n playerMap.remove(player);\n return true;\n } else {\n //Player isn't safe to save\n System.out.println(\"Tried to unload player \" + player.getName() + \"'s data, but it's not available\");\n return false;\n }\n }",
"public boolean poll()\n {\n if (this.mediaPlayer == null)\n {\n return false;\n }\n\n return mediaPlayer.getStatus().equals(MediaPlayer.Status.PLAYING);\n }",
"@SuppressWarnings(\"static-access\")\n\tpublic boolean isPlay(){\n\t\treturn this.isPlay;\n\t}",
"public boolean startGame() {\n\t\tif(!ackReadyToPlay){\n\t\t\tackReadyToPlay = true;\n\t\t\tSystem.out\n\t\t\t.println(\"PPL: StartGameBean vom typ RESULT empfangen von: \" + jid);\n\t\t\treturn game.playerReadyToPlay(this);\n\t\t}\n\t\treturn false;\n\t}",
"public static final boolean libraryLoaded(){\n return PS3_Library.loaded();\n }",
"protected boolean isAvailable() {\r\n\t\treturn true;\r\n\t}",
"@Override\r\n\tpublic boolean canPlay() {\n\t\treturn false;\r\n\t}",
"public final boolean isServer() {\n\t\treturn !world.isRemote;\n\t}",
"public boolean hasLoaded(String filename)\n {\n return this.loadedFiles.containsKey(filename);\n }",
"public boolean limeAvailable();",
"boolean hasVideo();",
"public boolean hasPlayready() {\n return ((bitField0_ & 0x00000004) != 0);\n }",
"boolean hasPlayerId();",
"public boolean isPublicServer() {\n return publicServer;\n }",
"@Override\r\n\tpublic boolean isPlaying() {\n\t\treturn mediaPlayer.isPlaying();\r\n\t}",
"public static boolean isLoggedIn() {\n\t\treturn arcade.hasPlayer();\n\t}",
"public boolean isLoadedFromDisk() {\n return isLoadedFromDisk;\n }",
"@Test\n public void testStart() {\n plugin.start(gameData, world);\n\n boolean hasPlayer = false;\n for (Entity e : world.getEntities(EntityType.PLAYER)) {\n hasPlayer = true;\n }\n assertTrue(hasPlayer);\n }",
"public boolean load() {\n return load(Datastore.fetchDefaultService());\n }",
"public boolean isCaching(Player player) {\n\t\treturn this.caching.contains(player);\n\t}",
"@Override\n\t\tpublic void onLoaded(String arg0) {\n\t\t\t\tplayer.play();\n\t\t}",
"@Test\r\n\tpublic void verifyAudioLoadedSuccessfully(){\r\n\t\tdriver.get(audioUrl2);\r\n\t\tObject response = jse.executeScript(\r\n\t\t\t\t\"if(document.readyState === 'complete'){\"\r\n\t\t\t\t+ \"if(document.getElementsByClassName('rp__playingItem__overlay')[0] != null && document.getElementById('player') != null){\"\r\n\t\t\t\t+ \"return true;}}\", \"\");\r\n\t\tAssert.assertTrue(((Boolean)response).booleanValue(), \"Audio not loaded as expected\");\r\n\t}",
"public boolean isPlaying() {\n return params.isPlay();\n }"
]
| [
"0.8157205",
"0.6954982",
"0.6940023",
"0.6860445",
"0.6819087",
"0.68075764",
"0.6761657",
"0.66990936",
"0.6625268",
"0.66103584",
"0.6608068",
"0.6591832",
"0.65870285",
"0.65665215",
"0.6551166",
"0.65466744",
"0.6545276",
"0.6537527",
"0.65323037",
"0.653172",
"0.65209836",
"0.6504487",
"0.6454436",
"0.6405841",
"0.6403562",
"0.63942134",
"0.6393535",
"0.6350426",
"0.6341369",
"0.6329368",
"0.63277197",
"0.6327448",
"0.6323596",
"0.6321236",
"0.6315087",
"0.6313011",
"0.63127965",
"0.6308136",
"0.6272239",
"0.62692124",
"0.62688476",
"0.6268505",
"0.6251935",
"0.6240519",
"0.62398785",
"0.6229034",
"0.6224016",
"0.6222649",
"0.6212824",
"0.6211216",
"0.61675227",
"0.6165833",
"0.61461097",
"0.61413604",
"0.6127049",
"0.6125475",
"0.6121026",
"0.6101065",
"0.60966945",
"0.6094664",
"0.608844",
"0.60712665",
"0.60666615",
"0.6060637",
"0.6046413",
"0.6030826",
"0.6011008",
"0.600364",
"0.59903854",
"0.5979697",
"0.5979638",
"0.59790796",
"0.59776837",
"0.596167",
"0.5938583",
"0.59381044",
"0.5934973",
"0.59290135",
"0.59241366",
"0.591299",
"0.59090394",
"0.59061676",
"0.5900234",
"0.59002185",
"0.58985144",
"0.58928305",
"0.58866817",
"0.588609",
"0.5872963",
"0.5872249",
"0.58670944",
"0.58582",
"0.58562875",
"0.5856181",
"0.58545613",
"0.58345884",
"0.58285636",
"0.5828178",
"0.5826694",
"0.58193547"
]
| 0.7687602 | 1 |
Returns true upon the player data of a specific data is loaded, otherwise returns false | public boolean loadPlayer(P player){
//Is the player already loaded?
if(playerMap.containsKey(player)){
System.out.println("Tried to load player " + player.getName() + "'s data, even though it's already loaded!");
return false;
} else {
if(data.getConfig().contains(player.getUniqueId().toString())){
//Load player
PlayerProfile playerProfile = new PlayerProfile(false, data, player);
playerMap.put(player, playerProfile);
return true;
} else {
//Create player profile
PlayerProfile playerProfile = new PlayerProfile(true, data, player);
playerMap.put(player, playerProfile);
return true;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isLoaded(P player){\n return playerMap.containsKey(player);\n }",
"boolean canLoadData();",
"public static boolean isLoaded() {\n\t\ttry {\n\t\t\tPlayer.getRSPlayer();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"boolean hasData();",
"boolean hasData();",
"boolean hasData();",
"boolean hasData();",
"boolean hasData();",
"boolean hasData();",
"boolean hasData();",
"public boolean isLoadData() {\n return loadData;\n }",
"boolean hasData2();",
"boolean hasData2();",
"public boolean hasPlayLoad(Player player) {\n for (PayLoad payLoad : payLoadList) {\n if(payLoad.getPlayer().equals(player)){\n return true;\n }\n }\n return false;\n }",
"public boolean hasData();",
"boolean hasData1();",
"boolean hasData1();",
"public static boolean testLoading() {\r\n Data instance = new Data();\r\n Pokemon[] list;\r\n try {\r\n instance.update();\r\n list = instance.getPokemonList();\r\n int cnt = 0;\r\n while (cnt < list.length && list[cnt] != null)\r\n cnt++;\r\n if (cnt != 799) {\r\n System.out.print(\"Pokemon num incorrect: \");\r\n System.out.println(cnt - 1);\r\n return false;\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n System.out.println(\"fall the test in exception\");\r\n return false;\r\n }\r\n\r\n for (int i = 0; i < 6; i++) {\r\n if (!pokemonEq(testList[i], list[indices[i]])) {\r\n System.out.print(\"fail the test in check element \");\r\n System.out.println(i);\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }",
"boolean isLoaded();",
"public boolean isMetaDataAvailable()\n\t{\n\t\tboolean allLoaded = true;\n\t\ttry \n\t\t{\n\t\t\t// we need to ask the session since our fileinfocache will hide the exception\n\t\t\tSwfInfo[] swfs = m_session.getSwfs();\n\t\t\tfor(int i=0; i<swfs.length; i++)\n\t\t\t{\n\t\t\t\t// check if our processing is finished.\n\t\t\t\tSwfInfo swf = swfs[i];\n\t\t\t\tif (swf != null && !swf.isProcessingComplete())\n\t\t\t\t{\n\t\t\t\t\tallLoaded = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(NoResponseException nre)\n\t\t{\n\t\t\t// ok we still need to wait for player to read the swd in\n\t\t\tallLoaded = false;\n\t\t}\n\n\t\t// count the number of times we checked and it wasn't there\n\t\tif (!allLoaded)\n\t\t{\n\t\t\tint count = propertyGet(METADATA_NOT_AVAILABLE);\n\t\t\tcount++;\n\t\t\tpropertyPut(METADATA_NOT_AVAILABLE, count);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// success so we reset our attempt counter\n\t\t\tpropertyPut(METADATA_ATTEMPTS, METADATA_RETRIES);\n\t\t}\n\t\treturn allLoaded;\n\t}",
"private void checkRemotePlayerReady(){\n String data = getJSON(hostUrl + \"retrieve_remote_ready.php?matchId=\" + matchId\n + \"&player=\" + oppositePlayer, 2000);\n\n System.out.println(\"Ready: \" + data);\n\n // Get first character, as, for some reason, it returns one extra character.\n int ready = Integer.parseInt(data.substring(0, 1));\n\n if (ready == 1){\n remotePlayerReady = true;\n }\n\n }",
"public synchronized boolean isLoaded() {\n\t\treturn _resourceData != null;\n\t}",
"public boolean hasPlayerInfo()\n {\n return this.getPlayerInfo() != null;\n }",
"boolean hasMultimediaData();",
"@Override\r\n public boolean doLoadTrackersData() {\r\n TrackerManager tManager = TrackerManager.getInstance();\r\n ObjectTracker objectTracker = (ObjectTracker) tManager.getTracker(ObjectTracker.getClassType());\r\n if (objectTracker == null)\r\n return false;\r\n if (mCurrentDataset == null)\r\n mCurrentDataset = objectTracker.createDataSet();\r\n if (mCurrentDataset == null)\r\n return false;\r\n if (!mCurrentDataset.load(mDatasetStrings.get(mCurrentDatasetSelectionIndex), STORAGE_TYPE.STORAGE_APPRESOURCE))\r\n return false;\r\n if (!objectTracker.activateDataSet(mCurrentDataset))\r\n return false;\r\n int numTrackables = mCurrentDataset.getNumTrackables();\r\n for (int count = 0; count < numTrackables; count++) {\r\n Trackable trackable = mCurrentDataset.getTrackable(count);\r\n if (isExtendedTrackingActive())\r\n trackable.startExtendedTracking();\r\n\r\n String name = \"Current Dataset : \" + trackable.getName();\r\n trackable.setUserData(name);\r\n Log.d(LOGTAG, \"UserData:Set the following user data \" + trackable.getUserData());\r\n }\r\n return true;\r\n }",
"@Override\n public boolean doLoadTrackersData() {\n\n TrackerManager tManager = TrackerManager.getInstance();\n ObjectTracker objectTracker = (ObjectTracker) tManager\n .getTracker(ObjectTracker.getClassType());\n if (objectTracker == null)\n return false;\n\n if (markerDataSet == null)\n markerDataSet = objectTracker.createDataSet();\n\n if (markerDataSet == null)\n return false;\n\n if (!markerDataSet.load(\n \"Test0000.xml\",\n STORAGE_TYPE.STORAGE_APPRESOURCE))\n return false;\n\n if (!objectTracker.activateDataSet(markerDataSet))\n return false;\n\n int numTrackers = markerDataSet.getNumTrackables();\n for (int count = 0; count < numTrackers; count++) {\n Trackable trackable = markerDataSet.getTrackable(count);\n if (enableExtendedTracking) {\n trackable.startExtendedTracking();\n }\n\n String name = \"Current Dataset : \" + trackable.getName();\n trackable.setUserData(name);\n Log.d(TAG, \"UserData:Set the following user data \" + trackable.getUserData());\n }\n\n return true;\n }",
"@Override\n\tpublic void loadPlayerData(InputStream is) {\n\t}",
"public boolean isDataLoaded() {\n\t\t\n\t\t return dataLoaded;\n\t }",
"public boolean isLoaded();",
"@Override\n\tpublic void loadPlayerData(InputStream is) {\n\n\t}",
"public boolean isData();",
"public boolean checkPlays(Player player){\n return true;\n }",
"public boolean isLoaded() \n\t{\n\t return htRecords != null ;\n\t}",
"boolean hasPlayerId();",
"@java.lang.Override\n public boolean hasPlayer() {\n return player_ != null;\n }",
"public abstract boolean Load();",
"public abstract boolean isPlayer();",
"boolean isPlayable();",
"boolean hasPlayerBag();",
"public boolean evaluateDataClientHeavy() {\n // reset labels\n resetLabels();\n // get IDs of players\n // create one map with playerName and playerID\n // create one map with playerID and the count how often this player participates in this game\n List<Map<String, Object>> returnList;\n Map<String, Integer> mapNameToID = new HashMap<>();\n HashMap<Integer, Integer> mapIDToCount = new HashMap<>();\n if (!dbAccess.openConn()) {\n showAlertDBError();\n return false;\n }\n for (String playerName : playerNameList) {\n returnList = dbAccess.selectSQL(\"SELECT players.id FROM players WHERE players.name = '\" + playerName + \"';\");\n if (returnList == null || returnList.isEmpty()) {\n showAlertDBError();\n return false;\n } else {\n int playerID = (int) returnList.get(0).get(\"id\");\n if (!mapNameToID.containsKey(playerName)) {\n mapNameToID.put(playerName, playerID);\n }\n if (!mapIDToCount.containsKey(playerID)) {\n mapIDToCount.put(playerID, 1);\n } else {\n mapIDToCount.put(playerID, mapIDToCount.get(playerID) + 1);\n }\n }\n }\n\n // get all games and all participants from DB\n List<Map<String, Object>> dbGames = dbAccess.selectSQL(\"SELECT * FROM games;\");\n List<Map<String, Object>> dbParticipants = dbAccess.selectSQL(\"SELECT * FROM participants;\");\n if (dbGames == null || dbParticipants == null) {\n showAlertDBError();\n return false;\n }\n dbAccess.closeConn();\n\n // create winners map\n // holds gameID and ID of winning participant, if game has no winner participantID is -1\n HashMap<Integer, Integer> mapGameIDToWinnerID = new HashMap<>();\n\n // iterate all games\n for (Map<String, Object> rowGames : dbGames) {\n boolean dumpGame = false;\n int gameId = (int) rowGames.get(\"id\");\n String endTime = null;\n if (rowGames.get(\"end_time\") != null)\n endTime = rowGames.get(\"end_time\").toString();\n boolean isAIOnly = (boolean) rowGames.get(\"ai_only\");\n // get deepCopy of mapIDToCount\n Map<Integer, Integer> idToCountCopy = copyHashMapIntInt(mapIDToCount);\n // check if game was aborted preemptively\n if (endTime == null)\n continue;\n int winner = -1;\n\n //iterate all participants\n for (Map<String, Object> rowParticipants : dbParticipants) {\n // check if game.id matches participants.game\n if (gameId == (int) rowParticipants.get(\"game\")) {\n // get participants.id\n int playerID = (int) rowParticipants.get(\"player\");\n // check if participant is in the map of participants, if not skip to next game (break)\n if (idToCountCopy.containsKey(playerID)) {\n // check if the count in this map is higher than 0, if not skip to next game (break)\n if (idToCountCopy.get(playerID) > 0) {\n // lower value of count in map of participants for this participant\n idToCountCopy.put(playerID, idToCountCopy.get(playerID) - 1);\n // if this participant is winner - store it temporarily\n if (rowParticipants.get(\"winner\") != null) {\n winner = playerID;\n }\n } else {\n dumpGame = true;\n break;\n }\n } else {\n dumpGame = true;\n break;\n }\n }\n }\n // check if every value in idToCountCopy is 0\n // if yes -> save game and winner in winners map\n // if not -> dump game\n for (Map.Entry<Integer, Integer> entry : idToCountCopy.entrySet()) {\n if (entry.getValue() != 0) {\n dumpGame = true;\n }\n }\n if (dumpGame == false) {\n mapGameIDToWinnerID.put(gameId, winner);\n }\n }\n\n // check if any games with this constellation of players was played\n if (mapGameIDToWinnerID.isEmpty()) {\n resetPieChart();\n resetLabels();\n showAlertSelectionFail(\"Selection error\", \"No games with this constellation were found.\");\n return false;\n }\n\n // calculate average turns until winner is determined\n if (!dbAccess.openConn()) {\n showAlertDBError();\n return false;\n }\n Integer turnSum = 0;\n Integer gameCounter = 0;\n int averageTurns = 0;\n for (Map.Entry<Integer, Integer> entry : mapGameIDToWinnerID.entrySet()) {\n // check if game has winner\n if (entry.getValue() != -1) {\n // get number of turns for this game\n List<Map<String, Object>> resultList = dbAccess.selectSQL(\"SELECT MAX(turn) FROM moves WHERE game = \" + entry.getKey() + \";\");\n if (resultList == null || resultList.isEmpty()) {\n showAlertDBError();\n return false;\n } else {\n turnSum += (int) resultList.get(0).get(\"MAX(turn)\");\n gameCounter++;\n }\n }\n }\n\n // calculate average turns\n String strAverageTurns = \"\";\n if (gameCounter > 0) {\n averageTurns = Math.round(turnSum / gameCounter);\n }\n strAverageTurns = String.valueOf(averageTurns);\n dbAccess.closeConn();\n\n // now process mapGameIDToWinnerID to pieChart and labels\n Map<String, Integer> mapNameToWins = new HashMap<>();\n // iterate over GameID-WinnerID map and count wins for each player\n int endlessGames = 0;\n for (Map.Entry<Integer, Integer> entryWins : mapGameIDToWinnerID.entrySet()) {\n if (entryWins.getValue() == -1)\n endlessGames++;\n for (Map.Entry<String, Integer> entryName : mapNameToID.entrySet()) {\n if (entryName.getValue() == entryWins.getValue()) {\n if (!mapNameToWins.containsKey(entryName.getKey())) {\n mapNameToWins.put(entryName.getKey(), 1);\n } else {\n mapNameToWins.put(entryName.getKey(), mapNameToWins.get(entryName.getKey()) + 1);\n }\n }\n }\n }\n // add players without wins to the map\n for (Map.Entry<String, Integer> entry : mapNameToID.entrySet()) {\n if (!mapNameToWins.containsKey(entry.getKey()))\n mapNameToWins.put(entry.getKey(), 0);\n }\n\n // fill labels with numbers\n lblTotalGames.setText(String.valueOf(mapGameIDToWinnerID.size()));\n lblGamesWithoutWinner.setText(String.valueOf(endlessGames));\n if (averageTurns == 0) {\n lblAverageTurns.setText(\"Not available\");\n } else {\n lblAverageTurns.setText(strAverageTurns);\n }\n int labelCounter = 1;\n for (Map.Entry<String, Integer> entry : mapNameToWins.entrySet()) {\n vBoxDesc.getChildren().add(labelCounter, new Label(entry.getKey() + \":\"));\n vBoxNumbers.getChildren().add(labelCounter, new Label(String.valueOf(entry.getValue()) + \" wins\"));\n }\n\n // fill pieChart\n pieChartData = FXCollections.observableArrayList();\n for (Map.Entry<String, Integer> entry : mapNameToWins.entrySet()) {\n pieChartData.add(new PieChart.Data(entry.getKey(), entry.getValue()));\n }\n if (endlessGames > 0) {\n pieChartData.add(new PieChart.Data(\"No winner\", endlessGames));\n }\n chart.setData(pieChartData);\n chart.setTitle(\"Winners by percentage\");\n\n lblCaption.setTextFill(Color.web(\"#404040\", 1.0));\n lblCaption.setStyle(\"-fx-font: 24 arial;\");\n\n // set percentages\n for (PieChart.Data data : chart.getData()) {\n data.getNode().addEventHandler(MouseEvent.MOUSE_PRESSED,\n new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent e) {\n lblCaption.setTranslateX(e.getSceneX());\n lblCaption.setTranslateY(e.getSceneY());\n double percentage = (data.getPieValue() * 100) / Integer.valueOf(mapGameIDToWinnerID.size()).doubleValue();\n String strPercentage = formatDec(percentage);\n lblCaption.setText(String.valueOf(strPercentage + \"%\"));\n }\n });\n }\n // add pieChart and caption\n if (!diagramBox.getChildren().contains(chart))\n diagramBox.getChildren().add(chart);\n if (!root.getChildren().contains(lblCaption))\n root.getChildren().add(lblCaption);\n return true;\n }",
"protected abstract boolean isPlayerActivatable(PlayerSimple player);",
"@Override\n\tpublic void loadPlayerData(InputStream arg0) {\n\n\t}",
"boolean hasPlayer(String player);",
"boolean hasReplacePlayerResponse();",
"public abstract boolean isLoadCompleted();",
"private boolean isTextureLoaded() {\n return loaded;\n }",
"public boolean hasPlayer() {\n return playerBuilder_ != null || player_ != null;\n }",
"@Override\n\tpublic void loadPlayerData(InputStream arg0)\n\t{\n\n\t}",
"public boolean shouldLoad() {\n return load;\n }",
"protected boolean matchData() {\n for (int i = 0; i < itsNumPoints; i++) {\n if (itsValues[i] == null || itsValues[i].getData() == null) {\n return false;\n }\n }\n return true;\n }",
"boolean isPlayableInGame();",
"boolean hasPlayready();",
"protected boolean isLoaded()\n {\n return m_fLoaded;\n }",
"private boolean allReady() {\n PlayerModel[] playersInLobby = this.lobbyModel.getPlayersInLobby();\n if (playersInLobby.length <= 1)\n return false;\n for (PlayerModel pl : playersInLobby) {\n if (!pl.isReady() && !(pl instanceof ClientPlayerModel))\n return false;\n }\n return true;\n }",
"public boolean isLoaded() {\n return _id != null;\n }",
"boolean hasDataset();",
"public boolean allPlayersReady() {\r\n for (Player player : players) {\r\n if (!player.isReady()) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"private boolean isData() {\n return \"data\".equalsIgnoreCase(data.substring(tokenStart, tokenStart + 4));\n }",
"private boolean playerDetection() {\n\t\tAxisAlignedBB axisalignedbb = new AxisAlignedBB(posX, posY, posZ, posX + 1, posY + 1, posZ + 1).grow(DETECTION_RANGE);\n\t\tList<EntityPlayer> list = world.getEntitiesWithinAABB(EntityPlayer.class, axisalignedbb);\n\n\t\treturn !list.isEmpty();\n\t}",
"public boolean isLoaded(){return true;}",
"boolean hasChatData();",
"boolean isFetchData();",
"boolean hasTargetPlayerId();",
"public boolean isSetPlayer() {\n return this.player != null;\n }",
"@java.lang.Override\n public boolean hasData() {\n return data_ != null;\n }",
"boolean playerExists() {\n return this.game.h != null;\n }",
"boolean hasAsset();",
"public PlayerFunctionality getPlayerData()\r\n\t{ return data; }",
"public boolean loadGame(File file){\n\t\treturn true;\n\t}",
"public boolean allPlayersReady() {\n // Si un jugador esta offline, lo ignora\n for (Player p : players) {\n if (p.isOnline() && !p.isReady())\n return false;\n }\n return true;\n }",
"private boolean isOver() {\r\n return players.size() == 1;\r\n }",
"@java.lang.Override\n public boolean hasData() {\n return data_ != null;\n }",
"protected boolean processGameInfo(GameInfoStruct data){return false;}",
"public Boolean isDataEnabled() {\n return (mask / 4) > 0;\n }",
"public boolean unloadPlayer(P player){\n if(playerMap.containsKey(player)){\n //Player is safe to unload\n playerMap.remove(player);\n return true;\n } else {\n //Player isn't safe to save\n System.out.println(\"Tried to unload player \" + player.getName() + \"'s data, but it's not available\");\n return false;\n }\n }",
"public final boolean isDataAvailable() {\n\t\tif ( hasStatus() >= FileSegmentInfo.Available &&\n\t\t\t\t hasStatus() < FileSegmentInfo.Error)\n\t\t\treturn true;\n\t\treturn false;\n\t}",
"public void load()\n\t{\n\t\tfor(String s : playerData.getConfig().getKeys(false))\n\t\t{\n\t\t\tPlayerData pd = new PlayerData(playerData, s);\n\t\t\tpd.load();\n\t\t\tdataMap.put(s, pd);\n\t\t}\n\t}",
"public boolean readData() {\r\n \t\tif (null == dataFile)\r\n \t\t\treturn false;\r\n \t\tif (localLOGV) {\r\n \t\t\tLog.i(TAG, \"Reading Data...\");\r\n \t\t}\r\n \t\tgncDataHandler = new GNCDataHandler(this, dataFile, gzipFile);\r\n \t\treturn true;\r\n \t}",
"public boolean isWin_CommanderVimes(){\r\n // player got LordSelachii card\r\n Player playerHoldCard = null;\r\n for (Player player : discWorld.getPlayer_HASH().values()) {\r\n if (player.getPersonalityCardID() == 7) {\r\n playerHoldCard = player;\r\n break;\r\n }\r\n }\r\n \r\n if(playerHoldCard != null){\r\n if(discWorld.getShuffled_PlayerCard().size() == 0){\r\n return true;\r\n }\r\n } \r\n \r\n return false;\r\n }",
"boolean hasFairplay();",
"boolean hasDataName();",
"boolean hasTargetPlayerName();",
"public boolean isLoaded() {\n\treturn loaded;\n }",
"public boolean isAvailable(Player player) {\n return playerList.contains(player);\n }",
"public boolean isFirstPlayer()\r\n\t{\r\n\t\tgetStartGameDataFromServer();\r\n\t\treturn isFirstPlayer;\r\n\t}",
"public boolean canReadData() {\r\n \t\tboolean can = true;\r\n \t\tif (null == dataFile ) {\r\n \t\t\tcan = false;\r\n \t\t}\r\n \t\treturn can;\r\n \t}",
"boolean hasData()\n {\n logger.info(\"server: \" + server + \" addr: \" + addr + \"text:\" + text);\n return server != null && addr != null && text != null;\n }",
"public boolean initializeData() {\n m_robotData.clear(); // Data that we store \"per game session\"\n System.out.println(\"* Cleared robot data\");\n return true;\n }",
"public boolean live(String nom){\n\treturn players.get(nom);\n }",
"Boolean isPlaying() {\n return execute(\"player.playing\");\n }",
"boolean hasDataPartner();",
"public boolean hasData() {\n return dataBuilder_ != null || data_ != null;\n }",
"public boolean isLoaded()\n {\n return m_syntheticKind == JCacheSyntheticKind.JCACHE_SYNTHETHIC_LOADED;\n }",
"public boolean isDataLoadedOnce() {\n return mDataLoadedOnce;\n }",
"boolean hasPlaySingleCardResponse();",
"@Override\n\tpublic boolean isLoad() {\n\t\treturn false;\n\t}",
"boolean hasSrc();",
"java.util.Optional<Boolean> getLoadContents();",
"private boolean readyPlayer() {\n switch (this.state) {\n case MEDIA_NONE:\n if (this.player == null) {\n //TODO: Agregar buffer (this, audiobuffer, decoderbuffer).\n this.player = new MultiPlayer(this);\n this.setState(STATE.MEDIA_STARTING);\n return true;\n }\n case MEDIA_LOADING:\n //cordova js is not aware of MEDIA_LOADING, so we send MEDIA_STARTING instead\n LOG.d(LOG_TAG, \"StreamPlayer Loading: startPlaying() called during media preparation: \" + STATE.MEDIA_STARTING.ordinal());\n return false;\n case MEDIA_STARTING:\n case MEDIA_RUNNING:\n case MEDIA_PAUSED:\n case MEDIA_STOPPED:\n return true;\n default:\n LOG.d(LOG_TAG, \"StreamPlayer Error: startPlaying() called during invalid state: \" + this.state);\n sendErrorStatus(MEDIA_ERR_ABORTED);\n }\n return false;\n }",
"public boolean isOnline()\n\t{\n\t\treturn PlayerManager.getPlayer(name)!=null;\n\t}"
]
| [
"0.7334941",
"0.7107245",
"0.68265027",
"0.66384614",
"0.66384614",
"0.66384614",
"0.66384614",
"0.66384614",
"0.66384614",
"0.66384614",
"0.6578529",
"0.64882463",
"0.64882463",
"0.64744836",
"0.63509625",
"0.63361585",
"0.63361585",
"0.63268304",
"0.6315728",
"0.62908536",
"0.6287937",
"0.6287088",
"0.6260783",
"0.6257757",
"0.61959165",
"0.61858433",
"0.6183731",
"0.6173295",
"0.6159353",
"0.61516166",
"0.6131441",
"0.6130139",
"0.6127714",
"0.6079221",
"0.60759854",
"0.6066725",
"0.6063017",
"0.6057682",
"0.60504425",
"0.603829",
"0.6023248",
"0.6003078",
"0.5998159",
"0.5994334",
"0.5986665",
"0.59820515",
"0.5977621",
"0.5963709",
"0.5958493",
"0.5931885",
"0.5924063",
"0.59183407",
"0.5915426",
"0.5909963",
"0.58880097",
"0.58690906",
"0.5852584",
"0.58383894",
"0.58328295",
"0.58304614",
"0.58291703",
"0.58280873",
"0.5826738",
"0.5810303",
"0.58068645",
"0.57957983",
"0.57807636",
"0.5759933",
"0.57585275",
"0.57568055",
"0.5752171",
"0.5742382",
"0.57362765",
"0.57283425",
"0.57257736",
"0.57250804",
"0.5719284",
"0.5712133",
"0.5706493",
"0.5704851",
"0.5694785",
"0.56933075",
"0.5693114",
"0.567303",
"0.5669643",
"0.56677765",
"0.56645614",
"0.56601316",
"0.56474656",
"0.5646448",
"0.56418955",
"0.56415284",
"0.5641472",
"0.56306416",
"0.56253946",
"0.5617471",
"0.5616338",
"0.5607146",
"0.5601806",
"0.55965275"
]
| 0.70791626 | 2 |
Returns a specific player's data | public PlayerProfile getPlayer(P player){
if(playerMap.containsKey(player)){
//Player is safe to send
return playerMap.get(player);
} else {
//Player isn't safe to send
System.out.println("Tried to grab player " + player.getName() + "'s data, but it's not available");
return null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public PlayerData getPlayerData() {\n return player;\n }",
"public PlayerFunctionality getPlayerData()\r\n\t{ return data; }",
"public Node getPlayerData(){\n if(blender_Player == null){\n /** Get player data **/\n blender_Player = (Node) assetManager.loadModel(\"Models/Blender/PlayerModel.j3o\");\n String name = blender_Player.getName();\n\n /** Get player scene data **/\n Node blenderNode = (Node) blender_Player.getChildren().get(0);\n playerData_Children = blenderNode.getChildren();\n\n for(int p = 0; p < playerData_Children.size(); p++){\n String namePD = playerData_Children.get(p).getName();\n if(namePD.equals(\"AnimCharacter\")){\n playerIndex = p;\n }\n //System.out.println(\"Name : \" + namePD);\n }\n }\n if(playerIndex == -1){\n return null;\n }\n return (Node) playerData_Children.get(playerIndex);\n }",
"String getPlayer();",
"public static Database getPlayerData(String player){\n if(!PLAYERDATAS.containsKey(player)){\n PLAYERDATAS.put(player, new Database(player, true));\n }\n return PLAYERDATAS.get(player);\n }",
"public static Player getPlayer(Player player){\n Player returnPlayer = null;\n if (player != null) {\n try {\n returnPlayer = mapper.readValue(new File(\"Data\\\\PlayerData\\\\\" + getFileName(player) + \".json\"), Player.class);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n return returnPlayer;\n }",
"Player getPlayer(UUID playerId);",
"public Player getPlayer();",
"public Player getPlayer();",
"public int getPlayer()\n {\n return this.player;\n }",
"public String getPlayer() {\r\n return player;\r\n }",
"Player getPlayer();",
"public String getPlayer() {\n return p;\n }",
"public Player getPlayer(int index) {\r\n return players[index];\r\n }",
"public Player getPlayer(String username){\n return this.players.get(username);\n }",
"public PlayerID getPlayer(){\n\t\treturn this.player;\n\t}",
"public int getPlayer() {\r\n\t\treturn myPlayer;\r\n\t}",
"public Player getPlayer() {\r\n return world.getPlayer();\r\n }",
"public Player getPlayer(){\n\t\treturn this.player;\n\t}",
"Player getPlayer(int playerNumber){\n return players.get(playerNumber);\n }",
"public Player getPlayer() {\n return player;\n }",
"public List<PlayerItem> getAllPlayerItemById(Player player);",
"public Player getPlayer() {\n return player;\n }",
"public int getPlayer() {\r\n\t\treturn player;\r\n\t}",
"public Player getPlayer()\r\n {\r\n return player;\r\n }",
"public List<PlayerItem> getSpecific(int playerItemId);",
"public Player getPlayer() {\r\n return player;\r\n }",
"String getPlayerName();",
"@Override\n\tpublic List<Player> getPlayer() {\n\t\treturn ofy().load().type(Player.class).list();\n\t}",
"public Player getPlayer() { return player; }",
"public Player getPlayer() {\n return p;\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"java.lang.String getPlayerId();",
"public Player getPlayer() {\n\t\treturn this.player;\r\n\t}",
"public int getPlayerPosition(int player)\n {\n return players[player];\n }",
"public User getPlayer(String name) {\n\t\tUser ret = null;\n\t\tList<User> searchResult = this.players.stream().filter(x->x.name.equals(name)).collect(Collectors.toList());\n\t\tif (!searchResult.isEmpty()) {\n\t\t\tret = searchResult.get(0);\n\t\t}\n\t\treturn ret;\n\t}",
"protected Player getPlayer() { return player; }",
"public Player getPlayer() { return player;}",
"public Player getPlayer(String username) {\n for (Player p : players) {\n if (p.username.equals(username))\n return p;\n }\n return null;\n }",
"public Player retrieveOnePlayerFromDatabase(String dbMemberName, String dbChildName) {\n\n player = null;\n DatabaseReference dbReference = FirebaseDatabase.getInstance().getReference().child(dbMemberName).child(dbChildName);\n dbReference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n String name = dataSnapshot.child(\"name\").getValue().toString();\n String userName = dataSnapshot.child(\"userName\").getValue().toString();\n String password = dataSnapshot.child(\"password\").getValue().toString();\n String age = dataSnapshot.child(\"age\").getValue().toString();\n String phone = dataSnapshot.child(\"phone\").getValue().toString();\n String team = dataSnapshot.child(\"team\").getValue().toString();\n String location = dataSnapshot.child(\"location\").getValue().toString();\n String type = dataSnapshot.child(\"type\").getValue().toString();\n\n Log.d(\">>>>>\", \"[\" + name + \", \" + userName + \", \" + password + \", \" + age + \", \" + phone +\n \", \" + team + \", \" + location + \", \" + type + \"]\");\n player = new Player(name, userName, password, age, phone, team, location, type);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n return player;\n }",
"public int getPlayerId();",
"protected Player getPlayer() {\n return getGame().getPlayers().get(0);\n }",
"Player getCurrentPlayer();",
"Player getCurrentPlayer();",
"public Player getPlayer() {\n\t\treturn p;\n\t}",
"public Player getPlayer() {\n\t\treturn this.player;\n\t}",
"public Player getPlayer1(){\n return jugador1;\n }",
"public Player getPlayer() {\r\n\t\treturn player;\r\n\t}",
"public BasketballPlayer getPlayer(String player){\n\t\tfor(int i=0; i<5; i++){\n\t\t\tif(player.equals(_homeTeam.getPlayer(i).getpname())){\n\t\t\t\treturn _homeTeam.getPlayer(i);\n\t\t\t}\n\t\t}\n\t\tfor(int i=0; i<5; i++){\n\t\t\tif(player.equals(_awayTeam.getPlayer(i).getpname())){\n\t\t\t\treturn _awayTeam.getPlayer(i);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public String getCurrentPlayer() {\r\n return this.playerIds[this.currentPlayer];\r\n }",
"public final Player getPlayer() {\n return player;\n }",
"public Player getPlayer()\r\n\t{\r\n\t\treturn mPlayer;\r\n\t}",
"public String getPlayerName() {\n return name; \n }",
"public Player getPlayer(int i) {\n return this.players[i];\n }",
"public Player getPlayer() {\n\t\treturn player;\n\t}",
"public Player getPlayer() {\n\t\treturn player;\n\t}",
"public Player getPlayer() {\n\t\treturn player;\n\t}",
"public Player getPlayer() {\n\t\treturn player;\n\t}",
"public Player getPlayer() {\n\t\treturn player;\n\t}",
"public Player getPlayer() {\n\t\treturn player;\n\t}",
"public Player getPlayer() {\n\t\treturn player;\n\t}",
"public PlayerParticipant getPlayer(int playerId) {\n try {\n String query = \"SELECT * from playerparticpant WHERE Id = \" + playerId;\n ResultSet resultSet = dbhelper.ExecuteSqlQuery(query);\n if (resultSet.next()) {\n PlayerParticipant playerParticipant = new PlayerParticipant();\n playerParticipant.matchHistoryUri = resultSet.getString(\"MatchHistoryUri\");\n playerParticipant.profileIcon = resultSet.getInt(\"ProfileIconId\");\n playerParticipant.summonerId = resultSet.getLong(\"SummonerId\");\n playerParticipant.summonerName = resultSet.getString(\"SummonerName\");\n \n return playerParticipant;\n }\n } catch (SQLException | IllegalStateException ex) {\n System.out.println(\"An error occurred: \" + ex.getMessage());\n }\n \n return null;\n }",
"@Override\n\tpublic String getPlayer() {\n\t\treturn null;\n\t}",
"BPlayer getPlayer(UUID uuid);",
"private void getPlayerList(){\r\n\r\n PlayerDAO playerDAO = new PlayerDAO(Statistics.this);\r\n players = playerDAO.readListofPlayerNameswDefaultFirst();\r\n\r\n }",
"public String getOtherPlayer() {\n return otherPlayer;\n }",
"public String getPlayerName(){\n return this.playerName;\n\n }",
"public Dalek getPlayer() {\n return dalek;\n }",
"Player loadPlayer(String playerIdentifier) {\n\n Player load = new Player();\n Table t = Constants.processing.loadTable(\"data/player\" + playerIdentifier + \".csv\");\n load.brain.TableToNet(t);\n return load;\n }",
"String player1GetName(){\n return player1;\n }",
"Player getDormantPlayer();",
"public String getPlayerName() {\n return this.playerName;\n }",
"@Override\n public Player getPlayerOnIndex(int index) {\n return players.get(index);\n }",
"public PlayerItem getPlayerItemById(int playerItemId);",
"public Player getPlayer(){\r\n return player;\r\n }",
"public abstract void info(Player p);",
"int getPlayerId();",
"int getPlayerId();",
"@Override\n public <T extends PlayerData<?>> T get(Class<T> type) {\n T data = super.get(type);\n\n if (data != null) {\n return data;\n }\n\n data = PlayerDataController.INSTANCE.getDefaultData(this, type);\n return data;\n }",
"BPlayer getPlayer(Player player);",
"public Player getPlayer() {\n\t\t\treturn player;\n\t\t}",
"Player getSelectedPlayer();",
"public Long getPlayerAttribute(P player, String attribute){\n attribute = \".\" + attribute;\n\n if(playerMap.containsKey(player) && getPlayer(player).getPlayerProfile().containsKey(attribute)){\n //PlayerAttribute is safe to send\n return playerMap.get(player).getPlayerProfile().get(attribute);\n } else {\n //Player isn't safe to send\n System.out.println(\"Tried to grab player \" + player.getName() + \"'s attribute, but it's not available\");\n return null;\n }\n }",
"public String getPlayerName(){\n\t\treturn playerName;\n\t}",
"@SuppressWarnings(\"unused\")\n public static IHubParkourPlayer getPlayer(Player player) throws NullPointerException {\n if (player == null) {\n throw new NullPointerException(\"Player cannot be null\");\n }\n return CacheManager.getPlayer(player);\n }",
"public Player getPlayer() {\n return me;\n }",
"public AbstractGameObject getPlayer() {\n return this.player;\n }",
"private String getPlayerName() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n String storedName = preferences.getString(\"playerName\",\"none\");\n return storedName;\n }",
"@java.lang.Override\n public POGOProtos.Rpc.CombatProto.CombatPlayerProto getPlayer() {\n return player_ == null ? POGOProtos.Rpc.CombatProto.CombatPlayerProto.getDefaultInstance() : player_;\n }",
"public Player getClientPlayer() {\n\t\treturn players.get(0);\n\t}",
"@Override\r\n\tpublic void SavePlayerData() {\r\n\r\n Player player = (Player)Player.getPlayerInstance();\r\n\t\t\r\n\t\tString file = \"PlayerInfo.txt\";\r\n\t\tString playerlifepoint = \"\"+player.getLifePoints();\r\n\t\tString playerArmore = player.getArmorDescription();\r\n\t\ttry{\r\n\t\t\tPrintWriter print = new PrintWriter(file);\r\n\t\t\tprint.println(playerlifepoint);\r\n\t\t\tprint.println(playerArmore);\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\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 UUID getPlayerUuid() { return uuid; }",
"public char getPlayer() {\n return player;\n }",
"public String getPlayerName() {\n return playerName;\n }",
"public String getPlayerName() {\n return playerName;\n }",
"public String getPlayerName() {\n \treturn playername;\n }"
]
| [
"0.7689696",
"0.7364779",
"0.717891",
"0.6980499",
"0.6910961",
"0.69087756",
"0.6705104",
"0.6689655",
"0.6689655",
"0.66390294",
"0.6634278",
"0.6630735",
"0.6609475",
"0.66027695",
"0.6541365",
"0.6516325",
"0.6510536",
"0.6493997",
"0.64631706",
"0.6447286",
"0.64227986",
"0.6421942",
"0.6421799",
"0.64093727",
"0.6393906",
"0.63906884",
"0.6384506",
"0.63800865",
"0.6369571",
"0.63544595",
"0.6347013",
"0.6341285",
"0.6341285",
"0.6341285",
"0.6341285",
"0.6341285",
"0.63208467",
"0.6312955",
"0.6308702",
"0.62889665",
"0.6283091",
"0.62655616",
"0.6260676",
"0.6259722",
"0.6249462",
"0.62299913",
"0.6227639",
"0.6227639",
"0.6226895",
"0.6226454",
"0.6224241",
"0.62215674",
"0.6208076",
"0.6197709",
"0.61713773",
"0.61670196",
"0.6162617",
"0.61611533",
"0.61552876",
"0.61552876",
"0.61552876",
"0.61552876",
"0.61552876",
"0.61552876",
"0.61552876",
"0.61480284",
"0.61464304",
"0.61412936",
"0.614062",
"0.61405903",
"0.61252844",
"0.611904",
"0.61167127",
"0.61107767",
"0.6095165",
"0.60947114",
"0.6086882",
"0.60676336",
"0.6065856",
"0.60631794",
"0.6056039",
"0.6056039",
"0.6052989",
"0.6052127",
"0.60444266",
"0.6041476",
"0.60376704",
"0.6034812",
"0.60281456",
"0.6015813",
"0.6015067",
"0.6011175",
"0.60093665",
"0.60078",
"0.5993569",
"0.5991026",
"0.59886897",
"0.59875274",
"0.59875274",
"0.5980799"
]
| 0.7250355 | 2 |
Returns a specific player's attribute | public Long getPlayerAttribute(P player, String attribute){
attribute = "." + attribute;
if(playerMap.containsKey(player) && getPlayer(player).getPlayerProfile().containsKey(attribute)){
//PlayerAttribute is safe to send
return playerMap.get(player).getPlayerProfile().get(attribute);
} else {
//Player isn't safe to send
System.out.println("Tried to grab player " + player.getName() + "'s attribute, but it's not available");
return null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getAttribNum(){\r\n\t\treturn playerNum;\r\n\t}",
"public int getAttribNum(){\r\n\t\treturn playerNum;\r\n\t}",
"Object getAttribute(int attribute);",
"Attribute getAttribute();",
"String getAttribute();",
"java.lang.String getAttribute();",
"public int getPlayer()\n {\n return this.player;\n }",
"String getPlayer();",
"public int getPlayer() {\r\n\t\treturn myPlayer;\r\n\t}",
"public String getPlayer() {\r\n return player;\r\n }",
"public Player getPlayer();",
"public Player getPlayer();",
"public PlayerID getPlayer(){\n\t\treturn this.player;\n\t}",
"public Player getPlayer() { return player; }",
"Object getAttribute(String name);",
"Object getAttribute(String name);",
"Object getAttribute(String name);",
"public char getPlayer() {\n return player;\n }",
"public Player getPlayer(){\n\t\treturn this.player;\n\t}",
"public String getPlayerName() {\n return props.getProperty(\"name\");\n }",
"public Player getPlayer() { return player;}",
"public String getPlayer() {\n return p;\n }",
"public int getPlayer() {\r\n\t\treturn player;\r\n\t}",
"protected Player getPlayer() { return player; }",
"public static final ExtendedPlayer get(EntityPlayer player)\n\t{\n\t\treturn (ExtendedPlayer) player.getExtendedProperties(EXT_PROP_NAME);\n\t}",
"public Player getPlayer()\r\n {\r\n return player;\r\n }",
"public org.omg.uml.foundation.core.Attribute getAttribute();",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"String getPlayerName();",
"public String getSpecificUserAttribute(String ownerUsername, String username, int attribute)\n throws GcWebServiceError {\n WsSubject[] subjects;\n WsSubjectLookup lookup;\n String[] attributeValues = new String[5];\n Map<String, String> mapping = new HashMap<>();\n\n if (isSuperuser(ownerUsername) || groupingAssignmentService.groupingsOwned(\n groupingAssignmentService.getGroupPaths(ownerUsername, ownerUsername)).size() != 0) {\n try {\n lookup = grouperFS.makeWsSubjectLookup(username);\n WsGetSubjectsResults results = grouperFS.makeWsGetSubjectsResults(lookup);\n subjects = results.getWsSubjects();\n\n attributeValues = subjects[0].getAttributeValues();\n return attributeValues[attribute];\n\n } catch (NullPointerException npe) {\n throw new GcWebServiceError(\"Error 404 Not Found\");\n }\n } else {\n return attributeValues[attribute];\n }\n\n }",
"public Object getAttribute(String name);",
"String player1GetName(){\n return player1;\n }",
"public boolean setPlayerAttribute(P player, String attribute, Long number){\n attribute = \".\" + attribute;\n if(playerMap.containsKey(player)){\n if(playerMap.get(player).hasAttribute(attribute)){\n playerMap.get(player).getPlayerProfile().put(attribute, number);\n return true;\n } else {\n playerMap.get(player).getPlayerProfile().put(attribute, number);\n System.out.println(\"Just set an attribute that isn't loaded on the player\");\n return false;\n }\n } else {\n System.out.println(\"Failed to setPlayerAttribute as player isn't loaded\");\n return false;\n }\n }",
"public Player getPlayer() {\r\n return player;\r\n }",
"public String getPlayerName(){\n return this.playerName;\n\n }",
"String getName() {\n return getStringStat(playerName);\n }",
"public Player getPlayer() {\n\t\treturn this.player;\r\n\t}",
"com.google.protobuf.ByteString getAttributeBytes();",
"Player getPlayer();",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"Object getAttribute(String key);",
"Object getAttribute(String key);",
"public Player getPlayer(){\r\n return player;\r\n }",
"public Strider getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return p;\n }",
"public String getAttribute(String name);",
"public Player getPlayer() {\n\t\treturn this.player;\n\t}",
"public static Player getArtist(){return artist;}",
"public Player getPlayer() {\n\t\treturn p;\n\t}",
"public Player getPlayer() {\n return humanPlayer;\n }",
"String getName(){\n\t\treturn playerName;\n\t}",
"public Player getPlayer() {\r\n\t\treturn player;\r\n\t}",
"public PlayerProfile getPlayer(P player){\n\n if(playerMap.containsKey(player)){\n //Player is safe to send\n return playerMap.get(player);\n } else {\n //Player isn't safe to send\n System.out.println(\"Tried to grab player \" + player.getName() + \"'s data, but it's not available\");\n return null;\n }\n }",
"Player getPlayer(UUID playerId);",
"public Player getPlayer() {\n\t\treturn player;\n\t}",
"public Player getPlayer() {\n\t\treturn player;\n\t}",
"public Player getPlayer() {\n\t\treturn player;\n\t}",
"public Player getPlayer() {\n\t\treturn player;\n\t}",
"public Player getPlayer() {\n\t\treturn player;\n\t}",
"public Player getPlayer() {\n\t\treturn player;\n\t}",
"public Player getPlayer() {\n\t\treturn player;\n\t}",
"java.lang.String getPlayerId();",
"public String getOtherPlayer() {\n return otherPlayer;\n }",
"public Player getPlayer(int i) {\n return this.players[i];\n }",
"public int getPlayerX() {\n return playerX;\n }",
"abstract public String getNameFor(Player player);",
"public String getPlayerName() {\n return name; \n }",
"public Player getPlayer(){\r\n\t\treturn acquiredBy;\r\n\t}",
"String player2GetName(){\n return player2;\n }",
"public int getPlayerId();",
"public Player getPlayer()\r\n\t{\r\n\t\treturn mPlayer;\r\n\t}",
"public Player getPlayer1(){\n return jugador1;\n }",
"public PlayerData getPlayerData() {\n return player;\n }",
"Pair<String, String> getAdditionalAttribute();",
"public Player getPlayer() {\n return (roomPlayer);\n }",
"public String getName(){\r\n\t\treturn playerName;\r\n\t}",
"public Object getAttribute(Object key);",
"public UUID getPlayerUuid() { return uuid; }",
"public static String getUserAttribute(String username, String attribute) {\n String attributeValue = null;\n\n try {\n DirectoryManager directoryManager = (DirectoryManager) appContext.getBean(\"directoryManager\");\n User user = directoryManager.getUserByUsername(username);\n\n if (user != null) {\n //convert first character to upper case\n char firstChar = attribute.charAt(0);\n firstChar = Character.toUpperCase(firstChar);\n attribute = firstChar + attribute.substring(1, attribute.length());\n\n Method method = User.class.getDeclaredMethod(\"get\" + attribute, new Class[]{});\n String returnResult = (String) method.invoke(user, new Object[]{});\n if (returnResult == null || attribute.equals(\"Password\")) {\n returnResult = \"\";\n }\n\n attributeValue = returnResult;\n }\n } catch (Exception e) {\n LogUtil.error(WorkflowUtil.class.getName(), e, \"Error retrieving user attribute \" + attribute);\n }\n return attributeValue;\n }",
"public String getPlayerName(){\n\t\treturn playerName;\n\t}",
"public Player getAiPlayer() {\n return aiPlayer;\n }",
"public String getPlayerName() {\n \treturn playername;\n }",
"public String getPlayerName() {\n return this.playerName;\n }",
"public Node getPlayerData(){\n if(blender_Player == null){\n /** Get player data **/\n blender_Player = (Node) assetManager.loadModel(\"Models/Blender/PlayerModel.j3o\");\n String name = blender_Player.getName();\n\n /** Get player scene data **/\n Node blenderNode = (Node) blender_Player.getChildren().get(0);\n playerData_Children = blenderNode.getChildren();\n\n for(int p = 0; p < playerData_Children.size(); p++){\n String namePD = playerData_Children.get(p).getName();\n if(namePD.equals(\"AnimCharacter\")){\n playerIndex = p;\n }\n //System.out.println(\"Name : \" + namePD);\n }\n }\n if(playerIndex == -1){\n return null;\n }\n return (Node) playerData_Children.get(playerIndex);\n }",
"public Player getPlayer() {\n\t\t\treturn player;\n\t\t}",
"public Player getPlayer(int index) {\r\n return players[index];\r\n }",
"public final Player getPlayer() {\n return player;\n }",
"public PlayerSet getPlayer(){\n return definedOn;\n }",
"String attributeToGetter(String name);",
"public Sprite getPlayer() {\n\t\treturn player;\n\t}",
"public String getName()\r\n\t{\r\n\t\treturn this.playerName;\r\n\t}",
"@Override\n public void playerAttributeChange() {\n\n Logger.info(\"HUD Presenter: playerAttributeChange\");\n view.setLives(String.valueOf(player.getLives()));\n view.setMoney(String.valueOf(player.getMoney()));\n setWaveCount();\n }",
"public Dalek getPlayer() {\n return dalek;\n }",
"public String getName(Player p) {\n\t\treturn name;\n\t}",
"@Override\n\tpublic String getPlayer() {\n\t\treturn null;\n\t}"
]
| [
"0.7124137",
"0.7124137",
"0.66200376",
"0.66093236",
"0.6545951",
"0.6495355",
"0.64912325",
"0.64884555",
"0.62995917",
"0.62879163",
"0.62743235",
"0.62743235",
"0.62631553",
"0.6223225",
"0.6221269",
"0.6221269",
"0.6221269",
"0.6208794",
"0.62041456",
"0.61973536",
"0.61811",
"0.61753803",
"0.61661047",
"0.6119155",
"0.61104184",
"0.6107368",
"0.6106277",
"0.610268",
"0.6097137",
"0.60834736",
"0.6082047",
"0.6056451",
"0.6037281",
"0.6034848",
"0.6025477",
"0.602156",
"0.6020593",
"0.6016011",
"0.599994",
"0.5982159",
"0.597815",
"0.597815",
"0.597815",
"0.597815",
"0.597815",
"0.5973008",
"0.5973008",
"0.59637976",
"0.59606314",
"0.59559256",
"0.5953248",
"0.59469277",
"0.59461164",
"0.5940411",
"0.5937244",
"0.5913557",
"0.5912453",
"0.590432",
"0.58948255",
"0.5879551",
"0.5879551",
"0.5879551",
"0.5879551",
"0.5879551",
"0.5879551",
"0.5879551",
"0.5878248",
"0.5876906",
"0.58715427",
"0.5854906",
"0.58464575",
"0.58435965",
"0.5839433",
"0.5839385",
"0.5821408",
"0.5814936",
"0.5811868",
"0.5810839",
"0.5809978",
"0.5783302",
"0.5779964",
"0.57757276",
"0.5768261",
"0.5767882",
"0.57656235",
"0.57654375",
"0.57404935",
"0.5737947",
"0.5731365",
"0.57310253",
"0.57287806",
"0.57248086",
"0.5721843",
"0.5697058",
"0.5695118",
"0.56877005",
"0.56870717",
"0.5683265",
"0.567746",
"0.567249"
]
| 0.80281913 | 0 |
Saves a specific player, then writes new data to disk Returns true if successful | public boolean savePlayer(P player){
String uuid = player.getUniqueId().toString();
if(playerMap.containsKey(player)){
//Player is safe to save
List<String> playerAttributes = new ArrayList<String>(getPlayer(player).getPlayerAttributes());
System.out.println(player.getName() + " has " + playerAttributes.size() + " attributes to save.");
for(int i = 0; playerAttributes.size() > i; i++){
data.getConfig().set(uuid + "." + playerAttributes.get(i), playerMap.get(player).getPlayerAttribute(playerAttributes.get(i)));
}
data.saveData();
for(int i = 0; playerAttributes.size() > i; i++){
System.out.println("Saved " + uuid + "." + playerAttributes.get(i) + " as " + playerMap.get(player).getPlayerAttribute(playerAttributes.get(i)));
}
return true;
} else {
//Player isn't safe to save
System.out.println("Tried to save player " + player.getName() + "'s data, but it's not available");
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void savePlayer(Player player){\n if (player != null){\n try {\n mapper.writeValue(new File(\"Data\\\\PlayerData\\\\\" + getFileName(player) + \".json\"), player);\n } catch ( Exception e ) {\n e.printStackTrace();\n }\n }\n }",
"public void save()\n\t{\n\t\tif(entity != null)\n\t\t\t((SaveHandler)DimensionManager.getWorld(0).getSaveHandler()).writePlayerData(entity);\n\t}",
"public void saveCurrentPlayer() {\n\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/current_player\");\n\t\tBashCmdUtil.bashCmdNoOutput(String.format(\"echo \\\"%s\\\" >> data/current_player\",_currentPlayer));\n\t}",
"@Override\r\n\tpublic void SavePlayerData() {\r\n\r\n Player player = (Player)Player.getPlayerInstance();\r\n\t\t\r\n\t\tString file = \"PlayerInfo.txt\";\r\n\t\tString playerlifepoint = \"\"+player.getLifePoints();\r\n\t\tString playerArmore = player.getArmorDescription();\r\n\t\ttry{\r\n\t\t\tPrintWriter print = new PrintWriter(file);\r\n\t\t\tprint.println(playerlifepoint);\r\n\t\t\tprint.println(playerArmore);\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tpublic void savePlayerData(OutputStream os) {\n\t\t\n\t}",
"static void savePlayerData() throws IOException{\n\t\t/*\n\t\t\tFile playerData = new File(\"Players/\" + Player.getName() +\".txt\");\n\t\t\tif (!playerData.exists()) {\n\t\t\t\tplayerData.createNewFile(); \n\t\t\t}\n\t\tObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(\"Players/\" + Player.getName() +\".txt\"));\n\t\toos.writeObject(Player.class);\n\t\toos.close();\n\t\t*/\n\t\t\n\t\tString[] player = Player.getInfoAsStringArray();\n\t\tjava.io.File playerData = new java.io.File(\"Players/\" + player[0] +\".txt\");\n\t\tif (!playerData.exists()){\n\t\t\tplayerData.createNewFile();\n\t\t}\n\t\tjava.io.PrintWriter writer = new java.io.PrintWriter(playerData);\n\t\t//[0] Name, \n\t\twriter.println(\"# Name\");\n\t\twriter.println(player[0]);\n\t\t//[1] Level, \n\t\twriter.println(\"# Level\");\n\t\twriter.println(player[1]);\n\t\t//[2] getRoleAsInt(),\n\t\twriter.println(\"# Role/Class\");\n\t\twriter.println(player[2]);\n\t\t//[3] exp,\n\t\twriter.println(\"# Exp\");\n\t\twriter.println(player[3]);\n\t\t//[4] nextLevelAt,\n\t\twriter.println(\"# Exp Required for Next Level Up\");\n\t\twriter.println(player[4]);\n\t\t//[5] health,\n\t\twriter.println(\"# Current Health\");\n\t\twriter.println(player[5]);\n\t\t//[6] maxHealth,\n\t\twriter.println(\"# Max Health\");\n\t\twriter.println(player[6]);\n\t\t//[7] intelligence,\n\t\twriter.println(\"# Intelligence\");\n\t\twriter.println(player[7]);\n\t\t//[8] dexterity,\n\t\twriter.println(\"# Dexterity\");\n\t\twriter.println(player[8]);\n\t\t//[9] strength,\n\t\twriter.println(\"# Strength\");\n\t\twriter.println(player[9]);\n\t\t//[10] speed,\n\t\twriter.println(\"# Speed\");\n\t\twriter.println(player[10]);\n\t\t//[11] protection,\n\t\twriter.println(\"# Protection\");\n\t\twriter.println(player[11]);\n\t\t//[12] accuracy,\n\t\twriter.println(\"# Accuracy\");\n\t\twriter.println(player[12]);\n\t\t//[13] dodge,\n\t\twriter.println(\"# Dodge\");\n\t\twriter.println(player[13]);\n\t\t//[14] weaponCode,\n\t\twriter.println(\"# Weapon's Code\");\n\t\twriter.println(player[14]);\n\t\t//[15] armorCode,\n\t\twriter.println(\"# Armor's Code\");\n\t\twriter.println(player[15]);\n\t\t//[16] Gold,\n\t\twriter.println(\"# Gold\");\n\t\twriter.println(player[16]);\n\t\twriter.close();\n\t\t\n\t}",
"@Override\n\tpublic void savePlayerData(OutputStream os) {\n\n\t}",
"public void save(){\n Player temp = Arena.CUR_PLAYER;\n try{\n FileOutputStream outputFile = new FileOutputStream(\"./data.sec\");\n ObjectOutputStream objectOut = new ObjectOutputStream(outputFile);\n objectOut.writeObject(temp);\n objectOut.close();\n outputFile.close();\n }\n catch(FileNotFoundException e){\n System.out.print(\"Cannot create a file at that location\");\n }\n catch(SecurityException e){\n System.out.print(\"Permission Denied!\");\n }\n catch(IOException e){\n System.out.println(\"Error 203\");\n } \n }",
"public void save()\n\t{\n\t\tfor(PlayerData pd : dataMap.values())\n\t\t\tpd.save();\n\t}",
"@Override\n\tpublic void savePlayerData(OutputStream arg0) {\n\n\t}",
"@Override\r\n\tpublic void SavePlayerName() {\r\n\t\tPlayer player = (Player)Player.getPlayerInstance();\r\n\t\t\r\n\t\tString file = \"PlayerName.txt\";\r\n\t\tString playerName = player.getName();\r\n\t\ttry{\r\n\t\t\tPrintWriter print = new PrintWriter(file);\r\n\t\t\tprint.println(playerName);\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tpublic void savePlayerData(OutputStream arg0)\n\t{\n\n\t}",
"void save(int Wave, Set<UUID> players);",
"public void save() {\n final JFileChooser fileChooser =\n new JFileChooser(System.getProperty(\"user.dir\"));\n try {\n fileChooser.setSelectedFile(new File(\"save.ser\"));\n int saveFile = fileChooser.showSaveDialog(GameFrame.this);\n\n if (saveFile == JFileChooser.APPROVE_OPTION) {\n File saveGame = fileChooser.getSelectedFile();\n FileOutputStream fileOut = new FileOutputStream(saveGame);\n ObjectOutputStream objOut = new ObjectOutputStream(fileOut);\n objOut.writeObject(world);\n objOut.close();\n fileOut.close();\n System.out.println(\"Game saved.\");\n } else {\n return;\n }\n } catch (IOException i) {\n i.printStackTrace();\n }\n\n }",
"public static boolean save(Map map, Player player) {\n\t\tnew File(\"save/\" + map.getName() + \"/chunk\").mkdirs();\n\t\t// Chunk\n\t\tfor (Entry<Vector2i, Chunk> e : map.getChunks().entrySet())\n\t\t\tif (!saveChunk(map.getName(), e.getValue()))\n\t\t\t\treturn false;\n\t\t// Setting\n\t\ttry (DataOutputStream dos = new DataOutputStream(\n\t\t\t\tnew FileOutputStream(new File(\"save/\" + map.getName() + \"/map.settings\")))) {\n\t\t\t// Player\n\t\t\tdos.writeFloat(player.getCamera().getPosition().x);\n\t\t\tdos.writeFloat(player.getCamera().getPosition().y);\n\t\t\tdos.writeFloat(player.getCamera().getPosition().z);\n\t\t\t// Chunk\n\t\t\tdos.writeInt(Chunk.SIZE);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t\tSystem.out.println(\"[Info] Map \" + map.getName() + \" saved\");\n\t\treturn true;\n\t}",
"void savePlayer(String playerIdentifier, int score, int popID) {\n //save the players top score and its population id\n Table playerStats = new Table();\n playerStats.addColumn(\"Top Score\");\n playerStats.addColumn(\"PopulationID\");\n TableRow tr = playerStats.addRow();\n tr.setFloat(0, score);\n tr.setInt(1, popID);\n\n Constants.processing.saveTable(playerStats, \"data/playerStats\" + playerIdentifier + \".csv\");\n\n //save players brain\n Constants.processing.saveTable(brain.NetToTable(), \"data/player\" + playerIdentifier + \".csv\");\n }",
"private void savePlayers() {\r\n this.passive_players.stream()\r\n .filter(E -> E.isChanged())\r\n .forEach(e -> {\r\n e.save();\r\n });\r\n }",
"public void savePlayer(String username, String password, String path, Boolean changed) throws IOException {\r\n ctrlDomain.savePlayer(username, password, path, changed);\r\n }",
"public Save(Player player, String worldname) {\n\t\tthis(player.game, \"/saves/\" + worldname + \"/\");\r\n\t\t\r\n\t\twriteGame(\"Game\");\n\t\t//writePrefs(\"KeyPrefs\");\r\n\t\twriteWorld(\"Level\");\r\n\t\twritePlayer(\"Player\", player);\r\n\t\twriteInventory(\"Inventory\", player);\r\n\t\twriteEntities(\"Entities\");\r\n\t\t\r\n\t\tGame.notifications.add(\"World Saved!\");\r\n\t\tplayer.game.asTick = 0;\r\n\t\tplayer.game.saving = false;\r\n\t}",
"public void save() throws IOException {\n/* 481 */ Connection dbcon = null;\n/* 482 */ PreparedStatement ps = null;\n/* */ \n/* */ try {\n/* 485 */ CreaturePos pos = CreaturePos.getPosition(this.wurmid);\n/* 486 */ if (pos != null) {\n/* */ \n/* 488 */ pos.setPosX(this.posx);\n/* 489 */ pos.setPosY(this.posy);\n/* 490 */ pos.setPosZ(this.posz, false);\n/* 491 */ pos.setRotation(this.rotation);\n/* 492 */ pos.setZoneId(this.zoneid);\n/* 493 */ pos.setLayer(0);\n/* */ } else {\n/* */ \n/* 496 */ new CreaturePos(this.wurmid, this.posx, this.posy, this.posz, this.rotation, this.zoneid, 0, -10L, true);\n/* 497 */ } dbcon = DbConnector.getPlayerDbCon();\n/* 498 */ if (exists(dbcon)) {\n/* */ \n/* 500 */ ps = dbcon.prepareStatement(\"DELETE FROM PLAYERS WHERE WURMID=?\");\n/* 501 */ ps.setLong(1, this.wurmid);\n/* 502 */ ps.executeUpdate();\n/* 503 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ } \n/* 505 */ ps = dbcon.prepareStatement(\"insert into PLAYERS (MAYUSESHOP,PASSWORD,WURMID,LASTLOGOUT,PLAYINGTIME,TEMPLATENAME,SEX,CENTIMETERSHIGH,CENTIMETERSLONG,CENTIMETERSWIDE,INVENTORYID,BODYID,MONEYSALES,BUILDINGID,STAMINA,HUNGER,THIRST,IPADDRESS,REIMBURSED,PLANTEDSIGN,BANNED,PAYMENTEXPIRE,POWER,RANK,DEVTALK,WARNINGS,LASTWARNED,FAITH,DEITY,ALIGNMENT,GOD,FAVOR,LASTCHANGEDDEITY,REALDEATH,CHEATED,LASTFATIGUE,FATIGUE,DEAD,KINGDOM,SESSIONKEY,SESSIONEXPIRE,VERSION,MUTED,LASTFAITH,NUMFAITH,MONEY,CLIMBING,NUMSCHANGEDKINGDOM,AGE,LASTPOLLEDAGE,FAT,BANEXPIRY,BANREASON,FACE,REPUTATION,LASTPOLLEDREP,TITLE,PET,NICOTINE,NICOTINETIME,ALCOHOL,ALCOHOLTIME,LOGGING,MAYMUTE,MUTEEXPIRY,MUTEREASON,LASTSERVER,CURRENTSERVER,REFERRER,EMAIL,PWQUESTION,PWANSWER,PRIEST,BED,SLEEP,CREATIONDATE,THEFTWARNED,NOREIMB,DEATHPROT,FATIGUETODAY,FATIGUEYDAY,FIGHTMODE,NEXTAFFINITY,DETECTIONSECS,TUTORIALLEVEL,AUTOFIGHT,APPOINTMENTS,PA,APPOINTPA,PAWINDOW,NUTRITION,DISEASE,PRIESTTYPE,LASTCHANGEDPRIEST,LASTCHANGEDKINGDOM,LASTLOSTCHAMPION,CHAMPIONPOINTS,CHAMPCHANNELING,MUTETIMES,VOTEDKING,EPICKINGDOM,EPICSERVER,CHAOSKINGDOM,FREETRANSFER,HOTA_WINS,LASTMODIFIEDRANK,MAXRANK,KARMA,MAXKARMA,TOTALKARMA,BLOOD,FLAGS,FLAGS2,ABILITIES,ABILITYTITLE,SCENARIOKARMA,UNDEADTYPE,UNDEADKILLS,UNDEADPKILLS,UNDEADPSECS,NAME,CALORIES,CARBS,FATS,PROTEINS,SECONDTITLE) VALUES(?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\");\n/* 506 */ ps.setBoolean(1, this.overrideshop);\n/* 507 */ ps.setString(2, this.password);\n/* 508 */ ps.setLong(3, this.wurmid);\n/* 509 */ ps.setLong(4, System.currentTimeMillis());\n/* 510 */ ps.setLong(5, this.playingTime);\n/* 511 */ ps.setString(6, this.templateName);\n/* 512 */ ps.setByte(7, this.sex);\n/* 513 */ ps.setShort(8, this.centhigh);\n/* 514 */ ps.setShort(9, this.centlong);\n/* 515 */ ps.setShort(10, this.centwide);\n/* 516 */ ps.setLong(11, this.inventoryId);\n/* 517 */ ps.setLong(12, this.bodyId);\n/* 518 */ ps.setLong(13, this.moneySalesEver);\n/* 519 */ ps.setLong(14, this.buildingId);\n/* 520 */ ps.setShort(15, (short)this.stamina);\n/* 521 */ ps.setShort(16, (short)this.hunger);\n/* 522 */ ps.setShort(17, (short)this.thirst);\n/* 523 */ ps.setString(18, this.lastip);\n/* 524 */ ps.setBoolean(19, this.reimbursed);\n/* 525 */ ps.setLong(20, this.plantedSign);\n/* 526 */ ps.setBoolean(21, this.banned);\n/* 527 */ ps.setLong(22, this.paymentExpire);\n/* 528 */ ps.setByte(23, this.power);\n/* 529 */ ps.setInt(24, this.rank);\n/* 530 */ ps.setBoolean(25, this.mayHearDevtalk);\n/* 531 */ ps.setShort(26, (short)this.warnings);\n/* 532 */ ps.setLong(27, this.lastwarned);\n/* 533 */ ps.setFloat(28, this.faith);\n/* 534 */ ps.setByte(29, this.deity);\n/* 535 */ ps.setFloat(30, this.align);\n/* 536 */ ps.setByte(31, this.god);\n/* 537 */ ps.setFloat(32, this.favor);\n/* 538 */ ps.setLong(33, this.lastChangedDeity);\n/* 539 */ ps.setByte(34, this.realdeathcounter);\n/* 540 */ ps.setLong(35, this.lastcheated);\n/* 541 */ ps.setLong(36, this.lastfatigue);\n/* 542 */ ps.setInt(37, this.fatiguesecsleft);\n/* 543 */ ps.setBoolean(38, this.dead);\n/* 544 */ ps.setByte(39, this.kingdom);\n/* 545 */ ps.setString(40, this.session);\n/* 546 */ ps.setLong(41, this.sessionExpiration);\n/* 547 */ ps.setLong(42, this.ver);\n/* 548 */ ps.setBoolean(43, this.mute);\n/* 549 */ ps.setLong(44, this.lastfaith);\n/* 550 */ ps.setByte(45, this.numfaith);\n/* 551 */ ps.setLong(46, this.money);\n/* 552 */ ps.setBoolean(47, this.climbing);\n/* 553 */ ps.setByte(48, this.changedKingdom);\n/* 554 */ ps.setInt(49, this.age);\n/* 555 */ ps.setLong(50, this.lastPolledAge);\n/* 556 */ ps.setByte(51, this.fat);\n/* 557 */ ps.setLong(52, this.banexpiry);\n/* 558 */ ps.setString(53, this.banreason);\n/* 559 */ ps.setLong(54, this.face);\n/* 560 */ ps.setInt(55, this.reputation);\n/* 561 */ ps.setLong(56, this.lastPolledReputation);\n/* 562 */ ps.setInt(57, this.title);\n/* 563 */ ps.setLong(58, this.pet);\n/* 564 */ ps.setFloat(59, this.nicotine);\n/* 565 */ ps.setLong(60, this.nicotineTime);\n/* 566 */ ps.setFloat(61, this.alcohol);\n/* 567 */ ps.setLong(62, this.alcoholTime);\n/* 568 */ ps.setBoolean(63, this.logging);\n/* 569 */ ps.setBoolean(64, this.mayMute);\n/* 570 */ ps.setLong(65, this.muteexpiry);\n/* 571 */ ps.setString(66, this.mutereason);\n/* 572 */ ps.setInt(67, this.lastServer);\n/* 573 */ ps.setInt(68, this.currentServer);\n/* 574 */ ps.setLong(69, this.referrer);\n/* 575 */ ps.setString(70, this.emailAdress);\n/* 576 */ ps.setString(71, this.pwQuestion);\n/* 577 */ ps.setString(72, this.pwAnswer);\n/* 578 */ ps.setBoolean(73, this.isPriest);\n/* 579 */ ps.setLong(74, this.bed);\n/* 580 */ ps.setInt(75, this.sleep);\n/* 581 */ ps.setLong(76, this.creationDate);\n/* 582 */ ps.setBoolean(77, this.istheftwarned);\n/* 583 */ ps.setBoolean(78, this.noReimbLeft);\n/* 584 */ ps.setBoolean(79, this.deathProt);\n/* 585 */ ps.setInt(80, this.fatigueSecsToday);\n/* 586 */ ps.setInt(81, this.fatigueSecsYday);\n/* 587 */ ps.setByte(82, this.fightmode);\n/* 588 */ ps.setLong(83, this.nextAffinity);\n/* 589 */ ps.setShort(84, this.detectionSecs);\n/* 590 */ ps.setInt(85, this.tutLevel);\n/* 591 */ ps.setBoolean(86, this.autofight);\n/* 592 */ ps.setLong(87, this.appointments);\n/* 593 */ ps.setBoolean(88, this.isPA);\n/* 594 */ ps.setBoolean(89, this.mayAppointPA);\n/* 595 */ ps.setBoolean(90, this.seesPAWin);\n/* 596 */ ps.setFloat(91, this.nutrition);\n/* 597 */ ps.setByte(92, this.disease);\n/* 598 */ ps.setByte(93, this.priestType);\n/* 599 */ ps.setLong(94, this.lastChangedPriestType);\n/* 600 */ ps.setLong(95, this.lastChangedKingdom);\n/* 601 */ ps.setLong(96, this.lastLostChampion);\n/* 602 */ ps.setShort(97, this.championPoints);\n/* 603 */ ps.setFloat(98, this.champChanneling);\n/* 604 */ ps.setShort(99, this.muteTimes);\n/* 605 */ ps.setBoolean(100, this.voteKing);\n/* 606 */ ps.setByte(101, this.epicKingdom);\n/* 607 */ ps.setInt(102, this.epicServerId);\n/* 608 */ ps.setInt(103, this.chaosKingdom);\n/* 609 */ ps.setBoolean(104, this.hasFreeTransfer);\n/* 610 */ ps.setShort(105, this.hotaWins);\n/* */ \n/* 612 */ ps.setLong(106, this.lastModifiedRank);\n/* 613 */ ps.setInt(107, this.maxRank);\n/* 614 */ ps.setInt(108, this.karma);\n/* 615 */ ps.setInt(109, this.maxKarma);\n/* 616 */ ps.setInt(110, this.totalKarma);\n/* 617 */ ps.setByte(111, this.blood);\n/* 618 */ ps.setLong(112, this.flags);\n/* 619 */ ps.setLong(113, this.flags2);\n/* 620 */ ps.setLong(114, this.abilities);\n/* 621 */ ps.setInt(115, this.abilityTitle);\n/* 622 */ ps.setInt(116, this.scenarioKarma);\n/* */ \n/* 624 */ ps.setByte(117, this.undeadType);\n/* 625 */ ps.setInt(118, this.undeadKills);\n/* 626 */ ps.setInt(119, this.undeadPKills);\n/* 627 */ ps.setInt(120, this.undeadPSecs);\n/* */ \n/* 629 */ ps.setString(121, this.name);\n/* 630 */ ps.setFloat(122, this.calories);\n/* 631 */ ps.setFloat(123, this.carbs);\n/* 632 */ ps.setFloat(124, this.fats);\n/* 633 */ ps.setFloat(125, this.proteins);\n/* */ \n/* 635 */ ps.setInt(126, this.secondTitle);\n/* */ \n/* 637 */ ps.executeUpdate();\n/* 638 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ \n/* 640 */ Players.getInstance().registerNewKingdom(this.wurmid, this.kingdom);\n/* */ \n/* 642 */ ps = dbcon.prepareStatement(\"DELETE FROM FRIENDS WHERE WURMID=?\");\n/* 643 */ ps.setLong(1, this.wurmid);\n/* 644 */ ps.executeUpdate();\n/* 645 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ \n/* 647 */ if (this.friends != null)\n/* */ {\n/* 649 */ for (int x = 0; x < this.friends.length; x++) {\n/* */ \n/* 651 */ ps = dbcon.prepareStatement(INSERT_FRIEND);\n/* 652 */ ps.setLong(1, this.wurmid);\n/* 653 */ ps.setLong(2, this.friends[x]);\n/* 654 */ ps.setByte(3, this.friendcats[x]);\n/* 655 */ ps.executeUpdate();\n/* 656 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ } \n/* */ }\n/* */ \n/* 660 */ ps = dbcon.prepareStatement(\"DELETE FROM IGNORED WHERE WURMID=?\");\n/* 661 */ ps.setLong(1, this.wurmid);\n/* 662 */ ps.executeUpdate();\n/* 663 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ \n/* 665 */ if (this.ignored != null)\n/* */ {\n/* 667 */ for (int x = 0; x < this.ignored.length; x++) {\n/* */ \n/* 669 */ ps = dbcon.prepareStatement(INSERT_IGNORED);\n/* 670 */ ps.setLong(1, this.wurmid);\n/* 671 */ ps.setLong(2, this.ignored[x]);\n/* 672 */ ps.executeUpdate();\n/* 673 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ } \n/* */ }\n/* */ \n/* 677 */ if (this.enemies != null)\n/* */ {\n/* 679 */ for (int x = 0; x < this.enemies.length; x++) {\n/* */ \n/* 681 */ ps = dbcon.prepareStatement(INSERT_ENEMY);\n/* 682 */ ps.setLong(1, this.wurmid);\n/* 683 */ ps.setLong(2, this.enemies[x]);\n/* 684 */ ps.executeUpdate();\n/* 685 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ } \n/* */ }\n/* */ \n/* 689 */ if (this.titleArr.length > 0)\n/* */ {\n/* 691 */ for (int x = 0; x < this.titleArr.length; x++) {\n/* */ \n/* 693 */ Titles.Title t = Titles.Title.getTitle(this.titleArr[x]);\n/* 694 */ if (t != null) {\n/* */ \n/* 696 */ ps = dbcon.prepareStatement(\"INSERT INTO TITLES (WURMID,TITLEID,TITLENAME) VALUES(?,?,?)\");\n/* 697 */ ps.setLong(1, this.wurmid);\n/* 698 */ ps.setInt(2, this.titleArr[x]);\n/* 699 */ ps.setString(3, t.getName(true));\n/* 700 */ ps.executeUpdate();\n/* 701 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ } \n/* */ } \n/* */ }\n/* */ \n/* 706 */ if (this.hasAwards) {\n/* */ \n/* 708 */ ps = dbcon.prepareStatement(\"DELETE FROM AWARDS WHERE WURMID=?\");\n/* 709 */ ps.setLong(1, this.wurmid);\n/* 710 */ ps.executeUpdate();\n/* 711 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ \n/* 713 */ ps = dbcon.prepareStatement(\"INSERT INTO AWARDS(WURMID, DAYSPREM, MONTHSPREM, MONTHSEVER, CONSECMONTHS, SILVERSPURCHASED, LASTTICKEDPREM, CURRENTLOYALTY, TOTALLOYALTY) VALUES(?,?,?,?,?,?,?,?,?)\");\n/* 714 */ ps.setLong(1, this.wurmid);\n/* 715 */ ps.setInt(2, this.daysPrem);\n/* 716 */ ps.setInt(3, this.monthsPaidSinceReset);\n/* 717 */ ps.setInt(4, this.monthsPaidEver);\n/* 718 */ ps.setInt(5, this.monthsPaidInARow);\n/* 719 */ ps.setInt(6, this.silverPaidEver);\n/* 720 */ ps.setLong(7, this.lastTicked);\n/* 721 */ ps.setInt(8, this.currentLoyaltyPoints);\n/* 722 */ ps.setInt(9, this.totalLoyaltyPoints);\n/* 723 */ ps.executeUpdate();\n/* 724 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ } \n/* 726 */ if (this.cooldowns.size() > 0)\n/* */ {\n/* 728 */ Cooldowns cd = Cooldowns.getCooldownsFor(this.wurmid, true);\n/* 729 */ for (Map.Entry<Integer, Long> ent : this.cooldowns.entrySet())\n/* */ {\n/* 731 */ cd.addCooldown(((Integer)ent.getKey()).intValue(), ((Long)ent.getValue()).longValue(), false);\n/* */ }\n/* */ }\n/* */ \n/* 735 */ } catch (SQLException sqex) {\n/* */ \n/* 737 */ logger.log(Level.WARNING, this.name + \" \" + sqex.getMessage(), sqex);\n/* 738 */ throw new IOException(sqex);\n/* */ }\n/* */ finally {\n/* */ \n/* 742 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* 743 */ DbConnector.returnConnection(dbcon);\n/* */ } \n/* */ }",
"public static void writePlayerToFile(Player p)\r\n {\r\n try{\r\n //Create an \"players.txt\" file with an ObjectOutputStream\r\n FileOutputStream fileOut = new FileOutputStream(\"players.txt\", true);\r\n ObjectOutputStream objectOut = new ObjectOutputStream(fileOut); \r\n\r\n //Write the Player objetct to the file \r\n objectOut.writeObject(p);\r\n //Close file\r\n objectOut.close();\r\n }catch (IOException ioException) \r\n { \r\n //Output error message \r\n System.out.println(\"Error: The file cannot be created\"); \r\n }//end try\r\n }",
"public void saveGame(String fileName){\n Gson gson = new Gson();\n String userJson = gson.toJson(player);\n\n try(Writer w = new BufferedWriter(new OutputStreamWriter( new FileOutputStream(fileName), \"UTF-8\"))) {\n w.write(userJson);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void save(){\r\n\t\ttry {\r\n\t\t\tgame.suspendLoop();\r\n\t\t\tGameStockage.getInstance().save(game);\r\n\t\t\tgame.resumeLoop();\r\n\t\t} catch (GameNotSaveException e) {\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\tgame.resumeLoop();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\tgame.resumeLoop();\r\n\t\t}\r\n\t}",
"public void saveGameData(int score, int tiempo, String replay_path){\n connect();\n\n try {\n doStream.writeUTF(\"END_GAME_DATA\");\n doStream.writeUTF(currentUser.getUserName());\n doStream.writeInt(score);\n doStream.writeInt(tiempo);\n doStream.writeUTF(replay_path);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n disconnect();\n }",
"public void save() {\n\t\tlog.log(\"Attempting to save...\");\n\t\tPath spath = Paths.get(getFullSavePath());\n\t\tPath cpath = Paths.get(getFullSavePath() + \"units/\");\n\t\ttry {\n\t\t\tif(!Files.exists(spath))\n\t\t\t\tFiles.createDirectory(spath);\n\t\t\tif(!Files.exists(cpath))\n\t\t\t\tFiles.createDirectory(cpath);\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tlog.log(\"Save failed.\");\n\t\t\treturn;\n\t\t}\n\n\t\tFile[] files = new File(cpath.toString()).listFiles();\n\t\tfor(File f : files) {\n\t\t\tf.delete();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tBufferedWriter mfestWriter = new BufferedWriter(new FileWriter(getFullSavePath() + \"progress.txt\"));\n\t\t\tmfestWriter.write(name);\n\t\t\tmfestWriter.close();\n\t\t\tfor(MapCharacter mc : getFriendlies()) {\n\t\t\t\tBufferedWriter charWriter = new BufferedWriter(new FileWriter(getFullSavePath() + \"units/\"\n\t\t\t\t\t\t+ mc.getEnclosed().getDirName()));\n\t\t\t\tcharWriter.write(mc.getEnclosed().save());\n\t\t\t\tcharWriter.close();\n\t\t\t}\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tlog.log(\"Save failed.\");\n\t\t\treturn;\n\t\t}\n\t\tlog.log(\"Game saved.\");\n\t}",
"public void saveGame(File fileLocation);",
"@Override\n public void onPause() {\n super.onPause();\n ObjectOutput out = null;\n String fileName = \"savedGame\";\n File saved = new File(getFilesDir(), fileName);\n\n try {\n out = new ObjectOutputStream(new FileOutputStream(saved, false));\n out.writeObject(player);\n out.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void saveGame(int gameId, String fileName){\n\n }",
"public String save(){\r\n StringBuilder saveString = new StringBuilder(\"\");\r\n //currentPlayer, numPlayer, players[], \r\n saveString.append(currentPlayer + \" \");\r\n saveString.append(numPlayers + \" \");\r\n \r\n int i = 0;\r\n while(i < numPlayers){\r\n saveString.append(playerToString(players[i]) + \" \");\r\n i = i + 1;\r\n }\r\n\t\t\r\n\t\t//encrypt saveString\r\n\t\tString result = encryptSave(saveString.toString());\r\n \r\n return result;\r\n }",
"private void saveScore() {\n try {\n PrintWriter writer = new PrintWriter(new FileOutputStream(new File(Const.SCORE_FILE), true));\n writer.println(this.player.getName() + \":\" + this.player.getGold() + \":\" + this.player.getStrength());\n writer.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }",
"public void saveGame(Player player, Computer computer, \r\n\t\t\tObject strategy, String gameMode, String gameType) {\r\n\t\r\n\t\tSystem.out.println(\"writing data in file \"+this.uName);\r\n\t\ttry {\r\n\r\n\t\t\t//gets the total saved files in the folder;\r\n\t\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\"); \r\n\t\t Date date = new Date();\r\n\t\t formatter.format(date);\r\n\t\t FileWriter fw = new FileWriter(folderPath+this.uName+\".txt\", true);\r\n\t\t BufferedWriter bw = new BufferedWriter(fw);\r\n\t\t PrintWriter out = new PrintWriter(bw);\r\n\t\t out.println(\"Created on: \"+date);\r\n\t\t out.println(\"Game Mode: \"+gameMode);\r\n\t\t out.println(\"Game Type: \"+gameType);\r\n\t\t saveData(out, player, computer, strategy);\r\n\t\t out.close();\r\n\t\t}catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}",
"private void save() {\n Saver.saveTeam(team);\n }",
"public static synchronized void save() {\n\n String team_fil = config.Server.serverdata_file_location + \"/teams.ser\";\n String team_backup = config.Server.serverdata_file_location + \"/teams\";\n\n Calendar dato = new GregorianCalendar();\n\n team_backup += dato.get(Calendar.YEAR) + \"-\" + dato.get(Calendar.DAY_OF_MONTH) + \"-\" + dato.get(Calendar.MONTH) + \"-\";\n team_backup += dato.get(Calendar.HOUR) + \"-\" + dato.get(Calendar.MINUTE) + \".ser\";\n\n admin.logging.globalserverMsg(\"Saving team data to file.\");\n\n try {\n FileOutputStream fil = new FileOutputStream(team_fil);\n FileOutputStream fil_backup = new FileOutputStream(team_backup);\n\n //Skriv til teams.txt\n ObjectOutputStream out = new ObjectOutputStream(fil);\n out.writeObject(team_list);\n out.flush();\n out.close();\n fil.close();\n\n //Skriv til backup fil.\n out = new ObjectOutputStream(fil_backup);\n out.writeObject(team_list);\n out.flush();\n out.close();\n fil.close();\n } catch (Exception e) {\n e.printStackTrace();\n admin.logging.globalserverMsg(\"Error saving team data to file.\");\n }\n }",
"public void addPlayerToPlayers(String username) throws IOException{\r\n\t\tScanner readPlayers = new Scanner(new BufferedReader(new FileReader(\"players.txt\")));\r\n\t\tint numberOfPlayers = readPlayers.nextInt();\r\n\t\tif(numberOfPlayers == 0) { // no need to store data to rewrite\r\n\t\t\ttry {\r\n\t\t\t\tFileWriter writer = new FileWriter(\"players.txt\");\r\n\t\t\t\tBufferedWriter playerWriter = new BufferedWriter(writer);\r\n\t\t\t\tnumberOfPlayers++;\r\n\t\t\t\tInteger numPlayers = numberOfPlayers; // allows conversion to string for writing\r\n\t\t\t\tplayerWriter.write(numPlayers.toString());\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.write(numPlayers.toString()); // write userId as 1 because only 1 player\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.write(username);\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.close();\r\n\t\t\t}\r\n\t\t\tcatch(IOException e) {\r\n\t\t\t\tSystem.out.println(e);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\t/* Store all current usernames and userIds in a directory to rewrite to file */\r\n\t\t\tPlayerName[] directory = new PlayerName[numberOfPlayers];\r\n\t\t\t\r\n\t\t\tfor(int index = 0; index < numberOfPlayers; index++) {\r\n\t\t\t\tPlayerName playerName = new PlayerName();\r\n\t\t\t\tplayerName.setUserId(readPlayers.nextInt());\r\n\t\t\t\tplayerName.setUserName(readPlayers.next());\r\n\t\t\t\tdirectory[index] = playerName;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treadPlayers.close();\r\n\t\t\t/* Add a new player */\r\n\t\t\ttry {\r\n\t\t\t\tnumberOfPlayers++;\r\n\t\t\t\tFileWriter writer = new FileWriter(\"players.txt\");\r\n\t\t\t\tBufferedWriter playerWriter = new BufferedWriter(writer);\r\n\t\t\t\tInteger numPlayers = numberOfPlayers; // allows conversion to string for writing\r\n\t\t\t\tplayerWriter.write(numPlayers.toString());\r\n\t\t\t\tplayerWriter.write(\"\\n\"); // maintains format of players.txt\r\n\t\t\t\t\r\n\t\t\t\tfor(int index = 0; index < numberOfPlayers - 1; index++) { // - 1 because it was incremented\r\n\t\t\t\t\tInteger nextId = directory[index].getUserId();\r\n\t\t\t\t\tplayerWriter.write(nextId.toString());\r\n\t\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\t\tplayerWriter.write(directory[index].getUserName());\r\n\t\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tInteger lastId = numberOfPlayers;\r\n\t\t\t\tplayerWriter.write(lastId.toString());\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.write(username);\r\n\t\t\t\tplayerWriter.write(\"\\n\");\r\n\t\t\t\tplayerWriter.close();\r\n\t\t\t}\r\n\t\t\tcatch(IOException e) {\r\n\t\t\t\tSystem.out.println(e);\r\n\t\t\t}\r\n\t\t}\r\n\t\treadPlayers.close();\r\n\t}",
"static void saveAllPlayersToFiles(){\n \tfor( String playername : GoreaProtect.playersData.getKeys(false))\n \t{\n \t\tFile playerfile = new File(GoreaProtect.datafolder + File.separator + \"Protections\");\n \t\tFile fileplayer= new File(playerfile, playername + \".yml\");\n\n \t\tConfigurationSection playerdata = GoreaProtect.playersData.getConfigurationSection(playername);\n\n \t\tYamlConfiguration PlayersDatayml = new YamlConfiguration();\n\n \t\tfor (String aaa:playerdata.getKeys(false))\n \t\tPlayersDatayml.set(aaa, playerdata.get(aaa));\n \t\t\n \t\t\n \t\ttry {\n\t\t\t\tPlayersDatayml.save(fileplayer);\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} \n }",
"void saveGame() throws IOException, Throwable {\n Save save = new Save(\"01\");\n save.addToSaveGame(objectsToSave());\n save.saveGame();\n }",
"private void saveGame(){\n\t\t\n\t}",
"void save() {\n gameModelPoDao.saveToFile(file.getAbsolutePath(), gameModelPo);\n }",
"public void saveGame() {\r\n\t\t//separator used by system\r\n\t\tString separator = System.getProperty(\"file.separator\");\r\n\t\t//path to where files will be saved\r\n\t\tString path = System.getProperty(\"user.dir\") + separator + \"src\" + separator + \"GameFiles\" + separator;\r\n\r\n\t\ttry {\r\n\r\n\t\t\t//Save the world objects\r\n\t\t\tString world_objects_name = EnvironmentVariables.getTitle() + \"WorldObjects\";\r\n\t\t\t//create a new file with name given by user with added text for identification\r\n\t\t\tFile world_objects_file = new File(path + world_objects_name + \".txt\");\r\n\t\t\tFileOutputStream f_world_objects = new FileOutputStream(world_objects_file);\r\n\t\t\tObjectOutputStream o_world_objects = new ObjectOutputStream(f_world_objects);\r\n\r\n\t\t\t//loop through list and write each object to file\r\n\t\t\tfor(GameObject obj: EnvironmentVariables.getWorldObjects()) {\r\n\t\t\t\to_world_objects.writeObject(obj);\r\n\t\t\t}\r\n\r\n\t\t\to_world_objects.flush();\r\n\t\t\to_world_objects.close();\r\n\t\t\tf_world_objects.flush();\r\n\t\t\tf_world_objects.close();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//Save terrain is done the same ass world objects but we create a new file \r\n\t\t\t//with different added text\r\n\t\t\tString terrain_name = EnvironmentVariables.getTitle() + \"Terrain\";\r\n\t\t\tFile terrain_file = new File(path + terrain_name + \".txt\");\r\n\t\t\tFileOutputStream f_terrain = new FileOutputStream(terrain_file);\r\n\t\t\tObjectOutputStream o_terrain = new ObjectOutputStream(f_terrain);\r\n\r\n\t\t\tfor(GameObject obj: EnvironmentVariables.getTerrain()) {\r\n\t\t\t\to_terrain.writeObject(obj);\r\n\t\t\t}\r\n\r\n\t\t\to_terrain.flush();\r\n\t\t\to_terrain.close();\r\n\t\t\tf_terrain.flush();\r\n\t\t\tf_terrain.close();\r\n\t\t\t\r\n\t\t\t//Save main player, given own file but just a single object\r\n\t\t\tString main_player_name = EnvironmentVariables.getTitle() + \"MainPlayer\";\r\n\t\t\tFile main_player_file = new File(path + main_player_name + \".txt\");\r\n\t\t\tFileOutputStream f_main_player = new FileOutputStream(main_player_file);\r\n\t\t\tObjectOutputStream o_main_player = new ObjectOutputStream(f_main_player);\r\n\r\n\t\t\to_main_player.writeObject(EnvironmentVariables.getMainPlayer());\r\n\r\n\t\t\to_main_player.flush();\r\n\t\t\to_main_player.close();\r\n\t\t\tf_main_player.flush();\r\n\t\t\tf_main_player.close();\r\n\t\t\t\r\n\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"File not found\");\r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t\tSystem.out.println(\"Error initializing stream\");\r\n\t\t} \r\n\t\t\r\n\t\t//saving the environment variables\r\n\t\ttry {\r\n\t\t\tString env_name = EnvironmentVariables.getTitle() + \"EnvVariables\";\r\n\t\t\tFile env_file = new File(path + env_name + \".txt\");\r\n\t\t\t\r\n\t\t\tif(!env_file.exists()) {\r\n\t\t\t\tenv_file.createNewFile();\r\n\t\t }\r\n\t\t\t \r\n\t\t\t//FileWriter fw = new FileWriter(env_file);\r\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(env_file));\r\n\t\t\t//write each variable to a new line as a string\r\n\t\t\tbw.write(EnvironmentVariables.getTitle()); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getWidth())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getHeight())); bw.newLine();\r\n\t\t\tbw.write(EnvironmentVariables.getPlanet()); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getMass())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getRadius())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getAirDensity())); bw.newLine();\r\n\t\t\tbw.write(Float.toString(EnvironmentVariables.getMeter())); bw.newLine();\r\n\r\n\t\t\t\r\n\t\t\t//bw.flush();\r\n\t\t\tbw.close();\r\n\t\t\t\r\n\t\t}catch (IOException e) {\r\n\t\t\tSystem.out.println(\"Error initializing stream\");\r\n\t\t}\r\n\t\t\r\n\t\tEnvironmentVariables.getTerrain().clear();\r\n\t\tEnvironmentVariables.getWorldObjects().clear();\r\n\t}",
"public void savePokemonData()\r\n {\r\n try\r\n {\r\n int currentPokemon = playerPokemon.getCurrentPokemon();\r\n\r\n FileWriter fw = new FileWriter(\"tempPlayerPokemon.txt\");\r\n\r\n List<String> list = Files.readAllLines(Paths.get(\"playerPokemon.txt\"), StandardCharsets.UTF_8);\r\n String[] pokemonList = list.toArray(new String[list.size()]);\r\n\r\n String currentPokemonStr = pokemonList[currentPokemon];\r\n String[] currentPokemonArray = currentPokemonStr.split(\"\\\\s*,\\\\s*\");\r\n\r\n currentPokemonArray[1] = Integer.toString(playerPokemon.getLevel());\r\n currentPokemonArray[3] = Integer.toString(playerPokemon.getCurrentHealth());\r\n currentPokemonArray[4] = Integer.toString(playerPokemon.getCurrentExperience());\r\n for(int c = 0; c < 4; c++)\r\n {\r\n currentPokemonArray[5 + c] = playerPokemon.getMove(c);\r\n }\r\n\r\n String arrayAdd = currentPokemonArray[0];\r\n for(int i = 1; i < currentPokemonArray.length; i++)\r\n {\r\n arrayAdd = arrayAdd.concat(\", \" + currentPokemonArray[i]);\r\n }\r\n\r\n pokemonList[currentPokemon] = arrayAdd;\r\n\r\n for(int f = 0; f < pokemonList.length; f++)\r\n {\r\n fw.write(pokemonList[f]);\r\n fw.write(\"\\n\");\r\n }\r\n fw.close();\r\n\r\n Writer.overwriteFile(\"tempPlayerPokemon\", \"playerPokemon\");\r\n }\r\n catch(Exception error)\r\n {\r\n }\r\n }",
"public void save(int boardSize, PlayerColor firstPlayer, PlayerColor secondPlayer, String player1Color,\r\n String player2Color) throws IOException {\r\n //set the data.\r\n this.boardSize = boardSize;\r\n this.firstPlayer = firstPlayer;\r\n this.secondPlayer = secondPlayer;\r\n this.player1Color = player1Color;\r\n this.player2Color = player2Color;\r\n\r\n //writing to a file\r\n File file = new File(this.filename);\r\n FileOutputStream fos = new FileOutputStream(file);\r\n ObjectOutputStream oos = new ObjectOutputStream(fos);\r\n oos.writeObject(this);\r\n fos.close();\r\n oos.close();\r\n }",
"public void saveGame(){\n \tsaveOriginator.writeMap(this.map, this.getObjectives(), this.gameState);\n \tsaveGame.saveGame(saveOriginator);\n }",
"@Override\n public void writeNewPlayer(Player player){\n if (gameCodeRef == null){\n throw new IllegalStateException(\"GameRoom is not set\");\n }\n DatabaseReference currentRef = database.getReference(gameCodeRef);\n currentRef.child(\"Players\").child(player.getUsername()).setValue(player.getUsername());\n updateNrPlayerValues(\"NumberOfPlayers\");\n }",
"private void saveFile(){\n\tif (numPlayers == 1 && 0 < numNPCs && numNPCs < 6){\n\t int returnVal = fileChooser.showSaveDialog(this);\n\t if (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\ttry {\n\t\t FileWriter writer =\n\t\t\tnew FileWriter(fileChooser.getSelectedFile());\n\t\t writer.write(this.toXML());\n\t\t writer.close();\n\t\t} catch (Exception ex) {\n\t\t ex.printStackTrace();\n\t\t}\n\t }\n\t} else {\n\t //If it wouldn't make a valid game, warn the user\n\t JFrame f = new JFrame();\n\t JOptionPane.showMessageDialog(f,\n\t\t\t\t\t \"You must have exactly one playable\\n\"\n\t\t\t\t\t + \"character and 1-5 NPCs.\\n\" +\n\t\t\t\t\t \"Current PCs= \" + numPlayers +\n\t\t\t\t\t \", NPCs = \" + numNPCs,\n\t\t\t\t\t \"Improper Game Configuration\",\n\t\t\t\t\t JOptionPane.WARNING_MESSAGE);\t \n\t}\n }",
"public void saveGame(GamePanel gamePanel) throws IOException\r\n\t{\r\n\t\tSystem.out.println(\"Saving your game.\");\r\n\t\ttry\r\n\t\t{\r\n\t\t\tObjectOutputStream os = new ObjectOutputStream(new FileOutputStream(\"Game.ser\"));\r\n\t\t\tos.writeObject(gamePanel);\r\n\t\t\tos.close();\r\n\t\t}\r\n\t\tcatch (IOException ex) \r\n\t\t{\r\n ex.printStackTrace();\r\n }\r\n\t}",
"@Override\r\n\tpublic void saveReplay(GameEngine engine, int playerID, CustomProperties prop) {\r\n\t\tsaveOtherSetting(engine, owner.replayProp);\r\n\t\tsavePreset(engine, owner.replayProp, -1 - playerID, \"spf\");\r\n\r\n\t\tif(useMap[playerID] && (fldBackup[playerID] != null)) {\r\n\t\t\tsaveMap(fldBackup[playerID], owner.replayProp, playerID);\r\n\t\t}\r\n\r\n\t\towner.replayProp.setProperty(\"avalanchevs.version\", version);\r\n\t}",
"public void saveGame();",
"private static boolean saveMOTD(JSONObject motdObj) {\n File JSONFile = new File(plugin.getDataFolder() + \"/motd.json\");\n\n try ( //open our writer and write the player file\n PrintWriter writer = new PrintWriter(JSONFile)) {\n //System.out.println(obj);\n writer.print(motdObj.toString(4));\n writer.close();\n Logger.getLogger(MOTDHandler.class.getName()).log(Level.INFO, \"Successfully updated motd.json\");\n return true;\n } catch (FileNotFoundException ex) {\n\n Logger.getLogger(MOTDHandler.class.getName()).log(Level.SEVERE, null, ex);\n return false;\n }\n }",
"public void saveGame(){\n updateProperties();\n try {\n output = new FileOutputStream(fileName);\n properties.store(output, null); //saving properties to file\n } catch (IOException e) {\n System.out.println(\"--- FAILED TO SAVE GAME ---\");\n e.printStackTrace();\n } finally {\n if (output != null) {\n try {\n output.close();\n System.out.println(\"--- GAME SAVED ---\");\n } catch (IOException e) {\n System.out.println(\"--- FAILED TO CLOSE OUTPUT ---\");\n e.printStackTrace();\n }\n }\n }\n }",
"public boolean save() {\n\t\treturn save(_file);\n\t}",
"public void saveGame() {\n\t\tmanager.saveGame();\n\t}",
"public void save() {\n\t\ttry {\n\t\t\t// use buffering\n\t\t\tOutputStream file = new FileOutputStream(\"games.txt\");\n\t\t\tOutputStream buffer = new BufferedOutputStream(file);\n\t\t\tObjectOutput output = new ObjectOutputStream(buffer);\n\t\t\ttry {\n\t\t\t\tif (gameOver) {\n\t\t\t\t\t//notify no need to save completed game\n\t\t\t\t} else {\n\t\t\t\t\tgames.add(this);\n\t\t\t\t\toutput.writeObject(games);\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\toutput.close();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Save not successful\");\n\t\t}\n\t}",
"boolean hasSavedFile() {\n return currPlayer != -1 && getStat(saveStatus) == 1;\n }",
"protected void savePlayers(Context context) {\n\t\tif (context == null) return;\n\n\t\t//Create json\n\t\tJSONObject JSON = new JSONObject();\n\t\ttry {\n\t\t\t//Save\n\t\t\tJSON.put(JSON_ID, m_ID);\n\t\t\tJSON.put(JSON_EMAIL, m_Email);\n\t\t} catch (JSONException e) {}\n\n\t\t//Get access to preference\n\t\t/*SharedPreferences Preference \t= context.getSharedPreferences(PREFERENCE_NAME, Context.MODE_PRIVATE);\n\t\tSharedPreferences.Editor Editor\t= Preference.edit();\n\n\t\t//Save\n\t\tEditor.putString(KEY_PLAYERS, JSON.toString());\n\t\tEditor.commit();*/\n\t}",
"public void saveGame(DataOutputStream s) throws IOException {\n s.writeUTF(level.toString());\n s.writeUTF(level.getName());\n s.writeInt(lives);\n s.writeInt(points);\n s.writeInt(wonLevels);\n pacman.writeEntity(s);\n s.writeInt(entities.size());\n for (GameEntity entity : entities)\n entity.writeEntity(s);\n }",
"public boolean save(String file);",
"@Override\n\tpublic boolean writeData(File file) {\n\n Collection<SoccerPlayer> soccerPlayers = stats.values();\n\n\n\n try {\n\n PrintWriter writer = new PrintWriter(file);\n\n for (SoccerPlayer sp : soccerPlayers) {\n\n writer.println(logString(sp.getFirstName()));\n writer.println(logString(sp.getLastName()));\n writer.println(logString(sp.getTeamName()));\n writer.println(logString(sp.getUniform()+\"\"));\n writer.println(logString(sp.getGoals() + \"\"));\n writer.println(logString(sp.getAssists() + \"\"));\n writer.println(logString(sp.getShots() + \"\"));\n writer.println(logString(sp.getSaves() + \"\"));\n writer.println(logString(sp.getFouls() + \"\"));\n writer.println(logString(sp.getYellowCards() + \"\"));\n writer.println(logString(sp.getRedCards() + \"\"));\n\n }\n\n writer.close();\n\n return true;\n\n }\n\n catch(java.io.FileNotFoundException ex) {\n\n return false;\n }\n\t}",
"public boolean save();",
"public void saveGame(){\r\n Scanner in = new Scanner(System.in);\r\n Boolean nameIsFine = false;\r\n String filename;\r\n int input;\r\n do {\r\n System.out.println(\"Filename?\");\r\n filename = this.savePath + File.separator + this.getFilename() + \".ser\";\r\n File newFile = new File(filename);\r\n if(newFile.exists()) {\r\n System.out.println(\"This file already exists.\");\r\n System.out.println(\"Do you want to change the file name?\");\r\n System.out.println(\"Yes: '1', No: '0'.\");\r\n input = in.nextInt();\r\n if (input == 0) {\r\n nameIsFine = true;\r\n } else {\r\n if (input != 1){\r\n System.out.println(\"This is not an option.\");\r\n }\r\n System.out.println(\"Give a different filename.\");\r\n }\r\n } else {\r\n nameIsFine = true;\r\n }\r\n } while(!nameIsFine);\r\n this.save(filename);\r\n }",
"private void saveGame() throws FileNotFoundException {\r\n\t\tJFileChooser fileChooser = new JFileChooser();\r\n\t\tFile file = null;\r\n\t\tif (fileChooser.showSaveDialog(gameView) == JFileChooser.APPROVE_OPTION) {\r\n\t\t\tfile = fileChooser.getSelectedFile();\r\n\t\t}\r\n\t\tif (file != null) {\r\n\t\t\tFileWriter fileWriter = new FileWriter(convertToStringArrayList(), file);\r\n\t\t\tfileWriter.writeFile();\r\n\t\t}\r\n\r\n\t}",
"void saveGame();",
"public static void writePlayerToFile(ArrayList<Player> players)\r\n {\r\n clearFile(new File(\"players.txt\"));\r\n\r\n for(Player p : players)\r\n {\r\n writePlayerToFile(p);\r\n }//end for\r\n }",
"public void save(String filePath){\r\n Scanner in = new Scanner(System.in);\r\n File saveFile = new File(filePath);\r\n if (saveFile.exists()){\r\n System.out.println(\"Do you really, really want to overwrite your previous game?\");\r\n System.out.println(\"Yes: '1', No: '0'.\");\r\n int input = in.nextInt();\r\n if (input!=1){\r\n return;\r\n }\r\n }\r\n File saveDir = new File(this.savePath);\r\n if (!saveDir.exists()){\r\n saveDir.mkdir();\r\n }\r\n FileOutputStream fos = null;\r\n ObjectOutputStream out = null;\r\n try {\r\n fos = new FileOutputStream(saveFile);\r\n out = new ObjectOutputStream(fos);\r\n out.writeObject(this.serialVersionUID);\r\n out.writeObject(p);\r\n out.writeObject(map);\r\n out.close();\r\n } catch (Exception ex) {\r\n System.out.println(\"Make sure you don't use spaces in your folder names.\");\r\n ex.printStackTrace();\r\n }\r\n }",
"@Override\n public int saveGame(String foo) {\n RunGame.saveGameToDisk(foo);\n return 0;\n }",
"public void save () {\n preference.putBoolean(\"sound effect\", hasSoundOn);\n preference.putBoolean(\"background music\", hasMusicOn);\n preference.putFloat(\"sound volume\", soundVolume);\n preference.putFloat(\"music volume\", musicVolume);\n preference.flush(); //this is called to write the changed data into the file\n }",
"private void save() {\r\n\t\tif (Store.save()) {\r\n\t\t\tSystem.out.println(\" > The store has been successfully saved in the file StoreData.\\n\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\" > An error occurred during saving.\\n\");\r\n\t\t}\r\n\t}",
"public void saveAllPlayers() {\n for (Player player : bukkitService.getOnlinePlayers()) {\n savePlayer(player);\n }\n }",
"public boolean saveFile() {\n\t\tif (isProjectOpen() && projectModified) {\n\t\t\tboolean written = projectFileIO.writeFile(soundList.values());\n\t\t\tif (written)\n\t\t\t\tprojectModified = false;\n\t\t\treturn written;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic void save() {\n\t\t\n\t\tFile savingDirectory = new File(savingFolder());\n\t\t\n\t\tif( !savingDirectory.isDirectory() ) {\n\t\t\tsavingDirectory.mkdirs();\n\t\t}\n\t\t\n\t\t\n\t\t//Create the file if it's necessary. The file is based on the name of the item. two items in the same directory shouldn't have the same name.\n\t\t\n\t\tFile savingFile = new File(savingDirectory, getIdentifier());\n\t\t\n\t\tif( !savingFile.exists() ) {\n\t\t\t\n\t\t\ttry {\n\t\t\t\tsavingFile.createNewFile();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"the following item couldn't be saved: \" + getIdentifier());\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t}\n\n\t\t\n\t\t//generate the savingTextLine and print it in the savingFile. the previous content is erased when the PrintWriter is created.\n\t\t\n\t\tString text = generateSavingTextLine();\n\n\t\ttry {\n\t\t\tPrintWriter printer = new PrintWriter(savingFile);\n\t\t\tprinter.write(text);\t\t\t\n\t\t\tprinter.close();\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tsave();\n\t\t} \n\t}",
"public void save() {\n DataBuffer.saveDataLocally();\n\n //TODO save to db must be done properly\n DataBuffer.save(session);\n\n //TODO recording saved confirmation\n }",
"static void writeRanking(ArrayList<PlayerInfo> player){\n\t\ttry{\r\n\t\t\tFileOutputStream fos = new FileOutputStream(\"ranking.dat\");\r\n\t\t\tObjectOutputStream oos = new ObjectOutputStream(fos);\r\n\t\t\toos.writeObject(player);\r\n\t\t\toos.flush();\r\n\t\t\toos.close();\r\n\t\t\tfos.close();\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t//return player;\r\n\t}",
"private void saveUserPlayerId(UserPlayerId userPlayerId) {\n new SaveUserPlayerId(userPlayerId, new SaveUserPlayerId.InvokeOnCompleteAsync() {\n @Override\n public void onComplete(List<UserPlayerId> userPlayerIds) {\n LoggerHelper.showDebugLog(\"===> Save user player id successfully\" + userPlayerId.toString());\n }\n\n @Override\n public void onError(Throwable e) {\n LoggerHelper.showErrorLog(\"Error 329: \", e);\n }\n });\n }",
"public void SerialWriteFile() {\r\n\r\n PrintWriter pwrite = null;\r\n File fileObject = new File(getName());\r\n QuizPlayer q = new QuizPlayer(getName(), getNickname(), getTotalScore());\r\n\r\n try {\r\n ObjectOutputStream outputStream =\r\n new ObjectOutputStream(new FileOutputStream(fileObject));\r\n\r\n outputStream.writeObject(q); //Writes the object to the serialized file.\r\n outputStream.close();\r\n\r\n\r\n } catch (IOException e) {\r\n System.out.println(\"Problem with file output.\");\r\n }\r\n\r\n }",
"public void save() {\n UTILS.write(FILE.getAbsolutePath(), data);\n }",
"public static void save()\n\t{\n writeMap();\n\t}",
"public boolean saveMap()\n {\n // This should probably write all the data to a temporary file, then copy it over the old one at the end\n try {\n \n StringBuffer\t\tbuf = new StringBuffer();\n FileWriter\t\t\tmapWriter;\n \n if (!file.canWrite())\n {\n ErrorHandler.displayError(\"Could not write to map file. Maybe it's locked.\", ErrorHandler.ERR_SAVE_FAIL);\n return false;\n }\n \n file.createNewFile();\n mapWriter = new FileWriter(file);\n \n // Write the size in x, y\n buf.append(map.getSizeX());\n buf.append(\" \");\n buf.append(map.getSizeY());\n buf.append(\"\\n\");\n \n // Write all of the data\n for (int y = 0; y < map.getSizeY(); y++)\n {\n for (int x = 0; x < map.getSizeX(); x++)\n {\n buf.append(MUXHex.terrainForId(map.getHexTerrain(x, y)));\n buf.append(map.getHexAbsoluteElevation(x, y));\n }\n \n buf.append(\"\\n\");\n }\n \n // Now write it to the file\n mapWriter.write(buf.toString());\n mapWriter.close();\n \n // Musta been okay...\n map.setChanged(false);\n \n // Change our name\n setTitle(file.getName() + sizeString());\n \n return true;\n \n } catch (Exception e) {\n ErrorHandler.displayError(\"Could not write data to map file:\\n\" + e, ErrorHandler.ERR_SAVE_FAIL);\n return false;\n }\n }",
"private boolean savingData(Track track){\n return sqLiteController.SAVE_TRACK_DATA(track);\n }",
"public static void save() {\n Game.save(UI.askNgetString(\"Filename for this save file?\")+\".xml\");\n }",
"public interface SaveInterface {\n\t\n\t/**\n\t * Writes a game data object to disk\n\t */\n\tpublic void saveGame();\n\t\n}",
"public void save() {\n CSVWriter csvWriter = new CSVWriter();\n csvWriter.writeToTalks(\"phase1/src/Resources/Talks.csv\", this.getTalkManager()); //Not implemented yet\n }",
"private void save() {\n File personFile = mainApp.getFilmFilePath();\n if (personFile != null) {\n mainApp.saveFilmDataToFile(personFile);\n } else {\n saveAs();\n }\n }",
"private void save() {\n var boolGrid = editor.getBoolGrid();\n //Generate a track grid from the bool frid\n var grid = Track.createFromBoolGrid(boolGrid);\n var valid = Track.isValidTrack(grid);\n if (!valid) {\n //fire an error event\n MessageBus.fire(new ErrorEvent(\"Invalid track\", \"\", 2));\n } else {\n //Save the track and pop back\n var generator = new TrackFromGridGenerator(grid);\n var track = generator.generateTrack();\n (new TrackStorageManager()).saveTrack(track);\n menu.navigationPop();\n menu.showError(new ErrorEvent(\"Saved track!\", \"\", 2, Colour.GREEN));\n }\n }",
"void saveGameState(File saveName);",
"public void saveTournament() throws IOException{\r\n\t\tBuzzardTournamentFileChooser fileChooser = new BuzzardTournamentFileChooser();\r\n\t\tfileChooser.saveTournament(dealer.getTournament());\r\n\t}",
"static boolean savePlayerState(PlayerState playerState) {\n if (playerState.getId() == null) {\n return insertPlayerState(playerState);\n } else {\n return updatePlayerState(playerState);\n }\n }",
"@Override\n public boolean save(String file) {\n boolean ans = false;\n ObjectOutputStream oos;\n try {\n FileOutputStream fileOut = new FileOutputStream(file, true);\n oos = new ObjectOutputStream(fileOut);\n oos.writeObject(this);\n ans= true;\n }\n catch (FileNotFoundException e) {\n e.printStackTrace(); }\n catch (IOException e) {e.printStackTrace();}\n return ans;\n }",
"public void onSaveListen() {\n _gamesList.get(_gamePos).getPlayers().add(playerName);\n // Increment the number of players that have joined the game\n _gamesList.get(_gamePos).setNumPlayers(_gamesList.get(_gamePos).getNumPlayers() + 1);\n\n TextView playersBlock = (TextView) findViewById(R.id.playersBlock);\n playersBlock.setText(\"\");\n List<String> players = _gamesList.get(_gamePos).getPlayers();\n for(int i = 0; i < players.size(); i++) {\n Log.d(\"GamePlayerSize\", Integer.toString(_gamesList.get(_gamePos).getPlayers().size()));\n if (i < players.size() - 1) {\n playersBlock.append(players.get(i) + \", \");\n }\n else {\n // Don't put a comma after the last one\n playersBlock.append(players.get(i));\n }\n }\n\n // Update the shared preferences with the edited game\n SharedPreferences gamesPref = this.getSharedPreferences(GAMES_FILE, MODE_PRIVATE);\n Gson gson = new Gson();\n\n SharedPreferences.Editor prefsEditor = gamesPref.edit();\n\n // Convert the games list into a json string\n String json = gson.toJson(_gamesList);\n Log.d(\"MainActivity\", json);\n\n // Update the _gamesMasterList with the modified _game\n prefsEditor.putString(GAME_KEY, json);\n prefsEditor.commit();\n\n Context context = getApplicationContext();\n CharSequence text = \"You have joined the game!\";\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }",
"public static void save(){\n\t\ttry{\n\t\t\tFile f=new File(Constants.PATH+\"\\\\InitializeData\\\\battlesavefile.txt\");\n\t\t\tPrintWriter pw=new PrintWriter(f);\n\t\t\tpw.println(turn);\n\t\t\tpw.println(opponent.toString());\n\t\t\tfor(Unit u:punits){\n\t\t\t\tpw.println(u.toString());\n\t\t\t}\n\t\t\tpw.println(\"End Player Units\");\n\t\t\tfor(Unit u:ounits){\n\t\t\t\tpw.println(u.toString());\n\t\t\t}\n\t\t\tpw.println(\"End Opponent Units\");\n\t\t\tpw.println(priorities);\n\t\t\tpw.println(Arrays.asList(xpgains));\n\t\t\tpw.println(spikesplaced+\" \"+numpaydays+\" \"+activeindex+\" \"+activeunit.getID()+\" \"+weather+\" \"+weatherturn);\n\t\t\tpw.println(bfmaker.toString());\n\t\t\tpw.close();\n\t\t}catch(Exception e){e.printStackTrace();}\n\t}",
"void saveToFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile target = new File(directory, FILE_NAME);\n\t\t\tif (!target.exists()) {\n\t\t\t\ttarget.createNewFile();\n\t\t\t}\n\t\t\tJsonWriter writer = new JsonWriter(new FileWriter(target));\n\t\t\twriter.setIndent(\" \");\n\t\t\twriter.beginArray();\n\t\t\tfor (Scoreboard scoreboard : scoreboards.values()) {\n\t\t\t\twriteScoreboard(writer, scoreboard);\n\t\t\t}\n\t\t\twriter.endArray();\n\t\t\twriter.flush();\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void btnSaveActionPerformed(java.awt.event.ActionEvent evt) {\n rom.save(obstacle, frog);\n isSaved = true;\n }",
"public static void savePlayerConfig(String name, FileConfiguration config) {\r\n if (!name.endsWith(\".yml\")) {\r\n \tname += \".yml\";\r\n }\r\n File file = new File(plugin.getDataFolder() + File.separator + \"players\", name);\r\n try {\r\n config.save(file);\r\n } catch (IOException e) {\r\n \tFPSCaste.log(\"Could not save: \" + name + \", is the disk full?\", Level.WARNING);\r\n }\r\n\t\t}",
"public boolean saveData() throws FileNotFoundException, IOException {\n\t\t\n\t\tFile f = new File(FILE_SAVE_PATH);\n\t\t\n\t\tboolean wasSaved = false;\n\t\t\n\t\tif(f.exists()) {\n\t\t\t\n\t\t\tObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(FILE_SAVE_PATH));\n\t\t\toos.writeObject(students);\n\t\t\toos.close();\n\t\t\twasSaved = true;\n\t\t}\n\t\t\n\t\treturn wasSaved;\n\t}",
"public boolean updatePlayerInfo() throws IOException {\n\n com.google.api.services.games.model.Player gpgPlayer =\n gamesAPI.players().get(player.getPlayerId()).execute();\n\n player.setDisplayName(gpgPlayer.getDisplayName());\n player.setVisibleProfile(gpgPlayer.getProfileSettings()\n .getProfileVisible());\n player.setTitle(gpgPlayer.getTitle());\n\n // Handle 'games-lite' player id migration.\n if (!player.getPlayerId().equals(gpgPlayer.getPlayerId())) {\n // Check the original player id and set the alternate id to it.\n if (player.getPlayerId().equals(gpgPlayer.getOriginalPlayerId())) {\n player.setAltPlayerId(gpgPlayer.getPlayerId());\n } else {\n return false;\n }\n } else if (gpgPlayer.getOriginalPlayerId() != null &&\n !gpgPlayer.getOriginalPlayerId().equals(player.getAltPlayerId())) {\n player.setAltPlayerId(gpgPlayer.getOriginalPlayerId());\n }\n\n return true;\n }",
"public String saveGame(String fileName) {\n File file = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);\n File saveFile = new File(file, fileName);\n\n try {\n PrintWriter writer = new PrintWriter(saveFile.getAbsolutePath(), \"UTF-8\");\n writer.println(\"Black: \" + playerBlack.getScore());\n writer.println(\"White: \" + playerWhite.getScore());\n writer.println(\"Board:\");\n\n for (int r = 0; r < Board.MAX_ROW; r++) {\n for (int c = 0; c < Board.MAX_COLUMN; c++) {\n if (boardObject.getSlot(r, c).getColor() == Slot.BLACK) {\n writer.print(\"B \");\n } else if (boardObject.getSlot(r, c).getColor() == Slot.WHITE) {\n writer.print(\"W \");\n } else {\n writer.print(\"O \");\n }\n }\n writer.println();\n }\n\n String nextPlayer = playerWhite.isTurn() ? \"White\" : \"Black\";\n writer.println(\"Next player: \" + nextPlayer);\n\n String humanPlayer = playerWhite.isComputer() ? \"Black\" : \"White\";\n writer.println(\"Human: \" + humanPlayer);\n\n writer.close();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return saveFile.getAbsolutePath();\n }",
"@Override\n public void actionPerformed(ActionEvent e){\n JFileChooser fileChooser = new JFileChooser();\n int status = fileChooser.showSaveDialog(null);\n \n //Check if they actually saved the file\n if (status == JFileChooser.APPROVE_OPTION) {\n File fileToSave = fileChooser.getSelectedFile();\n \n //Try block to make sure file actually exists\n try {\n FileOutputStream fos = new FileOutputStream(fileToSave);\n ObjectOutputStream out = new ObjectOutputStream(fos);\n out.writeObject(games);\n \n //Close the file\n fos.close();\n out.close();\n } catch (FileNotFoundException ex) {\n JOptionPane.showMessageDialog(null, \"Error: File not found\");\n } catch (IOException ex) {\n JOptionPane.showMessageDialog(null, \"Error: File I/O problem\");\n }\n \n //Tell the user it saved successfully\n JOptionPane.showMessageDialog(null, \"Saved as file: \" + fileToSave.getAbsolutePath());\n }\n }",
"public void save(String serverID)\r\n\t{\r\n\t\tT save = instances.get(serverID);\r\n\t\tif(save!=null)\r\n\t\t{\r\n\t\t\tFile f = new File(root,serverID+\"/\"+save.path());\r\n\t\t\tf.getParentFile().mkdirs();\r\n\t\t\ttry {\r\n\t\t\t\tWriter out = new BufferedWriter(new OutputStreamWriter(\r\n\t\t\t\t\t\tnew FileOutputStream(f), \"UTF-8\"));\r\n\t\t\t\ttry {\r\n\t\t\t\t\tout.write(save.toText(gson));\r\n\t\t\t\t} finally {\r\n\t\t\t\t\tout.close();\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public boolean save(CameraRecord record);",
"public void save() {\t\n\t\n\t\n\t}",
"public void save() {\n\t\tthis.setState(Constants.CWorld.STATE_SAVING);\n\t\tthis.getWorld().saveAll();\n\t\tthis.setState(Constants.CWorld.STATE_ONLINE);\n\t}",
"private void saveHighScore() {\n\n\t\tFileOutputStream os;\n\t\n\t\ttry {\n\t\t boolean exists = (new File(this.getFilesDir() + filename).exists());\n\t\t // Create the file and directories if they do not exist\n\t\t if (!exists) {\n\t\t\tnew File(this.getFilesDir() + \"\").mkdirs();\n\t\t\tnew File(this.getFilesDir() + filename);\n\t\t }\n\t\t // Saving the file\n\t\t os = new FileOutputStream(this.getFilesDir() + filename, false);\n\t\t ObjectOutputStream oos = new ObjectOutputStream(os);\n\t\t oos.writeObject(localScores);\n\t\t oos.close();\n\t\t os.close();\n\t\t} catch (Exception e) {\n\t\t e.printStackTrace();\n\t\t}\n }"
]
| [
"0.760548",
"0.71982545",
"0.7092924",
"0.7076662",
"0.70730734",
"0.70587945",
"0.7017409",
"0.69808364",
"0.6962902",
"0.6936556",
"0.69284034",
"0.6912552",
"0.69086325",
"0.6703208",
"0.66779596",
"0.6584774",
"0.6488851",
"0.6480791",
"0.6471393",
"0.6471273",
"0.646609",
"0.63908535",
"0.63857144",
"0.6356466",
"0.6352883",
"0.6273954",
"0.62684745",
"0.6262044",
"0.6249073",
"0.6245391",
"0.6238452",
"0.62302893",
"0.6206472",
"0.61990285",
"0.61964786",
"0.61773795",
"0.6154713",
"0.614852",
"0.614735",
"0.61193645",
"0.61178446",
"0.609966",
"0.60890305",
"0.60806686",
"0.60456806",
"0.6032907",
"0.6029499",
"0.60260034",
"0.6023193",
"0.60222405",
"0.6000537",
"0.6000028",
"0.5999043",
"0.599736",
"0.5988692",
"0.5988325",
"0.5986258",
"0.597927",
"0.59747756",
"0.59720814",
"0.59666246",
"0.59649295",
"0.59640485",
"0.594022",
"0.59175617",
"0.58944947",
"0.589384",
"0.5879607",
"0.58769506",
"0.58723813",
"0.5870253",
"0.5867729",
"0.5866535",
"0.58610725",
"0.58492357",
"0.58405936",
"0.58259755",
"0.5806667",
"0.5797566",
"0.5788278",
"0.57848054",
"0.57838863",
"0.5783259",
"0.57815844",
"0.578007",
"0.576463",
"0.57464564",
"0.574587",
"0.5744915",
"0.5741466",
"0.5734576",
"0.57194537",
"0.5717148",
"0.5714214",
"0.57099307",
"0.57005215",
"0.56977624",
"0.5688416",
"0.5676741",
"0.5675035"
]
| 0.74133617 | 1 |
Returns true if a specific player is successfully unloaded from the server | public boolean unloadPlayer(P player){
if(playerMap.containsKey(player)){
//Player is safe to unload
playerMap.remove(player);
return true;
} else {
//Player isn't safe to save
System.out.println("Tried to unload player " + player.getName() + "'s data, but it's not available");
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean removePlayer(String player);",
"@Override\n public boolean logout(String username) throws RemoteException {\n Player p = getPlayer(username);\n if (p != null) {\n p.setOnline(false);\n p.setReady(false);\n }\n return p != null;\n }",
"public boolean vanished(Player player) {\n return vanished.contains(player);\n }",
"boolean hasReplacePlayerResponse();",
"boolean unload();",
"private void removePlayerFromLobby() {\n\n //Added Firebase functionality assuming var player is the player who wants to leave the game.\n }",
"@Test\n public void testremovePlayer() {\n session.removePlayer(playerRemco);\n // There already was 1 player, so now there should be 0\n assertEquals(0, session.getPlayers().size());\n }",
"@EventHandler(priority = EventPriority.MONITOR)\n public void PlayerQuit(PlayerQuitEvent e){\n plugin.playerIslands.remove(e.getPlayer().getName());\n }",
"public boolean isLoaded(P player){\n return playerMap.containsKey(player);\n }",
"default boolean removePlayer(Player player) {\n return removePlayer(Objects.requireNonNull(player, \"player\").getName());\n }",
"@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)\n public void onPlayerQuit(PlayerQuitEvent event)\n {\n Player player = event.getPlayer();\n EMIPlayer playerToRemove = new EMIPlayer();\n for (EMIPlayer ep : RP.getOnlinePlayers())\n {\n if(ep.getUniqueId().equals(player.getUniqueId().toString()))\n playerToRemove = ep;\n }\n RP.getOnlinePlayers().remove(playerToRemove);\n }",
"private void removePlayerFromTheGame(){\n ServerConnection toRemove = currClient;\n\n currClient.send(\"You have been removed from the match!\");\n updateCurrClient();\n server.removePlayerFromMatch(gameID, toRemove);\n\n if ( toRemove == client1 ){\n this.client1 = null;\n }\n else if ( toRemove == client2 ){\n this.client2 = null;\n }\n else {\n client3 = null;\n }\n gameMessage.notify(gameMessage);\n\n if ( (client1 == null && client2 == null) || (client2 == null && client3 == null) || (client1 == null && client3 == null) ){\n gameMessage.notify(gameMessage);\n }\n if ( liteGame.isWinner() ) endOfTheGame = true;\n playerRemoved = true;\n }",
"public boolean removePlayer(String user){ \r\n\t\t//TODO //What does this mean in the context of the game? do we stop the game? do we check if \r\n\t\t//there is the right number of players...\r\n\t\tif(userToRole.containsKey(user)){\r\n\t\t\tString rid = userToRole.get(user);\r\n\t\t\troleToUser.remove(rid,user);\r\n\t\t\tlog.info(\"removed \" + user + \" from roleToUser\");\r\n\t\t\tInteger x = roleCount.get(rid);\r\n\t\t\troleCount.put(rid,x - 1);\r\n\t\t\tlog.info(\"removed \" + user + \" from roleCount\");\r\n\t\t\tuserReady.remove(user);\r\n\t\t\tlog.info (\"removed \" + user + \" from userReady\");\r\n\t\t\t//Do we want to stop the game, pause the game...\t\r\n\t\t\tsetGameState(GAMESTATE.STOP);\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"boolean GameOver() {\n\t\treturn player.isDead();\n\t}",
"public void unregister(final Player player) {\n\t\tplayer.getActionQueue().cancelQueuedActions();\n\t\t//final Player unregister = player;\n\t\tTrade.exitOutOfTrade(player, false);\n\t\tplayer.destroy();\n\t\tplayer.getSession().close(false);\n\t\tplayers.remove(player);\n\t\tlogger.info(\"Unregistered player : \" + player + \" [online=\" + players.size() + \"]\");\n\t\tengine.submitWork(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tloader.savePlayer(player);\n\t\t\t\tif(World.getWorld().getLoginServerConnector() != null && Constants.CONNNECT_TO_LOGIN_SERVER) {\n\t\t\t\t\tWorld.getWorld().getLoginServerConnector().disconnected(player.getName());\n\t\t\t\t} else {\n\t\t\t\t\t//Remove user online\n\t\t\t\t\tfor(Player p : World.getWorld().getPlayers())\n\t\t\t\t\t\tif(p.getFriends().contains(player.getNameAsLong()))\n\t\t\t\t\t\t\tp.getActionSender().sendPrivateMessageStatus(p.getNameAsLong(), -9);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"public boolean verifyEndGame(Player gamer);",
"public boolean isVanished(Player player) {\n return this.vanishedPlayers.contains(player.getUniqueId());\n }",
"public void cmdRemovePlayer(User teller, Player player) {\n boolean removed = tournamentService.removePlayer(player);\n tournamentService.flush();\n if (!removed) {\n command.tell(teller, \"I''m not able to find {0} in the tournament.\", player);\n } else {\n command.tell(teller, \"Done. Player {0} is no longer in the tournament.\", player);\n }\n }",
"public boolean deletePlayerItem(PlayerItem playerItem);",
"public void unregisterPlayer(final Player p) {\n\t\ttry {\n\t\n\t\n\t\tserver.getLoginConnector().getActionSender().playerLogout(p.getUsernameHash());\n\n\t\t\n\t\tp.setLoggedIn(false);\n\t\tp.resetAll();\n\t\tp.save();\n\t\tMob opponent = p.getOpponent();\n\t\tif (opponent != null) {\n\t\t\tp.resetCombat(CombatState.ERROR);\n\t\t\topponent.resetCombat(CombatState.ERROR);\n\t\t}\n\t\t\n\t\tdelayedEventHandler.removePlayersEvents(p);\n\t\tplayers.remove(p);\n\t\tsetLocation(p, p.getLocation(), null);\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"public void deadPlayer() {\r\n\t\tthis.nbPlayer --;\r\n\t}",
"boolean hasPlayer(String player);",
"void notifyPlayerDisconnected(String username);",
"private Boolean infect( Player player ){\n try {\n player.setHealth( false );\n return true;\n } catch (Exception e) {\n System.out.println(\"Something went wrong.\");\n return false;\n }\n }",
"public void playerLogout(Player player)\n {\n PlayerAFKModel playerAFKModel = players.get(player.getUniqueId());\n\n // Check if player is AFK\n if( playerAFKModel.isAFK() )\n {\n // Is AFK. Update AFK timer before removal\n playerAFKModel.updateAFKTimer();\n playerAFKModel.markAsNotAFK();\n }\n players.remove(player.getUniqueId());\n }",
"@Override\n public void unsuspendPlayer(String username) {\n if (match != null && username != null) {\n match.unsuspendPlayer(username);\n }\n }",
"boolean checkEndGame() throws RemoteException;",
"void disconnectedPlayerMessage(String name);",
"public boolean removePlayer(long idGame, long idPlayer) {\n Game game = this.getGameById(idGame);\n\n if(game == null) {\n return false;\n }\n\n List<Player> players = game.getPlayers();\n Iterator<Player> iterator = players.iterator();\n while (iterator.hasNext()) {\n Player player = iterator.next();\n if(idPlayer == player.getPlayer_identifier()) {\n iterator.remove();\n this.save(game);\n return true;\n }\n }\n\n return false;\n }",
"public boolean playerRemoveProtection(Location loc, Player player) {\n Set set = plugin.map.entrySet();\n Iterator i = set.iterator();\n\n while (i.hasNext()) {\n Map.Entry me = (Map.Entry) i.next();\n List list = (List) me.getValue();\n for (int index = 0, d = list.size(); index < d; index++) {\n Areas area = (Areas) list.get(index);\n Location x = area.getLocation();\n if ((x.equals(loc)) && (me.getKey().equals(player.getName()))) {\n list.remove(area);\n plugin.map.put(player.getName(), list);\n return true;\n }\n }\n }\n return false;\n }",
"Boolean checkEndGame() {\n for (WarPlayer player : players) {\n if (player.getHand().size() == 0)\n return true;\n }\n return false;\n }",
"public boolean removePlayer(long playerId)\r\n\t{\r\n\t\tPlayer player = lookupPlayer(playerId);\r\n\r\n\t\tlogger.debug(\"remove player gameID=\"+player.getGame().getId()+\r\n\t\t\t\t\" member=\"+player.getId());\r\n\t\t\r\n\t\tif (player.getGame().getStatus() == Game.STATUS.CREATING ||\r\n\t\t\tplayer.getGame().getStatus() == Game.STATUS.INVITING) {\r\n\t\t\t// if player hasnt responded yet, just remove it.\r\n\t\t\t// TODO -- could be some nasty windows here where player is registering when this happens.\r\n\t\t\tdeletePlayer(player);\r\n\t\t} \r\n\t\telse {\r\n\t\t\tplayer.setIsActive(false);\r\n\t\t\tgetGameState(player.getGame()).eventPlayerRemoved();\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Override\n public void removePlayer(Player player){\n this.steadyPlayers.remove(player);\n }",
"private static boolean isNotConnected(ProxiedPlayer player, ServerInfo server) {\n for (ProxiedPlayer serverPlayer : server.getPlayers()) {\n if (player.getUniqueId().equals(serverPlayer.getUniqueId())) {\n return false;\n }\n }\n\n return true;\n }",
"public boolean isVanished(String playerName) {\n final Player player = this.plugin.getServer().getPlayer(playerName);\n if (player != null) {\n Debuggle.log(\"Testing vanished status of \" + player.getName() + \": \" + this.isVanished(player));\n return this.isVanished(player);\n }\n Debuggle.log(\"Testing vanished status of \" + playerName + \": null\");\n return false;\n }",
"public boolean isPlayerAlive() {\r\n\t\treturn !(this.getRobotsAlive().isEmpty());\r\n\t}",
"public boolean removePlayerCard(GreenPlayerCard card) {\r\n\t\treturn playerCards.remove(card);\r\n\t}",
"@Test\n public void testStop() {\n plugin.start(gameData, world);\n plugin.stop();\n\n boolean hasPlayer = false;\n for (Entity e : world.getEntities(EntityType.PLAYER)) {\n\n hasPlayer = true;\n\n }\n assertFalse(hasPlayer);\n }",
"public boolean quitGame() {\n\t\treturn game.quitPlayer(this, \"sieler gibt auf\");\t\t\n\t}",
"@EventHandler\n public void onPlayerQuit(PlayerQuitEvent event) {\n playerDataMap.remove(event.getPlayer().getUniqueId());\n }",
"public static boolean DeleteOtherPlayer(Context context) {\n SharedPreferences prefs = context.getSharedPreferences(PREF, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n prefs.edit().remove(\"OtherPlayer\");\n //prefs.edit().commit();\n prefs.edit().apply();\n return true;\n }",
"@Override\n\tpublic boolean tick() {\n\t\t\n\t\tif (this.worldServer.disableSaving) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tfinal int MaxNumToUnload = 400;\n\t\t\n\t\t// unload cubes\n\t\tfor (int i = 0; i < MaxNumToUnload && !this.cubesToUnload.isEmpty(); i++) {\n\t\t\tlong cubeAddress = this.cubesToUnload.poll();\n\t\t\tlong columnAddress = AddressTools.getAddress(AddressTools.getX(cubeAddress), AddressTools.getZ(cubeAddress));\n\t\t\t\n\t\t\t// get the cube\n\t\t\tColumn column = this.loadedColumns.get(columnAddress);\n\t\t\tif (column == null) {\n\t\t\t\t// already unloaded\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// unload the cube\n\t\t\tint cubeY = AddressTools.getY(cubeAddress);\n\t\t\tCube cube = column.removeCube(cubeY);\n\t\t\tif (cube != null) {\n\t\t\t\t// tell the cube it has been unloaded\n\t\t\t\tcube.onUnload();\n\t\t\t\t\n\t\t\t\t// save the cube\n\t\t\t\tthis.cubeIO.saveCube(cube);\n\t\t\t}\n\t\t\t\n\t\t\t// unload empty columns\n\t\t\tif (!column.hasCubes()) {\n\t\t\t\tcolumn.onChunkLoad();\n\t\t\t\tthis.loadedColumns.remove(columnAddress);\n\t\t\t\tthis.cubeIO.saveColumn(column);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"public boolean removeMember(EntityPlayer player)\n {\n return player != null && removeMember(player.getGameProfile().getId());\n }",
"@Override\r\n public boolean doUnloadTrackersData() {\n boolean result = true;\r\n\r\n TrackerManager tManager = TrackerManager.getInstance();\r\n ObjectTracker objectTracker = (ObjectTracker) tManager.getTracker(ObjectTracker.getClassType());\r\n if (objectTracker == null)\r\n return false;\r\n\r\n if (mCurrentDataset != null && mCurrentDataset.isActive()) {\r\n if (objectTracker.getActiveDataSet().equals(mCurrentDataset) && !objectTracker.deactivateDataSet(mCurrentDataset))\r\n result = false;\r\n else if (!objectTracker.destroyDataSet(mCurrentDataset))\r\n result = false;\r\n\r\n mCurrentDataset = null;\r\n }\r\n return result;\r\n }",
"public abstract BossBar removePlayer(UUID uuid);",
"void gameOver() {\n if (!running.compareAndSet(true, false)) return;\n for (PlayerController controller : playerControllers) {\n if (controller == null) continue;\n controller.getClient().setPlayerController(null);\n try {\n controller.getClient().notifyGameOver();\n } catch (IOException e) {\n // no need to handle disconnection, game is over\n }\n }\n if (server != null) new Thread(() -> server.removeGame(this)).start();\n }",
"@java.lang.Override\n public boolean hasPlayer() {\n return player_ != null;\n }",
"public synchronized void delPlayer(@NotNull PlayerInterface player) {\n\n for(BoardCell boardCell[] : board.getGrid()) {\n for(BoardCell b : boardCell) {\n if(b.getWorker() != null) {\n if(b.getWorker().getPlayerWorker().getNickname().equals(player.getNickname())) {\n b.setWorker(null);\n }\n }\n }\n }\n player.getWorkerRef().clear();\n for (int i = 0; i < onlinePlayers.size(); i++) {\n if(onlinePlayers.get(i).getNickname().equals(player.getNickname())) {\n if(started) {\n stateList.remove(i);\n onlinePlayers.remove(i);\n nickNames.remove(player.getNickname());\n }\n break;\n }\n }\n }",
"public void onChunkUnload()\n {\n //RadioMod.logger.info(\"Unload\");\n RadioMod.instance.musicManager.radioSources.get(this.uuid).stopMusic();\n }",
"public void killPlayer() {\n \tdungeon.removeentity(getX(), getY(), name);\n \t\tdungeon.deleteentity(getX(),getY(),name);\n \t\t//System.out.println(\"YOU LOSE MAMA\");\n \t\t//System.exit(0);\n \t\t\n }",
"void removeFromGame() {\n\t\t// remove from game\n\t\t//only for multi-player\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n private boolean unloadPlugin(PluginCommandManager manager, CommandSender player, String pluginName) {\r\n PluginManager pluginManager = Bukkit.getServer().getPluginManager();\r\n Plugin plugin = getPlugin(pluginName);\r\n if (plugin == null) {\r\n manager.sendMessage(player, \"A plugin with the name '\" + pluginName + \"' could not be found.\");\r\n return true;\r\n }\r\n SimplePluginManager simplePluginManager = (SimplePluginManager) pluginManager;\r\n try {\r\n Field pluginsField = simplePluginManager.getClass().getDeclaredField(\"plugins\");\r\n pluginsField.setAccessible(true);\r\n List<Plugin> plugins = (List<Plugin>) pluginsField.get(simplePluginManager);\r\n Field lookupNamesField = simplePluginManager.getClass().getDeclaredField(\"lookupNames\");\r\n lookupNamesField.setAccessible(true);\r\n Map<String, Plugin> lookupNames = (Map<String, Plugin>) lookupNamesField.get(simplePluginManager);\r\n Field commandMapField = simplePluginManager.getClass().getDeclaredField(\"commandMap\");\r\n commandMapField.setAccessible(true);\r\n SimpleCommandMap commandMap = (SimpleCommandMap) commandMapField.get(simplePluginManager);\r\n Field knownCommandsField;\r\n Map<String, Command> knownCommands = null;\r\n if (commandMap != null) {\r\n knownCommandsField = commandMap.getClass().getDeclaredField(\"knownCommands\");\r\n knownCommandsField.setAccessible(true);\r\n knownCommands = (Map<String, Command>) knownCommandsField.get(commandMap);\r\n }\r\n pluginManager.disablePlugin(plugin);\r\n if (plugins != null && plugins.contains(plugin)) {\r\n plugins.remove(plugin);\r\n }\r\n if (lookupNames != null && lookupNames.containsKey(pluginName)) {\r\n lookupNames.remove(pluginName);\r\n }\r\n if (commandMap != null && knownCommands != null) {\r\n for (Iterator<Map.Entry<String, Command>> it = knownCommands.entrySet().iterator(); it.hasNext();) {\r\n Map.Entry<String, Command> entry = it.next();\r\n if (entry.getValue() instanceof PluginCommand) {\r\n PluginCommand command = (PluginCommand) entry.getValue();\r\n if (command.getPlugin() == plugin) {\r\n command.unregister(commandMap);\r\n it.remove();\r\n }\r\n }\r\n }\r\n }\r\n } catch (NoSuchFieldException ex) {\r\n manager.sendMessage(player, \"Failed to query plugin manager, could not unload plugin.\");\r\n return true;\r\n } catch (SecurityException ex) {\r\n manager.sendMessage(player, \"Failed to query plugin manager, could not unload plugin.\");\r\n return true;\r\n } catch (IllegalArgumentException ex) {\r\n manager.sendMessage(player, \"Failed to query plugin manager, could not unload plugin.\");\r\n return true;\r\n } catch (IllegalAccessException ex) {\r\n manager.sendMessage(player, \"Failed to query plugin manager, could not unload plugin.\");\r\n return true;\r\n }\r\n \r\n manager.sendMessage(player, \"The plugin '\" + pluginName + \"' was successfully unloaded.\");\r\n m_plugin.cachePluginDetails();\r\n return true;\r\n }",
"public void unloaded(){\n\t\tloaded=false;\n\t}",
"boolean hasGameEndedResponse();",
"public boolean verifyNameAlreadyRegistered(Player player) {\n\n\t\treturn playerService.findPlayerByName(player.getName()) == null;\n\t}",
"void unsubscribe(Player player);",
"public boolean userStillInGame() {\n return playersInGame.contains(humanPlayer);\n }",
"@EventHandler\n\tpublic void onPlayerLeaveServer(PlayerQuitEvent e){\n\t\tgame.removePlayerFromGame(e.getPlayer());\n\t}",
"private boolean isPlayerNameFreeToUse(String clientName){\n\t\tfor (Player p : getPlayerMap().values()) {\n\t\t\tif(p.getName().equals(clientName)){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public void Gamefinished()\n\t\t{\n\t\t\tplayers_in_game--;\n\t\t}",
"private void eliminatePlayer(Player loser){\n players.remove(loser);\n }",
"boolean playerExists() {\n return this.game.h != null;\n }",
"public void onWorldUnload(Minecraft minecraft, WorldClient world, String message);",
"public abstract void destroyPlayer();",
"@Test\n\tpublic void validRemovePlayer_1() {\n\t\tGameState gameState = new GameState(1, \"assets/maps/map.json\");\n\t\tgameState.addPlayer(0, \"Ben\", Color.RED);\n\t\tgameState.removePlayer(0);\n\t\tassertNull(gameState.getPlayer(0));\n\t}",
"public boolean loadPlayer(P player){\n\n //Is the player already loaded?\n if(playerMap.containsKey(player)){\n System.out.println(\"Tried to load player \" + player.getName() + \"'s data, even though it's already loaded!\");\n return false;\n } else {\n\n if(data.getConfig().contains(player.getUniqueId().toString())){\n //Load player\n PlayerProfile playerProfile = new PlayerProfile(false, data, player);\n playerMap.put(player, playerProfile);\n\n return true;\n } else {\n //Create player profile\n PlayerProfile playerProfile = new PlayerProfile(true, data, player);\n playerMap.put(player, playerProfile);\n\n return true;\n }\n }\n }",
"public boolean endOfGame() {\n\t\tfor (int i = 0; i < getNumOfPlayers(); i++) {\n\t\t\tif (this.getPlayerList().get(i).getCardsInHand().isEmpty()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public void removePlayer(Player player){\n playerList.remove(player);\n }",
"public void removePlayer(Player player){\n for(int x = 0; x < players.size(); x++){\n if(players.get(x) == player){\n players.remove(x);\n }\n }\n }",
"@EventHandler\n public void onPlayerQuitEvent(PlayerQuitEvent e)\n {\n String playerName = e.getPlayer().getName();\n \n this.afkPlayers.remove(playerName);\n this.afkPlayersAuto.remove(playerName);\n this.afkLastSeen.remove(playerName);\n }",
"public void eliminatePlayer(Character player){\r\n\t\tplayer.setAsPlayer(false);\r\n\t\tSystem.err.println(player.getName() + \" was eliminated\");\r\n\t}",
"public boolean removePawnLife() {\n return pawn.removeLife();\n }",
"@EventHandler\r\n\tpublic void onPlayerQuit(PlayerQuitEvent event) {\r\n\t\tUUID uuid = event.getPlayer().getUniqueId();\r\n\t\tmain.getPlayers().get(uuid).saveTask.cancel();\r\n\t\tmain.getPlayers().get(uuid).savePlayer();\r\n\t\tmain.getPlayers().remove(uuid);\r\n\t\t\r\n\t}",
"boolean hasPlayerId();",
"void clean(Player p);",
"private void checkRemotePlayerReady(){\n String data = getJSON(hostUrl + \"retrieve_remote_ready.php?matchId=\" + matchId\n + \"&player=\" + oppositePlayer, 2000);\n\n System.out.println(\"Ready: \" + data);\n\n // Get first character, as, for some reason, it returns one extra character.\n int ready = Integer.parseInt(data.substring(0, 1));\n\n if (ready == 1){\n remotePlayerReady = true;\n }\n\n }",
"public void onPlayerDisconnect(Player player)\r\n \t{\r\n \t\tPlayerData data = plugin.getPlayerDataCache().getData(player);\r\n \r\n \t\tdata.setFrenzyEnabled(false);\r\n \t\tdata.setSuperPickaxeEnabled(false);\r\n \t\tdata.setUnlimitedAmmoEnabled(false);\r\n \t}",
"public static boolean isLoaded() {\n\t\ttry {\n\t\t\tPlayer.getRSPlayer();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public boolean existsPlayer(String username) {\r\n return ctrlDomain.existsPlayer(username);\r\n }",
"public boolean removePlayerVisible(Integer levelIndex) {\n\t\treturn playerVisible.remove(levelIndex);\n\t}",
"public void removePlayer(String p) {\n this.playersNames.remove(p);\n }",
"void unloadUser(KingdomUser user);",
"public synchronized void gameOver(PlayerHandler playerHandler) {\n\n winner();\n\n if (temporaryGame) {\n for (Game game : Server.getGames().values()) {\n if (game.equals(this)) {\n Server.getGames().remove(playerHandler.getGameRoom());\n //return; //(if not commented, does not remove the !fixed game.\n System.out.println(\"game \" + this.name + \" removed from map\");\n }\n }\n }\n\n resetGameRoom();\n\n }",
"public boolean unloadScreen(String name) {\r\n if (screens.remove(name) == null) {\r\n System.out.println(\"Screen doesn't exist\");\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }",
"@Override\n \tpublic boolean leave(ArenaPlayer p) {\n \t\treturn true;\n \t}",
"@EventHandler(priority = EventPriority.HIGHEST)\n\tvoid onPlayerQuit(PlayerQuitEvent event)\n\t{\n\t Player player = event.getPlayer();\n\t\tUUID playerID = player.getUniqueId();\n\t PlayerData playerData = this.dataStore.getPlayerData(playerID);\n\n\t this.dataStore.savePlayerData(player.getUniqueId(), playerData);\n\n //drop data about this player\n this.dataStore.clearCachedPlayerData(playerID);\n\t}",
"public void endGame() {\r\n\t\tthis.gameStarted = false;\r\n\t\tthis.sendMessages = false;\r\n\t\tthis.centralServer.removeServer(this);\r\n\t}",
"public boolean quit(TBGPProtocolCallback callback) {\n\t\tif(!isActive()) {\n\t\t\tString removedPlayer = players.remove(callback);\n\t\t\tlogger.info(removedPlayer + \" left the room\");\n\t\t\tbroadcast(removedPlayer + \" left room \"+this.thisRoomName, TBGPCommand.SYSMSG);\n\t\t\treturn true;\n\t\t} else {\n\t\t\tlogger.info(\"Unable to leave room in a middle of a game\");\n\t\t\treturn false;\n\t\t}\n\t}",
"public void finishPlayerLogin(Response resp, Player player) {\n LoginRequest req = (LoginRequest) player.removeAttribute(\"req\");\n if (resp != Response.LOGIN) {\n getPlayerMap().remove(player.getUsername());\n loginSession.getIndexToName().remove(player.getStaticIndex());\n AbstractProtocol.sendLoginResponse(req, resp);\n } else {\n boolean success;\n synchronized (worldPlayers) {\n success = worldPlayers.add(player);\n }\n if (success && player.getSession().isConnected()) {\n if (WorldModule.isCommercial()) {\n loginSession.completePlayerLogin(player);\n }\n System.out.println(\"Registered Player: \" + player);\n } else if (WorldModule.isCommercial() && !player.getSession().isConnected()) {\n loginSession.sendPlayerUpdate(player, 3);\n success = false;\n }\n if (success) {\n AbstractProtocol.sendLoginResponse(req, resp);\n }\n }\n currentlyLogging.remove(player.getUsername());\n }",
"@Test\n\tpublic void invalidRemovePlayer_1() {\n\t\tGameState gameState = new GameState(1, \"assets/maps/map.json\");\n\t\tassertFalse(gameState.removePlayer(-1));\n\t}",
"public boolean isPlayerDefeated() {\n if (player.getHealth() <= 0) {\n return true;\n }\n return false;\n }",
"public boolean endGame(String nom){\n \tif((nbFantomes==0 || players.size()==0) ||\n \t (gameMode==2 && (!live(nom) || winOfJuggernaut())))\n \t return true;\n \treturn false;\n }",
"public boolean sendDeath() {\n return true;\n }",
"public void removePlayer(EntityPlayerMP player)\r\n {\r\n int var2 = (int)player.managedPosX >> 4;\r\n int var3 = (int)player.managedPosZ >> 4;\r\n\r\n for (int var4 = var2 - this.playerViewRadius; var4 <= var2 + this.playerViewRadius; ++var4)\r\n {\r\n for (int var5 = var3 - this.playerViewRadius; var5 <= var3 + this.playerViewRadius; ++var5)\r\n {\r\n PlayerManager.PlayerInstance var6 = this.getPlayerInstance(var4, var5, false);\r\n\r\n if (var6 != null)\r\n {\r\n var6.removePlayer(player);\r\n }\r\n }\r\n }\r\n\r\n this.players.remove(player);\r\n }",
"public void removePlayer(String name) {\n\t\tfor(Player p : playerList) {\n\t\t\tif(p.getName().equals(name)) {\n\t\t\t\toccupiedPositions.remove(p.getPosition());\n\t\t\t\tif(p.getType() == Player.PlayerType.Agent) {\n\t\t\t\t\treAssignRobots(p);\n\t\t\t\t\tthis.agents -= 1;\n\t\t\t\t}\n\t\t\t\tplayerList.remove(p);\n\t\t\t}\n\t\t}\n\t\tserver.broadcastToClient(name, SendSetting.RemovePlayer, null, null);\n\t\tserver.updateGameplane();\n\t}",
"public void remove(Player player) {\n\t\tgetPlayers().remove(player);\n\t\tif (getPlayers().size() < 2) {\n\n\t\t}\n\t}",
"public void erasePlayer(Player player) {\n if(player.equals(occupant)) {\n // System.out.println(\"killedToo\");\n revertBlock(player);\n getAdjacent(GameEngine.UP).erasePlayer(player);\n getAdjacent(GameEngine.DOWN).erasePlayer(player);\n getAdjacent(GameEngine.LEFT).erasePlayer(player);\n getAdjacent(GameEngine.RIGHT).erasePlayer(player);\n }\n }",
"@EventHandler(ignoreCancelled = true)\n public void onChunkUnload(ChunkUnloadEvent event) {\n for (Entity entity : event.getChunk().getEntities()) {\n if (Util.isTrackable(entity)) {\n AbstractHorse abstractHorse = (AbstractHorse) entity;\n SavedHorse savedHorse = DB.findHorse(abstractHorse);\n if (savedHorse != null) {\n DB.observe(savedHorse, abstractHorse);\n }\n }\n }\n }",
"public boolean removePossibleOwner(Player player) {\n\t\treturn possibleOwners.remove(player);\n\t}",
"public void removeFromGame(){\n this.isInGame = false;\n }"
]
| [
"0.6740087",
"0.62350315",
"0.61749774",
"0.61491287",
"0.61206704",
"0.6047892",
"0.60146517",
"0.5908345",
"0.5888307",
"0.58592886",
"0.5848374",
"0.583597",
"0.5824092",
"0.5818401",
"0.57797617",
"0.57720554",
"0.5728725",
"0.57285506",
"0.57122064",
"0.5693472",
"0.56489533",
"0.5643492",
"0.56385106",
"0.5627606",
"0.56247145",
"0.5609784",
"0.5601645",
"0.5600664",
"0.55973244",
"0.5594269",
"0.5590585",
"0.55902183",
"0.5584237",
"0.5581626",
"0.55644935",
"0.5552988",
"0.5550609",
"0.554735",
"0.5545305",
"0.5538149",
"0.5535425",
"0.55302936",
"0.55275875",
"0.5522592",
"0.55063504",
"0.55046827",
"0.5496192",
"0.5492323",
"0.5473291",
"0.5466067",
"0.54608047",
"0.54579926",
"0.54571074",
"0.5445044",
"0.54401773",
"0.5439242",
"0.5437254",
"0.54371375",
"0.5435121",
"0.5430482",
"0.54288757",
"0.54156363",
"0.5400627",
"0.53978974",
"0.5396998",
"0.5396781",
"0.5395165",
"0.5392309",
"0.53922963",
"0.53838104",
"0.5382438",
"0.53763056",
"0.5356362",
"0.5355584",
"0.53504014",
"0.5348914",
"0.53460723",
"0.5344142",
"0.5343599",
"0.53428453",
"0.534107",
"0.53376776",
"0.5334201",
"0.53205657",
"0.53158027",
"0.5312485",
"0.5308285",
"0.53038734",
"0.52944994",
"0.5293989",
"0.5281683",
"0.5278015",
"0.5272878",
"0.52704126",
"0.5267892",
"0.5267518",
"0.52604216",
"0.52580297",
"0.5257313",
"0.52415234"
]
| 0.79737675 | 0 |
Returns how many players are currently loaded | public int loadedPlayers(){
return playerMap.size();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int playersCount(){\r\n\t\treturn players.size();\r\n\t}",
"public static int getNumPlayers(){\n\t\treturn numPlayers;\n\t}",
"public int countPlayers(){\n return players.size();\n }",
"public int getNumPlayers(){\n\t\treturn this.players.size();\n\t}",
"public int playerCount()\r\n\t{\r\n\t\tint count = 0;\r\n\t\tfor(Player player: this.players)\r\n\t\t{\r\n\t\t\tif(player != null)\r\n\t\t\t{\r\n\t\t\t\t++count;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t}",
"public int numPlayers() {\n return playerList.size();\n }",
"public int getNumPlayers() {\n\n\t\treturn this.playerCount;\n\t}",
"public int getNumPlayers(){\n return m_numPlayers;\n }",
"private void getNumPlayers() {\n\t\tSystem.out.println(\"How many people are playing? (must be between \"+MIN_PLAYERS+\" and \"+MAX_PLAYERS+\")\");\n\t\tnumPlayers = GetInput.getInstance().anInteger(MIN_PLAYERS, MAX_PLAYERS);\n\t}",
"public int numPlayers(){\n return this.members.size();\n }",
"public int getNumPlayers() {\n return numPlayers;\n }",
"public int playerCount() {\n\t\treturn playerList.size();\n\t}",
"public int getPlayerCount() {\n \n \treturn playerCount;\n \t\n }",
"public int getNumOfPlayers() {\n\t\treturn playerList.size();\n\t}",
"public int getPlayerCount() {\n\t\treturn playerCount;\n\t}",
"public int getPlayerCount() {\n return 0;\n }",
"public int nrOfPlayers() {\n int playerCount = 0;\n for (Player player : players) {\n if (player.getName() != null) {\n playerCount++;\n }\n }\n\n return playerCount;\n }",
"int getNumOfPlayers() {\n return this.numOfPlayers;\n }",
"int getNumberOfPlayers(){\n return players.size();\n }",
"public int getNumOfPlayers() {\n\t\treturn numOfPlayers;\n\t}",
"private int getOnlinePlayers()\n {\n return (int) Bukkit.getOnlinePlayers().stream().filter( p -> p != null && p.isOnline() ).count();\n }",
"public int activePlayers() {\n int playerCount = 0;\n for (Player player : players) {\n if (player.getName() != null && player.getState()) {\n playerCount++;\n }\n }\n\n return playerCount;\n }",
"public int readyCount()\r\n\t{\r\n\t\tint count = 0;\r\n\t\tfor(Player player: this.players)\r\n\t\t{\r\n\t\t\tif(player != null)\r\n\t\t\t{\r\n\t\t\t\tif(player.isReady())\r\n\t\t\t\t{\r\n\t\t\t\t\t++count;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t}",
"private int getTotalPlayerCount() {\n String baseUrl = \"https://www.runescape.com/player_count.js?varname=iPlayerCount\";\n String url = baseUrl + \"&callback=jQuery33102792551319766081_1618634108386&_=\" + System.currentTimeMillis();\n try {\n String response = new NetworkRequest(url, false).get().body;\n Matcher matcher = Pattern.compile(\"\\\\(\\\\d+\\\\)\").matcher(response);\n if(!matcher.find()) {\n throw new Exception();\n }\n return Integer.parseInt(response.substring(matcher.start() + 1, matcher.end() - 1));\n }\n catch(Exception e) {\n return 0;\n }\n }",
"public int getNumberOfPlayers() {\n return listaJogadores.size() - listaJogadoresFalidos.size();\n }",
"@Override\n\tpublic int getOnlinePlayerSum() {\n\t\treturn PlayerManager.getInstance().getOnlinePlayers().size();\n\t}",
"@Override\npublic int getNumPlayers() {\n\treturn numPlayer;\n}",
"public int getPlayerIdsCount() {\n return playerIds_.size();\n }",
"public int getPlayerIdsCount() {\n return playerIds_.size();\n }",
"public int getCurentPlayerNumber() {\n return players.size();\n }",
"public int size ()\n\t{\n\t\treturn playerList.size();\n\t}",
"public static int numberofplayers (String filename) throws IOException\n {\n int countplayer = 0;\n LineNumberReader L1= new LineNumberReader(new FileReader(filename));// reading the lines by using line reader\n while ((L1.readLine())!=null) {};\t// reading the line while its not null\n countplayer = L1.getLineNumber(); // number of lines equals the number of player\n L1.close();\n return countplayer;\n }",
"public int readyCount ()\n\t{\n\t\tint count =0;\n\t\tIterator<Player> it = iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tPlayer p = it.next();\n\t\t\tif(p.available())\n\t\t\t\tcount++;\n\t\t}\n\t\treturn count;\n\t}",
"@Override\n public int getTotalHumanPlayers() {\n return totalHumanPlayers;\n }",
"@Override\n\tpublic int selectCount() {\n\n\t\tint res = session.selectOne(\"play.play_count\");\n\n\t\treturn res;\n\t}",
"public int getNumPlayed()\n\t{\n\t\treturn numPlayed;\n\t}",
"public static int GetPlayersLeft () {\n int players_left = 0;\r\n\r\n // LOOK AT EACH PLAYER AND CHECK IF THEY HAVEN'T LOST\r\n for (int i = 0; i < player_count; i++) {\r\n if (!player[i].lost)\r\n players_left++;\r\n }\r\n\r\n // RETURN THE RESULTS\r\n return players_left;\r\n }",
"int getStatsCount();",
"int getStatsCount();",
"int getStatsCount();",
"int getCount(Side player) {\n return player == BLACK ? _countBlack : _countWhite;\n }",
"public int getNumberOfSelectedPlayers() {\n\t\treturn tmpTeam.size();\n\t}",
"public int nbEnemiesAlive(){\n return state.getPlayers().size()-1;\n }",
"public int getNumOfPlayerPieces() {\n return playerPiecePositions.length;\n }",
"public int getMinimumPlayers() {\n return getOption(ArenaOption.MINIMUM_PLAYERS);\n }",
"private int getOSRSPlayerCount() {\n try {\n Document document = Jsoup.connect(\"https://oldschool.runescape.com\").get();\n String playerCountText = document.getElementsByClass(\"player-count\").get(0).text();\n Matcher matcher = Pattern.compile(\"[\\\\d,?]+\").matcher(playerCountText);\n if(!matcher.find()) {\n throw new Exception();\n }\n playerCountText = playerCountText.substring(matcher.start(), matcher.end());\n return Integer.parseInt(playerCountText.replace(\",\", \"\"));\n }\n catch(Exception e) {\n return 0;\n }\n }",
"Integer loadUserCount();",
"public int getAvailableCount();",
"public int countPlayers(Long gameId){\n List<User_Game> user_games = userGameRepository.retrieveGamePlayers(gameId);\n return user_games.size();\n }",
"public int getPlayPoints() {\n return localPlayPoints;\n }",
"public int totalGames() {\n return wins + losses + draws;\n }",
"int getPeerCount();",
"int getFaintedPokemonCount();",
"public int getMaximumPlayers() {\n return getOption(ArenaOption.MAXIMUM_PLAYERS);\n }",
"public int getMinPlayers() {\n return minPlayers;\n }",
"public int getPartyCount()\n\t{\n\t\tint r = 0;\n\t\tfor(int i = 0; i < m_pokemon.length; i++)\n\t\t\tif(m_pokemon[i] != null)\n\t\t\t\tr++;\n\t\treturn r;\n\t}",
"public int getMaximumPlayers() {\n return maximumPlayers;\n }",
"@Test\n public void getNumDraw() {\n this.reset();\n assertEquals(-1, this.bps.getNumDraw());\n // max # of visible cards in the draw pile\n this.reset();\n this.bps.startGame(this.fullDeck, false, 7, 1);\n assertEquals(1, this.bps.getNumDraw());\n }",
"public int getNumPlayerProtections(Player player) {\n List list;\n try {\n list = (List) plugin.map.get(player.getName());\n return list.size();\n } catch (NullPointerException e) {\n plugin.map.put(player.getName(), new ArrayList<>());\n return 0;\n }\n }",
"int getProfilesCount();",
"public int NumOfGames()\n\t{\n\t\treturn gametype.length;\n\t}",
"public int getTimesPlayed() {\r\n\t\treturn timesPlayed;\r\n\t}",
"public int getStatsCount() {\n return stats_.size();\n }",
"int getMonstersCount();",
"int getMonstersCount();",
"int getReservePokemonCount();",
"public int getPlayedTimes() {\n return playedTimes;\n }",
"public int getNbPawns(Player player) {\n Pawn aPawn;\n int Size, nbPawn;\n Size = getSize();\n nbPawn = 0;\n\n for (int numLine = 0; numLine < Size; numLine++) {\n for (int numCol = 0; numCol < Size; numCol++) {\n\n aPawn = field[numLine][numCol];\n if (aPawn != null) {\n if (aPawn.getPlayer() == player) nbPawn++; //if the pawn belong to player\n }\n\n }\n }\n\n return nbPawn;\n }",
"public int getMaxPlayers() {\n return maxPlayers;\n }",
"int getQuestCount();",
"public int getPlayerTotal() {\n\t\t\treturn playerTotal;\n\t\t}",
"List<PlayedQuestion> getPlayedQuestionsCount();",
"int getScoresCount();",
"public int getCount() {\n\n if (team.size() <= 0)\n return 1;\n return team.size();\n }",
"int getAchievementsCount();",
"public int getNumberUnplayedCities() {\n\t\t return playerPieces.getNumberUnplayedCities();\n\t }",
"public int getTurnCount() {\n return turnEncoder.getCount();\n }",
"int getFramesCount();",
"int getNewlyAvailableQuestsCount();",
"@Override\n // report number of players on a given team (or all players, if null)\n\tpublic int numPlayers(String teamName) {\n\n int numPlayers = 0;\n\n\n if (teamName == null) {\n\n for (int i = 0; i < (stats.keySet()).toArray().length; i++) {\n\n numPlayers++;\n\n }\n\n return numPlayers;\n\n }\n\n else {\n\n Collection<SoccerPlayer> soccerPlayers = stats.values();\n\n for (SoccerPlayer sp: soccerPlayers) {\n\n if (sp.getTeamName().equals(teamName)){\n\n numPlayers++;\n }\n }\n\n return numPlayers;\n\n }\n\n\n\t}",
"public int numVanished() {\n return this.vanishedPlayers.size();\n }",
"public int numAlivePokemon() {\r\n\t\tint count = 0;\r\n\t\tfor (Pokemon p : ownedPokemon) {\r\n\t\t\tif (p.getCurrentHP() > 0) {\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t}",
"public int getD_CurrentNumberOfTurns() {\n return d_CurrentNumberOfTurns;\n }",
"public int getNumberOfMonumentsPlayed() {\n\t\tint numberPlayed = 0;\n\t\t// Iterate through all the player owned soldier cards to check, which of these have been played\n\t\tfor(DevelopmentCard card: victoryPointCards) {\n\t\t\tif(card.hasBeenPlayed()) {\n\t\t\t\tnumberPlayed++;\n\t\t\t}\n\t\t}\n\t\treturn numberPlayed;\n\t}",
"int getParticipantsCount();",
"int getParticipantsCount();",
"public int getNumberOfSongs()\n {\n return songs.size();\n }",
"public int leaderDeckSize(){\n return deckLeaderCard.size();\n }",
"public int getPoints ( Player player );",
"int getAchieveInfoCount();",
"public float numRemainingPlays(List<Player> players) {\n\t\tfloat f = 0;\n\t\tfor (Player p: players) {\n\t\t\tf += (float)p.getHandCount();\n\t\t}\n\t\tf += (float)getDeckSize();\n\t\t\n\t\treturn f;\n\t}",
"public int getUserCount() {\n return instance.getUserCount();\n }",
"public int getAmountOfVideosThatWillBeSaved(){\n\t\treturn (int) (Math.ceil((videoLength/videoIterationLength)));\n\t}",
"private int promptNumPlayers() {\r\n Object[] options = {1, 2, 3, 4};\r\n int numPlr = (int) JOptionPane.showInputDialog(\r\n null,\r\n \"How many people are playing?\",\r\n \"Welcome!\",\r\n JOptionPane.PLAIN_MESSAGE,\r\n null,\r\n options,\r\n 1);\r\n\r\n players = new Player[numPlr];\r\n\r\n for (int i = 0; i < numPlr; i++) {\r\n players[i] = new Player();\r\n }\r\n\r\n return numPlr;\r\n }",
"public int getGamesPlayed() {\n return gamesPlayed;\n }",
"int getExperiencesCount();",
"int getPickupsCount();",
"public int getStatsCount() {\n return instance.getStatsCount();\n }",
"public int getNumIdle();",
"public int getNumberOfSoldiersPlayed() {\n\t\t\treturn developmentCardHand.getNumberOfSoldiersPlayed();\n\t\t}"
]
| [
"0.825248",
"0.8152763",
"0.81312966",
"0.8063653",
"0.79801464",
"0.7974848",
"0.787548",
"0.7850627",
"0.78282267",
"0.78277445",
"0.78068095",
"0.778485",
"0.7775487",
"0.7713559",
"0.767092",
"0.7666394",
"0.7661111",
"0.7645021",
"0.76312536",
"0.7621268",
"0.75645834",
"0.7530519",
"0.7501221",
"0.74609643",
"0.7454117",
"0.7439431",
"0.7432866",
"0.7325842",
"0.72938055",
"0.7271118",
"0.71880287",
"0.7159587",
"0.7153382",
"0.71199405",
"0.6957611",
"0.69488305",
"0.69041336",
"0.68971086",
"0.68971086",
"0.68971086",
"0.68779874",
"0.68546885",
"0.68436515",
"0.680103",
"0.6731993",
"0.6725815",
"0.670174",
"0.66920966",
"0.6686996",
"0.66732645",
"0.66667515",
"0.66144055",
"0.6611732",
"0.65733933",
"0.6571858",
"0.6558848",
"0.6558466",
"0.655605",
"0.6535866",
"0.65345716",
"0.6532643",
"0.6516694",
"0.6499373",
"0.6497582",
"0.6497582",
"0.649189",
"0.64852536",
"0.64775777",
"0.64589995",
"0.6448993",
"0.64423746",
"0.6440383",
"0.6439678",
"0.64328957",
"0.6431466",
"0.64251816",
"0.64198387",
"0.64171547",
"0.64153934",
"0.6414642",
"0.64076906",
"0.6407233",
"0.6402088",
"0.6400888",
"0.6400652",
"0.6400652",
"0.63994753",
"0.6395207",
"0.63751554",
"0.63688195",
"0.63559246",
"0.63542134",
"0.63420475",
"0.63415265",
"0.63410926",
"0.633647",
"0.6335471",
"0.6334474",
"0.6333175",
"0.6323305"
]
| 0.84428316 | 0 |
Sets a players attribute, returns false if it's a new attribute | public boolean setPlayerAttribute(P player, String attribute, Long number){
attribute = "." + attribute;
if(playerMap.containsKey(player)){
if(playerMap.get(player).hasAttribute(attribute)){
playerMap.get(player).getPlayerProfile().put(attribute, number);
return true;
} else {
playerMap.get(player).getPlayerProfile().put(attribute, number);
System.out.println("Just set an attribute that isn't loaded on the player");
return false;
}
} else {
System.out.println("Failed to setPlayerAttribute as player isn't loaded");
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean setPlayer(Player aNewPlayer)\r\n {\r\n boolean wasSet = false;\r\n player = aNewPlayer;\r\n wasSet = true;\r\n return wasSet;\r\n }",
"boolean setPlayer(String player);",
"public boolean increasePlayerAttribute(P player, String attribute, Long number){\n attribute = \".\" + attribute;\n if(playerMap.get(player).hasAttribute(attribute)){\n playerMap.get(player).getPlayerProfile().put(attribute, playerMap.get(player).getPlayerAttribute(attribute) + number);\n return true;\n } else {\n playerMap.get(player).getPlayerProfile().put(attribute, number);\n return false;\n }\n }",
"public void setAsPlayer(){\n\t\tthis.isPlayer = true;\n\t}",
"public boolean decreasePlayerAttribute(P player, String attribute, Long number){\n attribute = \".\" + attribute;\n if(playerMap.get(player).hasAttribute(attribute)){\n playerMap.get(player).getPlayerProfile().put(attribute, playerMap.get(player).getPlayerAttribute(attribute) - number);\n return true;\n } else {\n playerMap.get(player).getPlayerProfile().put(attribute, number);\n return false;\n }\n }",
"public void setPlayer(Player myPlayer){\n battlePlayer=myPlayer;\n }",
"public boolean savePlayer(P player){\n String uuid = player.getUniqueId().toString();\n\n if(playerMap.containsKey(player)){\n //Player is safe to save\n List<String> playerAttributes = new ArrayList<String>(getPlayer(player).getPlayerAttributes());\n\n System.out.println(player.getName() + \" has \" + playerAttributes.size() + \" attributes to save.\");\n\n for(int i = 0; playerAttributes.size() > i; i++){\n data.getConfig().set(uuid + \".\" + playerAttributes.get(i), playerMap.get(player).getPlayerAttribute(playerAttributes.get(i)));\n }\n\n data.saveData();\n\n for(int i = 0; playerAttributes.size() > i; i++){\n System.out.println(\"Saved \" + uuid + \".\" + playerAttributes.get(i) + \" as \" + playerMap.get(player).getPlayerAttribute(playerAttributes.get(i)));\n }\n\n return true;\n } else {\n //Player isn't safe to save\n System.out.println(\"Tried to save player \" + player.getName() + \"'s data, but it's not available\");\n return false;\n }\n }",
"@Override\n public void playerAttributeChange() {\n\n Logger.info(\"HUD Presenter: playerAttributeChange\");\n view.setLives(String.valueOf(player.getLives()));\n view.setMoney(String.valueOf(player.getMoney()));\n setWaveCount();\n }",
"public void setActivePlayer()\n {\n activePlayer = !activePlayer;\n }",
"public void setPlayer(Player _player) { // beallit egy ezredest az adott mapElementre, ha az rajta van\n player = _player;\n }",
"public static void set_players(){\n\t\tif(TossBrain.compselect.equals(\"bat\")){\n\t\t\tbat1=PlayBrain1.myteam[0];\n\t\t\tbat2=PlayBrain1.myteam[1];\n\t\t\tStriker=bat1;\n\t\t\tNonStriker=bat2;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\tbat1=PlayBrain1.oppteam[0];\n\t\t\t\tbat2=PlayBrain1.oppteam[1];\n\t\t\t\tStriker=bat1;\n\t\t\t\tNonStriker=bat2;\n\n\t\t\t\t}\n\t}",
"public void setPlayer(Player newPlayer) {\n roomPlayer = newPlayer;\n }",
"@Override\r\n\tpublic void set(final Player t) {\n\r\n\t}",
"@Override\n\tpublic void setPlayer(Player player) {\n\n\t}",
"public void setPlayer(String player) {\r\n this.player = player;\r\n }",
"public boolean setPlayerToMove(Player aNewPlayerToMove)\n {\n boolean wasSet = false;\n if (aNewPlayerToMove != null)\n {\n playerToMove = aNewPlayerToMove;\n wasSet = true;\n }\n return wasSet;\n }",
"public void setPlayers(Player[] players) {\n this.players = players;\n }",
"void setPlayerId(int playerId);",
"public void setPlayer(Player player) {\r\n this.player = player;\r\n }",
"public int getAttribNum(){\r\n\t\treturn playerNum;\r\n\t}",
"public int getAttribNum(){\r\n\t\treturn playerNum;\r\n\t}",
"public void testSetIsPlayable()\n {\n assertEquals(b1.getIsPlayable(), false);\n b1.setIsPlayable(true);\n assertEquals(b1.getIsPlayable(), true);\n\n }",
"public void setStrat(boolean player, int strat){\n\tif (player){\n\t p1.loadStrat(strat);\n\t}\n\tp2.loadStrat(strat);\n }",
"public void setAiPlayer(Player player) {\n if(aiPlayer != null) {\n throw new IllegalArgumentException(\"The player has already been set to \"\n + aiPlayer.getName() + \" with the game piece \" + aiPlayer.getPiece());\n }\n if(player == null) {\n throw new IllegalArgumentException(\"Player cannot be null.\");\n }\n aiPlayer = player;\n }",
"public void setPlayers(Hashtable<Integer, Player> players) {\r\n\t\tthis.players = players;\r\n\t}",
"public void setPlayer(Player player) {\n this.player = player;\n }",
"public void setPlayer(Player player) {\n this.player = player;\n }",
"public void setName(String name)\n {\n playersName = name;\n }",
"public void setCurrentPlayer(User newPlayer) {\n\n\t\tif (currentPlayer != null) {\n\t\t\tif (currentPlayer.equals(newPlayer))\n\t\t\t\treturn;\n\t\t\telse if (newPlayer == null)\n\t\t\t\tthrow new RuntimeException(\"Once a player has been assigned to a Level Pack, it cannot be nulled.\");\n\t\t\telse\n\t\t\t\tthrow new RuntimeException(\"Once a player has been assigned to a Level Pack, it cannot be changed.\");\n\t\t} else if (newPlayer == null)\n\t\t\treturn;\n\t\tcurrentPlayer = newPlayer;\n\t}",
"public void setPlayers(ArrayList<Player> players) {\n\t\tthis.players = players;\n\t}",
"public void setPlayer(Player player) {\n\t\tthis.player = player;\r\n\t}",
"public void setPlayers(ArrayList<Player> players) {\n this.players = players;\n }",
"private void changeCardAttributes(Player player,LeaderCard toCopy){\n\t\tfor(LeaderCard leader : player.getLeaderCards()){\n\t\t\tif((\"Lorenzo de Medici\").equalsIgnoreCase(leader.getName())){\n\t\t\t\tleader.setEffect(toCopy.getEffect());\n\t\t\t\tleader.setPermanent(toCopy.getPermanent());\n\t\t\t\tleader.setName(toCopy.getName());\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void setAttribute(boolean f)\n {\n checkState();\n attribute = f;\n }",
"public void setPlayers(Player a_players[], int a_numPlayers)\n {\n m_numPlayers = a_numPlayers;\n \n for(int i = 0; i < m_numPlayers; i++)\n {\n m_currentPlayers.add(a_players[i]);\n m_players.add(a_players[i]);\n }\n }",
"public void setPlayer(Player p) {\n\t\tplayer = p;\n\t}",
"public void setAttrib(String name, String value);",
"public void setPlayer(Player player) {\n\t\tthis.player = player;\n\t}",
"public boolean setAttributes(Set<String> foundAttributes);",
"public void setData(List<Player> players, Player owningPlayer) {\n this.players = players;\n thisPlayer = owningPlayer;\n }",
"@Override\r\n public void applyAttributes() {\r\n super.applyAttributes();\r\n getEntity().setColor(color);\r\n getEntity().setOwner(MbPets.getInstance().getServer().getPlayer(getOwner()));\r\n getEntity().setAgeLock(true);\r\n\r\n if (isBaby) {\r\n getEntity().setBaby();\r\n } else {\r\n getEntity().setAdult();\r\n }\r\n Bukkit.getMobGoals().removeGoal(getEntity(), VanillaGoal.LLAMA_ATTACK_WOLF);\r\n Bukkit.getMobGoals().removeGoal(getEntity(), VanillaGoal.LLAMA_FOLLOW_CARAVAN);\r\n Bukkit.getMobGoals().removeGoal(getEntity(), VanillaGoal.TRADER_LLAMA_DEFEND_WANDERING_TRADER);\r\n }",
"public void setPlayers(ArrayList<Integer> players) {\n this.players= new ArrayList<>(players);\n }",
"public void setPlayerAttributes(String title, Player p) {\t\n\t\tname_Class.setText(title);\n\t\tcurrentHp.setText(p.getHP()+\"/\"+p.getMaxHP());\n\t\tplayerHPBar.setProgress((double)p.getHP()/p.getMaxHP());\n\t\tString outDMG = Integer.toString(p.getDMG());\n\t\tgdmg.setText(outDMG);\n\t\tString outEV = Integer.toString(p.getEV());\n\t\tgev.setText(outEV);\n\t\tthis.p=p.copy();\n\t}",
"public void playerSetFlag(List<String> playersList) {\n for (String playerId : playersList) {\n Player player = playerRepository.findBy_id(playerId);\n player.setFirst(false);\n player.setLast(false);\n playerRepository.save(player);\n }\n\n //setez First\n String idFirst = playersList.get(0);\n Player first = playerRepository.findBy_id(idFirst);\n first.setFirst(true);\n playerRepository.save(first);\n\n //setez Last\n String idLast = playersList.get(playersList.size() - 1);\n Player last = playerRepository.findBy_id(idLast);\n last.setLast(true);\n playerRepository.save(last);\n }",
"public void setSinglePlayer(){\n isSinglePlayer = true;\n }",
"public void setControllable(Rowdy player) {\r\n\t\tthis.player = player;\r\n\t}",
"public void setPlayer(Player player) {\n\t\t\tthis.player = player;\n\t\t}",
"public void setOwner(Player player) {\n owner = player;\n }",
"@Test\n\tpublic void testSetAttribute_UpdateMode() throws NamingException {\n\t\t// Set original attribute value\n\t\tAttribute attribute = new BasicAttribute(\"cn\", \"john doe\");\n\t\ttested.setAttribute(attribute);\n\n\t\t// Set to update mode\n\t\ttested.setUpdateMode(true);\n\n\t\t// Perform test - update the attribute\n\t\tAttribute updatedAttribute = new BasicAttribute(\"cn\", \"nisse hult\");\n\t\ttested.setAttribute(updatedAttribute);\n\n\t\t// Verify result\n\t\tModificationItem[] mods = tested.getModificationItems();\n\t\tassertEquals(1, mods.length);\n\t\tassertEquals(DirContext.REPLACE_ATTRIBUTE, mods[0].getModificationOp());\n\n\t\tAttribute modificationAttribute = mods[0].getAttribute();\n\t\tassertEquals(\"cn\", modificationAttribute.getID());\n\t\tassertEquals(\"nisse hult\", modificationAttribute.get());\n\t}",
"private void setPlayer()\t{\n\t\tgrid.setGameObject(spy, Spy.INITIAL_X, Spy.INITIAL_Y);\n\t}",
"public void updatePlayer(Player player) {\n\t\t// update the flag GO TO JAIL in Player class\n\t}",
"public void setPlayer(Sprite player) {\n\t\tthis.player = player;\n\t}",
"protected abstract void assignTeam(boolean playerR, boolean playerB);",
"@Override\n public void setPlayerDoneBrainstorming(Player player, boolean value){\n DatabaseReference currentRef = database.getReference(gameCodeRef).child(\"Players\").child(player.getUsername());\n currentRef.child(\"DoneBrainstorming\").setValue(value);\n if(value){\n updateNrPlayerValues(\"PlayersDoneBrainstorming\");\n }\n }",
"public void setPlayer(Player player) {\n if(humanPlayer != null) {\n throw new IllegalArgumentException(\"The player has already been set to \"\n + humanPlayer.getName() + \" with the game piece \" + humanPlayer.getPiece());\n }\n if(player == null) {\n throw new IllegalArgumentException(\"Player cannot be null.\");\n }\n humanPlayer = player;\n }",
"public static void setPlayer(Player p) {\n\t\tUniverse.player = p;\n\t}",
"public static void overridePlayers(Player... players)\n {\n getBackgammonTournamentData().setPlayers(players);\n\n storeTournamentData();\n }",
"public void setAttribute(FactAttribute[] param) {\r\n\r\n validateAttribute(param);\r\n\r\n localAttributeTracker = true;\r\n\r\n this.localAttribute = param;\r\n }",
"public PlayerSet getPlayer(){\n return definedOn;\n }",
"public void setSecondTrustedPlayer(@Nullable AnimalTamer player);",
"public void setName(String name)\r\n\t{\r\n\t\tthis.playerName = name;\r\n\t}",
"public void setPlayer(Player player) {\n this.currentPlayer = player;\n }",
"public void setHasPlayers(boolean hasPlayers) {\n\t\tHasPlayers = hasPlayers;\n\t}",
"public Long getPlayerAttribute(P player, String attribute){\n attribute = \".\" + attribute;\n\n if(playerMap.containsKey(player) && getPlayer(player).getPlayerProfile().containsKey(attribute)){\n //PlayerAttribute is safe to send\n return playerMap.get(player).getPlayerProfile().get(attribute);\n } else {\n //Player isn't safe to send\n System.out.println(\"Tried to grab player \" + player.getName() + \"'s attribute, but it's not available\");\n return null;\n }\n }",
"public boolean isSetPlayer() {\n return this.player != null;\n }",
"@Override\n public void setPlayerDoneEliminating(Player player, boolean value) {\n DatabaseReference currentRef = database.getReference(gameCodeRef).child(\"Players\").child(player.getUsername());\n currentRef.child(\"DoneEliminating\").setValue(value);\n if(value){\n updateNrPlayerValues(\"PlayersDoneEliminating\");\n }\n\n }",
"public void setPlayPoints(int param) {\n // setting primitive attribute tracker to true\n localPlayPointsTracker = param != java.lang.Integer.MIN_VALUE;\n\n this.localPlayPoints = param;\n }",
"@Override\r\n\tpublic void setNumeroPlayer(int numeroPlayer) {\n\t\tif(!(numeroPlayer>=0 || numeroPlayer<=1))\r\n\t\t\tthrow new PreConditionError(\"Error PreCondition: numeroPlayer>=0 || numeroPlayer<=1\");\r\n\r\n\t\tcheckInvariant();\r\n\r\n\t\tsuper.setNumeroPlayer(numeroPlayer);\r\n\r\n\t\tcheckInvariant();\r\n\r\n\t\t//post: getNumeroPlayer == numeroPlayer\r\n\t\tif(!(getNumeroPlayer()==numeroPlayer))\r\n\t\t\tthrow new PostConditionError(\"Error PostCondition: getNumeroPlayer()==numeroPlayer\");\r\n\t}",
"public void setPlayerName(String newName) {\n if(newName == null) {\n return;\n }\n props.setProperty(\"name\", newName);\n saveProps();\n }",
"public void setPlayers(ArrayList<String> players) {\n this.players = new ArrayList<>();\n this.nicknames = new ArrayList<>();\n for (int i = 0; i < players.size(); i++) {\n if (!players.get(i).equals(gui.getViewController().getNickName())){\n JMenuItem newPlayerItem = new JMenuItem(players.get(i));\n newPlayerItem.addActionListener(new OpponentItemListener(gui.getViewController(),i));\n this.players.add(newPlayerItem);\n }\n this.nicknames.add(new JLabel(players.get(i)));\n this.nicknames.get(i).setHorizontalAlignment(SwingConstants.CENTER);\n this.nicknames.get(i).setVerticalAlignment(SwingConstants.CENTER);\n }\n for(int i = 0; i<this.players.size();i++){\n this.playerMenu.add(this.players.get(i));\n }\n initTurnPanel();\n }",
"public void setHasPlayer(boolean hasPlayer) {\n\t\tHasPlayer = hasPlayer;\n\t}",
"public void setAntagonistPlayer(Player antagonistPlayer) {\n this.antagonistPlayer = antagonistPlayer;\n startGame();\n }",
"public void cmdSetPlayer(User teller, Player player, String var, StringBuffer setting) throws MalformedURLException, InvalidNameException {\n String value = setting.toString();\n var = var.toLowerCase();\n if (ComparisionHelper.anyEquals(var, \"name\", \"fullname\")) {\n player.setRealName(value);\n } else if (ComparisionHelper.anyEquals(var, \"handle\", \"username\")) {\n String handle = setting.toString();\n player.setHandle(handle);\n } else if (ComparisionHelper.anyEquals(var, \"title\", \"titles\")) {\n Set<Title> titles = player.getTitles();\n titles.clear();\n String[] titleNames = CollectionHelper.split(value);\n List<Title> newTitles = titleService.lookupAll(titleNames);\n titles.addAll(newTitles);\n } else if (\"rating\".equals(var)) {\n Map<RatingCategory, Integer> ratings = player.ratings();\n if (value.isEmpty()) {\n ratings.remove(USCL_RATING);\n } else {\n int r = Integer.parseInt(value);\n ratings.put(USCL_RATING, r);\n }\n } else if (ComparisionHelper.anyEquals(var, \"web\", \"webpage\", \"website\")) {\n player.setWebsite(value);\n } else {\n command.tell(teller, \"Unknown variable: \" + var);\n return;\n }\n cmdShowPlayer(teller, player);\n cmdRefreshProfile(teller, player);\n tournamentService.updatePlayer(player);\n tournamentService.flush();\n }",
"public boolean setPlayerOwned(int row, int column) {\n return setPlayerOwned(row, column, false);\n }",
"public void setPlayer(int play)\n {\n this.player=play;\n }",
"public void checkSetPlayerTurn() // Check and if needed set the players turns so it is their turn.\n\t{\n\t\tswitch (totalPlayers) // Determine how many players there are...\n\t\t{\n\t\tcase 2: // For two players...\n\t\t\tswitch (gameState)\n\t\t\t{\n\t\t\tcase twoPlayersNowPlayerOnesTurn: // Make sure it's player one's turn.\n\t\t\t\tplayers.get(0).setIsPlayerTurn(true);\n\t\t\t\tbreak;\t\t\t\t\n\t\t\tcase twoPlayersNowPlayerTwosTurn: // Make sure it's player two's turn.\n\t\t\t\tplayers.get(1).setIsPlayerTurn(true);\n\t\t\t\tbreak;\t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t}",
"public void setPlayer(Player player) {\n\n\t\tif (this.player != null) {\n\t\t\tthrow new IllegalStateException(\"The player for this PlayerGuiDisplay has already been set\");\n\t\t}\n\n\t\tthis.player = player;\n\t}",
"public void setPlayer1Name(String name){\n player1 = name;\n }",
"@Override\n\tpublic void setData(String playerName) {\n\t\tthis.currentPlayerName = playerName;\n\t\t\n\t}",
"private void setName(String nameIn){\r\n\t\tplayerName = nameIn;\r\n\t}",
"Player() {\r\n setPlayerType(\"HUMAN\");\r\n\t}",
"AdditionalAttributes setAttribute(String name, Object value, boolean force);",
"public boolean hasSetAttribute() {\n return ((bitField0_ & 0x08000000) == 0x08000000);\n }",
"@Override\n \tpublic boolean imprisonPlayer(String playerName) {\n \t\treturn false;\n \t}",
"public boolean hasSetAttribute() {\n return ((bitField0_ & 0x08000000) == 0x08000000);\n }",
"public void setAI ( boolean ai ) {\n\t\ttry {\n\t\t\tinvoke ( \"setAI\" , new Class[] { boolean.class } , ai );\n\t\t} catch ( NoSuchMethodException e ) {\n\t\t\thandleOptional ( ).ifPresent ( handle -> EntityReflection.setAI ( handle , ai ) );\n\t\t}\n\t}",
"public void setPlayerPosition(Player player) {\n\n if (player.getPosition().equals(\"Left Wing\")) {\n\n for (int i = 0; i < 2; i++) {\n if (forwardLines[i][0] == null) {\n forwardLines[i][0] = player;\n break;\n }\n }\n }\n\n else if (player.getPosition().equals(\"Center\")) {\n for (int i = 0; i < 2; i++) {\n if (forwardLines[i][1] == null) {\n forwardLines[i][1] = player;\n break;\n }\n }\n }\n\n else if (player.getPosition().equals(\"Right Wing\")) {\n for (int i = 0; i < 2; i++) {\n if (forwardLines[i][2] == null) {\n forwardLines[i][2] = player;\n break;\n }\n }\n }\n\n else if (player.getPosition().equals(\"Left Defence\")) {\n for (int i = 0; i < 2; i++) {\n if (defenceLines[i][0] == null) {\n defenceLines[i][0] = player;\n break;\n }\n }\n }\n\n else if (player.getPosition().equals(\"Right Defence\")) {\n for (int i = 0; i < 2; i++) {\n if (defenceLines[i][1] == null) {\n defenceLines[i][1] = player;\n break;\n }\n }\n }\n }",
"public void setFirstTrustedPlayer(@Nullable AnimalTamer player);",
"boolean setPlayerOwned(int row, int column, boolean force) {\n return getCell(row, column).setPlayerOwned(force);\n }",
"public void setMinimumPlayers(int nPlayers)\r\n {\n \r\n }",
"public static void setPerson_to_play(int aPerson_to_play)\n {\n person_to_play = aPerson_to_play;\n }",
"void setInternal(ATTRIBUTES attribute, Object iValue);",
"public void setPlayerName(String name) {\n \tplayername = name;\n }",
"public void setAlive(boolean alive){\n // make sure the enemy can be alive'nt\n this.alive = alive; \n }",
"void setName(String name) {\n setStringStat(name, playerName);\n }",
"public void setNumberOfPlayers(int numberOfPlayers) {\n this.numberOfPlayers = numberOfPlayers;\n }",
"public boolean allSet(Player [] players) {\n\t\tfor (int i = 0; i < players.length; i++) {\n\t\t\tif (!players[i].allSet()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public void setPlayers(int theCompPlayer) throws Exception {\r\n\t\tswitch(theCompPlayer) {\r\n\t\t\tcase 1:\r\n\t\t\t\tcompPlayer = 1;\r\n\t\t\t\totherPlayer = 2;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tcompPlayer = 2;\r\n\t\t\t\totherPlayer = 1;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tthrow new Exception(\"That player number is invalid\");\r\n\t\t}\r\n\t}",
"protected abstract boolean isPlayerActivatable(PlayerSimple player);",
"public boolean updatePlayerItem(PlayerItem playerItem);"
]
| [
"0.69385374",
"0.6860206",
"0.68399954",
"0.65514326",
"0.65233296",
"0.62323225",
"0.61166066",
"0.6113851",
"0.604991",
"0.6046869",
"0.60205305",
"0.59964895",
"0.5957724",
"0.59571487",
"0.59472996",
"0.5923762",
"0.59076166",
"0.5885687",
"0.5877557",
"0.5871916",
"0.5871916",
"0.5845074",
"0.58287525",
"0.5821602",
"0.5814998",
"0.58113396",
"0.5803359",
"0.57691425",
"0.57653224",
"0.5761495",
"0.5757711",
"0.5745652",
"0.5739822",
"0.57287246",
"0.5709184",
"0.5708561",
"0.56795484",
"0.5665539",
"0.56437063",
"0.5626487",
"0.55936545",
"0.5588346",
"0.5587851",
"0.55792004",
"0.55706334",
"0.55624086",
"0.55611706",
"0.555842",
"0.55556333",
"0.55457604",
"0.5544353",
"0.55374646",
"0.5534321",
"0.5525798",
"0.54767245",
"0.547574",
"0.5443507",
"0.54427314",
"0.54325414",
"0.5432502",
"0.5425431",
"0.54246336",
"0.54245794",
"0.5415766",
"0.54078346",
"0.54049546",
"0.5389956",
"0.5372298",
"0.5367274",
"0.53615427",
"0.53388757",
"0.53376466",
"0.5325417",
"0.5324377",
"0.5311573",
"0.52968276",
"0.5284548",
"0.5281124",
"0.5277795",
"0.5267603",
"0.525756",
"0.52565014",
"0.5255091",
"0.5247511",
"0.52439845",
"0.5243212",
"0.5235723",
"0.5229341",
"0.52273935",
"0.5216637",
"0.5214722",
"0.5209761",
"0.52046186",
"0.5202128",
"0.5200475",
"0.5198057",
"0.51915646",
"0.518806",
"0.51855814",
"0.518005"
]
| 0.79299855 | 0 |
Adds to a players attribute, returns false if it creates a new attribute | public boolean increasePlayerAttribute(P player, String attribute, Long number){
attribute = "." + attribute;
if(playerMap.get(player).hasAttribute(attribute)){
playerMap.get(player).getPlayerProfile().put(attribute, playerMap.get(player).getPlayerAttribute(attribute) + number);
return true;
} else {
playerMap.get(player).getPlayerProfile().put(attribute, number);
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean setPlayerAttribute(P player, String attribute, Long number){\n attribute = \".\" + attribute;\n if(playerMap.containsKey(player)){\n if(playerMap.get(player).hasAttribute(attribute)){\n playerMap.get(player).getPlayerProfile().put(attribute, number);\n return true;\n } else {\n playerMap.get(player).getPlayerProfile().put(attribute, number);\n System.out.println(\"Just set an attribute that isn't loaded on the player\");\n return false;\n }\n } else {\n System.out.println(\"Failed to setPlayerAttribute as player isn't loaded\");\n return false;\n }\n }",
"public boolean savePlayer(P player){\n String uuid = player.getUniqueId().toString();\n\n if(playerMap.containsKey(player)){\n //Player is safe to save\n List<String> playerAttributes = new ArrayList<String>(getPlayer(player).getPlayerAttributes());\n\n System.out.println(player.getName() + \" has \" + playerAttributes.size() + \" attributes to save.\");\n\n for(int i = 0; playerAttributes.size() > i; i++){\n data.getConfig().set(uuid + \".\" + playerAttributes.get(i), playerMap.get(player).getPlayerAttribute(playerAttributes.get(i)));\n }\n\n data.saveData();\n\n for(int i = 0; playerAttributes.size() > i; i++){\n System.out.println(\"Saved \" + uuid + \".\" + playerAttributes.get(i) + \" as \" + playerMap.get(player).getPlayerAttribute(playerAttributes.get(i)));\n }\n\n return true;\n } else {\n //Player isn't safe to save\n System.out.println(\"Tried to save player \" + player.getName() + \"'s data, but it's not available\");\n return false;\n }\n }",
"public boolean decreasePlayerAttribute(P player, String attribute, Long number){\n attribute = \".\" + attribute;\n if(playerMap.get(player).hasAttribute(attribute)){\n playerMap.get(player).getPlayerProfile().put(attribute, playerMap.get(player).getPlayerAttribute(attribute) - number);\n return true;\n } else {\n playerMap.get(player).getPlayerProfile().put(attribute, number);\n return false;\n }\n }",
"public boolean addPlayerItem(PlayerItem playerItem);",
"public int getAttribNum(){\r\n\t\treturn playerNum;\r\n\t}",
"public int getAttribNum(){\r\n\t\treturn playerNum;\r\n\t}",
"boolean addPlayer(String player);",
"public void addWinnerAttribute(String attrName, String recordId) {\r\n attributeWinnersMap.put(attrName, recordId);\r\n }",
"public boolean addPlayer(Player p) {\n\t\tif(p != null && !squareOccuped()) {\n\t\t\tthis.player = p;\n\t\t\treturn true;\n\t\t} else return false;\n\t}",
"void addAttribute(String attrName, Attribute<?> newAttr);",
"default boolean addPlayer(Player player) {\n return addPlayer(Objects.requireNonNull(player, \"player\").getName());\n }",
"public boolean addPlayer(Player player)\n\t{\n\t\treturn playerList.add(player);\n\t}",
"public boolean setPlayer(Player aNewPlayer)\r\n {\r\n boolean wasSet = false;\r\n player = aNewPlayer;\r\n wasSet = true;\r\n return wasSet;\r\n }",
"public abstract BossBar addPlayer(UUID player);",
"public Long getPlayerAttribute(P player, String attribute){\n attribute = \".\" + attribute;\n\n if(playerMap.containsKey(player) && getPlayer(player).getPlayerProfile().containsKey(attribute)){\n //PlayerAttribute is safe to send\n return playerMap.get(player).getPlayerProfile().get(attribute);\n } else {\n //Player isn't safe to send\n System.out.println(\"Tried to grab player \" + player.getName() + \"'s attribute, but it's not available\");\n return null;\n }\n }",
"public boolean addPlayer(GamePlayer player) {\n\t\tif (players.size() >= info.getMaximumPlayers())\n\t\t\treturn false;\n\t\tplayer.setCurrentGame(this);\n\t\tplayer.setJoinLocation(player.getPlayer().get().getLocation());\n\t\tplayers.add(player);\n\t\treturn true;\n\t}",
"void addPlayer(Player newPlayer);",
"@Override\n\tpublic void attributeAdded(TGAttribute attribute, TGEntity owner) {\n gLogger.log(TGLogger.TGLevel.Debug, \"Attribute is created\");\n\t}",
"AdditionalAttributes setAttribute(String name, Object value, boolean force);",
"@Override\n public void playerAttributeChange() {\n\n Logger.info(\"HUD Presenter: playerAttributeChange\");\n view.setLives(String.valueOf(player.getLives()));\n view.setMoney(String.valueOf(player.getMoney()));\n setWaveCount();\n }",
"public boolean addPlayer(String playerName, GamePiece gamePiece, Location initialLocation)\n\t{\n\t\tif(playerPieces.containsKey(playerName) && playerPieces.containsValue(gamePiece))\n\t\t{\n\t\t\treturn false;\n\t\t} \n\t\telse if (playerPieces.containsValue(gamePiece))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tplayerLocations.put(playerName, initialLocation);\n\t\t\tplayerPieces.put(playerName, gamePiece);\n\t\t\treturn true;\n\t\t}\n\t}",
"@Override\n public void onRPClassAddAttribute(RPClass rpclass,\n String name, Definition.Type type, byte flags) {\n }",
"public boolean setAttributes(Set<String> foundAttributes);",
"boolean setPlayer(String player);",
"boolean hasSetAttribute();",
"protected abstract boolean populateAttributes();",
"@Override\r\n\t\tpublic boolean hasAttribute(String name)\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}",
"public final boolean giveIfHasnt(Player player) {\n\t\tif (this.hasTool(player))\n\t\t\treturn false;\n\n\t\tthis.give(player);\n\t\treturn true;\n\t}",
"public boolean addMember(EntityPlayer player)\n {\n //TODO trigger super profile that a new member was added\n return player != null && addMember(new AccessUser(player));\n }",
"@Override\n public void addPlayer(Player player) {\n\n if(steadyPlayers.size()>0){\n PlayersMeetNotification.firePropertyChange(new PropertyChangeEvent(this, \"More than one Player in this Panel\",steadyPlayers,player));\n }\n steadyPlayers.add(player);\n\n }",
"boolean hasAttribute(String name);",
"boolean isAttribute();",
"@Override\n public void onRPClassAddAttribute(RPClass rpclass,\n String name, Definition.Type type) {\n }",
"public boolean addPlayer(final Player player)\n {\n if (player == null || !player.isOnline()) {\n return false;\n }\n\n String playerName = player.getName().toLowerCase();\n\n if (!listeners.containsKey(playerName)) {\n listeners.put(playerName, player);\n\n player.setScoreboard(board);\n\n return true;\n }\n\n return false;\n }",
"public void addAttribute(TLAttribute attribute);",
"public void addPlayers(ArrayList<Player> players) {\r\n\t\tthis.players = players;\r\n\t}",
"private void addPlayerSheild() {\n this.playerShield += 1;\n }",
"public void addPlayer(String p) {\n this.playersNames.add(p);\n }",
"public boolean containAttribute(String name);",
"public boolean addPlayer(long idGame, Player player) {\n Game game = this.getGameById(idGame);\n\n if(game == null) {\n return false;\n }\n\n game.getPlayers().add(player);\n this.save(game);\n\n return true;\n }",
"public void addPlayer(String playerID) {\r\n\t\tplayerCount++;\r\n\t\tString name = guild.getMemberById(playerID).getEffectiveName();\r\n\t\t// Set up each player uniquely\r\n\t\tif (p2 == null) {\r\n\t\t\tp2 = new Player(1,playerID,GlobalVars.pieces.get(\"blue\"));\r\n\t\t\tp2.getPiece().setX(GlobalVars.playerCoordsPerRoom[0][0]+GlobalVars.playersOffset[1][0]);\r\n\t\t\tp2.getPiece().setY(GlobalVars.playerCoordsPerRoom[0][1]+GlobalVars.playersOffset[1][1]);\r\n\t\t\tplayers.add(p2);\r\n\t\t\tp1.setNextPlayer(p2);\r\n\t\t\tp2.setNextPlayer(p1);\r\n\t\t\tgameChannel.sendMessage(\"**\"+name+\"** has reincarnated as the BLUE adventurer\").queue();\r\n\t\t} else if (p3 == null) {\r\n\t\t\tp3 = new Player(2,playerID,GlobalVars.pieces.get(\"yellow\"));\r\n\t\t\tp3.getPiece().setX(GlobalVars.playerCoordsPerRoom[0][0]+GlobalVars.playersOffset[2][0]);\r\n\t\t\tp3.getPiece().setY(GlobalVars.playerCoordsPerRoom[0][1]+GlobalVars.playersOffset[2][1]);\r\n\t\t\tplayers.add(p3);\r\n\t\t\tp2.setNextPlayer(p3);\r\n\t\t\tp3.setNextPlayer(p1);\r\n\t\t\tgameChannel.sendMessage(\"**\"+name+\"** has reincarnated as the YELLOW adventurer\").queue();\r\n\t\t} else if (p4 == null) {\r\n\t\t\tp4 = new Player(3,playerID,GlobalVars.pieces.get(\"green\"));\r\n\t\t\tp4.getPiece().setX(GlobalVars.playerCoordsPerRoom[0][0]+GlobalVars.playersOffset[3][0]);\r\n\t\t\tp4.getPiece().setY(GlobalVars.playerCoordsPerRoom[0][1]+GlobalVars.playersOffset[3][1]);\r\n\t\t\tplayers.add(p4);\r\n\t\t\tp3.setNextPlayer(p4);\r\n\t\t\tp4.setNextPlayer(p1);\r\n\t\t\tgameChannel.sendMessage(\"**\"+name+\"** has reincarnated as the GREEN adventurer\").queue();\r\n\t\t}\r\n\t}",
"@Test\n\tpublic void addAttribute() {\n\t\tXMLTagParser.addNewElement(\"Person\");\n\n\t\tXMLTagParser.editElement(\"Person\", \"name\", \"tony\");\n\t\tassertEquals(XMLTagParser.getTagValueFromElement(\"Person\", \"name\"), \"tony\");\n\t}",
"public boolean addPlayer(Player player){\n\t\tif(this.canAdd){\n\t\t\tthis.players.add(player);\n\t\t\t\n\t\t\tif(this.players.size() == 2)\n\t\t\t\tthis.nextElem = 1;\n\t\t}\n\t\t\t\n\t\treturn this.canAdd;\n\t}",
"void addEventPlayers(Player player, boolean team);",
"public void addPlayer(Player player){\n players.add(player);\n }",
"boolean isUniqueAttribute();",
"public void addPlayer(Player player) {\n //int id = Repository.getNextUniqueID();\n this.player = player;\n }",
"public boolean hasSetAttribute() {\n return ((bitField0_ & 0x08000000) == 0x08000000);\n }",
"public boolean hasSetAttribute() {\n return ((bitField0_ & 0x08000000) == 0x08000000);\n }",
"public void addAttribute(Attribute attr) {\n attributes.add(attr);\n }",
"@Override\n\t\tpublic void addAttribute(String name, String value) {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void addAttribute(String name, String value) {\n\t\t\t\n\t\t}",
"@Override\r\n public void applyAttributes() {\r\n super.applyAttributes();\r\n getEntity().setColor(color);\r\n getEntity().setOwner(MbPets.getInstance().getServer().getPlayer(getOwner()));\r\n getEntity().setAgeLock(true);\r\n\r\n if (isBaby) {\r\n getEntity().setBaby();\r\n } else {\r\n getEntity().setAdult();\r\n }\r\n Bukkit.getMobGoals().removeGoal(getEntity(), VanillaGoal.LLAMA_ATTACK_WOLF);\r\n Bukkit.getMobGoals().removeGoal(getEntity(), VanillaGoal.LLAMA_FOLLOW_CARAVAN);\r\n Bukkit.getMobGoals().removeGoal(getEntity(), VanillaGoal.TRADER_LLAMA_DEFEND_WANDERING_TRADER);\r\n }",
"public boolean addPlayer(int pno){\n\t\t\n\t\t// Gets the coordinates of a non-wall and non-occupied space\n\t\tint[] pos = initiatePlayer(pno);\n\t\t\n\t\t// If a free space could not be found, return false and the client will be force quit\n\t\tif (pos == null){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Put the player into the HashMaps\n\t\tplayerPosition.put(pno, pos);\n\t\tcollectedGold.put(pno, 0);\n\t\t\n\t\treturn true;\n\t}",
"public boolean hasAttribute(String name)\n/* */ {\n/* 1234 */ return findAttribute(name) != null;\n/* */ }",
"protected abstract boolean isPlayerActivatable(PlayerSimple player);",
"public void addAttribute(String i) {\r\n if (attributes == null)\r\n attributes = new ArrayList<String>();\r\n attributes.add(i);\r\n }",
"public void setAsPlayer(){\n\t\tthis.isPlayer = true;\n\t}",
"public void addAI(ArrayList<Player> list,String U,String F,String G) {\r\n\t\tboolean flag = true;\r\n\t\tIterator<Player> aa = list.iterator();\r\n\t\twhile (aa.hasNext()) {\r\n\t\t\tPlayer in = aa.next();\r\n\t\t\tif(in.getUserName().equals(U)){\r\n\t\t\t\tSystem.out.println(\"The player already exists.\");\r\n\t\t\t\tflag =false;\r\n\t\t\t\treturn;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\tif(flag)\r\n\t\t\tlist.add(new NimAIPlayer(U,F,G,0,0,\"AI\"));\r\n\t\tSystem.out.println(\"\");\r\n\t}",
"public boolean addPlayer(Player player) {\n\t\tif (playerOne == null) {\n\t\t\tplayerOne = player;\n\t\t\tplayerOne.init(gameBoard);\n\t\t\tcurrentPlayer = playerOne;\n\t\t\treturn true;\n\t\t}\n\t\tif (playerOne != null) {\n\t\t\tplayerTwo = player;\n\t\t\tplayerTwo.init(gameBoard);\n\t\t\tnextPlayer = playerTwo;\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean attributeExists(String aname) {\n for (String s : attributes) {\n if (aname.equals(s))\n return true;\n }\n return false;\n }",
"protected final void addAttribute(final String name, final String value) {\n if(value == null) attributes.remove(name);\n else attributes.put(name, value);\n\t}",
"public void addPlayerShip()\n\t{\n\t\t//if a PlayerShip is already spawned, a new one will not be added\n\t\tif (gameObj[1].size() == 0)\n\t\t{\n\t\t\tgameObj[1].add(new PlayerShip());\n\t\t\tSystem.out.println(\"PlayerShip added\");\n\t\t}else{\n\t\t\tSystem.out.println(\"A player ship is already spawned\");\n\t\t}\n\t\t\n\t}",
"public boolean hasAttribute(String name) {\n // if attribute() returns a value, then this jode has that attribute\n return attribute(name, true) != null;\n }",
"private void changeCardAttributes(Player player,LeaderCard toCopy){\n\t\tfor(LeaderCard leader : player.getLeaderCards()){\n\t\t\tif((\"Lorenzo de Medici\").equalsIgnoreCase(leader.getName())){\n\t\t\t\tleader.setEffect(toCopy.getEffect());\n\t\t\t\tleader.setPermanent(toCopy.getPermanent());\n\t\t\t\tleader.setName(toCopy.getName());\n\t\t\t}\n\t\t}\n\t}",
"@Override\n \tpublic boolean imprisonPlayer(String playerName) {\n \t\treturn false;\n \t}",
"public boolean loadPlayer(P player){\n\n //Is the player already loaded?\n if(playerMap.containsKey(player)){\n System.out.println(\"Tried to load player \" + player.getName() + \"'s data, even though it's already loaded!\");\n return false;\n } else {\n\n if(data.getConfig().contains(player.getUniqueId().toString())){\n //Load player\n PlayerProfile playerProfile = new PlayerProfile(false, data, player);\n playerMap.put(player, playerProfile);\n\n return true;\n } else {\n //Create player profile\n PlayerProfile playerProfile = new PlayerProfile(true, data, player);\n playerMap.put(player, playerProfile);\n\n return true;\n }\n }\n }",
"private boolean isTagged(Player player, Player itPlayer) {\r\n double distanceBetweenPlayers = distanceBetweenLatLongPoints(itPlayer.getLastLocation().latitude,\r\n itPlayer.getLastLocation().longitude,\r\n player.getLastLocation().latitude,\r\n player.getLastLocation().longitude);\r\n\r\n Log.i(TAG, \"distance between players is \" + distanceBetweenPlayers + \" meters\");\r\n\r\n// if (distanceBetweenPlayers < tagDistance) {\r\n if (distanceBetweenPlayers < tagDistance && itPlayer != player) {\r\n Log.i(TAG, \"*************player is set to true*************\");\r\n player.setIt(true);\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }",
"boolean hasAttributes();",
"boolean hasAttributes();",
"void addPerson(Player player);",
"public SkillEntry addSkill(final SkillEntry newSkill, final boolean store) {\n if (newSkill == null) {\n return null;\n }\n\n // Add a skill to the L2Player skills and its Func objects to the calculator set of the L2Player\n final SkillEntry oldSkill = super.addSkill(newSkill);\n if (isTransformed()) {\n getTransformation().setStateUpdate(true);\n }\n if (newSkill == oldSkill) {\n return oldSkill;\n }\n\n // Add or update a L2Player skill in the character_skills table of the database\n if (store && !isPhantom()) {\n CharacterSkillDAO.getInstance().replace(this, newSkill);\n }\n\n return oldSkill;\n }",
"@Override\r\n\tpublic void addAttr(String name, String value) {\n\t}",
"@Override\n public boolean isAttribute()\n {\n return attribute;\n }",
"private void addAttribute(AttributesImpl attrs, String attrName, String attrValue,\n String type) {\n // Provide identical values for the qName & localName (although Javadocs indicate that both\n // can be omitted!)\n attrs.addAttribute(\"\", attrName, attrName, type, attrValue);\n // Saxon throws an exception if either omitted:\n // \"Saxon requires an XML parser that reports the QName of each element\"\n // \"Parser configuration problem: namespsace reporting is not enabled\"\n // The IBM JRE implementation produces bad xml if the qName is omitted,\n // but handles a missing localName correctly\n }",
"@Test\n\tpublic void addAttributeMultiple() {\n\t\tXMLTagParser.addNewElement(\"Person\");\n\n\t\tXMLTagParser.editElement(\"Person\", \"name\", \"tony\");\n\t\tassertEquals(XMLTagParser.getTagValueFromElement(\"Person\", \"name\"), \"tony\");\n\t\t\n\t\tXMLTagParser.editElement(\"Person\", \"surname\", \"blaire\");\n\t\tassertEquals(XMLTagParser.getTagValueFromElement(\"Person\", \"surname\"), \"blaire\");\n\t}",
"@java.lang.Override\n public boolean hasPlayer() {\n return player_ != null;\n }",
"private void addPlayers(@NotNull MapHandler map, @NotNull NewGameDto newGameDto) {\n ComparableTuple<Integer, Stack<SpawnTile>> result = analyseMap(map);\n flagCount = result.key;\n Stack<SpawnTile> spawnTiles = result.value;\n if (!spawnTiles.isEmpty()) {\n for (PlayerDto player : newGameDto.players) {\n SpawnTile spawnTile = spawnTiles.pop();\n if (player.id == newGameDto.userId) {\n user = new Player(spawnTile.getX(), spawnTile.getY(), Direction.NORTH, map, new ComparableTuple<>(GameGraphics.mainPlayerName + \" (you)\", player.color), player.id);\n user.setDock(spawnTile.getSpawnNumber());\n players.add(user);\n } else {\n IPlayer onlinePlayer = new OnlinePlayer(spawnTile.getX(), spawnTile.getY(), Direction.NORTH, map, new ComparableTuple<>(player.name, player.color), player.id);\n onlinePlayer.setDock(spawnTile.getSpawnNumber());\n players.add(onlinePlayer);\n }\n }\n } else {\n for (int i = 0; i < playerCount; i++) {\n NonPlayer nonPlayer = new NonPlayer(i, 0, Direction.NORTH, map, new ComparableTuple<>(\"blue\", Color.BLUE));\n nonPlayer.setDock(i);\n players.add(nonPlayer);\n }\n }\n }",
"public void addPlayerShip()\n\t{\n\t\t//if a PlayerShip is already spawned, a new one will not be added\n\t\tif(shipSpawned)\n\t\t{\n\t\t\t\tSystem.out.println(\"A player ship is already spawned\");\n\t\t\t\treturn;\n\t\t}\n\t\tgameObj.add(new PlayerShip(getHeight(), getWidth()));\n\t\tSystem.out.println(\"Player ship added\");\n\t\tshipSpawned = true;\n\t\tnotifyObservers();\n\t}",
"@Override\n protected void onNonKeyAttribute(String attributeName,\n AttributeValue currentValue) {\n if (getLocalSaveBehavior() == DynamoDBMapperConfig.SaveBehavior.APPEND_SET) {\n if (currentValue.getBS() != null\n || currentValue.getNS() != null\n || currentValue.getSS() != null) {\n getAttributeValueUpdates().put(\n attributeName,\n new AttributeValueUpdate().withValue(\n currentValue).withAction(\"ADD\"));\n return;\n }\n }\n /* Otherwise, we do the default \"PUT\" update. */\n super.onNonKeyAttribute(attributeName, currentValue);\n }",
"protected boolean hasAttribute(String name) {\n\tfor (int i = 0; i < this.attributeFields.size(); i++) {\n\t AttributeField af = \n\t\t(AttributeField) this.attributeFields.elementAt(i);\n\t if (af.getAttribute().getName().equals(name))\n\t\treturn true;\n\t}\n\treturn false;\n }",
"public final boolean hasAttribute ()\r\n {\r\n return _value.hasAttribute();\r\n }",
"@Override\n\tpublic <E> void add(Attr<E> newAttr) {\n\t\t\n\t}",
"boolean hasPlayerId();",
"public abstract void isUsedBy(Player player);",
"public void addPlayer(Player player) {\n playerList.add(player);\n }",
"@Override\n \tpublic void createAndAddNewPlayer( int playerID )\n \t{\n \t\t//add player with default name\n \t\tPlayer newPlayer = new Player( playerID, \"Player_\"+playerID );\n \t\tgetPlayerMap().put( playerID, newPlayer );\n \t}",
"@Test\n public void testGetMarkForPlayerNonExisting() {\n Player player = Player.builder().build();\n Map<Player, Character> players = new HashMap<>();\n players.put(player, 'O');\n Assertions.assertNull(GameUtil.getMarkForPlayerId(Game.builder().players(players).build(), \"X\"),\n \"Test non existing player in list.\");\n }",
"private void addAttribute(XmlAttribute xa, Method method, Object[] args) {\n/* 147 */ assert xa != null;\n/* */ \n/* 149 */ checkStartTag();\n/* */ \n/* 151 */ String localName = xa.value();\n/* 152 */ if (xa.value().length() == 0) {\n/* 153 */ localName = method.getName();\n/* */ }\n/* 155 */ _attribute(xa.ns(), localName, args);\n/* */ }",
"@Override\r\n\t\tpublic boolean hasAttributes()\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}",
"public boolean writeAttributeFile();",
"@Test\n\tpublic void testSetAttribute_UpdateMode() throws NamingException {\n\t\t// Set original attribute value\n\t\tAttribute attribute = new BasicAttribute(\"cn\", \"john doe\");\n\t\ttested.setAttribute(attribute);\n\n\t\t// Set to update mode\n\t\ttested.setUpdateMode(true);\n\n\t\t// Perform test - update the attribute\n\t\tAttribute updatedAttribute = new BasicAttribute(\"cn\", \"nisse hult\");\n\t\ttested.setAttribute(updatedAttribute);\n\n\t\t// Verify result\n\t\tModificationItem[] mods = tested.getModificationItems();\n\t\tassertEquals(1, mods.length);\n\t\tassertEquals(DirContext.REPLACE_ATTRIBUTE, mods[0].getModificationOp());\n\n\t\tAttribute modificationAttribute = mods[0].getAttribute();\n\t\tassertEquals(\"cn\", modificationAttribute.getID());\n\t\tassertEquals(\"nisse hult\", modificationAttribute.get());\n\t}",
"public boolean updatePlayerInfo() throws IOException {\n\n com.google.api.services.games.model.Player gpgPlayer =\n gamesAPI.players().get(player.getPlayerId()).execute();\n\n player.setDisplayName(gpgPlayer.getDisplayName());\n player.setVisibleProfile(gpgPlayer.getProfileSettings()\n .getProfileVisible());\n player.setTitle(gpgPlayer.getTitle());\n\n // Handle 'games-lite' player id migration.\n if (!player.getPlayerId().equals(gpgPlayer.getPlayerId())) {\n // Check the original player id and set the alternate id to it.\n if (player.getPlayerId().equals(gpgPlayer.getOriginalPlayerId())) {\n player.setAltPlayerId(gpgPlayer.getPlayerId());\n } else {\n return false;\n }\n } else if (gpgPlayer.getOriginalPlayerId() != null &&\n !gpgPlayer.getOriginalPlayerId().equals(player.getAltPlayerId())) {\n player.setAltPlayerId(gpgPlayer.getOriginalPlayerId());\n }\n\n return true;\n }",
"public void setAttrib(String name, String value);",
"public void attributeAdded(Component component, String attr, String newValue);",
"public void addPlayer(String name, double attackStat, double blockStat){\n players.add(new Player(name, attackStat, blockStat));\n }",
"boolean hasTargetPlayerId();",
"public boolean add(Object node,ConcurrentHashMap attributes) {\n attributeLis.add(attribute);\n \n return super.add(node);\n \n \n }",
"public void addAttribute( final ExtraAttribute attribute )\n {\n m_extraAttributes.add( attribute );\n }",
"@Test\n public void requireKeysForAttributes() {\n Set<Attribute> attributes = EnumSet.copyOf(Arrays.asList(Attribute.values()));\n Set<Attribute> implementedAttributes = Arrays.stream(AttributeManager.Key.values())\n .map(AttributeManager.Key::getAttribute)\n .collect(() -> EnumSet.noneOf(Attribute.class), AbstractCollection::add, AbstractCollection::addAll);\n\n attributes.removeAll(implementedAttributes);\n\n if (!attributes.isEmpty()) {\n throw new RuntimeException(\"Some Attributes are not supported by glowstone: \" + attributes);\n }\n }"
]
| [
"0.7126181",
"0.618613",
"0.5946676",
"0.5882908",
"0.5862277",
"0.5862277",
"0.58205354",
"0.578886",
"0.5716386",
"0.56396645",
"0.561927",
"0.55784225",
"0.5575982",
"0.55667996",
"0.5524235",
"0.55154645",
"0.5469824",
"0.54609436",
"0.5407541",
"0.5399785",
"0.53991055",
"0.53846693",
"0.5368752",
"0.5351019",
"0.5331714",
"0.5327918",
"0.5305074",
"0.52865493",
"0.5284507",
"0.5280405",
"0.52786356",
"0.5271479",
"0.52554303",
"0.5255099",
"0.52421546",
"0.52248734",
"0.5222751",
"0.5217851",
"0.5206092",
"0.52036303",
"0.5195287",
"0.5191391",
"0.5190615",
"0.5163307",
"0.51590616",
"0.51418847",
"0.5141681",
"0.5130886",
"0.5129951",
"0.5125581",
"0.51008636",
"0.51008636",
"0.5090589",
"0.5088139",
"0.50791883",
"0.5076138",
"0.5068369",
"0.5062324",
"0.5057273",
"0.5056714",
"0.50525224",
"0.50471264",
"0.5045439",
"0.50287104",
"0.50237787",
"0.502198",
"0.50159806",
"0.5011958",
"0.5003558",
"0.5003558",
"0.49983838",
"0.498814",
"0.49865934",
"0.49829453",
"0.4982277",
"0.49769464",
"0.49754405",
"0.4966113",
"0.49655303",
"0.49654746",
"0.49526536",
"0.4942855",
"0.49347702",
"0.4927608",
"0.49231848",
"0.491444",
"0.4907168",
"0.49068895",
"0.49045587",
"0.49017555",
"0.49010104",
"0.48962274",
"0.4895362",
"0.48932508",
"0.48854116",
"0.48819056",
"0.48793525",
"0.4877435",
"0.4875259",
"0.48708472"
]
| 0.71195924 | 1 |
Decreases a players attribute, returns false if it creates a new attribute | public boolean decreasePlayerAttribute(P player, String attribute, Long number){
attribute = "." + attribute;
if(playerMap.get(player).hasAttribute(attribute)){
playerMap.get(player).getPlayerProfile().put(attribute, playerMap.get(player).getPlayerAttribute(attribute) - number);
return true;
} else {
playerMap.get(player).getPlayerProfile().put(attribute, number);
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean increasePlayerAttribute(P player, String attribute, Long number){\n attribute = \".\" + attribute;\n if(playerMap.get(player).hasAttribute(attribute)){\n playerMap.get(player).getPlayerProfile().put(attribute, playerMap.get(player).getPlayerAttribute(attribute) + number);\n return true;\n } else {\n playerMap.get(player).getPlayerProfile().put(attribute, number);\n return false;\n }\n }",
"private void subtractPlayerMissile() {\n this.playerMissile -= 1;\n }",
"@Override\n\tpublic void removeAttribute(String name) {\n\t\t\n\t}",
"public boolean setPlayerAttribute(P player, String attribute, Long number){\n attribute = \".\" + attribute;\n if(playerMap.containsKey(player)){\n if(playerMap.get(player).hasAttribute(attribute)){\n playerMap.get(player).getPlayerProfile().put(attribute, number);\n return true;\n } else {\n playerMap.get(player).getPlayerProfile().put(attribute, number);\n System.out.println(\"Just set an attribute that isn't loaded on the player\");\n return false;\n }\n } else {\n System.out.println(\"Failed to setPlayerAttribute as player isn't loaded\");\n return false;\n }\n }",
"@Override\n\t\tpublic void removeAttribute(String name) {\n\t\t\t\n\t\t}",
"@Override\n\tpublic void removeAttribute(String arg0, int arg1) {\n\n\t}",
"@Override\n\tpublic void attributeRemoved(TGAttribute attribute, TGEntity owner) {\n gLogger.log(TGLogger.TGLevel.Debug, \"Attribute is removed\");\n\t}",
"public void decSpeed()\n\t{\n\t\t//only decrease if a PlayerShip is currently spawned\n\t\tIIterator iter = gameObj.getIterator();\n\t\twhile(iter.hasNext())\n\t\t{\n\t\t\tGameObject current = (GameObject)iter.getNext();\n\t\t\tif(current instanceof PlayerShip)\n\t\t\t{\n\t\t\t\t((PlayerShip)current).decSpeed();\n\t\t\t\tSystem.out.println(\"Speed decreased by 1\");\n\t\t\t\tnotifyObservers();\n\t\t\t\treturn;\n\t\t\t}\t\n\t\t}\n\t\tSystem.out.println(\"There is no playerShip spawned\");\n\t}",
"private void calculeStatRemove() {\n resourceA = this.getContext().getGame().getPlayer(idPlayer).getInventory().getValueRessource(type);\n int loose = resourceB - resourceA;\n int diff = (resourceA - resourceB) + value;\n this.getContext().getStats().incNbRessourceLoosePlayers(idPlayer,type,loose);\n this.getContext().getStats().incNbRessourceNotLoosePlayers(idPlayer,type,diff);\n }",
"private void subtractEnemyMissile() {\n this.enemyMissile -= 1;\n }",
"public int getAttribNum(){\r\n\t\treturn playerNum;\r\n\t}",
"public int getAttribNum(){\r\n\t\treturn playerNum;\r\n\t}",
"@Override\n public boolean removeAttribute(String name)\n {\n return attributes.removeNodes(name);\n }",
"@Override\n\tpublic void removeAttribute(String arg0) {\n\t\t\n\t}",
"public void buyDecreaseDamage() {\n this.decreaseDamage++;\n }",
"public void decrementLifePoints(double amount) {\r\n lifepoints -= amount;\r\n if (lifepoints < 0) {\r\n lifepoints = 0;\r\n }\r\n if (entity instanceof Player) {\r\n PacketRepository.send(SkillLevel.class, new SkillContext((Player) entity, HITPOINTS));\r\n }\r\n }",
"public void decrease() {\r\n --lives;\r\n }",
"@Override\n\tpublic void removeAttribute(String arg0) {\n\t}",
"@Override\n\tpublic void removeAttribute(String arg0) {\n\n\t}",
"@Override\n public void playerAttributeChange() {\n\n Logger.info(\"HUD Presenter: playerAttributeChange\");\n view.setLives(String.valueOf(player.getLives()));\n view.setMoney(String.valueOf(player.getMoney()));\n setWaveCount();\n }",
"void decrease();",
"void decrease();",
"public boolean unpoison() {\r\n\t\tstrength = STRENGTH;\r\n\t\treturn true;\r\n\t}",
"AdditionalAttributes removeAttribute(String name);",
"public void decSpeed()\n\t{\n\t\t//only decrease if a PlayerShip is currently spawned\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\t((PlayerShip)gameObj[1].get(0)).decSpeed();\n\t\t\tSystem.out.println(\"Speed -10\");\n\t\t}else\n\t\t\tSystem.out.println(\"A player ship is not currently spawned\");\n\t}",
"private void decrementOpponentRechargeTimes()\n\t{\n\t\tfor (Map.Entry<Skills, Integer> pair : rechargingOpponentSkills.entrySet())\n\t\t{\n\t\t\tint val = pair.getValue();\n\t\t\tSkills s = pair.getKey();\n\t\t\t\n\t\t\tif (val > 0)\n\t\t\t{\n\t\t\t\trechargingOpponentSkills.put(s, --val);\n\t\t\t}\n\t\t}\n\t}",
"public void decrease() {\r\n\r\n\t\tdecrease(1);\r\n\r\n\t}",
"public void removeAttribute(Execution exec, String name);",
"private void subtractPlayerSheild(int damage) {\n this.playerShield -= damage;\n }",
"public static void removeLife(Player p){\n FileConfiguration config = DatabaseManager.getPlayerFileConfiguration(p);\n config.set(\"Lives\", config.getInt(\"Lives\") - 1);\n try {\n config.save(DatabaseManager.getPlayerFile(p));\n } catch (IOException e) {\n e.printStackTrace();\n Logger.logError(e.getMessage());\n Logger.logError(\"Issue setting player life.\");\n } \n }",
"boolean removePlayer(String player);",
"@Test\n public void decreaseWithDiscardLessThan4() {\n gm.setPlayerInfo(clientPlayer4);\n gm.setThisPlayerIndex(clientPlayer4.getPlayerIndex());\n for (ResourceType type : ResourceType.values()) {\n assertEquals(0, getAmounts().getOfType(type));\n }\n assertFalse(dc.getMaxDiscard() >= 4);\n dc.increaseAmount(ResourceType.ORE);\n assertEquals(0, getAmounts().getOfType(ResourceType.ORE));\n dc.decreaseAmount(ResourceType.ORE);\n assertEquals(0, getAmounts().getOfType(ResourceType.ORE));\n }",
"private void subtractPlayerHealth(int damage) {\n this.playerShipHealth -= damage;\n }",
"public void deactivateAbility(LevelManager lm){\n\n int prevDamage = lm.player.getDamage();\n int newDamage = prevDamage-12;\n lm.player.setDamage(newDamage);\n }",
"public boolean poison() {\r\n\t\tstrength = 0;\r\n\t\treturn true;\r\n\t}",
"public void vanish(Player p){\n if(boostType.equals(\"force\")){\n p.setStrength(p.getStrength() - 1);\n }else if(boostType.equals(\"life\")){\n p.modifyLife(-1);\n }else if(boostType.equals(\"force+\")){\n p.setStrength(p.getStrength() - 2);\n }else if(boostType.equals(\"life+\")) {\n p.modifyLife(-2);\n }else if(boostType.equals(\"force++\")){\n p.setStrength(p.getStrength() - 3);\n }else if(boostType.equals(\"life++\")) {\n p.modifyLife(-3);\n }\n }",
"public void removeSkills()\r\n\t{\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5491, 1), false);\r\n\t\t// Cancel Gatekeeper Transformation\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(8248, 1), false);\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5656, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5657, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5658, 1), false);//Update by rocknow\r\n\t\tgetPlayer().removeSkill(SkillTable.getInstance().getInfo(5659, 1), false, false);//Update by rocknow\r\n\r\n\t\tgetPlayer().setTransformAllowedSkills(EMPTY_ARRAY);\r\n\t}",
"public void decrement() {\r\n\t\tcurrentSheeps--;\r\n\t}",
"public void killPlayer(){\n setInPlay(false);\n setDx(0.0f);\n setDy(0.04f);\n }",
"public void attributeRemoved(Component component, String attr, String oldValue);",
"@Override\n\t\tpublic Object removeAttribute(String name) {\n\t\t\treturn null;\n\t\t}",
"public void removeAttribute(TLAttribute attribute);",
"public static void decreaseDifficaulty() {\r\n\t\tif (Enemy._timerTicker < 70)\r\n\t\t\tEnemy._timerTicker += 3;\r\n\t\tif (Player._timerTicker > 4)\r\n\t\t\tPlayer._timerTicker -= 2;\r\n\t}",
"@Override\n public boolean removeAttribute(ConfigurationNode node)\n {\n return attributes.removeNode(node);\n }",
"public void resetPlayerPassed() {\n d_PlayerPassed = false;\n }",
"public void decreaseHealth() {\n setHealth(getHealth()-1);\n }",
"public Value removeAttributes() {\n checkNotUnknown();\n Value r = new Value(this);\n r.flags &= ~ATTR;\n r.flags |= ATTR_NOTDONTDELETE | ATTR_NOTDONTENUM | ATTR_NOTREADONLY;\n return canonicalize(r);\n }",
"public void desactivatePlayer() {\n\t\tthis.setEnabled(false);\n\t}",
"public void moveDown(TLAttribute attribute);",
"public void removeAttribute() {\n attributesToRemove = \"\";\r\n for (AttributeRow attribute : listAttributes) {\r\n if (attribute.isSelected()) {\r\n attributesToRemove = attributesToRemove + (attribute.getIdAttribute() + 1) + \",\";\r\n }\r\n }\r\n if (attributesToRemove.length() != 0) {\r\n attributesToRemove = attributesToRemove.substring(0, attributesToRemove.length() - 1);\r\n RequestContext.getCurrentInstance().execute(\"PF('wvDlgConfirmRemoveAttribute').show()\");\r\n } else {\r\n printMessage(\"Error\", \"You must select the attributes to be removed\", FacesMessage.SEVERITY_ERROR);\r\n }\r\n }",
"protected abstract boolean keepEntities(boolean attribute);",
"void takeDamage(int points) {\n this.health -= points;\n }",
"public void decreaseLife() {\n\t\tif(life<=0) {\n\t\t\tlife = 0;\n\t\t\tisAlive = false;\n\t\t}else if(life==1) {\t\t\t\t// If only one life left, then player will die\n\t\t\tlife--;\n\t\t\tisAlive = false;\n\t\t}else {\n\t\t\tlife--;\n\t\t}\n\t}",
"public void deductLife() {\n\t\t\n\t\t// If player01 is currently active.. \n\t\tif(player01.getIsCurrentlyPlaying()) {\n\t\t\t\n\t\t\t// Deduct a life.\n\t\t\tplayer01.deductlife();\n\t\t\t\n\t\t\t// Display message.\n\t\t\tSystem.out.println(\"Player 01 has lost a life!\");\n\t\t\tSystem.out.println(\"Player 01 Lives Left: \" + player01.getPlayerLives());\n\t\t\t\n\t\t\t// If all player 01's lives are lost..\n\t\t\tif(player01.getPlayerLives() == 0){\n\t\t\t\t\n\t\t\t\t// Invoke\n\t\t\t\tallPlayerLivesAreGone();\n\t\t\t}\n\t\t\t\n\t\t\t// If player02 is currently active.. \n\t\t} else {\n\t\t\t\n\t\t\tplayer02.deductlife();\n\t\t\tSystem.out.println(\"Player 02 has lost a life!\");\n\t\t\tSystem.out.println(\"Player 02 Lives Left: \" + player02.getPlayerLives());\n\t\t\t\n\t\t\tif(player02.getPlayerLives() == 0){\n\t\t\t\tallPlayerLivesAreGone();\n\t\t\t}\n\t\t}\n\t}",
"void decreaseStrength() {\n if (this.strokeStrength - 0.25 >= 1) {\n this.strokeStrength -= 0.25;\n }\n this.updateAcc();\n this.updateStick();\n }",
"public void removeAttribute(int r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: org.xml.sax.ext.Attributes2Impl.removeAttribute(int):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.xml.sax.ext.Attributes2Impl.removeAttribute(int):void\");\n }",
"public void removeAttribute(Session session, String name);",
"public boolean use(int value){durability -= value; if(durability == 0) return true; return false;}",
"public void removeAttribute(String name) {\n\tif (name == null)\n\t throw new NullPointerException(\"null arg!\");\n\tif (name != null) {\n\t int i = 0;\n\t for (i = 0; i < this.attributeFields.size(); i++) {\n\t\tAttributeField af = (AttributeField) \n\t\t this.attributeFields.elementAt(i);\n\t\tif (af.getAttribute().getName().equals(name)) break;\n\t }\n\t if (i < attributeFields.size())\n\t\tattributeFields.removeElementAt(i);\n\t}\n }",
"public void decLives()\n\t{\n\t\tlives--;\n\t\tshipSpawned = false;\t\n\t\tif(lives <= 0)\n\t\t{\n\t\t\tSystem.out.println(\"Game over\");\n\t\t\tif(isSound() && !isPaused())\n\t\t\t\tdeath.play();\n\t\t\tsetGameOver(true);\n\t\t\tnotifyObservers();\n\t\t\treturn;\n\t\t}\n\t\tthis.addPlayerShip();\n\t}",
"public int removeByAttribute(String name, Object value) {\n int result = 0;\n for( Iterator it = this.rcIterator(); it.hasNext() ; ){\n ReplicaCatalog catalog = (ReplicaCatalog) it.next();\n result += catalog.removeByAttribute( name, value ) ;\n }\n return result;\n\n }",
"private static int removeStatPoints(int statPoints){\r\n statPoints--;\r\n return statPoints;\r\n }",
"public void deadPlayer() {\r\n\t\tthis.nbPlayer --;\r\n\t}",
"private Boolean infect( Player player ){\n try {\n player.setHealth( false );\n return true;\n } catch (Exception e) {\n System.out.println(\"Something went wrong.\");\n return false;\n }\n }",
"public void disperseRewards(Player player, boolean success){\n if(success){\n //if player is in a role on a scene card\n if(player.getCurrentRole().isOnCard()){\n player.addCredits(2);\n }\n else{\n player.addCredits(1);\n player.addMoney(1);\n }\n }\n else{\n //disperse loss rewards\n //if player is not on a scene card role\n if(!(player.getCurrentRole().isOnCard())){\n player.addMoney(1);\n }\n }\n }",
"void removeUses(Equipment oldUses);",
"@Override\n public final void disqualify(final int playerId) {\n this.setPointsByPlayerId(playerId, 0);\n }",
"@Override\n\tpublic void attrRemoved(Attr node, String oldv) {\n\t\tif (!changing && baseVal != null) {\n\t\t\tbaseVal.invalidate();\n\t\t}\n\t\tfireBaseAttributeListeners();\n\t\tif (!hasAnimVal) {\n\t\t\tfireAnimatedAttributeListeners();\n\t\t}\n\t}",
"public void moveUp(TLAttribute attribute);",
"public void decreaseKarma(final int i) {\n final boolean flagChanged = karma > 0;\n karma -= i;\n if (karma <= 0) {\n karma = 0;\n updateKarma(flagChanged);\n } else {\n updateKarma(false);\n }\n }",
"public void RemoveAttributeByIndex(int i){\r\n\t\tthis.attributes.remove(i);\t\r\n\t}",
"public final void decreaseLives() {\n\t\tlives--;\n\t}",
"public boolean decreaseMinions() {\r\n\t\tif ((this.minions - 1) >= 0) {\r\n\t\t\tthis.minions = this.minions - 1;\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"void unsetSingleBetMinimum();",
"public void removeFromGame(){\n this.isInGame = false;\n }",
"public boolean removePawnLife() {\n return pawn.removeLife();\n }",
"public void shotShip() {\r\n score -= 20;\r\n System.out.println(\"Current Score = \"+score);\r\n }",
"public void updatePatience(){\n Patience = Patience - 1;\n }",
"protected void attributeRemoved(MutationEvent evt) throws MelodyException {\r\n\t\tsuper.attributeRemoved(evt);\r\n\t\t// the target element\r\n\t\tElement t = (Element) evt.getTarget();\r\n\t\tDUNID tdunid = DUNIDDocHelper.getDUNID(t);\r\n\t\t// Modify the DUNIDDoc\r\n\t\tElement tori = getOwnerDUNIDDoc(t).getElement(tdunid);\r\n\t\ttori.removeAttribute(evt.getAttrName());\r\n\t\t// Modify the targets descriptor\r\n\t\tif (!areTargetsFiltersDefined()) {\r\n\t\t\t/*\r\n\t\t\t * If there is no targets filters defined, there's no need to modify\r\n\t\t\t * the targets descriptor.\r\n\t\t\t */\r\n\t\t\treturn;\r\n\t\t}\r\n\t\ttori = getTargetsDescriptor().getElement(tdunid);\r\n\t\tif (tori != null) { // target node is in the targets descriptor\r\n\t\t\ttori.removeAttribute(evt.getAttrName());\r\n\t\t}\r\n\t}",
"@Override\r\n public void applyAttributes() {\r\n super.applyAttributes();\r\n getEntity().setColor(color);\r\n getEntity().setOwner(MbPets.getInstance().getServer().getPlayer(getOwner()));\r\n getEntity().setAgeLock(true);\r\n\r\n if (isBaby) {\r\n getEntity().setBaby();\r\n } else {\r\n getEntity().setAdult();\r\n }\r\n Bukkit.getMobGoals().removeGoal(getEntity(), VanillaGoal.LLAMA_ATTACK_WOLF);\r\n Bukkit.getMobGoals().removeGoal(getEntity(), VanillaGoal.LLAMA_FOLLOW_CARAVAN);\r\n Bukkit.getMobGoals().removeGoal(getEntity(), VanillaGoal.TRADER_LLAMA_DEFEND_WANDERING_TRADER);\r\n }",
"void decreaseHealth(Float damage);",
"public void decreaseScore(int p_96646_1_) {\n/* 51 */ if (this.theScoreObjective.getCriteria().isReadOnly())\n/* */ {\n/* 53 */ throw new IllegalStateException(\"Cannot modify read-only score\");\n/* */ }\n/* */ \n/* */ \n/* 57 */ setScorePoints(getScorePoints() - p_96646_1_);\n/* */ }",
"public void minusShield(int down) {\n\t\tshieldLevel -= down;\n\t}",
"void removeAttribute(Attribute attToDel, boolean inputAtt, int whichAtt){\r\n\t\tint newSize;\r\n\r\n\t\t//Getting the vector\r\n\t\tint index = 0;\r\n\t\tif (!inputAtt){ \r\n\t\t\tnewSize = --numOutputAttributes;\r\n\t\t\tindex = 1;\r\n\t\t}else newSize = --numInputAttributes;\r\n\r\n\t\t//The number of undefined attributes is increased. \r\n\t\t++numUndefinedAttributes;\r\n\r\n\t\t//It search the absolute position of the attribute to be\r\n\t\t//removed in the list of undefined attributes\r\n\t\tint undefPosition = Attributes.searchUndefPosition(attToDel);\r\n\r\n\t\t//Reserving auxiliar memory to reconstruct the input or output\r\n\t\tString [] nominalValuesAux = new String[newSize];\r\n\t\tint [] intNominalValuesAux = new int[newSize];\r\n\t\tdouble [] realValuesAux = new double[newSize];\r\n\t\tboolean [] missingValuesAux = new boolean[newSize];\r\n\r\n\t\t//Reserving auxiliar memory to reconstruct the undefined att's\r\n\t\tString [] nominalValuesUndef = new String[numUndefinedAttributes];\r\n\t\tint [] intNominalValuesUndef = new int[numUndefinedAttributes];\r\n\t\tdouble[] realValuesUndef = new double[numUndefinedAttributes];\r\n\t\tboolean []missingValuesUndef = new boolean[numUndefinedAttributes];\r\n\r\n\t\t//Copying the values without the removed attribute\r\n\t\tint k=0;\r\n\t\tanyMissingValue[index] = false;\r\n\t\tfor (int i=0; i<newSize+1; i++){\r\n\t\t\tif (i != whichAtt){\r\n\t\t\t\tnominalValuesAux[k] = nominalValues[index][i];\r\n\t\t\t\tintNominalValuesAux[k] = intNominalValues[index][i];\r\n\t\t\t\trealValuesAux[k] = realValues[index][i];\r\n\t\t\t\tmissingValuesAux[k] = missingValues[index][i];\r\n\t\t\t\tif (missingValuesAux[k]) anyMissingValue[index] = true;\r\n\t\t\t\tk++;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tnominalValuesUndef[undefPosition] = nominalValues[index][i];\r\n\t\t\t\tintNominalValuesUndef[undefPosition] = intNominalValues[index][i];\r\n\t\t\t\trealValuesUndef[undefPosition] = realValues[index][i];\r\n\t\t\t\tmissingValuesUndef[undefPosition] = missingValues[index][i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Copying the rest of the undefined values\r\n\t\tk=0;\r\n\t\tfor (int i=0; i<numUndefinedAttributes; i++){\r\n\t\t\tif (i==undefPosition) continue;\r\n\t\t\tnominalValuesUndef[i] = nominalValues[Instance.ATT_NONDEF][k];\r\n\t\t\tintNominalValuesUndef[i] = intNominalValues[Instance.ATT_NONDEF][k];\r\n\t\t\trealValuesUndef[i] = realValues[Instance.ATT_NONDEF][k];\r\n\t\t\tmissingValuesUndef[i] = missingValues[Instance.ATT_NONDEF][k];\r\n\t\t\tk++;\r\n\t\t}\r\n\r\n\t\t//Copying the new vectors without the information of the removed attribute.\r\n\t\tnominalValues[index] = nominalValuesAux;\r\n\t\tintNominalValues[index] = intNominalValuesAux;\r\n\t\trealValues[index] = realValuesAux;\r\n\t\tmissingValues[index] = missingValuesAux; \r\n\t\t//The undefined attributes\r\n\t\tnominalValues[Instance.ATT_NONDEF] = nominalValuesUndef;\r\n\t\tintNominalValues[Instance.ATT_NONDEF] = intNominalValuesUndef;\r\n\t\trealValues[Instance.ATT_NONDEF] = realValuesUndef;\r\n\t\tmissingValues[Instance.ATT_NONDEF] = missingValuesUndef;\r\n\t}",
"public void remove(String name)\n/* */ {\n/* 1177 */ for (int i = 0; i < this.attributes.size(); i++) {\n/* 1178 */ XMLAttribute attr = (XMLAttribute)this.attributes.elementAt(i);\n/* 1179 */ if (attr.getName().equals(name)) {\n/* 1180 */ this.attributes.removeElementAt(i);\n/* 1181 */ return;\n/* */ }\n/* */ }\n/* */ }",
"int mulliganDownTo(UUID playerId);",
"boolean checkLoss(@NotNull GameVariables variables) {\n if (this.y() > variables.getHeight()) {\n this.markForRemoval();\n\n return true;\n }\n\n return false;\n }",
"@Override\r\n\tpublic void onRemove(IGameObject target) {\n\t\ttarget.speed -= flatBonus;\r\n\t\ttarget.speed /= multiplier;\r\n\t\t\r\n\t}",
"void unmute() {\n execute(\"player.muted = false\");\n }",
"public void removePlayer(String name) {\n\t\tUser user = users.get(userTurn);\n\t\tFootballPlayer player = market.findPlayer(name);\n\t\tdouble marketValue = player.getMarketValue();\n\t\t\n\t\tif (tmpTeam.size() > 0) {\n\t\t\tuser.updateBudget(marketValue, \"+\");\n\t\t\ttmpTeam.removePlayer(name);\n\t\t}\n\t\tSystem.out.println(\"budget after sell\" + user.getBudget());\n\t}",
"public void setKills(Player player, int newCount) {\n\t\tsetStatsProperty(StatsProperty.KILLS, player, newCount);\n\t}",
"public int decrease()\n {\n return this.decrease(1);\n }",
"boolean deposite(double amount);",
"public void setActivePlayer()\n {\n activePlayer = !activePlayer;\n }",
"@Override\n public boolean use(Player p) {\n // Increase energy cap.\n p.setEnergyCap(p.getEnergyCap() + ENERGY_CAP_INCREASE);\n \n if (p.getEnergyCap() > ENERGY_RESTORE + p.getEnergy()) {\n // Replenish energy.\n p.setEnergy(ENERGY_RESTORE + p.getEnergy());\n\n // Otherwise set energy to max of capacity.\n } else {\n p.setEnergy(p.getEnergyCap());\n }\n return true;\n }",
"public void removeKing(){\n this.king = false;\n }",
"public abstract BossBar removePlayer(UUID uuid);",
"@Test(description = \"negative test if an local attribute is removed\")\n public void t21_negativeTestLocalAttributesRemoved()\n throws Exception\n {\n final RelationshipData relationDef = this.createNewData(\"Test\").create();\n this.mql(\"escape add attribute \\\"MXUPDATE_Test\\\" type string owner relationship \\\"\" + AbstractTest.convertMql(relationDef.getName()) + \"\\\"\");\n relationDef.failureUpdate(ErrorKey.DM_RELATION_REMOVE_LOCAL_ATTRIBUTE);\n }",
"public int removeProtein(double grams) {\n return this.protein -= grams;\n }",
"private void weakenPlayer(int player, double value) {\n\t\tif (player == LOCAL) {\n\t\t\tif (locStatBonus - value > 0.05) {\n\t\t\t\tlocStatBonus -= value;\n\t\t\t}\n\t\t} else if (player == OPPONENT) {\n\t\t\tif (oppStatBonus - value > 0.05) {\n\t\t\t\toppStatBonus -= value;\n\t\t\t}\n\t\t}\n\t\tweakenPlayerAnimation(player);\n\t}"
]
| [
"0.629688",
"0.59942055",
"0.5837393",
"0.5824582",
"0.5810841",
"0.57814145",
"0.56963074",
"0.5666114",
"0.56304765",
"0.56115663",
"0.55902827",
"0.55902827",
"0.5589865",
"0.5555358",
"0.55477136",
"0.5528611",
"0.5524838",
"0.5509718",
"0.5495766",
"0.54792154",
"0.5450415",
"0.5450415",
"0.54217",
"0.5417401",
"0.54086244",
"0.5404028",
"0.5388972",
"0.5383583",
"0.5361956",
"0.5356907",
"0.5350727",
"0.5341597",
"0.53211725",
"0.5275561",
"0.5274652",
"0.5268547",
"0.52684546",
"0.5261995",
"0.52617973",
"0.5261045",
"0.52590257",
"0.52495617",
"0.52410036",
"0.5233674",
"0.5224567",
"0.5221373",
"0.52077407",
"0.5204523",
"0.52044594",
"0.52028745",
"0.52015",
"0.5198583",
"0.51980865",
"0.51948303",
"0.51883084",
"0.5175969",
"0.5137506",
"0.5134409",
"0.5122219",
"0.5113844",
"0.51115847",
"0.5110326",
"0.5106007",
"0.5103419",
"0.5099234",
"0.5098038",
"0.50967026",
"0.50916296",
"0.50890523",
"0.50696295",
"0.5063182",
"0.5061426",
"0.5061415",
"0.5060744",
"0.50468326",
"0.50464576",
"0.50434756",
"0.5038732",
"0.50322896",
"0.503101",
"0.50255656",
"0.50173247",
"0.50161356",
"0.5015336",
"0.5012943",
"0.50039715",
"0.5003348",
"0.50016755",
"0.49980974",
"0.499635",
"0.4995056",
"0.49778298",
"0.49766707",
"0.49755862",
"0.4975179",
"0.49728397",
"0.4970979",
"0.49705675",
"0.49704584",
"0.49690092"
]
| 0.7879494 | 0 |
Dice cual de los dos barcos ha quedado mejor en la clasificacion PreCnd: Los barcos han de ser del mismo tipo | @Override
public int compare(Posicion pos1, Posicion pos2) {
/*Si ambos tiempos no acarrean la maxima puntuacion */
if ((!pos1.getPenal().isMaxPointsPenal())
&& (!pos2.getPenal().isMaxPointsPenal())) {
/**
* Si NO compiten en tiempo compensado
*/
if (pos1.getBarco().getTipo().getCompiteTmpReal()) {
//TODO Probar bien esto!
return (int) ponderarPenalizacion(pos1.getSegTiempo(),
pos1.getPenal(), pos1.getSegPenalizacion())
.compareTo(ponderarPenalizacion(pos2.getSegTiempo(),
pos2.getPenal(), pos2.getSegPenalizacion()));
} else {
return ponderarPenalizacion(
calcTiempoCompensado(pos1.getSegTiempo(), pos1.getBarco(), pos1.getManga()),
pos1.getPenal(),
pos1.getSegPenalizacion())
.compareTo(ponderarPenalizacion(calcTiempoCompensado(
pos2.getSegTiempo(),
pos2.getBarco(), pos2.getManga()),
pos2.getPenal(),
pos2.getSegPenalizacion()));
}
} else {
/**
* Situacion en la que uno de ellos esta penalizado o ambos lo
* están
*/
if (pos1.getPenal() == Posicion.Penalizacion.NAN) {
return -1;
} else if (pos2.getPenal() == Posicion.Penalizacion.NAN) {
return 1;
} else {
return 0;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void Diceroll()\n\t{\n\t\tdice1 = rand.nextInt(6)+1;\n\t\tdice2 = rand.nextInt(6)+1;\n\t\ttotal = dice1+dice2;\n\t}",
"public void colocarCompu(){\n int aux1;\n int aux2;\n \n for(int sub=0;sub<5;sub++){\n do{\n aux1=(int)(Math.random()*10);\n aux2=(int)(Math.random()*10);\n }while(proyectofinal.barc[aux1][aux2]!=0);\n \n \n proyectofinal.barc[aux1][aux2]=1;\n proyectofinal.barcosC ++ ;\n }\n }",
"int accidentVelo()\r\n\t{\r\n\t\tdouble rand = Math.random()*100;\r\n\t\tSystem.out.println(rand);\r\n\t\tif ((double)rand <= 0.5) {\r\n\t\t\tSystem.out.println(\"Finalement vous auriez du y aller à pied. Vous vous vider de votre sang sur le bord du trottoir.\");\r\n\t\t\treturn 0.5;\r\n\t\t}\r\n\t\treturn 0;\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tint[] totals = new int[11];\r\n\t\tint dice;\r\n\t\tint diceTwo;\r\n\t\tint total;\r\n\r\n\t\t\r\n\r\n\t\tfor (int i = 0; i < 10000; i++) {\r\n\t\t\tdice = (int) (Math.random() * 6) + 1;\r\n\t\t\tdiceTwo = (int) (Math.random() * 6) + 1;\r\n\t\t\ttotal = dice + diceTwo; \r\n\t\t\tif (total == 2) {\r\n\r\n\t\t\t\ttotals[0]++;\r\n\t\t\t}\r\n\r\n\t\t\telse if (total == 3) {\r\n\r\n\t\t\t\ttotals[1]++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (total == 4) {\r\n\r\n\t\t\t\ttotals[2]++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (total == 5) {\r\n\r\n\t\t\t\ttotals[3]++;\r\n\t\t\t}\r\n\t\t\telse if (total == 6) {\r\n\r\n\t\t\t\ttotals[4]++;\r\n\t\t\t}\r\n\t\t\telse if (total == 7) {\r\n\r\n\t\t\t\ttotals[5]++;\r\n\t\t\t}\r\n\t\t\telse if (total == 8) {\r\n\r\n\t\t\t\ttotals[6]++;\r\n\t\t\t}\r\n\t\t\telse if (total == 9) {\r\n\r\n\t\t\t\ttotals[7]++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (total == 10) {\r\n\r\n\t\t\t\ttotals[8]++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (total == 11) {\r\n\r\n\t\t\t\ttotals[9]++;\r\n\t\t\t}\r\n\t\t\telse if (total == 12) {\r\n\r\n\t\t\t\ttotals[10]++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Total - Number of Rolls\");\r\n\t\tSystem.out.println(\"2 \" + totals[0] );\r\n\t\tSystem.out.println(\"3 \" + totals[1] );\r\n\t\tSystem.out.println(\"4 \" + totals[2] );\r\n\t\tSystem.out.println(\"5 \" + totals[3] );\r\n\t\tSystem.out.println(\"6 \" + totals[4] );\r\n\t\tSystem.out.println(\"7 \" + totals[5] );\r\n\t\tSystem.out.println(\"8 \" + totals[6] );\r\n\t\tSystem.out.println(\"9 \" + totals[7] );\r\n\t\tSystem.out.println(\"10 \" + totals[8] );\r\n\t\tSystem.out.println(\"11 \" + totals[9] );\r\n\t\tSystem.out.println(\"12 \" + totals[10] );\r\n\t}",
"@Override\r\n\tpublic int rollDice() {\n\t\treturn 0;\r\n\t}",
"public static int rollDice(){\n return (int)(Math.random()*6) + 1;\n // Math.random returns a double number >=0.0 and <1.0\n }",
"@Override\n public void tirar() {\n if ( this.probabilidad == null ) {\n super.tirar();\n this.valorTrucado = super.getValor();\n return;\n }\n \n // Necesitamos conocer la probabilidad de cada número, trucados o no, para ello tengo que saber\n // primero cuantos números hay trucados y la suma de sus probabilidades. \n // Con esto puedo calcular la probabilidad de aparición de los números no trucados.\n \n int numeroTrucados = 0;\n double sumaProbalidadesTrucadas = 0;\n double probabilidadNoTrucados = 0;\n \n for ( double p: this.probabilidad ) { // cálculo de la suma números y probabilidades trucadas\n if ( p >= 0 ) {\n numeroTrucados++;\n sumaProbalidadesTrucadas += p;\n }\n }\n \n if ( numeroTrucados < 6 ) { // por si estuvieran todos trucados\n probabilidadNoTrucados = (1-sumaProbalidadesTrucadas) / (6-numeroTrucados);\n }\n\n double aleatorio = Math.random(); // me servirá para escoger el valor del dado\n \n // Me quedo con la cara del dado cuya probabilidad de aparición, sumada a las anteriores, \n // supere el valor aleatorio\n double sumaProbabilidades = 0;\n this.valorTrucado = 0;\n do {\n ++this.valorTrucado;\n if (this.probabilidad[this.valorTrucado-1] < 0) { // no es una cara del dado trucada\n sumaProbabilidades += probabilidadNoTrucados;\n } else {\n sumaProbabilidades += this.probabilidad[this.valorTrucado-1];\n }\n \n } while (sumaProbabilidades < aleatorio && valorTrucado < 6);\n \n \n }",
"public void throwDice() {\n\n Random r = new Random();\n\n if (color == DiceColor.NEUTRAL) {\n this.value = 0;\n } else {\n this.value = 1 + r.nextInt(6);\n }\n\n }",
"public int rollDice() {\n\t\td1 = r.nextInt(6) + 1;\n\t\td2 = r.nextInt(6) + 1;\n\t\trepaint();\n\t\treturn d1 + d2;\n\t}",
"public int tossDice(){\n\t\tRandom r = new Random();\n\t\tdiceValue = r.nextInt(6)+1;\n\t\tdiceTossed = true;\n\t\treturn diceValue;\n\t}",
"public void carroPulando() {\n\t\tpulos++;\n\t\tpulo = (int) (PULO_MAXIMO/10);\n\t\tdistanciaCorrida += pulo;\n\t\tif (distanciaCorrida > distanciaTotalCorrida) {\n\t\t\tdistanciaCorrida = distanciaTotalCorrida;\n\t\t}\n\t}",
"public static void crapsBS() {\r\n\t\tint dice1 = rand.nextInt(6) + 1;\r\n\t\tint dice2 = rand.nextInt(6) + 1;\r\n\t\tint sum = dice1 + dice2;\r\n\t\tSystem.out.printf(\"Nakon bacenih kockica brojevi su %d i %d\\n\", dice1, dice2);\r\n\t\tif (sum == 2 || sum == 3 || sum == 12) {\r\n\t\t\tSystem.out.println(\"Nazalost, izgubio si.\");\r\n\t\t} else if (sum == 7 || sum == 11) {\r\n\t\t\tSystem.out.println(\"Bravo, pobijedio si!\");\r\n\t\t} else if ((sum >= 4 && sum <= 6) || (sum >= 8 && sum <= 10)) {\r\n\t\t\tSystem.out.println(\"Point je \" + sum);\r\n\t\t\trestartBS();\r\n\t\t\tpointBS(sum);\r\n\t\t}\r\n\t}",
"public int roll(int dices){\n int faces[] = new int[dices];\n int total = 0;\n Dice dice = new Dice();\n for(int i = 0; i < dices; i++){\n faces[i] = (dice.rand.nextInt(6) + 1);\n }\n for(int i = 0; i < faces.length-1; i++){\n if(faces[i] != faces[i+1]){\n this.isDouble = false;\n break;\n }\n else{\n this.isDouble = true;\n }\n }\n if(this.isDouble == true){\n this.twiceCounter++;\n }\n for(int i = 1; i < faces.length+1; i++){\n System.out.print(\"The \" + i + \". dice: \" + faces[i-1] + \" \");\n total += faces[i-1];\n }\n System.out.println(\" and the sum is \" + total);\n\n return total;\n }",
"public static int diceRoll() {\n Random roller = new Random();//Create a random number generator\r\n return roller.nextInt(6) + 1;//Generate a number between 0-5 and add 1 to it\r\n }",
"public void precioFinal(){\r\n if(getConsumoEnergetico() == Letra.A){\r\n precioBase = 100+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.B)){\r\n precioBase = 80+precioBase;\r\n }\r\n else if(getConsumoEnergetico() == Letra.C){\r\n precioBase = 60+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.D)){\r\n precioBase = 50+precioBase;\r\n }\r\n else if(getConsumoEnergetico() == Letra.E){\r\n precioBase = 30+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.F)){\r\n precioBase = 10+precioBase;\r\n }\r\n else{\r\n aux=1;\r\n System.out.println(\"...No existe...\");\r\n }\r\n if (aux==0){\r\n peso();\r\n }\r\n \r\n }",
"private static void estadisticaClase() {\n int numeroAlumnos;\n int aprobados = 0, suspensos = 0; // definición e instanciación de varias a la vez\n int suficentes = 0, bienes = 0, notables = 0, sobresalientes = 0;\n float totalNotas = 0;\n float media;\n Scanner in = new Scanner(System.in);\n\n // Salismos del bucle sólo si nos introduce un número positivo\n do {\n System.out.println(\"Introduzca el número de alumnos/as: \");\n numeroAlumnos = in.nextInt();\n } while (numeroAlumnos <= 0);\n\n // Como sabemos el número de alumnos es un bucle definido\n for (int i = 1; i <= numeroAlumnos; i++) {\n float nota = 0;\n\n // nota solo existe dentro de este for, por eso la definimos aquí.\n do {\n System.out.println(\"Nota del alumno \" + i + \" [0-10]: \");\n nota = in.nextFloat();\n } while (nota < 0 || nota > 10);\n\n // Sumamos el total de notas\n totalNotas += nota;\n\n if (nota < 5) {\n suspensos++;\n } else if (nota >= 5 && nota < 6) {\n aprobados++;\n suficentes++;\n } else if (nota >= 6 && nota < 7) {\n aprobados++;\n bienes++;\n } else if (nota >= 7 && nota < 9) {\n aprobados++;\n notables++;\n } else if (nota >= 9) {\n aprobados++;\n sobresalientes++;\n }\n }\n // De esta manera redondeo a dos decimales. Tengo que hacer un casting porque de Double quiero float\n // Si no debería trabajar con double siempre.\n media = (float) (Math.round((totalNotas / numeroAlumnos) * 100.0) / 100.0);\n\n // Sacamos las estadísticas\n System.out.println(\"Número de alumnos/as: \" + numeroAlumnos);\n System.out.println(\"Número de aprobados/as: \" + aprobados);\n System.out.println(\"Número de suspensos: \" + suspensos);\n System.out.println(\"Nota media: \" + media);\n System.out.println(\"Nº Suficientes: \" + suficentes);\n System.out.println(\"Nº Bienes: \" + bienes);\n System.out.println(\"Nº Notables: \" + notables);\n System.out.println(\"Nº Sobresalientes: \" + sobresalientes);\n\n\n }",
"int RollDice ()\n {\n\tint roll = (int) (Math.random () * 6) + 1;\n\treturn roll;\n }",
"public int probabilidadesHastaAhora(){\n return contadorEstados + 1;\n }",
"public int roll() {\n int result = ThreadLocalRandom.current().nextInt(SIDES+1) + 1;// standard 1-7\n if(result == 7){ //LoadedDie 6 occurs twice as often\n return 6;\n } else{\n return result;\n }\n }",
"public int promedio() {\r\n // calculo y redondeo del promedio\r\n promedio = Math.round(nota1B+nota2B);\r\n // paso de Double a Int\r\n return (int) promedio;\r\n }",
"private int diceRoll(int sides) {\n return (int) ((Math.random() * sides) + 1);\n }",
"public int getDice(){\n\t\treturn diceValue;\n\t\t\n\t}",
"public void calcularEntropia(){\n //Verificamos si será con la misma probabilida o con probabilidad\n //especifica\n if(contadorEstados == 0){\n //Significa que será con la misma probabilidad por lo que nosotros\n //calcularemos las probabilidades individuales\n for(int i = 0; i < numEstados; i++){\n probabilidadEstados[i] = 1.0 / numEstados;\n }\n }\n for(int i = 0; i < numEstados; i++){\n double logEstado = Math.log10(probabilidadEstados[i]);\n logEstado = logEstado * (-1);\n double logDos = Math.log10(2);\n double divisionLog = logEstado / logDos;\n double entropiaTmp = probabilidadEstados[i] * divisionLog;\n resultado += entropiaTmp;\n }\n }",
"@Override\n public double calculaSalario() \n {\n double resultado = valor_base - ((acumulado * 0.05) * valor_base);\n resultado += auxilioProcriacao();\n //vale-coxinha\n resultado += 42;\n return resultado;\n }",
"public int throwDice() {\n //create new random number between 1 and 6\n int nr = ThreadLocalRandom.current().nextInt(1, 6 + 1);\n //throw the number\n throwDice(nr);\n //return number\n return nr;\n }",
"public int rollDice() {\n\t\td1 = (int)rand.nextInt(6)+1;\n\t\td2 = (int)rand.nextInt(6)+1;\n\t\treturn d1+d2;\n\t}",
"public static void promedio(int [] Grado1, int NNEstudent){\nint aux=0;\nfor(int i=0;i<NNEstudent;i++){\naux=Grado1[i]+aux;}\nint promedio;\npromedio=aux/NNEstudent;\nSystem.out.println(aux);\nSystem.out.println(\"el promedio de las edades es:\");\nSystem.out.println(promedio);\n}",
"public static void main(String[] args) {\n int tankToCargo = 3; // кол-во контейнеров помещающихся в грузовик\n int boxToTank = 2; // кол-во ящиков помещающихся в контейнер\n int box = 18; //кол-во ящиков\n\n double tanks = Math.ceil((double) box / boxToTank);//расчет кол-ва контейнеров\n double cargos = Math.ceil(tanks / tankToCargo);//расчет кол-ва грузовиков\n\n System.out.println(\"\\nКол-во ящиков для траспортировки \" + box + \" шт.\");\n System.out.println(\"Необходимое кол-во контейнеров для перевозки ящиков \" + (int) tanks + \" шт.\");\n System.out.println(\"Необходимое кол-во грузовиков \" + (int) cargos + \" шт.\");\n System.out.println(\"\\nРаспределение ящиков по контейнерам и контейнеров по грузовикам: \\n\");\n\n int countTank = 1;//счетчик контейнеров\n int coutnCargos = 1;//счетчик грузовиков\n for (int i = 1; i <= box; i++) {\n if (i == 1) {\n System.out.println(\"Грузовик: \" + coutnCargos);\n coutnCargos++;\n }\n if (i == 1) {\n System.out.print(\"\\tКонтейнер: \" + countTank + \"\\n\");\n countTank++;\n }\n {\n System.out.print(\"\\t\\tЯщик: \" + i + \"\\n\");\n }\n if (i % (tankToCargo * boxToTank) == 0 && i < box) {\n System.out.println(\"Грузовик: \" + coutnCargos);\n coutnCargos++;\n }\n if (i % boxToTank == 0 && i < box) {\n System.out.print(\"\\tКонтейнер: \" + countTank + \"\\n\");\n countTank++;\n }\n }//end of \"for\"\n }",
"public static int rollDice()\n\t{\n\t\tint roll = (int)(Math.random()*6)+1;\n\t\t\n\t\treturn roll;\n\n\t}",
"public void faiBagnetto() {\n System.out.println(\"Scrivere 1 per Bagno lungo, al costo di 150 Tam\\nSeleziona 2 per Bagno corto, al costo di 70 Tam\\nSeleziona 3 per Bide', al costo di 40 Tam\");\n\n switch (creaturaIn.nextInt()) {\n case 1 -> {\n puntiVita += 50;\n puntiFelicita -= 30;\n soldiTam -= 150;\n }\n case 2 -> {\n puntiVita += 30;\n puntiFelicita -= 15;\n soldiTam -= 70;\n }\n case 3 -> {\n puntiVita += 10;\n puntiFelicita -= 5;\n soldiTam -= 40;\n }\n }\n checkStato();\n }",
"public void realizaProcessamentoCartaoChance() throws Exception {\n if (indiceChance == 1) {\n DeslocarJogador(jogadorAtual(), 40);\n this.listaJogadores.get(jogadorAtual()).addDinheiro(200);\n\n } else if (indiceChance == 2) {\n DeslocarJogador(jogadorAtual(), 24);\n } else if (indiceChance == 3) {\n if (this.posicoes[this.jogadorAtual()] == 40 || this.posicoes[this.jogadorAtual()] > 11) {\n this.listaJogadores.get(jogadorAtual()).addDinheiro(200);\n }\n DeslocarJogador(jogadorAtual(), 11);\n\n\n } else if (indiceChance == 4) {\n if (this.posicoes[this.jogadorAtual()] < 12 || this.posicoes[this.jogadorAtual()] > 28) {\n DeslocarJogador(jogadorAtual(), 12);\n } else {\n DeslocarJogador(jogadorAtual(), 28);\n }\n } else if (indiceChance == 5 || indiceChance == 16) {\n if (this.posicoes[jogadorAtual()] < 5 || this.posicoes[jogadorAtual()] > 35) {\n DeslocarJogador(jogadorAtual(), 5);\n } else if (this.posicoes[jogadorAtual()] < 15) {\n DeslocarJogador(jogadorAtual(), 15);\n } else if (this.posicoes[jogadorAtual()] < 25) {\n DeslocarJogador(jogadorAtual(), 25);\n } else if (this.posicoes[jogadorAtual()] < 35) {\n DeslocarJogador(jogadorAtual(), 35);\n }\n\n int jogador = this.jogadorAtual();\n Lugar lugar = this.tabuleiro.get(this.posicoes[jogador] - 1);\n String nomeDono = (String) Donos.get(this.posicoes[jogador]);\n if (this.isUmJogador(nomeDono)) {\n Jogador possivelDono = this.getJogadorByName(nomeDono);\n if (this.isPosicaoFerrovia(this.posicoes[jogador])) {\n this.print(\"\\tO dono eh \" + possivelDono.getNome());\n }\n this.pagarFerrovia(possivelDono.getId(), jogador, 50, lugar.getNome());\n }\n\n } else if (indiceChance == 6) {\n this.listaJogadores.get(jogadorAtual()).addDinheiro(50);\n } else if (indiceChance == 7) {\n DeslocarJogador(jogadorAtual(), this.posicoes[jogadorAtual()] - 3);\n this.pagarEventuaisTaxas(jogadorAtual());\n } else if (indiceChance == 8) {\n DeslocarJogador(jogadorAtual(), 10);\n adicionaNaPrisao(listaJogadores.get(jogadorAtual()));\n\n } else if (indiceChance == 9) {\n int GastosRua = this.listaJogadores.get(jogadorAtual()).getQuantidadeDeCasas() * 25;\n GastosRua = GastosRua + this.listaJogadores.get(jogadorAtual()).getQuantidadeDeHoteis() * 10;\n this.listaJogadores.get(jogadorAtual()).retirarDinheiro(GastosRua);\n } else if (indiceChance == 10) {\n this.listaJogadores.get(jogadorAtual()).retirarDinheiro(15);\n } else if (indiceChance == 11) {\n\n this.listaJogadores.get(jogadorAtual()).ganharCartaoSaidaDePrisao(\"chance\");\n this.cardChancePrisaoEmPosse = true;\n } else if (indiceChance == 12) {\n if (this.posicoes[this.jogadorAtual()] > 5) {\n this.listaJogadores.get(jogadorAtual()).addDinheiro(200);\n }\n DeslocarJogador(jogadorAtual(), 5);\n if (this.posicoes[this.jogadorAtual()] > 5) {\n this.listaJogadores.get(jogadorAtual()).addDinheiro(200);\n }\n } else if (indiceChance == 13) {\n DeslocarJogador(jogadorAtual(), 39);\n } else if (indiceChance == 14) {\n int debito = numeroDeJogadores * 50 - 50;\n this.listaJogadores.get(jogadorAtual()).retirarDinheiro(debito);\n for (int i = 0; i < numeroDeJogadores; i++) {\n if (i != jogadorAtual()) {\n this.listaJogadores.get(i).addDinheiro(50);\n }\n }\n } else if (indiceChance == 15) {\n this.listaJogadores.get(jogadorAtual()).addDinheiro(150);\n }\n\n\n\n if (indiceChance < 16) {\n indiceChance++;\n } else {\n indiceChance = 1;\n }\n }",
"public static void miedo(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n aleatorio = (numeroAleatorio.nextInt(10-5+1)+5);\n \n if(oro>aleatorio){//condicion de finalizar battalla y sus acciones\n oroPerdido= (nivel*2)+aleatorio;\n oro= oro-oroPerdido;\n System.out.println(\"Huiste de la batalla!!!\");\n\t\t System.out.println(\"oro perdido:\"+oroPerdido);\n opcionMiedo=1; //finalizando battalla por huida del jugador \n }\n else{\n System.out.println(\"No pudes huir de la batalla\");\n } \n }",
"public int precioFinal(){\r\n int monto=super.PrecioFinal();\r\n\t \t \r\n\t if (pulgadas>40){\r\n\t monto+=precioBase*0.3;\r\n\t }\r\n\t if (sintonizador){\r\n\t monto+=50;\r\n\t }\r\n\t \r\n\t return monto;\r\n\t }",
"public void calculateThreeOfAKind(Die[] dice) {\n for (int i = 0; i < 6; i++) {\n if (this.numOfOccurances(dice, i) >= 3) {\n this.threeOfAKind = this.diceSum(dice);\n //System.out.println(\"you have gotten a three of a kind\");\n return;\n }\n }\n this.threeOfAKind = 0;\n return;\n }",
"public static int CPUTurn(){\n\t\t// Create the int variable turn and set it equal to a casted int random number.\n\t\tint turn = (int) Math.floor(Math.random()*3)+1;\n\t\t// Make a while loop that runs while turn is not equal to 1 and the count and turn variables are added to be greater than 20.\n\t\twhile(turn!=1 && count+turn>20) {\n\t\t\t// Set the turn variable equal to a casted int random number.\n\t\t\tturn = (int) Math.floor(Math.random()*3)+1;\n\t\t}\n\t\t// Have the system show what the CPU counts.\n\t\tSystem.out.println(\"CPU counts \"+turn+\".\");\n\t\treturn turn;\n\t}",
"public void animateDice() {\n pos += vel*tickCounter + ACC*tickCounter*tickCounter/2;\n if(pos<(TILE_SIZE*15-DICE_SIZE)/2){\n if(this.pIndex%3==0)\n diceImg = diceAnimation[tickCounter%diceAnimation.length];\n else\n diceImg = diceAnimation[diceAnimation.length-1-(tickCounter%diceAnimation.length)];\n tickCounter++;\n vel += ACC;}\n else{\n diceImg = dice[result-1];\n pos=(TILE_SIZE*15-DICE_SIZE)/2;}\n setCoordinates(pos);\n //System.out.println(\"dice pos \"+pos);\n }",
"public void precio4e(){\n precioHabitaciones = precioHabitaciones + (cantidadHabitaciones * numeroCamas);\n\n //Restaurante\n if(capacidadRestaurant < 30){\n precioHabitaciones = precioHabitaciones + 10;\n } else if (capacidadRestaurant > 29 && capacidadRestaurant < 51){\n precioHabitaciones = precioHabitaciones + 30;\n } else if (capacidadRestaurant > 50){\n precioHabitaciones = precioHabitaciones + 50;\n }\n\n //Gimnasio\n switch (gimnasio){\n case \"A\":\n precioHabitaciones = precioHabitaciones + 50;\n break;\n case \"B\":\n precioHabitaciones = precioHabitaciones + 30;\n break;\n }\n\n }",
"public static void curar(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n int curador;\n //condicion de puntos de mana para ejecutar la curacion del jugador\n if(puntosDeMana>=1){\n //acciones de la funcion curar en el jugador\n aleatorio = (numeroAleatorio.nextInt(25-15+1)+15);\n curador= ((nivel+1)*5)+aleatorio;\n puntosDeVida= puntosDeVida+curador;\n puntosDeMana=puntosDeMana-1;\n }\n else{//imprimiendo el mensaje de curacion fallada\n System.out.println(\"no cuentas con Puntos De mana (MP) para curarte\");\n }\n }",
"private void trocaFase() {\n\n\t\tif (score == mudaFase && fase == 1) {\n\t\t\tfase++;\n\t\t\tmudaFase += valorDeFase;\n\t\t\tcriaBlocos();\n\t\t\tpaddle.paddleInicio();\n\t\t\tbola.bolaInicio();\n\t\t\tmove = false;\n\t\t\tJOptionPane.showMessageDialog(null, \"Round \" + (fase));\n\t\t} else if (score == mudaFase && fase == 2) {\n\t\t\tfase++;\n\t\t\tmudaFase += valorDeFase;\n\t\t\tcriaBlocos();\n\t\t\tpaddle.paddleInicio();\n\t\t\tbola.bolaInicio();\n\t\t\tmove = false;\n\t\t\tJOptionPane.showMessageDialog(null, \"Round \" + (fase));\n\t\t} else if (score == mudaFase && fase == 3) {\n\t\t\tJOptionPane.showMessageDialog(null, \"VOCÊ VENCEU, PARABÉNS!\");\n\t\t\tint continuar;\n\t\t\tcontinuar = JOptionPane.showConfirmDialog(null, \"Deseja jogar novamente?\", \"Game Over\",\n\t\t\t\t\tJOptionPane.YES_NO_OPTION);\n\t\t\tif (continuar == 0) {\n\t\t\t\tfase = 1;\n\t\t\t\tvida += 3;\n\t\t\t\tmudaFase += valorDeFase;\n\t\t\t\tpaddle.paddleInicio();\n\t\t\t\tbola.bolaInicio();\n\t\t\t\tmove = false;\n\t\t\t\tcriaBlocos();\n\t\t\t} else {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t} // fecha else if\n\t}",
"public void throwDices() throws DiceException {\n /**generator of random numbers(in this case integer numbers >1)*/\n Random generator = new Random();\n /**mode of logic*/\n String mode = this.getMode();\n\n if (!mode.equals(\"sum\") && !mode.equals(\"max\")) {\n throw new DiceException(\"Wrong throw mode!!! Third argument should be 'max' or 'sum'!\");\n } else if (this.getNumOfDices() < 1) {\n throw new DiceException(\"Wrong numeber of dices!!! Number of dices should equals 1 or more!\");\n } else if (this.getNumOfWalls() < 4) {\n throw new DiceException(\"Wrong numeber of walls!!! Number of walls should equals 4 or more!\");\n } else {\n if (mode.equals(\"sum\")) {\n for (int i = 0; i < this.getNumOfDices(); i++) {\n result += (generator.nextInt(this.getNumOfWalls()) + 1);\n }\n } else if (mode.equals(\"max\")) {\n for (int i = 0; i < this.getNumOfDices(); i++) {\n int buff = (generator.nextInt(this.getNumOfWalls()) + 1);\n if (this.result < buff) {\n this.result = buff;\n }\n }\n }\n }\n }",
"public int generarDE(){\n int ts;\n float rnd=(float)Math.random();\n \n if(rnd<=0.35){ts=1;}\n else if(rnd<=0.75){ts=2;}\n else {ts=3;}\n \n return ts;\n }",
"public static void main(String[] args) {\n\t\tRandom coiso = new Random();\n\t\tList<Integer> stats = new ArrayList<Integer>();\n\t\tList<Integer> rolls = new ArrayList<Integer>();\n\t\tint soma = 0;\n\t\t\n\t\t\n\t\t/*for (int i=0;i<10;i++)\n\t\t\tSystem.out.println(1+coiso.nextInt(19));*/\n\t\tfor (int j=0;j<6;j++) {\n\t\t\tfor (int s=0;s<4;s++) {\n\t\t\t\trolls.add(1+coiso.nextInt(6));\n\t\t\t}\n\t\t\trolls.sort(new Comparator<Integer>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\treturn o1.compareTo(o2);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\trolls.remove(0);\n\t\t\tfor (int v=0;v<3;v++)\n\t\t\t\tsoma += rolls.get(v);\n\t\t\tstats.add(soma);\n\t\t\trolls.clear();\n\t\t\tsoma=0;\n\t\t\t\n\t\t}\n\t\tSystem.out.println(stats);\n\t\tfor (int i=0;i<6;i++)\n\t\t\tsoma+=stats.get(i);\n\t\tSystem.out.println(soma);\n\n\t}",
"public static void Promedio(){\n int ISumaNotas=0;\n int IFila=0,ICol=0;\n int INota;\n float FltPromedio;\n for(IFila=0;IFila<10;IFila++)\n {\n ISumaNotas+=Integer.parseInt(StrNotas[IFila][1]);\n }\n FltPromedio=ISumaNotas/10;\n System.out.println(\"El promedio de la clase es:\"+FltPromedio);\n }",
"public int throwDice() {\n Double randNumber = 1 + Math.random() * 5;\n this.face = randNumber.intValue();\n return this.face;\n }",
"static void sueldo7diasl(){\nSystem.out.println(\"Ejemplo estructura Condicional Multiple 1 \");\nString descuenta=\"\";\n//datos de entrada xd\nint ganancias= teclado.nextInt();\nif(ganancias<=150){\ndescuenta=\"0.5\";\n}else if (ganancias>150 && ganancias<300){\n descuenta=\"0.7\";}\n else if (ganancias>300 && ganancias<450){\n descuenta=\"0.9\";}\n //datos de salida:xd\n System.out.println(\"se le descuenta : \"+descuenta);\n}",
"public int rollDice();",
"public int generateRoll() {\n\t\tint something = (int) (Math.random() * 100) + 1;\n\t\tif (something <= 80) {\n\t\t\tint allNumRoll = (int) (Math.random() * getNumSides()) + 1;\n\t\t\tint roll = allNumRoll * 2 - 1;\n\t\t\treturn roll;\n\t\t} else {\n\t\t\tint allNumRoll = (int) (Math.random() * getNumSides()) + 1;\n\t\t\tint roll = allNumRoll * 2;\t\t\n\t\t\treturn roll;\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tRandom ricoDude = new Random();\r\n\t\tint x = ricoDude.nextInt(20) + 1;\r\n\t\t// the dice will have arange of 0-5 to make it 1-6 , + 1 to the end of it\r\n\t\t\r\n\t\tSystem.out.println(\"You rolled a: \" + x);\r\n\t\tint a = 1, b= 2,k;\r\n\t\tk = a + b + a++ + b++;\r\n\t\tSystem.out.println(k);\r\n\t\t\r\n\t}",
"private void peso(){\r\n if(getPeso()>80){\r\n precioBase+=100;\r\n }\r\n else if ((getPeso()<=79)&&(getPeso()>=50)){\r\n precioBase+=80;\r\n }\r\n else if ((getPeso()<=49)&&(getPeso()>=20)){\r\n precioBase+=50;\r\n }\r\n else if ((getPeso()<=19)&&(getPeso()>=0)){\r\n precioBase+=10;\r\n }\r\n }",
"public int roll_the_dice() {\n Random r = new Random();\n int number = r.nextInt(6) + 1;\n\n return number;\n }",
"private void giveScords(){\n \t//bingo 題數, seconds花費秒數\n \tint totalSec = (int)seconds;\n \t\n \tif(correct){\n \t\tif(totalSec<=5){\n \t\t\tuserPoints = userPoints + 150;\n \t\t}else if(totalSec<=10){\n \t\t\tuserPoints = userPoints + 125;\n \t\t}else if(totalSec<=15){\n \t\t\tuserPoints = userPoints + 100;\n \t\t}else if(totalSec<=20){\n \t\t\tuserPoints = userPoints + 80;\n \t\t}\n \t}\n }",
"public int getDiceTotal()\r\n {\r\n return diceTotal;\r\n }",
"public double Baricentro() {\n if (puntos.size() <= 2) {\n return 0;\n } else {\n // Inicializacion de las areas\n double areaPonderada = 0;\n double areaTotal = 0;\n double areaLocal;\n // Recorrer la lista conservando 2 puntos\n Punto2D antiguoPt = null;\n for (Punto2D pt : puntos) {\n if (antiguoPt != null) {\n // Cálculo deñ baricentro local\n if (antiguoPt.y == pt.y) {\n // Es un rectángulo, el baricentro esta en\n // centro\n areaLocal = pt.y * (pt.x - antiguoPt.x);\n areaTotal += areaLocal;\n areaPonderada += areaLocal * ((pt.x - antiguoPt.x) / 2.0 + antiguoPt.x);\n } else {\n // Es un trapecio, que podemos descomponer en\n // un reactangulo con un triangulo\n // rectangulo adicional\n // Separamos ambas formas\n // Primer tiempo: rectangulo\n areaLocal = Math.min(pt.y, antiguoPt.y) + (pt.x - antiguoPt.x);\n areaTotal += areaLocal;\n areaPonderada += areaLocal * ((pt.x - antiguoPt.x) / 2.0 + antiguoPt.x);\n //Segundo tiempo: triangulo rectangulo\n areaLocal = (pt.x - antiguoPt.x) * Math.abs(pt.y - antiguoPt.y) / 2.0;\n areaTotal += areaLocal;\n if (pt.y > antiguoPt.y) {\n // Baricentro a 1/3 del lado pt\n areaPonderada += areaLocal * (2.0 / 3.0 * (pt.x - antiguoPt.x) + antiguoPt.x);\n } else {\n // Baricentro a 1/3 dek lado antiguoPt\n areaPonderada += areaLocal * (1.0 / 3.0 * (pt.x - antiguoPt.x) + antiguoPt.x);\n }\n }\n }\n antiguoPt = pt;\n }\n // Devolvemos las coordenadas del baricentro\n return areaPonderada / areaTotal;\n }\n }",
"@Override\n public float calculaPreu(PreuTipusHabitacio p) {\n return p.getPreu() * this.perc;\n }",
"float genChance();",
"public void ex() {\n int inches = 86; \n int pie = 12; //1 pie = 12 inches \n //Operaciones para obtener la cantidad de pies e inches\n int cant = inches / pie; \n int res = inches % pie;\n //Muestra de resultados\n System.out.println(inches + \" pulgadas es equivalente a\\n \" + \n cant + \" pies \\n \" + res + \" pulgadas \");\n }",
"public void balayer()\r\n {\r\n int tot=0;\r\n for (int i=0;i<LONGUEUR;i++ )\r\n {\r\n for (int j=0; j<LARGEUR; j++ )\r\n {\r\n tot=0;\r\n Haut = lignesHor[i][j];\r\n Droite = lignesVert[i+1][j];\r\n Bas = lignesHor[i][j+1];\r\n Gauche = lignesVert[i][j];\r\n\r\n if (Haut)\r\n {\r\n tot++;\r\n Vision[i][j][1]=1;\r\n }\r\n\r\n if (Droite)\r\n {\r\n tot++;\r\n Vision[i][j][2]=1;\r\n }\r\n\r\n if (Bas)\r\n {\r\n tot++;\r\n Vision[i][j][3]=1;\r\n }\r\n\r\n\r\n if (Gauche)\r\n {\r\n tot++;\r\n Vision[i][j][4]=1;\r\n }\r\n\r\n Vision[i][j][0]=Vision[i][j][1]+Vision[i][j][2]+Vision[i][j][3]+Vision[i][j][4];\r\n }\r\n }\r\n }",
"public Dice() {\n this.random = new Random();\n this.faces = 6;\n }",
"public void kast() {\n\t\t// vaelg en tilfaeldig side\n\t\tdouble tilfaeldigtTal = Math.random();\n\t\tvaerdi = (int) (tilfaeldigtTal * 6 + 1);\n\t}",
"public void sueldo(){\n if(horas <= 40){\n sueldo = horas * cuota;\n }else {\n if (horas <= 50) {\n sueldo = (40 * cuota) + ((horas - 40) * (cuota * 2));\n } else {\n sueldo = ((40 * cuota) + (10 * cuota * 2)) + ((horas - 50) + (cuota * 3));\n }\n }\n\n }",
"private static int rollAmountOfCurrency(float chance)\n {\n boolean done = false;\n int count = 0;\n Random r = SylverRandom.random;\n\n while (!done){\n\n //Loop until we stop adding additional items\n if (r.nextFloat() < chance){\n chance *= .75;\n count++;\n }\n else\n done = true;\n\n }\n return count;\n }",
"public static void main(String[] args) {\n\r\n\t\tScanner tastatura = new Scanner(System.in);\r\n\t\tint pismo = 0;\r\n\t\tint brojBacanja = 0;\r\n\t\tint ishodBacanja = 0;\r\n\t\tint brojPisma = 0;\r\n\t\tint brojGlava = 0;\r\n//\t\tdouble kolicnkZaPismo = (double) brojPisma/brojBacanja;\r\n//\t\tdouble kolicnikZaGlavu = (double) brojGlava/brojBacanja;\r\n\t\t//ne moze ovde\r\n\t\t\r\n\t\twhile (true) {\r\n\t\t\tSystem.out.print(\"Koliko puta zelite da bacite novcic: \");\r\n\t\t\tbrojBacanja = tastatura.nextInt();\r\n\t\t\t\r\n\t\t\tif(brojBacanja == 0) break; \r\n\t\t\t\tbrojPisma = 0;\r\n\t\t\t\tbrojGlava = 0;\r\n\t\t\r\n\t\t\tfor (int i = 0; i<brojBacanja; i++) {\r\n\t\t\t\tishodBacanja = (int) (Math.random() + 0.5);\r\n\t\t\t\tif(ishodBacanja == pismo)\r\n\t\t\t\t\tbrojPisma++; \r\n\t\t\t\t\t//++ znaci ako je u zagradi tacno izvrsava se to nesti++\r\n\t\t\t\telse \r\n\t\t\t\t\tbrojGlava++;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdouble kolicnkZaPismo = (double) brojPisma/brojBacanja; //obavezno 2x double\r\n\t\t\tdouble kolicnikZaGlavu = (double) brojGlava/brojBacanja;\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Kolicnik za pisma: \" + kolicnkZaPismo);\r\n\t\t\tSystem.out.println(\"Kolicnik za glavu: \" + kolicnikZaGlavu);\r\n\t\t\tSystem.out.println(\"Pismo je palo \" + brojPisma +\" puta\");\r\n\t\t\tSystem.out.println(\"Glava je pala \" + brojGlava + \" puta\");\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"***Za izlaz ukucajte 0 ***\");\r\n\t\t\t\r\n// u zadatku\t\t\t\r\n//\t\t\tSystem.out.print(\"Broj pisma Broj glava\");\r\n//\t\t\tSystem.out.print(\" Broj pisma / Broj bacanja\");\r\n//\t\t\tSystem.out.println(\" Broj glava / Broj bacanja\");\r\n//\t\t\t\r\n//\t\t\tSystem.out.printf(\"%8d %12d %17.2f %25.2f\\n \" , \r\n//\t\t\t\t\tbrojPisma, brojGlava,\r\n//\t\t\t\t\t(double) brojPisma / brojBacanja,\r\n//\t\t\t\t\t(double) brojGlava / brojBacanja);\r\n\t\t}\r\n\t}",
"public String play() \r\n { \r\n \r\n theDiceTotal = dice.roll();\r\n \r\n while ( theDiceTotal != 12 )\r\n { \r\n theDiceTotal = dice.roll();\r\n System.out.println( dice.getDie1FaceValue() + \" \" + dice.getDie2FaceValue() );\r\n count++;\r\n }\r\n \r\n return ( count - 1 ) + \" dice rolled.\"; \r\n }",
"public static double probabilityThreeSixes() {\n int count = 0;\n int amount = 0;\n for (int i = 0; i < 10000; i++) {\n amount = 0;\n for (int j = 0; j < 18; j++) {\n if ((int) (Math.random() * 6) + 1 == 6)\n amount++;\n if (amount == 3) {\n count++;\n break; }\n }\n }\n return ((double) count / (double) 10000) * 100;\n }",
"public DiceController(int[] types)\n {\n int index = 0;\n this.diceArray = new ArrayList<>(5);\n for(int i = 0; i < types[0]; i++) //normal dice\n {\n Dice newDice = new Dice(index, true, 1); //set the dice index to be 1-5 and all flags to be true for first roll\n diceArray.add(newDice);\n index++;\n }\n for(int i = 0; i < types[1]; i++) //duel dice\n {\n Dice newDice = new Dice(index, true, 2); //set the dice index to be 1-5 and all flags to be true for first roll\n diceArray.add(newDice);\n index++;\n }\n for(int i = 0; i < types[2]; i++) //coward dice\n {\n Dice newDice = new Dice(index, true, 3); //set the dice index to be 1-5 and all flags to be true for first roll\n diceArray.add(newDice);\n index++;\n }\n for(int i = 0; i < types[3]; i++) //loudmouth dice\n {\n Dice newDice = new Dice(index, true, 4); //set the dice index to be 1-5 and all flags to be true for first roll\n diceArray.add(newDice);\n index++;\n }\n }",
"public Dice() {\n //Can it be simpler, than that..\n this.sides = 20;\n }",
"public void sumaPuntos() {\r\n int rojo = 0;\r\n int azul = 0;\r\n for (int i = 1; i < 10; i++) {\r\n\r\n if (tablero[1][i].getTipo().equals(\"Rojo\")) {\r\n rojo += tablero[1][i].getValor();\r\n }\r\n\r\n if (tablero[8][i].getTipo().equals(\"Azul\")) {\r\n azul += tablero[8][i].getValor();\r\n }\r\n\r\n }\r\n if (rojo > azul) {\r\n this.setResultado(\"Rojo\");\r\n this.agregarVictoria(jugadorRojo);\r\n }\r\n if (azul > rojo) {\r\n this.setResultado(\"Azul\");\r\n this.agregarVictoria(jugadorAzul);\r\n }\r\n \r\n this.setReplay(true);\r\n }",
"public int roll() \r\n {\r\n \r\n die1FaceValue = die1.roll();\r\n die2FaceValue = die2.roll();\r\n \r\n diceTotal = die1FaceValue + die2FaceValue;\r\n \r\n return diceTotal;\r\n }",
"public static void atacar(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n int ataqueJugador;\n //acciones de la funcion atacar sobre vida del enemigo\n aleatorio = (numeroAleatorio.nextInt(20-10+1)+10);\n ataqueJugador= ((nivel+1)*10)+aleatorio;\n puntosDeVidaEnemigo= puntosDeVidaEnemigo-ataqueJugador;\n \n }",
"public Dice() {\n\t\td1 = 0;\n\t\td2 = 0;\n\t}",
"public int roll3D6()\n {\n Random random1 = new Random();\n int r = random1.nextInt(6) +1;\n r += random1.nextInt(6) +1;\n r += random1.nextInt(6) +1;\n return r;\n }",
"public void rollCup()\n {\n die1.rolldice();\n die2.rolldice();\n gui.setDice(die1.getFacevalue(), die2.getFacevalue());\n }",
"public static int diceRoll() {\n\t\t\n\t\t//the outcome of the die is stored as an integer and returned\n\t\t\n\t\tint diceNumber = (int)((6 * (Math.random())) + 1);\n\t\treturn diceNumber;\n\t}",
"private int aleatorizarNaipe() {\n\t\tint aux;\n\t\taux = r.getIntRand(4);\n\t\treturn aux;\n\t}",
"private void setLoaded1() {\r\n\t\tdiceRoll1 = (int) (Math.random() * 6) + 1;\r\n\t}",
"public int roll(){\r\n myFaceValue = (int)(Math.random() * myNumSides) + 1;\r\n return myFaceValue;\r\n }",
"public String throwDice() {\n if (timesThrown < 3) {\n for (Die die : dice) {\n if (timesThrown == 0) {\n die.setChosen(false);\n }\n if (die.getChosen() == false) {\n int random = (int) (Math.random() * 6 + 1);\n die.setValue(random);\n }\n }\n return writeTimesThrown();\n }\n return null;\n }",
"public int numberOfKnightsIn() { // numero di cavalieri a tavola\n \n return numeroCompl;\n }",
"public void daiGioco() {\n System.out.println(\"Scrivere 1 per giocare al PC, al costo di 200 Tam\\nSeleziona 2 per a Calcio, al costo di 100 Tam\\nSeleziona 3 per Disegnare, al costo di 50 Tam\");\n\n switch (creaturaIn.nextInt()) {\n case 1 -> {\n puntiFelicita += 60;\n puntiVita -= 30;\n soldiTam -= 200;\n }\n case 2 -> {\n puntiFelicita += 40;\n puntiVita -= 20;\n soldiTam -= 100;\n }\n case 3 -> {\n puntiFelicita += 30;\n puntiVita -= 10;\n soldiTam -= 50;\n }\n }\n checkStato();\n }",
"public void hallarPerimetroEscaleno() {\r\n this.perimetro = this.ladoA+this.ladoB+this.ladoC;\r\n }",
"public void roll() {\n\t\tthis.faceValue = (int)(NUM_SIDES*Math.random()) + 1;\n\t}",
"private void devolver100() {\n cambio = cambio - 100;\n de100--;\n cambio100++;\n }",
"private static void roll()\n {\n rand = (int)(((Math.random())*6)+1); // dice roll #1\n rand2 = (int)(((Math.random())*6)+1);// dice roll #2\n }",
"void imprimeCalculos(){\n int a,b;\n a=calculaX();\n b=calculaY();\n System.out.println(\"Valor de X=\"+a);\n System.out.println(\"Valor de Y=\"+b);\n if(a==0){\n proporcion=0;\n }else{\n proporcion=(b/a);\n System.out.println(\"Valor de proporcion es: \"+proporcion);\n }\n }",
"public int roll() {\n Random random = new Random();\n faceValue = random.nextInt(sides)+1;\n return faceValue;\n }",
"public void percentualGordura(){\n\n s0 = 4.95 / denscorp;\n s1 = s0 - 4.50;\n percentgord = s1 * 100;\n\n }",
"void rollDice();",
"@Override\n public void calcularIntGanado() {\n intGanado = saldo;\n for(int i = 0; i < plazoInv; i++){\n intGanado += inve * 12;\n intGanado += intGanado * (intAnual / 100);\n }\n intGanado = intGanado - (inve + saldo);\n }",
"public double calcularIncremento(){\n double incremento=0.0;\n \n if (this.edad>=18&&this.edad<50){\n incremento=this.salario*0.05;\n }\n if (this.edad>=50&&this.edad<60){\n incremento=this.salario*0.10;\n }\n if (this.edad>=60){\n incremento=this.salario*0.15;\n }\n return incremento;\n }",
"public static int diceRoll() {\n int max = 20;\n int min = 1;\n int range = max - min + 1;\n int rand = (int) (Math.random() * range) + min;\n return rand;\n }",
"private void posicionInicial(int ancho){\r\n posicionX = ancho;\r\n Random aleatroio = new Random();\r\n int desplazamiento = aleatroio.nextInt(150)+100;\r\n \r\n \r\n cazaTie = new Rectangle2D.Double(posicionX, desplazamiento, anchoEnemigo, alturaEnemigo);\r\n }",
"public int rollResult(){\r\n return rand.nextInt(6) + 1;\r\n }",
"@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\n }",
"public void CoinFlip(int totalFlip) {\n\n //variables\n int count = 0;\n int head = 0;\n int tail = 0;\n\n //computation\n while (count != totalFlip) {\n double flip = Math.random();\n System.out.println(flip);\n\n if (flip < 0.5) {\n System.out.println(\"Print Head\");\n head++;\n\n } else {\n System.out.println(\"Print Tail\");\n tail++;\n }\n count++;\n }\n\n System.out.println(\"number of heads wins: \" + head);\n System.out.println(\"numberof tails wins:\" + tail);\n\n int perHaid = (head * 100 / totalFlip);\n int perTail = (tail * 100 / totalFlip);\n System.out.println(\"the percentage of head win:\" + perHaid);\n System.out.println(\"the percentage of tail win:\" + perTail);\n\n\n }",
"public void gastarDinero(double cantidad){\r\n\t\t\r\n\t}",
"public float getChance()\n {\n return 1.0f;\n }",
"public float calcular(float dinero, float precio) {\n // Cálculo del cambio en céntimos de euros \n cambio = Math.round(100 * dinero) - Math.round(100 * precio);\n // Se inicializan las variables de cambio a cero\n cambio1 = 0;\n cambio50 = 0;\n cambio100 = 0;\n // Se guardan los valores iniciales para restaurarlos en caso de no \n // haber cambio suficiente\n int de1Inicial = de1;\n int de50Inicial = de50;\n int de100Inicial = de100;\n \n // Mientras quede cambio por devolver y monedas en la máquina \n // se va devolviendo cambio\n while(cambio > 0) {\n // Hay que devolver 1 euro o más y hay monedas de 1 euro\n if(cambio >= 100 && de100 > 0) {\n devolver100();\n // Hay que devolver 50 céntimos o más y hay monedas de 50 céntimos\n } else if(cambio >= 50 && de50 > 0) {\n devolver50();\n // Hay que devolver 1 céntimo o más y hay monedas de 1 céntimo\n } else if (de1 > 0){\n devolver1();\n // No hay monedas suficientes para devolver el cambio\n } else {\n cambio = -1;\n }\n }\n \n // Si no hay cambio suficiente no se devuelve nada por lo que se\n // restauran los valores iniciales\n if(cambio == -1) {\n de1 = de1Inicial;\n de50 = de50Inicial;\n de100 = de100Inicial;\n return -1;\n } else {\n return dinero - precio;\n }\n }",
"public int rollDie() {\n\t\treturn (int) (Math.random()*6)+1;\n\t}",
"public int disminuir(int contador){\nSystem.out.println(\"Escoge la cantidad a disminuir\");\nnum=teclado.nextInt();\nfor(int i=0 ; i<num ; i++){\ncontador=contador-1;}\nreturn contador;}",
"public int rollDice(){\r\n\t\tString playerResponse;\r\n\t\tplayerResponse=JOptionPane.showInputDialog(name+\". \"+\"Type anything to roll\");\r\n\t\t//System.out.println(name+\"'s response: \"+playerResponse);\r\n\t\tdice1=(int)(Math.random() * ((6 - 1) + 1)) + 1;\r\n\t\tdice2=(int)(Math.random() * ((6 - 1) + 1)) + 1;\r\n\t\tdicetotal=dice1+dice2;\r\n\t\tnumTurns++;\r\n\t\treturn dicetotal;\r\n\t}",
"private int CasinoTurn() {\n List<Card> drawnCards = new LinkedList<>();\n boolean exit = false;\n\n // Determine to draw more cards\n do {\n // Draw cards\n Card drawn = drawCard();\n drawnCards.add(drawn);\n Ui.cls();\n Ui.println(\"Casino drew a \" + drawn.getName());\n Ui.pause();\n\n // Shows current cards and drawn cards\n Ui.cls();\n Ui.println(getHeader());\n Ui.println();\n Ui.print(\"Casino's cards:\");\n // Draw every card\n for (int i = 0; i < drawnCards.size(); i++) {\n Ui.print(\" \" + drawnCards.get(i));\n if (i + 1 < drawnCards.size()) {\n Ui.print(\",\");\n }\n }\n // Value of cards\n Ui.println(\"Casino's value: \" + highestPossibleValue(drawnCards));\n Ui.println();\n\n // Check for too much points\n if (highestPossibleValue(drawnCards) > 21) {\n Ui.println(\"The casino drew more than a total of 21, resulting in its loss!\");\n Ui.pause();\n break;\n }\n\n // Simple \"AI\" to determine the exit condition\n if (highestPossibleValue(drawnCards) > 17) {\n exit = true;\n Ui.println(\"The casino stopped playing!\");\n\n } else if (highestPossibleValue(drawnCards) > 15) {\n if (Math.random() < 0.5D) {\n exit = true;\n Ui.println(\"The casino stopped playing!\");\n }\n }\n\n } while (!exit);\n\n if (highestPossibleValue(drawnCards) > 21) {\n return 0;\n } else {\n return highestPossibleValue(drawnCards);\n }\n }"
]
| [
"0.63808495",
"0.61085945",
"0.6053281",
"0.59909165",
"0.59594446",
"0.59379923",
"0.59294546",
"0.59264463",
"0.5913681",
"0.58624285",
"0.58594596",
"0.5819852",
"0.5811414",
"0.5766782",
"0.5754939",
"0.5752118",
"0.5750497",
"0.5747107",
"0.57379055",
"0.5736005",
"0.5696904",
"0.56887376",
"0.5678014",
"0.56699413",
"0.5655107",
"0.5635424",
"0.5617485",
"0.5615908",
"0.56139106",
"0.5607358",
"0.5596522",
"0.5594963",
"0.55900896",
"0.5578678",
"0.55753535",
"0.5573783",
"0.5570057",
"0.5547518",
"0.55362767",
"0.552908",
"0.5527757",
"0.55232984",
"0.55202585",
"0.55095047",
"0.5507763",
"0.5494075",
"0.54841405",
"0.54778415",
"0.5474929",
"0.547156",
"0.5471459",
"0.54712015",
"0.54703873",
"0.5468711",
"0.54477537",
"0.544648",
"0.5445731",
"0.54316235",
"0.5421531",
"0.54135865",
"0.5409586",
"0.5406775",
"0.540507",
"0.54048914",
"0.54022044",
"0.54021186",
"0.53838193",
"0.53769875",
"0.53756547",
"0.5362264",
"0.53595126",
"0.5352762",
"0.5349727",
"0.5348495",
"0.5347652",
"0.5343386",
"0.53420323",
"0.5339843",
"0.5333833",
"0.5325466",
"0.53228563",
"0.5320699",
"0.53204364",
"0.5311894",
"0.5306337",
"0.53057617",
"0.5305554",
"0.53051436",
"0.5304252",
"0.5303293",
"0.5295707",
"0.52919155",
"0.52898866",
"0.5288915",
"0.5284403",
"0.5284151",
"0.52793074",
"0.52739275",
"0.52681816",
"0.52645266",
"0.52606523"
]
| 0.0 | -1 |
Devuelve el tiempo computado en segundos | private Long calcTiempoCompensado(Long tiempoReal, Barco barco, Manga manga) {
//Tiempo compensado = Tiempo Real + GPH * Nº de millas manga.
Float res = tiempoReal + barco.getGph() * manga.getMillas();
return (long) Math.round(res);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String dimeTuTiempo()\n {\n String cadResultado=\"\";\n if (horas<10)\n {\n cadResultado=cadResultado+\"0\";\n }\n cadResultado=cadResultado+horas;\n cadResultado=cadResultado+\":\";\n if(minutos<10)\n {\n cadResultado=cadResultado+\"0\";\n }\n cadResultado=cadResultado+minutos;\n \n return cadResultado;\n }",
"@Override\n\tpublic int horas_trabajo() {\n\t\treturn 1000;\n\t}",
"public void temporizadorTiempo() {\n Timer timer = new Timer();\n tareaRestar = new TimerTask() {\n @Override\n public void run() {\n tiempoRonda--;\n }\n };\n timer.schedule(tareaRestar, 1,1000);\n }",
"public void formatoTiempo() {\n String segundos, minutos, hora;\n\n hora = hrs < 10 ? String.valueOf(\"0\" + hrs) : String.valueOf(hrs);\n\n minutos = min < 10 ? String.valueOf(\"0\" + min) : String.valueOf(min);\n\n jLabel3.setText(hora + \" : \" + minutos + \" \" + tarde);\n }",
"public int getminutoStamina(){\n return tiempoReal;\n }",
"public static void main(String [] args){//inicio del main\r\n\r\n Scanner sc= new Scanner(System.in); \r\n\r\nSystem.out.println(\"ingrese los segundos \");//mesaje\r\nint num=sc.nextInt();//total de segundos\r\nint hor=num/3600;//total de horas en los segundos\r\nint min=(num-(3600*hor))/60;//total de min en las horas restantes\r\nint seg=num-((hor*3600)+(min*60));//total de segundo sen los miniutos restantes\r\nSystem.out.println(\"Horas: \" + hor + \" Minutos: \" + min + \" Segundos: \" + seg);//salida del tiempo\r\n\r\n}",
"public String tiempoRestanteHMS(Integer segundos) {\n\t\tint hor = segundos / 3600;\n\t\tint min = (segundos - (3600 * hor)) / 60;\n\t\tint seg = segundos - ((hor * 3600) + (min * 60));\n\t\treturn String.format(\"%02d\", hor) + \" : \" + String.format(\"%02d\", min)\n\t\t\t\t+ \" : \" + String.format(\"%02d\", seg);\n\t}",
"public Tiempo(int horas, int minutos, int segundos, String displayTiempo) {\r\n\t\tthis.horas = horas;\r\n\t\tif(minutos >= 0 && minutos <= 59){\r\n\t\t\tthis.minutos = minutos;\r\n\t\t}else{\r\n\t\t\tthis.minutos = 0;\r\n\t\t}\r\n\t\tif(segundos >=0 && segundos <=59){\r\n\t\t\tthis.segundos = segundos;\r\n\t\t}else{\r\n\t\t\tthis.segundos = 0;\r\n\t\t}\r\n\t\tthis.displayTiempo = displayTiempo;\r\n\t}",
"public void minutoStamina(int minutoStamina){\n tiempoReal = (minutoStamina * 6)+10;\n }",
"public void Cobrar() throws InterruptedException{\n System.out.println(\"Por favor indique la cantidad de litros que solicito\");\r\n int litros = sc.nextInt();\r\n String tipo = null;\r\n double costo;\r\n double costoTotal;\r\n do{\r\n System.out.println(\"¿Que tipo de gasolina?, indique magna o premium\");\r\n tipo = sc.nextLine();\r\n }while((!tipo.equalsIgnoreCase(\"magna\"))&&(!tipo.equalsIgnoreCase(\"premium\")));\r\n \r\n if (tipo.equalsIgnoreCase(\"magna\")) {\r\n costo = 19.42;\r\n }else costo = 20.71;\r\n System.out.println(\"Muy bien\");\r\n costoTotal = (litros*costo);\r\n Thread.sleep(2000);\r\n System.out.println(\"El total a pagar es de \"+costoTotal+\" pesos\");\r\n }",
"public Long consultarTiempoMaximo() {\n return timeFi;\n }",
"public void ponerMaximoTiempo() {\n this.timeFi = Long.parseLong(\"2000000000000\");\n }",
"public void calculoPersonal(){\n ayudantes = getAyudantesNecesarios();\n responsables = getResponsablesNecesarios();\n \n //Calculo atencion al cliente (30% total trabajadores) y RRPP (10% total trabajadores):\n \n int total = ayudantes + responsables;\n \n atencion_al_cliente = (total * 30) / 100;\n \n RRPP = (total * 10) / 100;\n \n //Creamos los trabajadores\n \n gestor_trabajadores.crearTrabajadores(RRPP, ayudantes,responsables,atencion_al_cliente);\n \n }",
"private void getTiempo() {\n\t\ttry {\n\t\t\tStringBuilder url = new StringBuilder(URL_TIME);\n\t\t\tHttpGet get = new HttpGet(url.toString());\n\t\t\tHttpResponse r = client.execute(get);\n\t\t\tint status = r.getStatusLine().getStatusCode();\n\t\t\tif (status == 200) {\n\t\t\t\tHttpEntity e = r.getEntity();\n\t\t\t\tInputStream webs = e.getContent();\n\t\t\t\ttry {\n\t\t\t\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\t\t\t\tnew InputStreamReader(webs, \"iso-8859-1\"), 8);\n\t\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\t\tString line = null;\n\t\t\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\t\t\tsb.append(line + \"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\twebs.close();\n\t\t\t\t\tSuperTiempo = sb.toString();\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\tLog.e(\"log_tag\",\n\t\t\t\t\t\t\t\"Error convirtiendo el resultado\" + e1.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void hora()\n {\n horaTotal = HoraSalida - HoraLlegada;\n\n }",
"@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\n }",
"public long termina() {\n\t\treturn (System.currentTimeMillis() - inicio) / 1000;\n\t}",
"public void TicTac()\n {\n if(minutos<=59)\n {\n minutos=minutos+1;\n \n }\n else\n {\n minutos=00;\n horas+=1;\n \n }\n if(horas>23)\n {\n horas=00;\n \n }\n else\n {\n minutos+=1;\n }\n }",
"public int getPontosTimeMandante() {\r\n return pontosTimeMandante;\r\n }",
"public static void sueldoTotal(int hora, int sueldo){\n int resultado = 0;\r\n if(hora<=40){\r\n resultado = hora*sueldo;\r\n }\r\n if(hora>40 || hora<48){\r\n resultado = (40*sueldo)+(hora-40)*(sueldo*2);\r\n }\r\n if (hora>=48){\r\n resultado =(40*sueldo)+8*(sueldo*2)+(hora-48)*(sueldo*3);\r\n }\r\n System.out.println(\"El sueldo es de \"+ resultado);//Se muestra el sueldo total\r\n \r\n \r\n \r\n }",
"public int getTempoSec() {\n return tempoSec;\n }",
"public int tiempoTotal() {\r\n\r\n\t\tint duracionTotal = 0;\r\n\t\tfor (int i = 0; i < misCanciones.size(); i++) {\r\n\t\t\tduracionTotal = duracionTotal + misCanciones.get(i).getDuracionS();\r\n\t\t}\r\n\t\t\r\n\t\treturn duracionTotal;\r\n\r\n\t}",
"@Override\n\tpublic int manufacturando(int unidades) {\n\t\treturn unidades*this.getTiempoEstimadoParaProducirse();\n\t}",
"static void Jogo (String nome, String Classe)\n {\n Scanner scan = new Scanner (System.in);\n \n int pontos = 0;\n int pontuador = 0;\n int erro = 0;\n\n int [] aleatorio; // cria um vetor para pegar a resposta da função de Gerar Perguntas Aleatórias \n aleatorio = GerarAleatorio(); // Pega a Reposta da função\n \n \n long start = System.currentTimeMillis(); // inicia o Cronometro do Jogo\n \n for (int i = 0; i < aleatorio.length; i++) // Para cada cada pergunta Aleatoria do tamanho total de perguntas(7) ele chama a pergunta montada e compara as respostas do usario \n { // com a função que tem todas as perguntas certas\n \n System.out.println((i + 1) + \") \" + MostrarPergunta (aleatorio[i])); //chama a função que monta a pergunta, passando o numero da pergunta (gerado aleatoriamente) \n \n String Certa = Correta(aleatorio[i]); // pega a resposta correta de acordo com o numero com o numero da pergunta\n \n System.out.println(\"Informe sua resposta: \\n\");\n String opcao = scan.next();\n \n if (opcao.equals(Certa)) // compara a resposta do usuario com a Resposta correta guardada na função \"Correta\"\n { // marca os pontos de acordo com a Classe escolhida pelo jogador \n pontuador++;\n if (Classe.equals(\"Pontuador\")) \n {\n pontos = pontos + 100;\n \n System.out.println(\"Parabens você acertou!: \" + pontos + \"\\n\");\n\n if(pontuador == 3)\n {\n pontos = pontos + 300;\n \n System.out.println(\"Parabens você acertou, e ganhou um Bonus de 300 pontos. Seus Pontos: \" + pontos + \"\\n\");\n \n pontuador = 0;\n }\n }\n else\n {\n pontos = pontos + 100;\n System.out.println(\"Parabens você acertou. Seus pontos: \" + pontos + \"\\n\");\n } \n }\n \n else if (opcao.equals(Certa) == false) \n {\n erro++;\n \n if (Classe.equals(\"Errar\")) \n {\n if(erro == 3)\n {\n pontos = pontos + 50;\n \n System.out.println(\"Infelizmente Você errou. Mas acomulou 3 erros e recebeu um bonus de 50 pontos: \" + pontos + \"\\n\");\n \n erro = 0;\n }\n }\n else\n {\n pontuador = 0;\n \n pontos = pontos - 100; \n System.out.println(\"Que pena vc errou, Seus pontos atuais: \" + pontos + \"\\n\");\n }\n }\n }\n \n long end = System.currentTimeMillis(); //Encerra o Cronometro do jogador\n \n tempo(start, end, nome, pontos, Classe); //manda para a função Tempo, para calcular os minutos e segundos do usuario \n \n }",
"public int numberOfTires() {\n int tires = 4;\n return tires;\n }",
"public static void tienda(){\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n int opcionCompra; //variables locales a utilizar\n Scanner scannerDos=new Scanner(System.in);\n //mostrando en pantalla las opciones de la tienda\n System.out.println(\"Bienvenido a la tienda, que deceas adquirir:\\n\");\n\tSystem.out.println(\"PRODUCTO \\tPRECIO \\tBENEFICIO\");\n\tSystem.out.println(\"1.Potion \\t50 oro \\tcura 25 HP\");\n\tSystem.out.println(\"2.Hi-Potion\\t100 oro \\tcura 75 HP\");\n\tSystem.out.println(\"3.M-Potion \\t75 oro \\trecupera 10 MP\");\n //ingresando numero de opcion\n System.out.println(\"\\n\\nIngrese numero de opcion:\");\n opcionCompra=scannerDos.nextInt();\n //comparando la opcion de compra\n switch(opcionCompra){\n case 1:{//condicion de oro necesario para el articulo1 \n\t\t\tif(oro>=50){\n articulo1=articulo1+1;\n System.out.println(\"compra exitosa\");\n }else {\n System.out.println(\"oro insuficiente!!!\");\n }\n break;\n }\n\t\tcase 2:{//condicion de oro necesario para el articulo2\n if(oro>=100){\n articulo2=articulo2+1;\n }else{ \n System.out.println(\"oro insuficiente!!!\");\n }\n break;\n }\n\t default:{//condicion de oro necesario para el articulo3\n if(oro>=75){\n articulo3=articulo3+1;\n }else{ \n System.out.println(\"oro insuficiente!!!\"); //poner while para ,ejora\n \t\t}\n break;\n }\n }\n }",
"private Integer calculaDiasSemanaTrabajoProyecto() {\r\n Integer dias = 0;\r\n List<ConfiguracionProyecto> configuracionProyectos = configuracionProyectoService.buscar(new ConfiguracionProyecto(\r\n docenteProyectoDM.getDocenteProyectoDTOSeleccionado().getDocenteProyecto().getProyectoId(), null, null,\r\n ConfiguracionProyectoEnum.DIASSEMANA.getTipo(), null));\r\n for (ConfiguracionProyecto cf : configuracionProyectos) {\r\n dias = Integer.parseInt(cf.getValor());\r\n break;\r\n }\r\n return dias;\r\n }",
"public int probabilidadesHastaAhora(){\n return contadorEstados + 1;\n }",
"public void carroPulando() {\n\t\tpulos++;\n\t\tpulo = (int) (PULO_MAXIMO/10);\n\t\tdistanciaCorrida += pulo;\n\t\tif (distanciaCorrida > distanciaTotalCorrida) {\n\t\t\tdistanciaCorrida = distanciaTotalCorrida;\n\t\t}\n\t}",
"public void startCount() {\n //meetodi k�ivitamisel nullime tunnid, minutid, sekundid:\n secondsPassed = 0;\n minutePassed = 0;\n hoursPassed = 0;\n if (task != null)\n return;\n task = new TimerTask() {\n @Override\n public void run() {//aeg l�ks!\n secondsPassed++; //loeme sekundid\n if (secondsPassed == 60) {//kui on l�binud 60 sek, nullime muutujat\n secondsPassed = 0;\n minutePassed++;//kui on l�binud 60 sek, suurendame minutid 1 v�rra\n }\n if (minutePassed == 60) {//kui on l�binud 60 min, nullime muutujat\n minutePassed = 0;\n hoursPassed++;//kui on l�binud 60 min, suurendame tunnid 1 v�rra\n }\n //kirjutame aeg �les\n String seconds = Integer.toString(secondsPassed);\n String minutes = Integer.toString(minutePassed);\n String hours = Integer.toString(hoursPassed);\n\n if (secondsPassed <= 9) {\n //kuni 10 kirjutame 0 ette\n seconds = \"0\" + Integer.toString(secondsPassed);\n }\n if (minutePassed <= 9) {\n //kuni 10 kirjutame 0 ette\n minutes = \"0\" + Integer.toString(minutePassed);\n }\n if (hoursPassed <= 9) {\n //kuni 10 kirjutame null ettte\n hours = \"0\" + Integer.toString(hoursPassed);\n }\n\n\n time = (hours + \":\" + minutes + \":\" + seconds);//aeg formaadis 00:00:00\n getTime();//edastame aeg meetodile getTime\n\n }\n\n };\n myTimer.scheduleAtFixedRate(task, 0, 1000);//timer k�ivitub kohe ja t��tab sekundite t�psusega\n\n }",
"private int calcTotalTime() {\n\t\tint time = 0;\n\t\tfor (Taxi taxi : taxis) {\n\t\t\ttime += taxi.calcTotalTime();\n\t\t}\n\t\treturn time;\n\t}",
"public int getTiempoEspera() {\n return tiempoEspera;\n }",
"public static void main (String[] args) {\n Thread[] threads = new Thread[NThreads];\n \n //inicializa vetor \n for (int i=0; i<vetor.length; i++){\n vetor[i] = i;\n }\n \n //cria uma instancia do recurso compartilhado entre as threads\n Soma s = new Soma();\n \n //cria as threads da aplicacao\n for (int i=0; i<threads.length; i++) {\n threads[i] = new ThreadPares(i, s);\n }\n \n //inicia as threads\n for (int i=0; i<threads.length; i++) {\n threads[i].start();\n }\n \n //espera pelo termino de todas as threads\n for (int i=0; i<threads.length; i++) {\n try { threads[i].join(); } catch (InterruptedException e) { return; }\n }\n \n //corretude\n if(s.get()==(N/2)) System.out.println(\"Saída correta\");\n else System.out.println(\"Saída incorreta\");\n \n \n System.out.println(\"Quantidade de pares = \" + s.get()); \n }",
"long buscarUltimo();",
"public int getPontosTimeVisitante() {\r\n return pontosTimeVisitante;\r\n }",
"public static void main(String[] args) {\n\t\t\n\t\tint h,m,s;\n\t\tScanner teclado = new Scanner(System.in);\n\t\tTiempo hora;\n\t\t\n\t\t/*\n\t\tSystem.out.println(\"Ingrese las horas\");\n\t\th = teclado.nextInt();\n\t\t\n\t\tSystem.out.println(\"Ingrese los minutos\");\n\t\tm = teclado.nextInt();\n\t\t\n\t\t*System.out.println(\"Ingrese los segundos\");\n\t\ts = teclado.nextInt();*/\n\t\t\n\t\thora = new Tiempo(17,53,52);\n\t\t\n\t\tSystem.out.println(hora.toString());\n\t\t\n\t\thora.aumentarHoras(2);\n\t\tSystem.out.println(hora.toString());\n\t\t\n\t\thora.aumentarMinutos(120);\n\t\tSystem.out.println(hora.toString());\n\t\t\n\t\thora.aumentarSegundos(3400);\n\t\tSystem.out.println(hora.toString());\n\t\t\n\t\thora.disminuirHoras(22);\n\t\tSystem.out.println(hora.toString());\n\t\t\n\t\thora.disminuirMinutos(120);\n\t\tSystem.out.println(hora.toString());\n\t\t\n\t\thora.disminuirMinutos(3600);\n\t\tSystem.out.println(hora.toString());\n\t}",
"public static void main(String [] args){\n int longitud;\n int ayuda;\n Random numero = new Random();\n Scanner console = new Scanner(System.in);\n System.out.println(\"Digite el n\");\n longitud=console.nextInt();\n //long start = System.nanoTime();\n ayuda=Puerto(50);\n //long end = System.nanoTime();\n //System.out.println(end-start);\n System.out.print(\"Se puede arreglar de\" +\" \" +ayuda+\" \"+\"formas.\");\n }",
"public void precio4e(){\n precioHabitaciones = precioHabitaciones + (cantidadHabitaciones * numeroCamas);\n\n //Restaurante\n if(capacidadRestaurant < 30){\n precioHabitaciones = precioHabitaciones + 10;\n } else if (capacidadRestaurant > 29 && capacidadRestaurant < 51){\n precioHabitaciones = precioHabitaciones + 30;\n } else if (capacidadRestaurant > 50){\n precioHabitaciones = precioHabitaciones + 50;\n }\n\n //Gimnasio\n switch (gimnasio){\n case \"A\":\n precioHabitaciones = precioHabitaciones + 50;\n break;\n case \"B\":\n precioHabitaciones = precioHabitaciones + 30;\n break;\n }\n\n }",
"int getCPU_time();",
"public void indicarTiempoMaximo(Long timeFi) {\n this.timeFi = (timeFi*1000);\n }",
"public String processamento(){\n \n List<com.profesorfalken.jsensors.model.components.Cpu> cpus = JSensors.get.components().cpus;\n if(cpus.isEmpty()) return \"40.0\";\n \n for (final com.profesorfalken.jsensors.model.components.Cpu cpu : cpus) {\n List<Load> loads = cpu.sensors.loads;\n for (final Load load : loads) {\n if(load.name.equals(\"Load CPU Total\"))\n return String.valueOf(load.value);\n }\n }\n return \"40.0\";\n }",
"public int getHora(){\n return minutosStamina;\n }",
"private void iniciarHilo() {\n tarea = new Thread(new Runnable() {\n @Override\n public void run() {\n while (true) {\n if (encendido) { // se activa la variable encendido si se presiona el boton iniciar\n try {\n Thread.sleep(1);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n mili++;\n if (mili >= 999) {\n seg++;\n mili = 0;\n }\n if (seg >= 59) {\n minutos++;\n seg = 0;\n }\n h.post(new Runnable() {\n @Override\n public void run() {\n String m = \"\", s = \"\", mi = \"\";\n if (mili < 10) { //Modificar la variacion de los 0\n m = \"00\" + mili;\n } else if (mili <= 100) {\n m = \"0\" + mili;\n } else {\n m = \"\" + mili;\n }\n if (seg <= 10) {\n s = \"0\" + seg;\n } else {\n s = \"\" + seg;\n }\n if (minutos <= 10) {\n mi = \"0\" + minutos;\n } else {\n mi = \"\" + minutos;\n }\n crono.setText(mi + \":\" + s + \":\" + m);\n }\n });\n }\n }\n }\n });\n tarea.start();\n }",
"public void cartgarTareasConRepeticionDespuesDe(TareaModel model,int unid_medi,String cant_tiempo,String tomas)\n {\n Date fecha = convertirStringEnFecha(model.getFecha_aviso(),model.getHora_aviso());\n Calendar calendar = Calendar.getInstance();\n\n if(fecha != null)\n {\n calendar.setTime(fecha);\n calcularCantidadDeRepeticionesHorasMin(unid_medi,calendar,cant_tiempo,tomas,model);\n }\n }",
"public double DiskServiceTime()\r\n\t{\r\n\t\tdouble rand = 0.0;\r\n\t\tdouble sum = 0.0;\r\n\t\tfor(int i=0; i<10; i++)\r\n\t\t{\r\n\t\t\tsum += Math.random();\r\n\t\t}\r\n\t\tsum = (sum - 10.0/2.0) / Math.sqrt(10.0/12.0);\r\n\t\trand = 20.0 * sum - 100.0;\r\n\t\trand = Math.abs(rand);\r\n\t\treturn rand;\r\n\t}",
"private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}",
"@Override\n\tpublic double calculaTributos() {\n\t\treturn numeroDePacientes * 10;\n\t}",
"public void calcularCost() {\r\n cost = 0;\r\n int a = 0;\r\n try {\r\n String r = DataR.toString()+ \" \" + horaR;\r\n String d = DataD.toString()+ \" \" + horaD;\r\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\");\r\n Date dateR = simpleDateFormat.parse(r);\r\n Date dateD = simpleDateFormat.parse(d);\r\n a = (int) ((dateD.getTime() - dateR.getTime())/(1000*3600));\r\n \r\n \r\n } catch (ParseException ex) {\r\n Logger.getLogger(Reserva.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n if(a > 24) {\r\n cost += 15*(a/(24));\r\n a -= (((int)(a/24))*24);\r\n }\r\n if(a%3600 == 0) {\r\n cost += 1;\r\n }\r\n if(a%3600 > 0) {\r\n cost += 1;\r\n }\r\n \r\n }",
"private void puntuacion(){\n timer++;\n if(timer == 10){\n contador++;\n timer = 0;\n }\n }",
"public void Millas_M(){\r\n System.out.println(\"Cálcular Metros o Kilometros de Millas Marinas\");\r\n System.out.println(\"Ingrese un valor en Millas Marinas\");\r\n cadena =numero.next(); \r\n valor = metodo.Doble(cadena);\r\n valor = metodo.NegativoD(valor);\r\n totalM = valor * 1852 ;\r\n Millas_KM(totalM);\r\n }",
"public void utilization() {\r\n\t\tfloat fAktuell = this.aktuelleLast;\r\n\t\tfloat fMax = this.raumsonde.getMaxNutzlast();\r\n\t\tfloat prozent = fAktuell / fMax * 100;\r\n\r\n\t\tSystem.out.println(\" \" + fAktuell + \"/\" + fMax + \" (\" + prozent + \"%)\");\r\n\t}",
"public void setTiempo(String tiempo) {\r\n this.tiempo = tiempo;\r\n }",
"public void calculoSalarioBruto(){\n salarioBruto = hrTrabalhada * valorHr;\n }",
"public int darTamanoHourly()\n\t{\n\t\treturn queueHourly.darNumeroElementos();\n\t}",
"public void sacarPaseo(){\r\n\t\t\tSystem.out.println(\"Por las tardes me saca de paseo mi dueño\");\r\n\t\t\t\r\n\t\t}",
"public void aumentarMinas(){\n\r\n if(espM==false){\r\n minascerca++;\r\n }\r\n }",
"public void ActualizadorOro(){\n\njavax.swing.Timer ao = new javax.swing.Timer(1000*60, new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n try {\n Connection conn = Conectar.conectar();\n Statement st = conn.createStatement();\n\n usuarios = new ArrayList<Usuario>();\n ResultSet rs = st.executeQuery(\"select * from usuarios\");\n while(rs.next()){\n usuarios.add(new Usuario(rs.getString(1), rs.getString(2), rs.getString(3), Integer.parseInt(rs.getString(4)), Integer.parseInt(rs.getString(5)), Integer.parseInt(rs.getString(6)), Integer.parseInt(rs.getString(7))));\n }\n\n //preparamos una consulta que nos lanzara el numero de minas por categoria que tiene cada usuario\n String consulta1 = \"select idEdificio, count(*) from regiones, edificiosregion\"+\n \" where regiones.idRegion=edificiosregion.idRegion\"+\n \" and propietario='\";\n\n String consulta2 = \"' and idEdificio in (1101,1102,1103,1104,1105)\"+\n \" group by idEdificio\";\n\n //recorremos toda la lista sumando el oro, dependiendo del numero de minas que posea\n ResultSet rs2 = null;\n for(Usuario usuario : usuarios){\n rs2 = st.executeQuery(consulta1 + usuario.getNick() + consulta2);\n int oro = 0;\n while(rs2.next()){\n System.out.println(Integer.parseInt(rs2.getString(1)));\n if(Integer.parseInt(rs2.getString(1)) == 1101){\n oro = oro + (rs2.getInt(2) * 100);\n }\n else if(Integer.parseInt(rs2.getString(1)) == 1102){\n oro = oro + (rs2.getInt(2) * 150);\n }\n else if(Integer.parseInt(rs2.getString(1)) == 1103){\n oro = oro + (rs2.getInt(2) * 300);\n }\n else if(Integer.parseInt(rs2.getString(1)) == 1104){\n oro = oro + (rs2.getInt(2) * 800);\n }\n else if(Integer.parseInt(rs2.getString(1)) == 1105){\n oro = oro + (rs2.getInt(2) * 2000);\n }\n }\n st.executeQuery(\"UPDATE usuarios SET oro = (SELECT oro+\" + oro + \" FROM usuarios WHERE nick ='\" + usuario.getNick() + \"'\"+\n \") WHERE nick = '\" + usuario.getNick() + \"'\");\n\n }\n st.close();\n rs.close();\n rs2.close();\n conn.close();\n\n } catch (SQLException ex) {\n System.out.println(ex.getMessage() + \" Fallo actualizar oro.\");\n }\n\n }\n });\n\n ao.start();\n}",
"public int getWorkRequired() {\n return time;\n }",
"public void calcularIndicePlasticidad(){\r\n\t\tindicePlasticidad = limiteLiquido - limitePlastico;\r\n\t}",
"public void convertirHoraMinutosStamina(int Hora, int Minutos){\n horaMinutos = Hora * 60;\n minutosTopStamina = 42 * 60;\n minutosTotales = horaMinutos + Minutos;\n totalMinutosStamina = minutosTopStamina - minutosTotales;\n }",
"public String getTiempo() {\r\n return tiempo;\r\n }",
"private static int timeSpent(Step s) {\n return s.getName().getBytes()[0] - 64 + PENALTY_TIME;\n }",
"public static double tic() {\n\t\tt = System.currentTimeMillis() / 1000d;\n\t\treturn t;\n\t}",
"public double CPUServiceTime()\r\n\t{\r\n\t\treturn Math.random()* (30.0 - 10.0) + 10.0;\r\n\t}",
"public void setTentos (int tentos) {\n this.tentos = tentos;\n }",
"int getTtiSeconds();",
"private void obtenerGastosDiariosMes() {\n\t\t// Obtenemos las fechas actuales inicial y final\n\t\tCalendar calendar = Calendar.getInstance();\n calendar.setTime(new Date());\n int diaFinalMes = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\n\t\tList<Movimiento> movimientos = this.movimientoService.obtenerMovimientosFechaUsuario(idUsuario, LocalDate.of(LocalDate.now().getYear(),LocalDate.now().getMonthValue(),1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDate.of(LocalDate.now().getYear(),LocalDate.now().getMonthValue(), diaFinalMes));\n\t\tList<Double> listaGastos = new ArrayList<Double>();\n\t\tList<String> listaFechas = new ArrayList<String>();\n\t\t\n\t\tDate fechaUtilizadaActual = null;\n\t\tdouble gastoDiario = 0;\n\t\t\n\t\tfor (Iterator iterator = movimientos.iterator(); iterator.hasNext();) {\n\t\t\tMovimiento movimiento = (Movimiento) iterator.next();\n\t\t\tif(fechaUtilizadaActual == null) { //Comprobamos si se acaba de entrar en el bucle para inicializar la fecha del movimiento\n\t\t\t\tfechaUtilizadaActual = movimiento.getFecha();\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Si hemos cambiado de fecha del movimiento se procede a guardar los datos recogidos\n\t\t\tif(!fechaUtilizadaActual.equals(movimiento.getFecha())) {\n\t\t\t\tlistaGastos.add(gastoDiario);\n\t\t\t\tlistaFechas.add(fechaUtilizadaActual.getDate()+\"/\"+Utils.getMonthForInt(fechaUtilizadaActual.getMonth()).substring(0, 3));\n\t\t\t\tgastoDiario = 0; // Reiniciamos el contador del gasto\n\t\t\t\tfechaUtilizadaActual = movimiento.getFecha(); // Almacenemos la fecha del nuevo gasto\n\t\t\t}\n\t\t\t\n\t\t\t// Si el movimiento que se ha realizado es un gasto lo sumamos al contador de gasto\n\t\t\tif(movimiento.getTipo().equals(TipoMovimiento.GASTO)) {\n\t\t\t\tgastoDiario += movimiento.getCantidad();\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Comprobamos si es el ultimo item del iterador y almacenamos sus datos\n\t\t\tif(!iterator.hasNext()) {\n\t\t\t\tlistaGastos.add(gastoDiario);\n\t\t\t\tlistaFechas.add(fechaUtilizadaActual.getDate()+\"/\"+Utils.getMonthForInt(fechaUtilizadaActual.getMonth()).substring(0, 3));\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tthis.listadoGastosDiariosDiagrama = new Double[listaGastos.size()];\n\t\tthis.listadoGastosDiariosDiagrama = listaGastos.toArray(this.listadoGastosDiariosDiagrama);\n\t\tthis.fechasDiagrama = new String[listaFechas.size()];\n\t\tthis.fechasDiagrama = listaFechas.toArray(this.fechasDiagrama);\n\t\t\n\t}",
"public double getCpuTimeSec() {\n\treturn getCpuTime() / Math.pow(10, 9);\t\t\n}",
"int getTempo();",
"private int pasarMilisegundoASegundo( long milisegundos )\n {\n return (int)(milisegundos/MILISEGUNDOS_EN_SEGUNDO);\n }",
"public static int GetMills() {\r\n return (int) System.currentTimeMillis() - StartUpTimeMS;\r\n }",
"private long getPTSUs() {\n long result = System.nanoTime() / 1000L;\n if (result < prevOutputPTSUs)\n result = (prevOutputPTSUs - result) + result;\n return result;\n }",
"@RequiresApi(api = Build.VERSION_CODES.O)\n private String obtenerSegundos(){\n try{\n this.minutos = java.time.LocalDateTime.now().toString().substring(17,19);\n }catch (StringIndexOutOfBoundsException sioobe){\n this.segundos = \"00\";\n }\n return this.minutos;\n }",
"private void vuoronKolmasHeitto() {\n while (heittojaJaljella == 1) {\n if (tulosLaitettu) {\n break;\n }\n try {\n Thread.sleep(100);\n } catch (InterruptedException ex) {\n System.out.println(\"Ei ole heitetty tai laitettu tulosta\");\n }\n }\n }",
"public static int tirarDados(){\n //elige valores aleatorios para los dados\n int dado1 = 1 + numerosAleatorios.nextInt(6);//<primer tiro del dado\n int dado2 = 1 + numerosAleatorios.nextInt(6);//< segundo tiro del dado\n \n int suma = dado1 + dado2;//< suma de los valores de los dados\n \n //muestra los resultados de este tiro\n System.out.printf(\"El jugador tiro %d + %d = %d%n\", dado1, dado2, suma);\n return suma;\n }",
"public void CobrarImpuestosReducidos(){\n\t\tif(sueldoBruto>=BASE_MINIMA_IMPUESTOS && sueldoBruto<IMPUESTO_SUP){\n\t\t\tsueldoNeto=sueldoBruto-(sueldoBruto*PAGA_IMPUESTOS_MIN);\n\t\t\ttipoImpuesto=\"Ha pagado el 20% de impuestos\";\n\t\t}\n\t}",
"@Test\n\tvoid calcularSalarioConMasCuarentaHorasPagoPositivoTest() {\n\t\tEmpleadoPorComision empleadoPorComision = new EmpleadoPorComision(\"Eiichiro oda\", \"p33\", 400000, 500000);\n\t\tdouble salarioEsperado = 425000;\n\t\tdouble salarioEmpleadoPorComision = empleadoPorComision.calcularSalario();\n\t\tassertEquals(salarioEsperado, salarioEmpleadoPorComision);\n\n\t}",
"private String obtenerMilisegundos(){\n\n String fecha = java.time.LocalDateTime.now().toString();\n int longitudPunto = fecha.lastIndexOf(\".\");\n try{\n this.milisegundos = java.time.LocalDateTime.now().toString().substring((longitudPunto+1),fecha.length());\n }catch (StringIndexOutOfBoundsException sioobe){\n this.milisegundos = \"000\";\n }\n\n return milisegundos;\n }",
"private void Calculation() {\n\t\tint calStd = jetztStunde + schlafStunde;\n\t\tint calMin = jetztMinute + schlafMinute;\n\n\t\ttotalMin = calMin % 60;\n\t\ttotalStunde = calStd % 24 + calMin / 60;\n\n\t}",
"public int obtenerHoraMasAccesos()\n {\n int numeroAccesosMaximoEncontradosHastaAhoraParaUnaHora = 0;\n int horaConElNumeroDeAccesosMaximo = -1;\n\n if(archivoLog.size() >0){\n for(int horaActual=0; horaActual < 24; horaActual++){\n int totalDeAccesosParaHoraActual = 0;\n //Miramos todos los accesos\n for(Acceso acceso :archivoLog){\n if(horaActual == acceso.getHora()){\n totalDeAccesosParaHoraActual++;\n }\n }\n if(numeroAccesosMaximoEncontradosHastaAhoraParaUnaHora<=totalDeAccesosParaHoraActual){\n numeroAccesosMaximoEncontradosHastaAhoraParaUnaHora =totalDeAccesosParaHoraActual;\n horaConElNumeroDeAccesosMaximo = horaActual;\n }\n }\n }\n else{\n System.out.println(\"No hay datos\");\n }\n return horaConElNumeroDeAccesosMaximo;\n }",
"public void daiMedicina() {\n System.out.println(\"Vuoi curare \" + nome + \" per 200 Tam? S/N\");\n String temp = creaturaIn.next();\n if (temp.equals(\"s\") || temp.equals(\"S\")) {\n puntiVita += 60;\n soldiTam -= 200;\n }\n checkStato();\n }",
"private int totalTime()\n\t{\n\t\t//i'm using this varaible enough that I should write a separate method for it\n\t\tint totalTime = 0;\n\t\tfor(int i = 0; i < saveData.size(); i++)//for each index of saveData\n\t\t{\n\t\t\t//get the start time\n\t\t\tString startTime = saveData.get(i).get(\"startTime\");\n\t\t\t//get the end time\n\t\t\tString endTime = saveData.get(i).get(\"endTime\");\n\t\t\t//****CONTINUE\n\t\t\t//total time in minutes\n\t\t}\n\t}",
"private void vuoronKaikkiHeitotHeitetty() {\n while (heittojaJaljella < 1) {\n if (tulosLaitettu) {\n break;\n }\n try {\n Thread.sleep(100);\n } catch (InterruptedException ex) {\n System.out.println(\"Ei ole laitettu tulosta\");\n }\n }\n }",
"@Override\r\n\tpublic double getTMB() {\r\n\t\tif (isAdultoJovem()) {\r\n\t\t\treturn 15.3 * anamnese.getPesoUsual() + 679;\r\n\t\t}\r\n\t\tif (isAdulto()) {\r\n\t\t\treturn 11.6 * anamnese.getPesoUsual() + 879;\r\n\t\t}\r\n\t\tif (isIdoso()) {\r\n\t\t\treturn 13.5 * anamnese.getPesoUsual() + 487;\r\n\t\t}\r\n\t\treturn 0;\r\n\t}",
"public void menuprecoperiodo(String username) {\n Scanner s=new Scanner(System.in);\n LogTransportadora t=b_dados.getTrasnportadoras().get(username);\n double count=0;\n try {\n ArrayList<Historico> hist = b_dados.buscaHistoricoTransportadora(t.getCodEmpresa());\n System.out.println(\"Indique o ano:\");\n int ano=s.nextInt();\n System.out.println(\"Indique o mês\");\n int mes=s.nextInt();\n System.out.println(\"Indique o dia\");\n int dia=s.nextInt();\n for(Historico h: hist){\n LocalDateTime date=h.getDate();\n if(date.getYear()==ano && date.getMonthValue()==mes && date.getDayOfMonth()==dia){\n count+=h.getKmspercorridos()*t.getPrecokm();\n }\n }\n System.out.println(\"O total fatorado nesse dia foi de \" + count +\"€\");\n }\n catch (TransportadoraNaoExisteException e){\n System.out.println(e.getMessage());\n }\n }",
"private static float tock(){\n\t\treturn (System.currentTimeMillis() - startTime);\n\t}",
"public Double darTiempoTotal(){\n\t\treturn tiempoComputacionalGrasp+tiempoComputacionalSetCovering;\n\t}",
"public void run() {\r\n\t\tDate fechaActual = new Date();\r\n\t\ttry {\r\n\t\t\t// Actual\r\n\t\t\tint horaActual = Integer.parseInt(ManipulacionFechas\r\n\t\t\t\t\t.getHora(fechaActual));\r\n\t\t\tint minutosActual = Integer.parseInt(ManipulacionFechas\r\n\t\t\t\t\t.getMinutos(fechaActual));\r\n\r\n\t\t\tint horaInicialRangoEjecucion = Integer\r\n\t\t\t\t\t.parseInt(Util\r\n\t\t\t\t\t\t\t.loadParametersValue(\"HORA_INICIAL_RANGO_EJECUCION_COBRO_CIAT_CASA_CIAT\"));\r\n\t\t\tint minutosInicialRangoEjecucion = Integer\r\n\t\t\t\t\t.parseInt(Util\r\n\t\t\t\t\t\t\t.loadParametersValue(\"MINUTOS_INICIAL_RANGO_EJECUCION_COBRO_CIAT_CASA_CIAT\"));\r\n\r\n\t\t\tint horaFinalRangoEjecucion = Integer\r\n\t\t\t\t\t.parseInt(Util\r\n\t\t\t\t\t\t\t.loadParametersValue(\"HORA_FINAL_RANGO_EJECUCION_COBRO_CIAT_CASA_CIAT\"));\r\n\t\t\tint minutosFinalRangoEjecucion = Integer\r\n\t\t\t\t\t.parseInt(Util\r\n\t\t\t\t\t\t\t.loadParametersValue(\"MINUTOS_FINAL_RANGO_EJECUCION_COBRO_CIAT_CASA_CIAT\"));\r\n\r\n\t\t\t// Tiempo Actual en Minutos\r\n\t\t\tint tiempoActual = (horaActual * 60) + minutosActual;\r\n\r\n\t\t\t// Tiempos de Rango de Ejecucion en Minutos\r\n\t\t\tint rangoInicial = (horaInicialRangoEjecucion * 60)\r\n\t\t\t\t\t+ minutosInicialRangoEjecucion;\r\n\t\t\tint rangoFinal = (horaFinalRangoEjecucion * 60)\r\n\t\t\t\t\t+ minutosFinalRangoEjecucion;\r\n\r\n\t\t\t// Pregunta si la hora actual esta dentro del rango de ejecucion de\r\n\t\t\t// la tarea\r\n\t\t\tif ((tiempoActual >= rangoInicial) && (tiempoActual <= rangoFinal)) {\r\n\t\t\t\tDate start = new Date();\r\n\t\t\t\tlog\r\n\t\t\t\t\t\t.info(\"--- Corriendo proceso automatico Cobro de Ciat Casa Ciat : \"\r\n\t\t\t\t\t\t\t\t+ start + \"----\");\r\n\t\t\t\tnew BillingAccountServiceImpl().CobroCiatCasaCiat();\r\n\r\n\t\t\t\tDate end = new Date();\r\n\t\t\t\tlog\r\n\t\t\t\t\t\t.info(\"--- Termina proceso Envio de notificaciones automaticas Cobro de Ciat Casa Ciat \"\r\n\t\t\t\t\t\t\t\t+ start + \"----\");\r\n\t\t\t\tlog\r\n\t\t\t\t\t\t.info(end.getTime()\r\n\t\t\t\t\t\t\t\t- start.getTime()\r\n\t\t\t\t\t\t\t\t+ \" total milliseconds en realizar tarea automatica Cobro de Ciat Casa Ciat : \");\r\n\r\n\t\t\t}// Fin if\r\n\t\t\telse {\r\n\t\t\t\tlog\r\n\t\t\t\t\t\t.info(\"--- Tarea Automatica de notificacion Cobro de Ciat Casa Ciat en espera... \"\r\n\t\t\t\t\t\t\t\t+ new Date() + \" ----\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog\r\n\t\t\t\t\t.error(\"Error RUN Tarea Automatica de notificacion Cobro de Ciat Casa Ciat: \"\r\n\t\t\t\t\t\t\t+ e.getMessage());\r\n\t\t}\r\n\r\n\t\tfechaActual = null;\r\n\r\n\t}",
"public static void main(String[] args) {\n int horaSalida;\n int minutosSalida;\n int horaLlegada;\n int minutosLlegada;\n //Salida:\n int duracion;\n //condiciones y restricciones: el vuelo puede pasar de medianoche y no dura mas de 24h\n Scanner sc = new Scanner(System.in);\n do {\n System.out.println(\"Ingrese la hora de salida\");\n horaSalida = sc.nextInt();\n System.out.println(\"Ingrese los minutos\");\n minutosSalida = sc.nextInt();\n\n System.out.println(\"Ingrese la hora de llegada\");\n horaLlegada = sc.nextInt();\n System.out.println(\"Ingrese los minutos\");\n minutosLlegada = sc.nextInt();\n if (horaSalida > 24 || horaLlegada > 24 || minutosSalida > 60 || minutosLlegada > 60) {\n System.out.println(\"Los datos no han sido ingresados correctamente, vuelva a intentarlo\");\n }\n } while (horaSalida > 24 || horaLlegada > 24 || minutosSalida > 60 || minutosLlegada > 60);\n\n //Conversion de horas y minutos en solo minutos 19<2\n if (horaSalida > horaLlegada) {//caso 1\n horaLlegada = 24 + horaLlegada;//para poder restarlo a eso las h y m de salida\n }\n if (horaLlegada == horaSalida && (minutosSalida > minutosLlegada || minutosSalida == minutosLlegada)) {//caso 2\n horaLlegada = 24 + horaLlegada;//para poder restarlo a eso las h y m de salida\n }\n duracion = ((horaLlegada * 60) + minutosLlegada) - ((horaSalida * 60) + minutosSalida);\n\n if (duracion >= 1440) {//24*60=1440 si se pasa esto significa que el vuelo dura mas de 24h ex: 3:41 y llego 3:20\n System.out.print(\"El vuelo no puede durar mas de 24 horas \");\n } else {\n System.out.print(\"La duracion del vuelo es \" + duracion + \" minutos o \");\n //CODICIONES PARA EL AFFICHAGE\n if ((duracion / 60) < 10) {\n System.out.print(\"0\");\n }\n System.out.print(duracion / 60 + \"h\");\n\n if ((duracion % 60) < 10) {\n System.out.print(\"0\");\n }\n System.out.print(duracion % 60 + \"m\");\n }\n }",
"@Override\r\n\tpublic double calcularNominaEmpleado() {\n\t\treturn sueldoPorHora * horas;\r\n\t}",
"@Override\n public void tirar() {\n if ( this.probabilidad == null ) {\n super.tirar();\n this.valorTrucado = super.getValor();\n return;\n }\n \n // Necesitamos conocer la probabilidad de cada número, trucados o no, para ello tengo que saber\n // primero cuantos números hay trucados y la suma de sus probabilidades. \n // Con esto puedo calcular la probabilidad de aparición de los números no trucados.\n \n int numeroTrucados = 0;\n double sumaProbalidadesTrucadas = 0;\n double probabilidadNoTrucados = 0;\n \n for ( double p: this.probabilidad ) { // cálculo de la suma números y probabilidades trucadas\n if ( p >= 0 ) {\n numeroTrucados++;\n sumaProbalidadesTrucadas += p;\n }\n }\n \n if ( numeroTrucados < 6 ) { // por si estuvieran todos trucados\n probabilidadNoTrucados = (1-sumaProbalidadesTrucadas) / (6-numeroTrucados);\n }\n\n double aleatorio = Math.random(); // me servirá para escoger el valor del dado\n \n // Me quedo con la cara del dado cuya probabilidad de aparición, sumada a las anteriores, \n // supere el valor aleatorio\n double sumaProbabilidades = 0;\n this.valorTrucado = 0;\n do {\n ++this.valorTrucado;\n if (this.probabilidad[this.valorTrucado-1] < 0) { // no es una cara del dado trucada\n sumaProbabilidades += probabilidadNoTrucados;\n } else {\n sumaProbabilidades += this.probabilidad[this.valorTrucado-1];\n }\n \n } while (sumaProbabilidades < aleatorio && valorTrucado < 6);\n \n \n }",
"public static void dormir(long milis)\r\n\t{\r\n\t\tlong inicial=System.currentTimeMillis();\r\n\t\twhile(System.currentTimeMillis()-inicial < milis) {/*Esperar a que pase el tiempo*/}\r\n\t}",
"public void imprimirResultados(){\n System.out.println(\"t (tiempo actual) \"+t);\n \n \n System.out.println(\"\\nGanancia total: $\"+R);\n System.out.println(\"Costos por mercaderia comprada: $\"+C);\n System.out.println(\"Costos por mantenimiento inventario: $\"+H);\n System.out.println(\"Ganancia promeio de la tienda por unidad de tiempo: $\"+(R-C-H)/T);\n \n }",
"public void mostrarTotales() { \n // Inicializacion de los atributos en 0\n totalPCs = 0;\n totalLaptops = 0;\n totalDesktops = 0; \n /* Recorrido de la lista de computadores para acumular el precio usar instanceof para comparar el tipo de computador */ \n for (Computador pc : computadores){\n if (pc instanceof PCLaptop) {\n totalLaptops += pc.calcularPrecio(); \n } else if (pc instanceof PCDesktop){\n totalDesktops += pc.calcularPrecio();\n }\n }\n totalPCs = totalLaptops + totalDesktops;\n System.out.println(\"El precio total de los computadores es de \" + totalPCs); \n System.out.println(\"La suma del precio de los Laptops es de \" + totalLaptops); \n System.out.println(\"La suma del precio de los Desktops es de \" + totalDesktops);\n }",
"private void cpu_jogada(){\n\n for(i=0;i<8;i++){\n for(j=0;j<8;j++){\n if(matriz[i][j] == jd2){\n // verificarAtaque(i,j,jd2);\n //verificarAtaque as posssibilidades de\n // ataque : defesa : aleatorio\n //ataque tem prioridade 1 - ve se tem como comer quem ataca\n //defesa tem prioridade 2 - ou movimenta a peca que esta sob ataque ou movimenta a outa para ajudar\n //aleatorio nao tem prioridade -- caso nao esteja sob ataque ou defesa\n }\n }\n }\n }",
"public void run (){\n\t\ttry{\n\t\t\tthis.sleep(tiempoEspera);\n\t\t}catch(InterruptedException ex){\n\t\t\tif(debug>0)System.err.println(\"WARNING:Temporizador interrumpido antes de tiempo de forma inesperada\");\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tEvent ev = new Event(Event.TIME_OUT);\n\t\tbuzon.meter(ev);\n }",
"public void sumaPuntos() {\r\n int rojo = 0;\r\n int azul = 0;\r\n for (int i = 1; i < 10; i++) {\r\n\r\n if (tablero[1][i].getTipo().equals(\"Rojo\")) {\r\n rojo += tablero[1][i].getValor();\r\n }\r\n\r\n if (tablero[8][i].getTipo().equals(\"Azul\")) {\r\n azul += tablero[8][i].getValor();\r\n }\r\n\r\n }\r\n if (rojo > azul) {\r\n this.setResultado(\"Rojo\");\r\n this.agregarVictoria(jugadorRojo);\r\n }\r\n if (azul > rojo) {\r\n this.setResultado(\"Azul\");\r\n this.agregarVictoria(jugadorAzul);\r\n }\r\n \r\n this.setReplay(true);\r\n }",
"public static void atacar(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n int ataqueJugador;\n //acciones de la funcion atacar sobre vida del enemigo\n aleatorio = (numeroAleatorio.nextInt(20-10+1)+10);\n ataqueJugador= ((nivel+1)*10)+aleatorio;\n puntosDeVidaEnemigo= puntosDeVidaEnemigo-ataqueJugador;\n \n }",
"public void setTiempoEspera(int tiempoEspera) {\n this.tiempoEspera = tiempoEspera;\n }",
"public int getSit_time()\n\t{\n\t\treturn sit_time;\n\t}"
]
| [
"0.68556404",
"0.6585681",
"0.6575457",
"0.6558005",
"0.6500158",
"0.6438496",
"0.62161505",
"0.6143818",
"0.6134352",
"0.6105389",
"0.60501075",
"0.5999134",
"0.59916484",
"0.5962564",
"0.5870423",
"0.58556575",
"0.58549774",
"0.580652",
"0.5786569",
"0.5783086",
"0.5783032",
"0.5769887",
"0.57613546",
"0.5751175",
"0.5747509",
"0.5738538",
"0.57240844",
"0.5717134",
"0.5714941",
"0.57130045",
"0.5682073",
"0.5676023",
"0.5659158",
"0.5655141",
"0.56528294",
"0.56516945",
"0.5644738",
"0.564311",
"0.5624581",
"0.56198084",
"0.5616492",
"0.56125903",
"0.56049913",
"0.5603902",
"0.5597076",
"0.55821073",
"0.557686",
"0.5570726",
"0.55639535",
"0.5550099",
"0.5542406",
"0.5541502",
"0.5540425",
"0.5533321",
"0.5532839",
"0.5523821",
"0.55199784",
"0.5519878",
"0.5514845",
"0.5511974",
"0.5510806",
"0.551042",
"0.55025965",
"0.5500616",
"0.54960954",
"0.54939944",
"0.5486237",
"0.54827183",
"0.54820275",
"0.5458755",
"0.54559135",
"0.5447098",
"0.544668",
"0.5444687",
"0.54402214",
"0.5439355",
"0.543637",
"0.543442",
"0.5429187",
"0.5428206",
"0.5427595",
"0.5418738",
"0.54012215",
"0.5398703",
"0.53948784",
"0.53932106",
"0.5384649",
"0.5373184",
"0.5367535",
"0.5367105",
"0.5364684",
"0.5364305",
"0.5362867",
"0.5361541",
"0.5361284",
"0.5358542",
"0.53524894",
"0.53505635",
"0.53503335",
"0.53487116"
]
| 0.59301966 | 14 |
Establecemos las penalizaciones que son leves y las que no, con esto impedimos que las graves puedan ser eliminadas con la regla de las 4 mangas | public Boolean isLowPenal() {
switch (this) {
case DNE: //NO EXCLUIBLE
return false;
case DGM: //NO EXCLUIBLE
return false;
default: // TODAS LAS DEMAS PENALIZACIONES SON EXCLUIBLES
return true;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void disperse() {\t\t\n\t\tfor (int r = 0; r < rows; r++){\n\t\t\tfor (int c = 1; c < cols; c++){\n\t\t\t\tint sum = values[r+1][c-1] + values[r+1][c] + values[r+1][c+1];\n\t\t\t\tif(r < rows - fireLevel + 14){\n\t\t\t\t\tvalues[r][c] = (sum / 3) - 1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvalues[r][c] = (int)((sum / 3.0) - 0.0); \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (values[r][c] < 0) values[r][c] = 0;\n\t\t\t\tg2.setColor(colors[values[r][c]]);\n\t\t\t\tif(values[r][c] > 5){\n\t\t\t\t\tg2.fillRect(c*res,r*res,res,res);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private boolean procesoComer(int a, int b)\n {\n ArrayList<Integer> muertes;\n muertes = animales.get(a).get(b).come();\n if (muertes.get(0) > krill) {\n krill = 0;\n return false;\n } else {\n krill -= muertes.get(0);\n }\n for (int i = 1; i < muertes.size(); i++) {\n for (int j = 0; j < muertes.get(i); j++) {\n if (animales.get(i).size() > 0) {\n animales.get(i).get(0).destruir(); //Reduce en 1 la cantidad\n animales.get(i).remove(0);\n } else {\n return false;\n }\n }\n }\n return true;\n }",
"private void balancearElimina(Vertice<T> v){\n\t//Caso 1 RAIZ\n\tif(v.padre == null){\n\t this.raiz = v;\n\t v.color = Color.NEGRO;\n\t return;\n\t}\n\t//Vertice<T> hermano = getHermano(v);\n\t//Caso 2 HERMANO ROJO\n\tif(getHermano(v).color == Color.ROJO){\n\t v.padre.color = Color.ROJO;\n\t getHermano(v).color = Color.NEGRO;\n\t if(v.padre.izquierdo == v)\n\t\tsuper.giraIzquierda(v.padre);\n\t else\n\t\tsuper.giraDerecha(v.padre);\n\t //Actualizar V\n\t // hermano = getHermano(v);\n\t \n\t}\n\t//Caso 3 TODOS SON NEGROS\n\tif(v.padre.color == Color.NEGRO && existeNegro(getHermano(v)) && existeNegro(getHermano(v).izquierdo) && existeNegro(getHermano(v).derecho)){\n\t getHermano(v).color = Color.ROJO;\n\t //Checar color\n\t //v.color = Color.ROJO; //POR H DE HERMANO 20:00\n\t\tbalancearElimina(v.padre);\n\t\treturn;\n\t}\n\t//Caso 4 HERMANO Y SOBRINOS NEGROS Y PADRE ROJO\n\tif(existeNegro(getHermano(v)) && v.padre.color == Color.ROJO && existeNegro(getHermano(v).izquierdo)\n\t && existeNegro(getHermano(v).derecho)){\n\t v.padre.color = Color.NEGRO;\n\t getHermano(v).color = Color.ROJO;\n\t return;\n\t \n\t}\n\t//Caso 5 HERMANO NEGRO Y SOBRINOS BICOLORES\n\tif(getHermano(v).color == Color.NEGRO && (!(existeNegro(getHermano(v).izquierdo) && existeNegro(getHermano(v).derecho)))){\n\t if(v.padre.derecho == v){\n\t if(!existeNegro(getHermano(v).derecho)){\n\t\t getHermano(v).color = Color.ROJO;\n\t\t getHermano(v).derecho.color = Color.NEGRO;\n\t\t super.giraIzquierda(getHermano(v));\n\t }else{\n\t\t if(!existeNegro(getHermano(v).izquierdo)){\n\t\t getHermano(v).color = Color.ROJO;\n\t\t getHermano(v).izquierdo.color = Color.NEGRO;\t \n\t\t super.giraDerecha(getHermano(v));\n\t\t }\n\t }\n\t }\n\t}\n\t//Caso 6 SOBRINO INVERSO DE V ES ROJO\n\tif(v.padre.izquierdo == v){\n\t if(!existeNegro(getHermano(v).derecho)){\n\t\tgetHermano(v).color = v.padre.color;\n\t\t v.padre.color = Color.NEGRO;\n\t\t getHermano(v).derecho.color = Color.NEGRO;\n\t\t super.giraIzquierda(v.padre);\n\t }\n\t}else{\n\t if(!existeNegro(getHermano(v).izquierdo)){\n\t\tgetHermano(v).color = v.padre.color;\n\t\t v.padre.color = Color.NEGRO;\n\t\t getHermano(v).izquierdo.color = Color.NEGRO;\n\t\t super.giraDerecha(v.padre);\n\t }\n\t}\t\n }",
"public void validarVidas(){\n if(validarChoque(lbl_enemigo,lbl_nave1)){\n vidas_n1--;\n System.out.println(\"Vidas nave1 \"+vidas_n1);\n if(vidas_n1 == 0){\n //cuando borro la nave la mando fuera de la pantalla\n this.lbl_nave1.setLocation(posX, 950);\n this.panel.remove(this.lbl_nave1);\n this.panel.repaint();\n \n }\n this.panel.remove(this.lbl_enemigo);\n this.panel.repaint();\n stop();\n }\n \n //validando choque de enemigos con naves amigas nave 2\n if(validarChoque(lbl_enemigo,lbl_nave2)){\n vidas_n2--;\n System.out.println(\"Vidas nave2 \"+vidas_n2);\n if(vidas_n2==0){\n //cuando borro la nave la mando fuera de la pantalla\n this.lbl_nave2.setLocation(posX, 950);\n this.panel.remove(this.lbl_nave2);\n this.panel.repaint();\n \n }\n this.panel.remove(this.lbl_enemigo);\n this.panel.repaint();\n stop();\n }\n \n //valido que ninguna nave enemiga haya escapado\n Point posEnemigo=this.lbl_enemigo.getLocation();\n if(posEnemigo.y == 480){// si pasa esta posicion ya F\n vidas_n1--;\n vidas_n2--;\n this.panel.remove(this.lbl_enemigo);\n this.panel.repaint();\n stop();\n if(vidas_n1 == 0){\n this.panel.remove(this.lbl_nave1);\n this.panel.repaint();\n }else if(vidas_n2 == 0){\n this.panel.remove(this.lbl_nave2);\n this.panel.repaint();\n }\n }\n \n if(vidas_n1 <= 0 && vidas_n2 <= 0){\n finalizarPartida();\n }\n }",
"private void suppressionCartes () {\r\n\t\tfor (int i = 0; i < 5; i++) {\r\n\t\t\tcartes.put(i, new JVide(carte_lg, carte_ht));\r\n\t\t}\r\n\t\tthis.formerTable();\r\n\t}",
"public void UnDia()\n {\n int i = 0;\n for (i = 0; i < 6; i++) {\n for (int j = animales.get(i).size() - 1; j >= 0; j--) {\n\n if (!procesoComer(i, j)) {\n animales.get(i).get(j).destruir();\n animales.get(i).remove(j);\n } else {\n if (animales.get(i).size() > 0 && j < animales.get(i).size()) {\n\n if (animales.get(i).get(j).reproducirse()) {\n ProcesoReproducirse(i, j);\n }\n if (j < animales.get(i).size()) {\n if (animales.get(i).get(j).morir()) {\n animales.get(i).get(j).destruir();\n animales.get(i).remove(j);\n }\n }\n }\n }\n\n }\n }\n if (krill == 0) {\n Utilidades.MostrarExtincion(0, dia);\n }\n modificarKrill();\n modificarTemperatura();\n ejecutarDesastres();\n for (i = 1; i < animales.size(); i++) {\n if (animales.get(i).size() == 0 && !extintos.get(i)) {\n extintos.set(i, true);\n Utilidades.MostrarExtincion(i, dia);\n }\n }\n dia++;\n System.out.println(dia + \":\" + krill + \",\" + animales.get(1).size() + \",\" + animales.get(2).size() + \",\" + animales.get(3).size() + \",\" + animales.get(4).size() + \",\" + animales.get(5).size());\n }",
"void evoluer()\n {\n int taille = grille.length;\n int nbVivantes = 0;\n for(int i=-1; i<2; i++)\n {\n int xx = ((x+i)+taille)%taille; // si x+i=-1, xx=taille-1. si x+i=taille, xx=0\n for(int j=-1; j<2; j++)\n {\n if (i==0 && j==0) continue;\n int yy = ((y+j)+taille)%taille;\n if (grille[xx][yy].vivante) nbVivantes++;\n }\n }\n if (nbVivantes<=1 || nbVivantes>=4) {vientDeChanger = (vivante==true); vivante = false;}\n if (nbVivantes==3) {vientDeChanger = (vivante==false); vivante = true;}\n }",
"public void decida(){\n int vecinasVivas=vecinos();\n if(vecinasVivas==3 && estadoActual=='m'){\n estadoSiguiente='v';\n }else if((estadoActual=='v' && vecinasVivas==2) || (estadoActual=='v' && vecinasVivas==3)){\n estadoSiguiente='v';\n }else if(vecinasVivas<2 || vecinasVivas>3){\n estadoSiguiente='m';\n }\n }",
"public void calculEtatSuccesseur() { \r\n\t\tboolean haut = false,\r\n\t\t\t\tbas = false,\r\n\t\t\t\tgauche = false,\r\n\t\t\t\tdroite = false,\r\n\t\t\t\thautGauche = false,\r\n\t\t\t\tbasGauche = false,\r\n\t\t\t\thautDroit = false,\r\n\t\t\t\tbasDroit = false;\r\n\t\t\r\n\t\tString blanc = \" B \";\r\n\t\tString noir = \" N \";\r\n\t\tfor(Point p : this.jetonAdverse()) {\r\n\t\t\tString [][]plateau;\r\n\t\t\tplateau= copieEtat();\r\n\t\t\tint x = (int) p.getX();\r\n\t\t\tint y = (int) p.getY();\r\n\t\t\tif(this.joueurActuel.getCouleur() == \"noir\") { //dans le cas ou le joueur pose un pion noir\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\t\r\n\t\t\t\tif(p.getY()>0 && p.getY()<plateau[0].length-1 && p.getX()>0 && p.getX()<plateau.length-1) { //on regarde uniquement le centre du plateaau \r\n\t\t\t\t\t//on reinitialise x,y et plateau a chaque étape\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tdroite = getDroite(x,y,blanc);\r\n\t\t\t\t\thaut = getHaut(x, y, blanc);\r\n\t\t\t\t\tbas = getBas(x, y, blanc);\r\n\t\t\t\t\tgauche = getGauche(x, y, blanc);\r\n\t\t\t\t\thautDroit = getDiagHautdroite(x, y, blanc);\r\n\t\t\t\t\thautGauche = getDiagHautGauche(x, y, blanc);\r\n\t\t\t\t\tbasDroit = getDiagBasDroite(x, y, blanc);\r\n\t\t\t\t\tbasGauche = getDiagBasGauche(x, y, blanc);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y-1]==noir) {//regarder si à gauche du pion blanc il y a un pion noir\r\n\r\n\t\t\t\t\t\t//on regarde si il est possible de poser un pion noir à droite\r\n\t\t\t\t\t\tif(droite) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//1\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x-1][y]==noir) {//regardre au dessus si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(bas) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tplateau[x][y]= noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//2\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y+1]==noir) { //regarde a droite si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(gauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y]= noir;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//3\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x+1][y] == noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(haut) {\r\n\t\t\t\t\t\t\t//System.out.println(\"regarde en dessous\");\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//4\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautgauche\r\n\t\t\t\t\tif(this.plateau[x+1][y+1]==noir) {\r\n\t\t\t\t\t\tif(hautGauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//5\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagbasGauche\r\n\t\t\t\t\tif(this.plateau[x-1][y+1]==noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(basGauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}//6\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautDroit : OK!\r\n\t\t\t\t\tif(this.plateau[x+1][y-1]==noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(hautDroit) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}//7\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagBasDroit\r\n\t\t\t\t\tif(this.plateau[x-1][y-1]==noir) {\r\n\t\t\t\t\t\tif(basDroit) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t//System.out.println(\"ajouté!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//8\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse {//si le joueur actuel a les pions blanc\r\n\t\t\t\tif(p.getY()>0 && p.getY()<plateau[0].length-1 && p.getX()>0 && p.getX()<plateau.length-1) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x][y-1]==blanc) {//regarder si à gauche du pion blanc il y a un pion noir\r\n\t\t\t\t\t\t//on regarde si il est possible de poser un pion noir à droite\r\n\t\t\t\t\t\tif(getDroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\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\t}//1.1\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x-1][y]==blanc) {//regardre au dessus si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getBas(x, y, noir)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//2.2\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y+1]==blanc) { //regarde a droite si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getGauche(x, y, noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//3.3\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x+1][y] == blanc) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getHaut(x, y, noir)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//4.4\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautgauche\r\n\t\t\t\t\tif(this.plateau[x+1][y+1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagHautGauche(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//5.5\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagbasGauche\r\n\t\t\t\t\tif(this.plateau[x-1][y+1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagBasGauche(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//6.6\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautDroit\r\n\t\t\t\t\tif(this.plateau[x+1][y-1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagHautdroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}//7.7\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagBasDroit\r\n\t\t\t\t\tif(this.plateau[x-1][y-1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagBasDroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//8.8\r\n\r\n\t\t\t\t\t\r\n\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}\r\n\t}",
"public void diminueVies() {\n\n nbVies_restantes.set(nbVies_restantes.get()-1);\n\n }",
"public void dessiner() {\n\t\tafficherMatriceLignes(m.getCopiePartielle(progresAffichage), gc);\r\n\t}",
"public void removeDeadVampires() {\n\n for (int i = 0; i < Vampiro.getNumVamp(); i++) {\n if (lista[i].getVida() <= 0)\n delVampire(i);\n }\n }",
"private void moverJogadorAPosicao(int jogador, int valorDados, boolean iguais) {\n int tentativasDeSairDaPrisao = this.listaJogadores.get(jogadorAtual()).getTentativasSairDaPrisao();\n //Analisando se o cara esta preso, se a prisao ta ativada e se o cara tentou um numero de vezes menos que tres\n //ou se a funcao prisao esta falsa\n //ou se o jogador nao esta preso\n if ((JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && iguais && this.prisao == true && tentativasDeSairDaPrisao <= 2) || this.prisao == false || (!JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && this.prisao == true)) {\n if (JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && iguais && this.prisao == true && tentativasDeSairDaPrisao < 2);\n {\n this.sairdaPrisao(this.listaJogadores.get(jogadorAtual()));\n this.listaJogadores.get(jogadorAtual()).setTentativasSairDaPrisao(0);\n }\n this.posicoes[jogador] = (this.posicoes[jogador] + valorDados);\n if (posicoes[jogador] > 40) {\n posicoes[jogador] = posicoes[jogador] - 40;\n }\n }\n\n //analisando se o jogador esta preso e lanca numeros diferentes nos dados\n if (JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && !iguais && this.prisao == true) {\n //analisa se estourou as tentativas\n //se estourou\n if (this.listaJogadores.get(jogadorAtual()).getTentativasSairDaPrisao() == 2) {\n this.sairdaPrisao(this.listaJogadores.get(jogadorAtual()));\n this.listaJogadores.get(jogadorAtual()).retirarDinheiro(50);\n this.listaJogadores.get(jogadorAtual()).setTentativasSairDaPrisao(0);\n this.posicoes[jogador] = (this.posicoes[jogador] + valorDados);\n if (posicoes[jogador] > 40) {\n posicoes[jogador] = posicoes[jogador] - 40;\n }\n\n } //se nao estourou\n else if (this.listaJogadores.get(jogadorAtual()).getTentativasSairDaPrisao() < 2) {\n this.listaJogadores.get(jogadorAtual()).addTentativasSairDaPrisao();\n }\n\n\n }\n\n\n }",
"public static void quienHaGanado(Mano[] jugadores, int actual,int carro){\n if(jugadores[actual].getNPiezas()!=0){\n boolean dosIguales=false;\n actual=0;\n for (int i = 1; i < jugadores.length; i++) {\n if(jugadores[i].getPuntuacion()==jugadores[actual].getPuntuacion()){//El jug i y el actual tienen la misma putnuacion\n if(i==carro){//el jugador i es el carro\n actual=i;\n dosIguales=false;\n }\n else if(actual==carro){//el jugador actual es el carro\n dosIguales=false;\n }\n else{//ninguno es el carro y hay que acudir a un metodo para nombrar a los dos ganadores.\n dosIguales=true;\n }\n }\n if(jugadores[i].getPuntuacion()<jugadores[actual].getPuntuacion()){//el jugador i tiene menor puntuacion que el jugador actual\n actual=i;\n dosIguales=false;\n }\n }\n if(dosIguales){\n System.out.println(\"pene\");\n Excepciones.cambiarColorAzul(\"Y los GANADORES SON....\");\n for (int i = 0; i < jugadores.length; i++) {\n if (jugadores[i].getPuntuacion()==jugadores[actual].getPuntuacion()) {\n //System.out.println(\"\\t\\t\\u001B[34mEl jugador nº- \"+(i+1)+\": \"+jugadores[i].getNombre());\n Excepciones.cambiarColorAzul(\"\\t\\tEl jugador nº- \"+(i+1)+\": \"+jugadores[i].getNombre());\n }\n }\n System.out.println(\"\\u001B[30m\");\n }\n else{\n Excepciones.cambiarColorAzul(\"Y el GANADOR ES....\");\n //System.out.println(\"\\t\\t\\u001B[34mEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre()+\"\\u001B[30m\");\n Excepciones.cambiarColorAzul(\"\\t\\tEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre());\n }\n }\n else {\n Excepciones.cambiarColorAzul(\"Y el GANADOR ES....\");\n //System.out.println(\"\\t\\t\\u001B[34mEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre()+\"\\u001B[30m\");\n Excepciones.cambiarColorAzul(\"\\t\\tEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre());\n }\n }",
"public void hallarPerimetroIsosceles() {\r\n this.perimetro = 2*(this.ladoA+this.ladoB);\r\n }",
"private void moverJogadorDaVez(int dado1, int dado2) throws Exception {\n // System.out.println(\"moverJogadorDaVez\" + dado1 + \" , \" + dado2);\n\n print(\"\\ttirou nos dados: \" + dado1 + \" , \" + dado2);\n int valorDados = dado1 + dado2;\n\n int jogador = this.jogadorAtual();\n\n boolean ValoresIguais = false;\n\n\n //preciso saber se o jogador vai passar pela posição 40, o que significa\n //ganhar dinheiro\n this.completouVolta(jogador, valorDados);\n\n if (dado1 == dado2) {\n ValoresIguais = true;\n } else {\n ValoresIguais = false;\n }\n\n //movendo à posição\n this.moverJogadorAPosicao(jogador, valorDados, ValoresIguais);\n this.print(\"\\tAtual dinheiro antes de ver a compra:\" + this.listaJogadores.get(jogador).getDinheiro());\n this.print(\"\\tVai até a posição \" + this.posicoes[jogador]);\n\n //vendo se caiu na prisao\n if (this.posicoes[this.jogadorAtual()] == 30 && this.prisao == true) {\n adicionaNaPrisao(listaJogadores.get(jogadorAtual()));\n DeslocarJogador(jogador, 10);\n listaJogadores.get(jogadorAtual()).adicionarComandoPay();\n }\n\n\n\n Lugar lugar = this.tabuleiro.get(this.posicoes[jogador] - 1);//busca em -1, pois eh um vetor\n\n\n if (this.isCompraAutomatica()) {\n this.realizarCompra(jogador, lugar);\n }\n\n if (!this.posicaoCompravel(this.posicoes[jogador])) {\n this.print(\"\\t\" + lugar.getNome() + \" não está à venda!\");\n\n\n String nomeDono = (String) Donos.get(this.posicoes[jogador]);\n //não cobrar aluguel de si mesmo\n if (!nomeDono.equals(this.listaJogadores.get(this.jogadorAtual()).getNome())) {\n\n if (this.isUmJogador(nomeDono)) {\n Jogador possivelDono = this.getJogadorByName(nomeDono);\n\n if (this.isPosicaoFerrovia(this.posicoes[jogador])) {\n this.print(\"\\tO dono eh \" + possivelDono.getNome());\n if (!lugar.estaHipotecada()) {\n this.pagarFerrovia(possivelDono.getId(), jogador, 25, lugar.getNome());\n }\n } else {\n\n this.print(\"\\tO dono eh \" + possivelDono.getNome());\n int valorAluguel = 0;\n if (this.posicoes[this.jogadorAtual()] != 12 && this.posicoes[this.jogadorAtual()] != 28) {\n valorAluguel = this.tabuleiro.getLugarPrecoAluguel(this.posicoes[jogador]);\n\n } else {\n if (possivelDono.getQuantidadeCompanhias() == 1) {\n valorAluguel = 4 * valorDados;\n\n }\n if (possivelDono.getQuantidadeCompanhias() == 2) {\n valorAluguel = 10 * valorDados;\n\n }\n }\n if (!lugar.estaHipotecada()) {\n this.pagarAluguel(possivelDono.getId(), jogador, valorAluguel, lugar.getNome());\n }\n\n }\n\n }\n }\n\n }\n\n\n this.pagarEventuaisTaxas(jogador);\n\n if ((this.posicoes[this.jogadorAtual()] == 2 || this.posicoes[jogadorAtual()] == 17 || this.posicoes[jogadorAtual()] == 33) && cards == true) {\n realizaProcessamentoCartaoChest();\n }\n\n if ((this.posicoes[this.jogadorAtual()] == 7 || this.posicoes[jogadorAtual()] == 22 || this.posicoes[jogadorAtual()] == 36) && cards == true) {\n realizaProcessamentoCartaoChance();\n }\n\n\n\n\n this.print(\"\\tAtual dinheiro depois:\" + this.listaJogadores.get(jogador).getDinheiro());\n\n\n\n }",
"private void calculeStatRemove() {\n resourceA = this.getContext().getGame().getPlayer(idPlayer).getInventory().getValueRessource(type);\n int loose = resourceB - resourceA;\n int diff = (resourceA - resourceB) + value;\n this.getContext().getStats().incNbRessourceLoosePlayers(idPlayer,type,loose);\n this.getContext().getStats().incNbRessourceNotLoosePlayers(idPlayer,type,diff);\n }",
"private void compruebaColisiones()\n {\n // Comprobamos las colisiones con los Ufo\n for (Ufo ufo : ufos) {\n // Las naves Ufo chocan con la nave Guardian\n if (ufo.colisionaCon(guardian) && ufo.getVisible()) {\n mensajeDialogo(0);\n juego = false;\n }\n // Las naves Ufo llegan abajo de la pantalla\n if ((ufo.getPosicionY() - ufo.getAlto() > altoVentana)) {\n mensajeDialogo(0);\n juego = false;\n }\n // El disparo de la nave Guardian mata a una nave Ufo\n if (ufo.colisionaCon(disparoGuardian) && ufo.getVisible()) {\n ufo.setVisible(false);\n disparoGuardian.setVisible(false);\n disparoGuardian.setPosicion(0, 0);\n ufosMuertos++;\n }\n }\n\n // El disparo de las naves Ufo mata a la nave Guardian\n if (guardian.colisionaCon(disparoUfo)) {\n disparoUfo.setVisible(false);\n mensajeDialogo(0);\n juego = false;\n }\n\n // Si el disparo Guardian colisiona con el disparo de los Ufo, se\n // eliminan ambos\n if (disparoGuardian.colisionaCon(disparoUfo)) {\n disparoGuardian.setVisible(false);\n disparoGuardian.setPosicion(0, 0);\n disparoUfo.setVisible(false);\n }\n }",
"public void ispisiSveNapomene() {\r\n\t\tint i = 0;// redni broj napomene\r\n\t\tint brojac = 0;\r\n\t\tfor (Podsjetnik podsjetnik : lista) {\r\n\r\n\t\t\ti++;\r\n\t\t\tSystem.out.println(i + \")\" + podsjetnik);\r\n\t\t\tbrojac = i;\r\n\t\t}\r\n\t\tif (brojac == 0) {\r\n\t\t\tSystem.out.println(\"Nema unesenih napomena!!\");\r\n\t\t}\r\n\r\n\t}",
"void negarAnalise();",
"private void calculadorNotaFinal() {\n\t\t//calculo notaFinal, media de las notas medias\n\t\tif(this.getAsignaturas() != null) {\n\t\t\t\tfor (Iterator<Asignatura> iterator = this.asignaturas.iterator(); iterator.hasNext();) {\n\t\t\t\t\tAsignatura asignatura = (Asignatura) iterator.next();\n\t\t\t\t\tif(asignatura.getNotas() != null) {\n\t\t\t\t\tnotaFinal += asignatura.notaMedia();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//curarse en salud con division entre 0\n\t\t\t\tif(this.getAsignaturas().size() != 0) {\n\t\t\t\tnotaFinal /= this.getAsignaturas().size();\n\t\t\t\t}\n\t\t}\n\t}",
"public void zmiana_rozmiaru_okna()\n {\n b.dostosowanie_rozmiaru(getWidth(),getHeight());\n w.dostosowanie_rozmiaru(getWidth(),getHeight());\n\n for (Pilka np : p) {\n np.dostosowanie_rozmiaru(getWidth(),getHeight());\n }\n for (Naboj np : n) {\n np.dostosowanie_rozmiaru(getWidth(),getHeight());\n }\n for (Bonus np : bon) {\n np.dostosowanie_rozmiaru(getWidth(),getHeight());\n }\n\n }",
"private void verificarColisiones() {\n if(inmunidadRamiro){\n tiempoInmunidadRamiro += Gdx.graphics.getDeltaTime();\n }\n if(tiempoInmunidadRamiro>=6f){//despues de 0.6 seg, vuelve a ser vulnerable\n inmunidadRamiro=false;\n tiempoInmunidadRamiro=0f;\n ramiro.setEstadoItem(Ramiro.EstadoItem.NORMAL);\n musicaRayo.stop();\n if(music){\n musicaFondo.play();\n }\n\n }\n\n if (inmunidad){//Para evitar bugs, Ramiro puede tomar damage cada cierto tiempo...\n //Se activa cada vez que toma damage\n tiempoInmunidad+=Gdx.graphics.getDeltaTime();\n }\n if(tiempoInmunidad>=0.6f){//despues de 0.6 seg, vuelve a ser vulnerable\n inmunidad=false;\n tiempoInmunidad=0f;\n }\n if (inmunidadItem){\n tiempoInmunidadItem+=Gdx.graphics.getDeltaTime();\n }\n if(tiempoInmunidadItem>=0.6f){\n inmunidadItem=false;\n tiempoInmunidadItem=0f;\n\n }\n //Verificar colisiones de Item Corazon.\n for (int i=arrCorazonesItem.size-1; i>=0; i--) {\n Corazon cora = arrCorazonesItem.get(i);\n\n if(ramiro.sprite.getBoundingRectangle().overlaps(cora.sprite.getBoundingRectangle())){//Colision de Item\n if(inmunidadItem!=true){// asi se evita bugs.\n\n arrCorazonesItem.removeIndex(i);\n agregarCorazon();\n inmunidadItem=true;\n }\n\n }\n\n }\n //Verifica colisiones Rayo emprendedor\n for (int i=arrRayoEmprendedor.size-1; i>=0; i--) {\n RayoEmprendedor rayo= arrRayoEmprendedor.get(i);\n\n if(ramiro.sprite.getBoundingRectangle().overlaps(rayo.sprite.getBoundingRectangle())){//Colision de Item\n if(inmunidadItem!=true){// asi se evita bugs.\n\n arrRayoEmprendedor.removeIndex(i);\n inmunidadRamiro();\n\n }\n\n }\n\n }\n //coalisiones de las tareas\n for (int i=arrTarea.size-1; i>=0; i--) {\n Tarea tarea = arrTarea.get(i);\n\n if(ramiro.sprite.getBoundingRectangle().overlaps(tarea.sprite.getBoundingRectangle())){//Colision de Item\n if(inmunidadItem!=true){// asi se evita bugs.\n agregarPuntos();\n arrTarea.removeIndex(i);\n inmunidadItem=true;\n }\n\n }\n\n }\n\n\n //Verifica colisiones de camioneta\n if(estadoMapa==EstadoMapa.RURAL || estadoMapa==EstadoMapa.RURALURBANO){\n for (int i=arrEnemigosCamioneta.size-1; i>=0; i--) {\n Camioneta camioneta = arrEnemigosCamioneta.get(i);\n\n // Gdx.app.log(\"Width\",\"width\"+vehiculo.sprite.getBoundingRectangle().width);\n if(ramiro.sprite.getBoundingRectangle().overlaps(camioneta.sprite.getBoundingRectangle())){//Colision de camioneta\n //Ramiro se vuelve inmune 0.6 seg\n\n if(inmunidad!=true){//Si no ha tomado damage, entoces se vuelve inmune, asi se evita bugs.\n if(vidas>0){//Mientras te queden vidas en el arreglo\n quitarCorazones();//Se resta una vida\n }\n inmunidad=true;\n }\n\n }\n\n }\n\n for (int i=arrEnemigoAve.size-1; i>=0; i--) {\n Ave ave = arrEnemigoAve.get(i);\n\n // Gdx.app.log(\"Width\",\"width\"+vehiculo.sprite.getBoundingRectangle().width);\n if(ramiro.sprite.getBoundingRectangle().overlaps(ave.sprite.getBoundingRectangle())){//Colision de camioneta\n //Ramiro se vuelve inmune 0.6 seg\n\n if(inmunidad!=true){//Si no ha tomado damage, entoces se vuelve inmune, asi se evita bugs.\n if(vidas>0){//Mientras te queden vidas en el arreglo\n quitarCorazones();//Se resta una vida\n }\n inmunidad=true;\n }\n\n }\n\n }\n }\n\n //Verifica colisiones de carro de Lujo\n if(estadoMapa==EstadoMapa.URBANO || estadoMapa == EstadoMapa.URBANOUNIVERSIDAD){\n for (int i=arrEnemigosAuto.size-1; i>=0; i--) {\n Auto cocheLujo = arrEnemigosAuto.get(i);\n\n // Gdx.app.log(\"Width\",\"width\"+vehiculo.sprite.getBoundingRectangle().width);\n if(ramiro.sprite.getBoundingRectangle().overlaps(cocheLujo.sprite.getBoundingRectangle())){//Colision de camioneta\n //Ramiro se vuelve inmune 0.6 seg\n\n if(inmunidad!=true){//Si no ha tomado damage, entoces se vuelve inmune, asi se evita bugs.\n if(vidas>0){//Mientras te queden vidas en el arreglo\n quitarCorazones();//Se resta una vida\n }\n inmunidad=true;\n }\n\n }\n\n }\n\n for (int i=arrEnemigoAve.size-1; i>=0; i--) {\n Ave ave = arrEnemigoAve.get(i);\n\n // Gdx.app.log(\"Width\",\"width\"+vehiculo.sprite.getBoundingRectangle().width);\n if(ramiro.sprite.getBoundingRectangle().overlaps(ave.sprite.getBoundingRectangle())){//Colision de camioneta\n //Ramiro se vuelve inmune 0.6 seg\n\n if(inmunidad!=true){//Si no ha tomado damage, entoces se vuelve inmune, asi se evita bugs.\n if(vidas>0){//Mientras te queden vidas en el arreglo\n quitarCorazones();//Se resta una vida\n }\n inmunidad=true;\n }\n\n }\n\n }\n }\n\n //Verifica colisiones de carrito de golf\n if(estadoMapa==EstadoMapa.UNIVERSIDAD){\n for (int i=arrEnemigosCarritoGolf.size-1; i>=0; i--) {\n AutoGolf carritoGolf = arrEnemigosCarritoGolf.get(i);\n\n // Gdx.app.log(\"Width\",\"width\"+vehiculo.sprite.getBoundingRectangle().width);\n if(ramiro.sprite.getBoundingRectangle().overlaps(carritoGolf.sprite.getBoundingRectangle())){//Colision de camioneta\n //Ramiro se vuelve inmune 0.6 seg\n\n if(inmunidad!=true){//Si no ha tomado damage, entoces se vuelve inmune, asi se evita bugs.\n if(vidas>0){//Mientras te queden vidas en el arreglo\n quitarCorazones();//Se resta una vida\n }\n inmunidad=true;\n }\n\n }\n\n }\n }\n\n //Verifica colisiones de las lamparas\n if(estadoMapa==EstadoMapa.SALONES){\n for (int i=arrEnemigoLampara.size-1; i>=0; i--) {\n Lampara lampara = arrEnemigoLampara.get(i);\n\n // Gdx.app.log(\"Width\",\"width\"+vehiculo.sprite.getBoundingRectangle().width);\n if(ramiro.sprite.getBoundingRectangle().overlaps(lampara.sprite.getBoundingRectangle())){//Colision de camioneta\n //Ramiro se vuelve inmune 0.6 seg\n\n if(inmunidad!=true){//Si no ha tomado damage, entoces se vuelve inmune, asi se evita bugs.\n if(vidas>0){//Mientras te queden vidas en el arreglo\n quitarCorazones();//Se resta una vida\n }\n inmunidad=true;\n }\n\n }\n\n }\n //Verifica colisiones de las sillas\n for (int i=arrEnemigoSilla.size-1; i>=0; i--) {\n Silla silla = arrEnemigoSilla.get(i);\n\n // Gdx.app.log(\"Width\",\"width\"+vehiculo.sprite.getBoundingRectangle().width);\n if(ramiro.sprite.getBoundingRectangle().overlaps(silla.sprite.getBoundingRectangle())){//Colision de camioneta\n //Ramiro se vuelve inmune 0.6 seg\n\n if(inmunidad!=true){//Si no ha tomado damage, entoces se vuelve inmune, asi se evita bugs.\n if(vidas>0){//Mientras te queden vidas en el arreglo\n quitarCorazones();//Se resta una vida\n }\n inmunidad=true;\n }\n\n }\n\n }\n }\n\n\n\n\n }",
"private void BajarPieza1posicion() {\n for (int i = 0; i < 4; ++i) {\r\n int x = posicionX + piezaActual.x(i);\r\n int y = posicionY - piezaActual.y(i);\r\n piezas[(y * anchoTablero) + x] = piezaActual.getPieza();\r\n }\r\n\r\n BorrarLineas();\r\n\r\n if (!finalizoQuitarFilas) {\r\n nuevaPieza();\r\n }\r\n }",
"private static boolean nivelPasado() {\r\n\t\tint[] contPelotas = new int[ COLORES_POSIBLES.length ]; // Contadores por color\r\n\t\tfor (int i=0; i<tablero.size(); i++) {\r\n\t\t\tPelota pelota = tablero.getPelota(i);\r\n\t\t\tint contColor = Arrays.asList(COLORES_POSIBLES).indexOf( pelota.getColor() ); // Posición del color de la pelota en el array de contadores\r\n\t\t\tcontPelotas[contColor]++;\r\n\t\t}\r\n\t\tfor (int contador : contPelotas) if (contador>=tamanyoTablero-2) return false;\r\n\t\treturn true;\r\n\t}",
"void unsetMultipleBetMinimum();",
"public void decida(){\r\n int f=this.getFila();\r\n int c=this.getColumna();\r\n int cont=alRededor(f,c);\r\n if(this.isVivo()){\r\n if(cont==2 || cont==3){\r\n estadoSiguiente=VIVA;\r\n }else/* if(cont==1 || cont>3)*/{\r\n estadoSiguiente=MUERTA;\r\n }\r\n }else{\r\n if(cont==3){\r\n estadoSiguiente=VIVA;\r\n }else if(cont==1 || cont>3){\r\n estadoSiguiente=MUERTA;\r\n }\r\n }\r\n }",
"private void cuentaminas() {\n\t//TODO: falta por hacer que calcule lasminas en el borde exterior\n\t//Probar a hacerlo con un try catch\n\tint minas = 0;\n\n\tfor (int i = 0; i < filas; i++) {\n\t for (int j = 0; j < columnas; j++) {\n\t\t//\t1 2 3\n\t\t//\t4 X 5\n\t\t//\t6 7 8\n\t\ttry {\n\t\t minas += arrayBotones[i - 1][j - 1].getMina();//1\n\n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t minas += arrayBotones[i - 1][j].getMina();//2\n\n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t minas += arrayBotones[i - 1][j + 1].getMina();//3\n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t minas += arrayBotones[i][j - 1].getMina();//4\n\n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t minas += arrayBotones[i][j + 1].getMina();//5\n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t minas += arrayBotones[i + 1][j - 1].getMina();//6 \t\t \n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t minas += arrayBotones[i + 1][j].getMina();//7\n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t minas += arrayBotones[i + 1][j + 1].getMina();//8\n\t\t} catch (Exception e) {\n\t\t}\n\t\tarrayBotones[i][j].setNumeroMinasAlrededor(minas);\n\t\t//TODO: comentar la siguiente parte para que no aparezcan los numeros al iniciar\n//\t\tif (arrayBotones[i][j].getMina() == 0 && minas != 0) {\n//\t\t arrayBotones[i][j].setText(String.valueOf(minas));\n//\t\t}\n\t\tminas = 0;\n\t }\n\t}\n }",
"private void obsluga_bonusu()\n {\n if(bonusy_poziomu>0)\n {\n boolean numer= los.nextBoolean();\n if(numer){\n bon.add(new Bonus(w.getPolozenie_x(),w.getPolozenie_y(),getWidth(),getHeight()));\n bonusy_poziomu--;\n }\n }\n }",
"public void ganarDineroPorAutomoviles() {\n for (Persona p : super.getMundo().getListaDoctores()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n for (Persona p : super.getMundo().getListaCocineros()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n for (Persona p : super.getMundo().getListaAlbaniles()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n for (Persona p : super.getMundo().getListaHerreros()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n for (Persona p : super.getMundo().getListaCocineros()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n }",
"public Boolean gorbiernoConPrestamos() {\n if (super.getMundo().getGobierno().getPrestamos().size() > 0)\n return true;\n return false;\n }",
"private void resetPieza() {\n for (int i = 0; i < altoTablero * anchoTablero; ++i) {\r\n piezas[i] = PiezasTetris.NoPieza;\r\n }\r\n }",
"private int obstaculos() {\n\t\treturn this.quadricula.length * this.quadricula[0].length - \n\t\t\t\tthis.ardiveis();\n\t}",
"public boolean undo(){\n\t\t\n\t\tif(this.grillaPrevia == null){\n\t\t\treturn false;\n\t\t}else{\n\t\t\tthis.grilla= (int[][])copyArray(this.grillaPrevia);\t\n\t\t\tthis.currentKeyX = this.currentKeyXPrevia;\n\t\t\tthis.currentKeyY = this.currentKeyYPrevia;\n\t\t\tthis.selected = this.selectedPrevia;\n\t\t\tthis.grillaPrevia = null;\n\t\t\tthis.acumulatedScore -= (2*SenkuPegs.getInstance().getPegs()[this.currentPegType].getScoreValue());\n\t\t\treturn true;\n\t\t}\n\t\t\n\t}",
"public void pleitegeierSperren() {\n kontoMap.values().stream()\n .filter(konto -> konto.getKontostand() < 0)\n .forEach(Konto::sperren);\n }",
"private void resetaPadraoEFundo() {\r\n\t\tdiferencaDeFundoATopo = new BigDecimal(0);\r\n\t\t\r\n\t\tif (!isNovoFundo) {\r\n\t\t\tvalorDoFundoAnterior = new BigDecimal(0);\r\n\t\t}\r\n\r\n\t\tvalorDoTopo = new BigDecimal(0);\r\n\t\tultimoFoiTopo = false;\r\n\t\t\r\n\t\tvalorDoFundo = valorCorrente;\r\n\t\tultimoFoiFundo = true;\r\n\t\t\r\n\t\tcorrecaoCorrente = new BigDecimal(0);\r\n\t\tformouPivoDeCompra = false;\r\n\t\tentrouNoRangeDeInicio = false;\r\n\t\testaNoRangeDeLimite = false;\r\n\t\tformadoSegundoTopo = false;\r\n\t\tformadoTopoRelevante = false;\r\n\t\tformouSegundoFundo = false;\r\n\t}",
"private void pintar_cuadrantes() {\tfor (int f = 0; f < 3; f++)\n//\t\t\tfor (int c = 0; c < 3; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 0; f < 3; f++)\n//\t\t\tfor (int c = 6; c < 9; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 3; f < 6; f++)\n//\t\t\tfor (int c = 3; c < 6; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 6; f < 9; f++)\n//\t\t\tfor (int c = 0; c < 3; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 6; f < 9; f++)\n//\t\t\tfor (int c = 6; c < 9; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\t\n\t\t\n\t\t}",
"public void recolheMao() {\n\t\tcartas[0].visible = false;\n\t\tfor (int i = 4; i <= 15; i++) {\n\t\t\tCartaVisual c = cartas[i];\n\t\t\tif ((c.top != topBaralho) || (c.left != leftBaralho)) {\n\t\t\t\tc.movePara(leftBaralho, topBaralho, 100);\n\t\t\t\tc.setCarta(null);\n\t\t\t\tc.descartada = false;\n\t\t\t\tcartasJogadas.remove(c);\n\t\t\t}\n\t\t}\n\t}",
"@Override\r\n\tpublic double getPregasCutaneas() {\r\n\r\n\t\treturn 0;\r\n\t}",
"private void nourrireLePeuple() {\n\t\t\tint totalDepense = (int)((population * 1) + (populationColoniale * 0.8) + ((armee + armeeDeployee()) * nourritureParArmee));\r\n\t\t\tnourriture -= totalDepense;\r\n\t\t\tenFamine = (nourriture > 0) ? false : true;\r\n\t\t}",
"public Agnello prelevaMontone() {\n\t\tfor (int i=0; i<pecore.size(); i++)\n\t\t\tif ((pecore.get(i) instanceof PecoraAdulta)\n\t\t\t\t\t&& (((PecoraAdulta) pecore.get(i)).isMaschio())) {\n\t\t\t\tnumMontoni--;\n\t\t\t\treturn pecore.remove(i);\n\t\t\t}\n\t\treturn null;\n\t}",
"public void balayer()\r\n {\r\n int tot=0;\r\n for (int i=0;i<LONGUEUR;i++ )\r\n {\r\n for (int j=0; j<LARGEUR; j++ )\r\n {\r\n tot=0;\r\n Haut = lignesHor[i][j];\r\n Droite = lignesVert[i+1][j];\r\n Bas = lignesHor[i][j+1];\r\n Gauche = lignesVert[i][j];\r\n\r\n if (Haut)\r\n {\r\n tot++;\r\n Vision[i][j][1]=1;\r\n }\r\n\r\n if (Droite)\r\n {\r\n tot++;\r\n Vision[i][j][2]=1;\r\n }\r\n\r\n if (Bas)\r\n {\r\n tot++;\r\n Vision[i][j][3]=1;\r\n }\r\n\r\n\r\n if (Gauche)\r\n {\r\n tot++;\r\n Vision[i][j][4]=1;\r\n }\r\n\r\n Vision[i][j][0]=Vision[i][j][1]+Vision[i][j][2]+Vision[i][j][3]+Vision[i][j][4];\r\n }\r\n }\r\n }",
"public void diminuiInSitu(){\n if(quantidade_in_situ>0)\n quantidade_in_situ--;\n else\n return;\n }",
"public void soin() {\n if (!autoriseOperation()) {\n return;\n }\n if (tamagoStats.getXp() >= 2) {\n incrFatigue(-3);\n incrHumeur(3);\n incrFaim(-3);\n incrSale(-3);\n incrXp(-2);\n\n if (tamagoStats.getPoids() == 0) {\n incrPoids(3);\n } else if (tamagoStats.getPoids() == TamagoStats.POIDS_MAX) {\n incrPoids(-3);\n }\n\n setEtatPiece(Etat.NONE);\n tamagoStats.setEtatSante(Etat.NONE);\n\n setChanged();\n notifyObservers();\n }\n }",
"ArrayList<Float> pierwszaPredykcja()\n\t{\n\t\tif (Stale.scenariusz<100)\n\t\t{\n\t\t\treturn pierwszaPredykcjaNormal();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//dla scenariusza testowego cnea predykcji jest ustawiana na 0.30\n\t\t\tArrayList<Float> L1 = new ArrayList<>();\n\t\t\tL1.add(0.30f);\n\t\t\treturn L1;\n\t\t}\n\t}",
"public void takeoutMoney (double amount) {\n if(amount >= 2.0) {\n int numberToRemove = (int) Math.min(getToonie(), amount / 2.0);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 2.0) {\n coins.remove(j);\n break;\n }\n }\n }\n NToonie -= numberToRemove;\n amount -= 2.0 * numberToRemove;\n }\n if(amount >= 1.0) {\n int numberToRemove = (int) Math.min(getLoonie(), amount / 1.0);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 1.0) {\n coins.remove(j);\n break;\n }\n }\n }\n NLoonie -= numberToRemove;\n amount -= 1.0 * numberToRemove;\n }\n if(amount >= 0.25) {\n int numberToRemove = (int) Math.min(getQuarter(), amount / 0.25);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 0.25) {\n coins.remove(j);\n break;\n }\n }\n }\n NQuarter -= numberToRemove;\n amount -= 0.25 * numberToRemove;\n }\n if(amount >= 0.1) {\n int numberToRemove = (int) Math.min(getDime(), amount / 0.1);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 0.1) {\n coins.remove(j);\n break;\n }\n }\n }\n NDime -= numberToRemove;\n amount -= 0.1 * numberToRemove;\n }\n if(amount >= 0.05) {\n int numberToRemove = (int) Math.min(getNickel(), amount / 0.05);\n for(int i = 0; i < numberToRemove; i++) {\n for(int j = 0; j < coins.size(); j++) {\n if(coins.get(j).getValue() == 0.05) {\n coins.remove(j);\n break;\n }\n }\n }\n NNickel -= numberToRemove;\n amount -= 0.05 * numberToRemove;\n }\n }",
"public void zeraEmpates() {\r\n contaEmpates = 0;\r\n }",
"private int cantFantasmasRestantes() {\n // TODO implement here\n return 0;\n }",
"public void removerFinal() {\n switch (totalElementos()) {\n case 0:\n System.out.println(\"lista esta vazia\");\n break;\n case 1:\n this.primeiro = this.ultimo = null;\n this.total--;\n break;\n default:\n ElementoLista elementoTemporarioAnteriorAtual = this.primeiro;\n ElementoLista elementoTemporarioAtual = this.primeiro.irParaProximo();\n for (int i = 1; i < totalElementos(); i++) {\n elementoTemporarioAnteriorAtual = elementoTemporarioAtual;\n elementoTemporarioAtual = elementoTemporarioAtual.irParaProximo();\n }\n\n this.ultimo = elementoTemporarioAnteriorAtual;\n this.ultimo.definirProximo(null);\n this.total--;\n }\n //this.ultimo = this.ultimo.irParaAnterior();\n //this.ultimo.definirProximo(null);\n }",
"public void aumentarMinas(){\n\r\n if(espM==false){\r\n minascerca++;\r\n }\r\n }",
"public int limitesY(){\n int v=0;\n if (columna==0 && fila>0 && fila<15){\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n }\n else if (columna==15 && fila>0 && fila<15){\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n }\n else{v=esquinas();}\n return v;\n }",
"static void palabras(){\n palabras=(stateCountS-1)*(stateCountP-1);\n System.out.println(\"S: \"+(stateCountS-1)+\" P: \"+(stateCountP-1)+\"palabras: \"+palabras);\n int coincidencias=0;\n for(int i=0;i<100005;i++){\n for(int j=0;j<26;j++){\n if(gs[i][j]!=0 && gs[i][j]!=-1 && gp[i][j]!=0 && gp[i][j]!=-1 && gs[i][j]==gp[i][j]){\n ++coincidencias;\n }\n }\n \n }\n System.out.println(coincidencias);\n \n palabras=palabras-coincidencias;\n System.out.println(palabras);\n }",
"public void HandelKlas() {\n\t\tSystem.out.println(\"HandelKlas\");\n\t\tPlansza.getNiewolnikNaPLanszy().Handel(Plansza.getRzemieslnikNaPlanszy());\n\t\tPlansza.getNiewolnikNaPLanszy().Handel(Plansza.getArystokrataNaPlanszy());\n\t\t\n\t\tPlansza.getRzemieslnikNaPlanszy().Handel(Plansza.getNiewolnikNaPLanszy());\n\t\tPlansza.getRzemieslnikNaPlanszy().Handel(Plansza.getArystokrataNaPlanszy());\n\t\t\n\t\tPlansza.getArystokrataNaPlanszy().Handel(Plansza.getNiewolnikNaPLanszy());\n\t\tPlansza.getArystokrataNaPlanszy().Handel(Plansza.getRzemieslnikNaPlanszy());\n\t}",
"private void carregaAvisosGerais() {\r\n\t\tif (codWcagEmag == WCAG) {\r\n\t\t\t/*\r\n\t\t\t * Mudan�as de idioma\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"4.1\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Ignorar arte ascii\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Utilizar a linguagem mais clara e simples poss�vel\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.1\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * navega��o de maneira coerente\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.4\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"11.4\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"12.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer mapa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Abreviaturas\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"4.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer atalho\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"9.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Prefer�ncias (por ex., por idioma ou por tipo de conte�do).\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"11.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * BreadCrumb\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * fun��es de pesquisa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.7\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * front-loading\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.8\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Documentos compostos por mais de uma p�gina\r\n\t\t\t */\r\n\t\t\t// comentado por n�o ter achado equi\r\n\t\t\t// erroOuAviso.add(new ArmazenaErroOuAviso(\"3.10\", AVISO,\r\n\t\t\t// codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Complementar o texto com imagens, etc.\r\n\t\t\t */\r\n\t\t\t// erroOuAviso.add(new ArmazenaErroOuAviso(\"3.11\", AVISO,\r\n\t\t\t// codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Forne�a metadados.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t} else if (codWcagEmag == EMAG) {\r\n\t\t\t/*\r\n\t\t\t * Mudan�as de idioma\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Ignorar arte ascii\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Utilizar a linguagem mais clara e simples poss�vel\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * navega��o de maneira coerente\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.21\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.24\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.11\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer mapa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.17\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Abreviaturas\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer atalho\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Prefer�ncias (por ex., por idioma ou por tipo de conte�do).\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * BreadCrumb\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.6\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * fun��es de pesquisa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.8\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * front-loading\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Documentos compostos por mais de uma p�gina\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Complementar o texto com imagens, etc.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.11\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Forne�a metadados.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.14\", AVISO, codWcagEmag, \"\"));\r\n\t\t}\r\n\r\n\t}",
"public boolean prestamo(){\n boolean prestado = true;\n if (cantPres < cantLibro) {\n cantPres++;\n } else {\n prestado = false;\n }\n return prestado;\n }",
"void unsetSingleBetMinimum();",
"private void unsetValidMoves() {\n\t\tcurrentPos.setFill(Paint.valueOf(\"Dodgerblue\"));\n\n\t\tif(l.upValid) {\n\t\t\ttmp=layout_Circle[l.y-1][l.x];\n\t\t\ttmp.setFill(Paint.valueOf(\"Dodgerblue\"));\n\t\t}\n\n\t\tif(l.leftValid) {\n\t\t\ttmp=layout_Circle[l.y][l.x-1];\n\t\t\ttmp.setFill(Paint.valueOf(\"Dodgerblue\"));\n\t\t}\n\n\t\tif(l.rightValid) {\n\t\t\ttmp=layout_Circle[l.y][l.x+1];\n\t\t\ttmp.setFill(Paint.valueOf(\"Dodgerblue\"));}\n\t}",
"public void remove_transfered_points(int points) {\n\t\tthis.balance = this.balance - points;\n\t\tif(this.balance < 10000) this.status = \"Bronze\";\n\t\telse if(this.balance >= 10000) this.status = \"Silver\";\n\t\t\n\t}",
"private void cpu_jogada(){\n\n for(i=0;i<8;i++){\n for(j=0;j<8;j++){\n if(matriz[i][j] == jd2){\n // verificarAtaque(i,j,jd2);\n //verificarAtaque as posssibilidades de\n // ataque : defesa : aleatorio\n //ataque tem prioridade 1 - ve se tem como comer quem ataca\n //defesa tem prioridade 2 - ou movimenta a peca que esta sob ataque ou movimenta a outa para ajudar\n //aleatorio nao tem prioridade -- caso nao esteja sob ataque ou defesa\n }\n }\n }\n }",
"public void eliminarcola(){\n Cola_banco actual=new Cola_banco();// se crea un metodo actual para indicar los datos ingresado\r\n actual=primero;//se indica que nuestro dato ingresado va a ser actual\r\n if(primero != null){// se usa una condiccion si nuestro es ingresado es diferente de null\r\n while(actual != null){//se usa el while que recorra la cola indicando que actual es diferente de null\r\n System.out.println(\"\"+actual.nombre);// se imprime un mensaje con los datos ingresado con los datos ingresado desde el teclado\r\n actual=actual.siguiente;// se indica que el dato actual pase a ser igual con el apuntador siguente\r\n }\r\n }else{// se usa la condicion sino se cumple la condicion\r\n System.out.println(\"\\n la cola se encuentra vacia\");// se indica al usuario que la cola esta vacia\r\n }\r\n }",
"private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}",
"public static int ruolette(ArrayList<Integer> fitvalores, ArrayList<int[]> poblacion, int semilla){ \n int totalfitnes = 0;\n int totalfitnesnuevo = 0;\n int indtablero = 0;\n int semi=semilla;\n int tpoblacion=poblacion.size();\n int []nuevofitness = new int [fitvalores.size()];\n double []nproporcion = new double [fitvalores.size()];\n ArrayList <Double> proporcion = new ArrayList<>();//proporcion j la ruleta\n ArrayList <Double> ruleta = new ArrayList<>();\n //obtener el max fitnes\n for(int i=0;i<fitvalores.size();i++){ //total de fitnes\n totalfitnes=totalfitnes+fitvalores.get(i);\n }\n \n for(int i=0;i<fitvalores.size();i++){ //poner datos en el nuevo fittnes inverso\n double pro=(tpoblacion*tpoblacion-tpoblacion)-fitvalores.get(i);\n nuevofitness[i]= (int) pro;\n // System.out.println(\"nuevo fitnes\"+nuevofitness[i]);\n } \n for(int i=0;i<fitvalores.size();i++){ //total de fitnes nuevo o inverso\n totalfitnesnuevo=(totalfitnesnuevo+nuevofitness[i]);//para que los mejores casos usen mas espacio\n }\n \n for(int i=0;i<fitvalores.size();i++){ //poner datos en el array proporcion\n double var1=nuevofitness[i];\n double var2=totalfitnesnuevo;\n double pro=var1/var2;\n nproporcion[i]=pro;\n //System.out.println(\"nueva proporcion \"+nproporcion[i]);\n } \n ruleta.add(nproporcion[0]);\n // System.out.println(\"primera propporniaso \"+nproporcion[0]);\n for(int i=1;i<fitvalores.size();i++){ //poner datos en la ruleta\n double var1=ruleta.get(i-1);\n double var2=nproporcion[i];\n ruleta.add(var1+var2);\n //System.out.println(\"ruleta \"+ruleta.get(i));\n }\n double num=randomadec(0,1,semi);\n // System.out.println(\"numero random dec \"+num); \n for(int i=0;i<fitvalores.size();i++){ //poner datos en el array proporcion\n // System.out.println(ruleta.get(i));\n if(num<ruleta.get(i)){\n indtablero=i;\n //System.out.println(\"se guardo el tablero \"+indtablero);\n break;\n }\n }\n return indtablero;//esto devuelve el indice del tablero ganador en la ruleta\n }",
"private Pares(){\n\t\t\tprimero=null;\n\t\t\tsegundo=null;\n\t\t\tdistancia=0;\n\t\t}",
"private boolean canBlackSaveItselfRightAhead(Pedina pedina) {\n boolean condizione1 = false;\n boolean condizione2 = false;\n boolean fine1 = false;\n boolean fine2 = false;\n boolean fine3 = false;\n \n for (int i = 0; i < arrayPedineBianche.size(); i++) {\n if (pedina.getX() + 1 == arrayPedineBianche.get(i).getX()\n && pedina.getY() + 1 == arrayPedineBianche.get(i).getY()) {\n condizione1 = true;\n }\n }\n \n if(controllaSeCasellaLibera(pedina.getX() - 1, pedina.getY() - 1))\n condizione2 = true;\n \n \n if (condizione1 && condizione2) {\n if(pedina.getX() - 1 < 0 || pedina.getY() - 1 < 0)\n return false;\n else {\n if(pedina.getX() + 1 > 7 || pedina.getY() - 1 < 0)\n fine1 = true;\n else {\n for (int i = 0; i < arrayPedineBianche.size(); i++) {\n if (pedina.getX() + 2 == arrayPedineBianche.get(i).getX()\n && pedina.getY() - 2 == arrayPedineBianche.get(i).getY()) {\n fine1 = true;\n }\n }\n }\n \n if(!fine1){\n if(controllaSeCasellaLibera(pedina.getX() + 1, pedina.getY() - 1)) {\n pedina.setXTemp(pedina.getX() + 1);\n pedina.setYTemp(pedina.getY() - 1);\n return true;\n } else\n fine1 = true;\n }\n \n if(pedina instanceof Damone) {\n if(pedina.getX() - 1 < 0 || pedina.getY() + 1 > 7)\n fine2 = true;\n else {\n for (int i = 0; i < arrayPedineBianche.size(); i++) {\n if (pedina.getX() - 2 == arrayPedineBianche.get(i).getX()\n && pedina.getY() + 2 == arrayPedineBianche.get(i).getY()) {\n fine2 = true;\n }\n }\n }\n \n if(!fine2) {\n if(controllaSeCasellaLibera(pedina.getX() - 1, pedina.getY() + 1)) {\n pedina.setXTemp(pedina.getX() - 1);\n pedina.setYTemp(pedina.getY() + 1);\n return true;\n } else\n fine2 = true;\n }\n \n \n for (int i = 0; i < arrayPedineBianche.size(); i++) {\n if (pedina.getX() - 2 == arrayPedineBianche.get(i).getX()\n && pedina.getY() - 2 == arrayPedineBianche.get(i).getY()) {\n fine3 = true;\n }\n }\n \n if(!fine3) {\n pedina.setXTemp(pedina.getX() - 1);\n pedina.setYTemp(pedina.getY() - 1);\n return true;\n } else\n return false;\n \n } else\n return false; \n } \n } else\n return false; \n }",
"public boolean NoEnPantalla() {\n\t\treturn x + xmapa + anchura < 0 ||\n\t\t\t\tx + xmapa - anchura > PanelJuego.ANCHURA ||\n\t\t\t\ty + ymapa + altura < 0 ||\n\t\t\t\ty + ymapa - altura > PanelJuego.ALTURA;\n\t}",
"@Override\n public void imprimir() {\n System.out.println(\"Vehiculos ordenados por precio mayor a menor:\");\n if(a1.precio>a2.precio && a1.precio >m1.precio && a1.precio >m2.precio){\n System.out.println(a1.marca+\"\"+a1.modelo);\n if(a2.precio >m1.precio && a2.precio >m2.precio){\n System.out.println(a2.marca+\"\"+a2.modelo);\n if(m1.precio >m2.precio){\n System.out.println(m1.marca+\"\"+m1.modelo);\n System.out.println(m2.marca+\"\"+m2.modelo);\n }else{\n System.out.println(m2.marca+\"\"+m1.modelo);\n System.out.println(m1.marca+\"\"+m1.modelo);\n \n }\n }else{\n if(m1.precio >a2.precio && m1.precio >m2.precio){\n System.out.println(m1.marca+\"\"+m1.modelo);\n if(a2.precio >m2.precio){\n System.out.println(a2.marca+\"\"+a2.modelo);\n System.out.println(m2.marca+\"\"+m2.modelo);\n }else{\n System.out.println(m2.marca+\"\"+m2.modelo);\n System.out.println(a2.marca+\"\"+a2.modelo);\n \n }\n }else{\n if(m2.precio >a2.precio && m2.precio >m1.precio){\n System.out.println(m2.marca+\"\"+m2.modelo);\n if(m1.precio >a2.precio){\n System.out.println(m1.marca+\"\"+m1.modelo);\n System.out.println(a2.marca+\"\"+a2.modelo);\n }else{\n System.out.println(a2.marca+\"\"+a2.modelo);\n System.out.println(m1.marca+\"\"+m1.modelo);\n }\n }\n }\n }\n }else{\n if(a2.precio>a1.precio && a2.precio >m1.precio && a2.precio >m2.precio){\n System.out.println(a2.marca+\" \"+a2.modelo);\n if(a1.precio >m1.precio && a1.precio >m2.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n if(m1.precio >m2.precio){\n System.out.println(m1.marca+\" \"+m1.modelo);\n System.out.println(m2.marca+\" \"+m2.modelo);\n }else{\n System.out.println(m2.marca+\" \"+m2.modelo);\n System.out.println(m1.marca+\" \"+m1.modelo);\n \n }\n }else{\n if(m1.precio >a1.precio && m1.precio >m2.precio){\n System.out.println(m1.marca+\" \"+m1.modelo);\n if(a1.precio >m2.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(m2.marca+\" \"+m2.modelo);\n }else{\n System.out.println(m2.marca+\" \"+m2.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n \n }\n }else{\n if(m2.precio >a1.precio && m2.precio >m1.precio){\n System.out.println(m2.marca+\" \"+m2.modelo);\n if(m1.precio >a1.precio){\n System.out.println(m1.marca+\" \"+m1.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n }else{\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(m1.marca+\" \"+m1.modelo);\n }\n }\n }\n }\n }else{\n if(m1.precio>a2.precio && m1.precio >a1.precio && m1.precio >m2.precio){\n System.out.println(m1.marca+\" \"+m1.modelo);\n if(a2.precio >a1.precio && a2.precio >m2.precio){\n System.out.println(a2.marca+\" \"+a2.modelo);\n if(a1.precio >m2.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(m2.marca+\" \"+m2.modelo);\n }else{\n System.out.println(m2.marca+\" \"+m2.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n \n }\n }else{\n if(a1.precio >a2.precio && a1.precio >m2.precio){\n System.out.println(a1.marca+\"\"+a1.modelo);\n if(a2.precio >m2.precio){\n System.out.println(a2.marca+\" \"+a2.modelo);\n System.out.println(m2.marca+\" \"+m2.modelo);\n }else{\n System.out.println(m2.marca+\" \"+m2.modelo);\n System.out.println(a2.marca+\" \"+a2.modelo);\n \n }\n }else{\n if(m2.precio >a2.precio && m2.precio >a1.precio){\n System.out.println(m2.marca+\" \"+m2.modelo);\n if(a1.precio >a2.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(a2.marca+\" \"+a2.modelo);\n }else{\n System.out.println(a2.marca+\" \"+a2.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n }\n }\n }\n }\n }else{ \n if(m2.precio>a2.precio && m2.precio >a1.precio && m2.precio >m1.precio){\n System.out.println(m2.marca+\" \"+m2.modelo);\n if(a2.precio >a1.precio && a2.precio >m1.precio){\n System.out.println(a2.marca+\" \"+a2.modelo);\n if(a1.precio >m1.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(m1.marca+\" \"+m1.modelo);\n }else{\n System.out.println(m1.marca+\" \"+m1.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n \n }\n }else{\n if(a1.precio >a2.precio && a1.precio >m1.precio){\n System.out.println(a1.marca+\"\"+a1.modelo);\n if(a2.precio >m1.precio){\n System.out.println(a2.marca+\" \"+a2.modelo);\n System.out.println(m1.marca+\" \"+m1.modelo);\n }else{\n System.out.println(m1.marca+\" \"+m1.modelo);\n System.out.println(a2.marca+\" \"+a2.modelo);\n \n }\n }else{\n if(m1.precio >a2.precio && m1.precio >a1.precio){\n System.out.println(m1.marca+\" \"+m1.modelo);\n if(a1.precio >a2.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(a2.marca+\" \"+a2.modelo);\n }else{\n System.out.println(a2.marca+\" \"+a2.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n }\n }\n }\n }\n } \n \n }\n\n }\n }\n }",
"private void removerPontos(final String matricula, final int pontos) {\n firebase.child(\"Alunos/\" + matricula + \"/pontuacao\").addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n long qtdAtual = (long) dataSnapshot.getValue();\n if (qtdAtual >= pontos) {\n firebase.child(\"Alunos/\" + matricula + \"/pontuacao\").setValue(qtdAtual - pontos);\n Toast.makeText(getContext(), \"Pontuação removida com sucesso.\", Toast.LENGTH_SHORT).show();\n quantidade.setText(\"\");\n\n if (alunoEncontrado == null) {\n Log log = new Log(matricula, pontos);\n log.pontos(\"Remover\");\n } else {\n Log log = new Log(alunoEncontrado, pontos);\n log.pontos(\"Remover\");\n }\n } else {\n Toast.makeText(getContext(), \"Aluno com menor quantidade de pontos que o solicitado.\", Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }",
"public boolean tienePapel()\n {\n //COMPLETE\n return this.hojas > 0;\n }",
"private static void kapazitaetPruefen(){\n\t\tList<OeffentlichesVerkehrsmittel> loev = new ArrayList<OeffentlichesVerkehrsmittel>();\n\t\t\n\t\tLinienBus b1 = new LinienBus();\n\t\tFaehrschiff f1 = new Faehrschiff();\n\t\tLinienBus b2 = new LinienBus();\t\n\t\t\n\t\tloev.add(b1);\n\t\tloev.add(b2);\n\t\tloev.add(f1);\n\t\t\n\t\tint zaehlung = 500;\n\t\tboolean ausreichend = kapazitaetPruefen(loev,500);\n\t\tp(\"Kapazitaet ausreichend? \" + ausreichend);\n\t\t\n\t}",
"public void ruleOutPos(){\n for(int i=0;i<scores.length;i++) {\n for(int j=0;j<scores[i].length;j++) {\n scores[i][j][13] = 0;//0=pass, >0 is fail, set to pass initially\n\n //check Ns - bit crude - what to discount regions with high N\n double ns = (double) scores[i][j][14] / (double) pLens[j];\n if (ns >= minPb | ns >= minPm)//\n scores[i][j][13] += 4;\n\n //probe\n if (hasProbe){\n if (j == 1 | j == 4) {\n double perc = (double) scores[i][j][0] / (double) primers[j].length();\n if (perc >= minPb) {\n scores[i][j][12] = 1;//flag for failed % test\n scores[i][j][13] += 2;\n }\n }\n }\n //primer\n else {\n //if more than 2 mismatches in 1-4nt at 3'\n if(scores[i][j][11]>max14nt) {\n scores[i][j][13]+=1;\n }\n //use mLen (combined F and R length) initially to find initial candidates - filter later\n double perc=(double)scores[i][j][0]/(double)mLen;\n double percI=(double)scores[i][j][0]/(double)pLens[j];\n\n if(perc>=minPm | percI>=minPmI) {\n scores[i][j][12]=1;//flag for failed % test\n scores[i][j][13]+=2;\n }\n }\n }\n }//end of finding positions that prime loop\n }",
"boolean sprawdz_przegrana(){\n for(int i=0;i<figura_jakas.getWspolzedne_figorki().size();i++)\n if(sprawdz_kolizje_z_innymi_klockami(0))\n return true;\n return false;\n }",
"private static boolean juega() {\r\n\t\tv.setMensaje( \"Empieza el nivel \" + nivel + \". Puntuación = \" + puntuacion + \r\n\t\t\t\". Dejar menos de \" + (tamanyoTablero-2) + \" pelotas de cada color. \" + (tamanyoTablero-1) + \" o más seguidas se quitan.\" );\r\n\t\t// v.setDibujadoInmediato( false ); // Notar la mejoría de \"vibración\" si se hace esto y (2)\r\n\t\twhile (!v.estaCerrada() && !juegoAcabado()) {\r\n\t\t\tPoint puls = v.getRatonPulsado();\r\n\t\t\tif (puls!=null) {\r\n\t\t\t\t// Pelota pelotaPulsada = hayPelotaPulsadaEn( puls, tablero ); // Sustituido por el objeto:\r\n\t\t\t\tPelota pelotaPulsada = tablero.hayPelotaPulsadaEn( puls );\r\n\t\t\t\tif (pelotaPulsada!=null) {\r\n\t\t\t\t\tdouble coordInicialX = pelotaPulsada.getX();\r\n\t\t\t\t\tdouble coordInicialY = pelotaPulsada.getY();\r\n\t\t\t\t\tv.espera(20); // Espera un poquito (si no pasa todo demasiado rápido)\r\n\t\t\t\t\t// Hacer movimiento hasta que se suelte el ratón\r\n\t\t\t\t\tPoint drag = v.getRatonPulsado();\r\n\t\t\t\t\twhile (drag!=null && drag.x>0 && drag.y>0 && drag.x<v.getAnchura() && drag.y<v.getAltura()) { // EN CORTOCIRCUITO - no se sale de los bordes\r\n\t\t\t\t\t\tpelotaPulsada.borra( v );\r\n\t\t\t\t\t\tpelotaPulsada.incXY( drag.x - puls.x, drag.y - puls.y );\r\n\t\t\t\t\t\tpelotaPulsada.dibuja( v );\r\n\t\t\t\t\t\trepintarTodas(); // Notar la diferencia si no se hace esto (se van borrando las pelotas al pintar otras que pasan por encima)\r\n\t\t\t\t\t\t// v.repaint(); // (2)\r\n\t\t\t\t\t\tpuls = drag;\r\n\t\t\t\t\t\tdrag = v.getRatonPulsado();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Recolocar pelota en un sitio válido\r\n\t\t\t\t\trecolocar( pelotaPulsada, coordInicialX, coordInicialY );\r\n\t\t\t\t\tquitaPelotasSiLineas( true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tpuntuacion -= (numMovimientos*PUNTOS_POR_MOVIMIENTO); // Se penaliza por el número de movimientos\r\n\t\tif (v.estaCerrada()) return false; // Se acaba el juego cerrando la ventana\r\n\t\tif (nivelPasado()) return true; // Se ha pasado el nivel\r\n\t\treturn false; // No se ha pasado el nivel\r\n\t}",
"public void precio4e(){\n precioHabitaciones = precioHabitaciones + (cantidadHabitaciones * numeroCamas);\n\n //Restaurante\n if(capacidadRestaurant < 30){\n precioHabitaciones = precioHabitaciones + 10;\n } else if (capacidadRestaurant > 29 && capacidadRestaurant < 51){\n precioHabitaciones = precioHabitaciones + 30;\n } else if (capacidadRestaurant > 50){\n precioHabitaciones = precioHabitaciones + 50;\n }\n\n //Gimnasio\n switch (gimnasio){\n case \"A\":\n precioHabitaciones = precioHabitaciones + 50;\n break;\n case \"B\":\n precioHabitaciones = precioHabitaciones + 30;\n break;\n }\n\n }",
"public void confirmar(){\r\n if((gato[0][0]==gato[0][1])&&(gato[0][0]==gato[0][2])&&(gato[0][0]!=' ')){\r\n //si encuentra alguna victoria la variable ganador agarra el simbolo del ganador 'o' o 'x'\r\n //para confirmar quien gano\r\n ganador=gato[0][0];\r\n //es lo que tomara tirar para salir del while si hay una victoria\r\n victoria=1; \r\n \r\n }\r\n\r\n if((gato[1][0]==gato[1][1])&&(gato[1][0]==gato[1][2])&&(gato[1][0]!=' ')){\r\n ganador=gato[1][0];\r\n victoria=1;\r\n }\r\n\r\n if((gato[2][0]==gato[2][1])&&(gato[2][0]==gato[2][2])&&(gato[2][0]!=' ')){\r\n ganador=gato[2][0];\r\n victoria=1;\r\n }\r\n\r\n if((gato[0][0]==gato[1][0])&&(gato[0][0]==gato[2][0])&&(gato[0][0]!=' ')){\r\n ganador=gato[0][0];\r\n victoria=1;\r\n }\r\n\r\n if((gato[0][1]==gato[1][1])&&(gato[0][1]==gato[2][1])&&(gato[0][1]!=' ')){\r\n ganador=gato[0][1];\r\n victoria=1;\r\n }\r\n\r\n if((gato[0][2]==gato[1][2])&&(gato[0][2]==gato[2][2])&&(gato[0][2]!=' ')){\r\n ganador=gato[0][2];\r\n victoria=1;\r\n }\r\n\r\n if((gato[0][0]==gato[1][1])&&(gato[0][0]==gato[2][2])&&(gato[0][0]!=' ')){\r\n ganador=gato[0][0];\r\n victoria=1;\r\n }\r\n\r\n if((gato[2][0]==gato[1][1])&&(gato[2][0]==gato[0][2])&&(gato[2][0]!=' ')){\r\n ganador=gato[2][0];\r\n victoria=1;\r\n }\r\n }",
"@SuppressWarnings(\"SuspiciousMethodCalls\")\n private int houve_estouro()\n {\n int retorno = 0;\n boolean checar = false;\n for (Map.Entry i: janela.entrySet())\n {\n if (janela.get(i.getKey()).isEstouro())\n {\n janela.get(i.getKey()).setEstouro(false);\n retorno =(int) i.getKey();\n checar = true;\n break;\n }\n }\n for(Map.Entry i2: janela.entrySet()) janela.get(i2.getKey()).setEstouro(false);\n if(checar) return retorno;\n else return -69;\n }",
"public void limpiarPaneles(){\n vistaInicial.jpCentralGeneral.removeAll();\n vistaInicial.jpDerecha.removeAll();\n vistaInicial.jpCentral.removeAll();\n }",
"private static void resetDescontoTotal(){\n for(Apps a : apps){\n if(a.isDescontoTotal()){\n a.setDescontoTotal(false);\n }\n }\n }",
"public void contarPosiciones() {\n if (tablero[0] == 1 && tablero[1] == 1 && tablero[2] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[3] == 1 && tablero[4] == 1 && tablero[5] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[6] == 1 && tablero[7] == 1 && tablero[8] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[0] == 1 && tablero[3] == 1 && tablero[6] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[1] == 1 && tablero[4] == 1 && tablero[7] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[2] == 1 && tablero[5] == 1 && tablero[8] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[0] == 1 && tablero[4] == 1 && tablero[8] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[2] == 1 && tablero[4] == 1 && tablero[6] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n // posibilidades jugados dos\n if (tablero[0] == 2 && tablero[1] == 2 && tablero[2] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[3] == 2 && tablero[4] == 2 && tablero[5] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[6] == 2 && tablero[7] == 2 && tablero[8] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[0] == 2 && tablero[3] == 2 && tablero[6] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[1] == 2 && tablero[4] == 2 && tablero[7] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[2] == 2 && tablero[5] == 2 && tablero[8] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[0] == 2 && tablero[4] == 2 && tablero[8] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[2] == 2 && tablero[4] == 2 && tablero[6] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if(tirar == 18 && !ganarJugadorUno && !ganarJugadorDos ){\n Toast.makeText(this, \"Empate\", Toast.LENGTH_SHORT).show();\n }\n }",
"public boolean Victoria(){\n boolean respuesta=false;\n if(!(this.palabra.contains(\"-\"))&& this.oportunidades>0 && !(this.palabra.isEmpty())){\n this.heGanado=true;\n respuesta=true;\n }\n return respuesta;\n }",
"public void deplacements () {\n\t\t//Efface de la fenetre le mineur\n\t\t((JLabel)grille.getComponents()[this.laby.getMineur().getY()*this.laby.getLargeur()+this.laby.getMineur().getX()]).setIcon(this.laby.getLabyrinthe()[this.laby.getMineur().getY()][this.laby.getMineur().getX()].imageCase(themeJeu));\n\t\t//Deplace et affiche le mineur suivant la touche pressee\n\t\tpartie.laby.deplacerMineur(Partie.touche);\n\t\tPartie.touche = ' ';\n\n\t\t//Operations effectuees si la case ou se trouve le mineur est une sortie\n\t\tif (partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()] instanceof Sortie) {\n\t\t\t//On verifie en premier lieu que tous les filons ont ete extraits\n\t\t\tboolean tousExtraits = true;\t\t\t\t\t\t\t\n\t\t\tfor (int i = 0 ; i < partie.laby.getHauteur() && tousExtraits == true ; i++) {\n\t\t\t\tfor (int j = 0 ; j < partie.laby.getLargeur() && tousExtraits == true ; j++) {\n\t\t\t\t\tif (partie.laby.getLabyrinthe()[i][j] instanceof Filon) {\n\t\t\t\t\t\ttousExtraits = ((Filon)partie.laby.getLabyrinthe()[i][j]).getExtrait();\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\t//Si c'est le cas alors la partie est terminee et le joueur peut recommencer ou quitter, sinon le joueur est averti qu'il n'a pas recupere tous les filons\n\t\t\tif (tousExtraits == true) {\n\t\t\t\tpartie.affichageLabyrinthe ();\n\t\t\t\tSystem.out.println(\"\\nFelicitations, vous avez trouvé la sortie, ainsi que tous les filons en \" + partie.laby.getNbCoups() + \" coups !\\n\\nQue voulez-vous faire à present : [r]ecommencer ou [q]uitter ?\");\n\t\t\t\tString[] choixPossiblesFin = {\"Quitter\", \"Recommencer\"};\n\t\t\t\tint choixFin = JOptionPane.showOptionDialog(null, \"Felicitations, vous avez trouve la sortie, ainsi que tous les filons en \" + partie.laby.getNbCoups() + \" coups !\\n\\nQue voulez-vous faire a present :\", \"Fin de la partie\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, choixPossiblesFin, choixPossiblesFin[0]);\n\t\t\t\tif ( choixFin == 1) {\n\t\t\t\t\tPartie.touche = 'r';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tPartie.touche = 'q';\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpartie.enTete.setText(\"Tous les filons n'ont pas ete extraits !\");\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t//Si la case ou se trouve le mineur est un filon qui n'est pas extrait, alors ce dernier est extrait.\n\t\t\tif (partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()] instanceof Filon && ((Filon)partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()]).getExtrait() == false) {\n\t\t\t\t((Filon)partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()]).setExtrait();\n\t\t\t\tSystem.out.println(\"\\nFilon extrait !\");\n\t\t\t}\n\t\t\t//Sinon si la case ou se trouve le mineur est une clef, alors on indique que la clef est ramassee, puis on cherche la porte et on l'efface de la fenetre, avant de rendre la case quelle occupe vide\n\t\t\telse {\n\t\t\t\tif (partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()] instanceof Clef && ((Clef)partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()]).getRamassee() == false) {\n\t\t\t\t\t((Clef)partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()]).setRamassee();\n\t\t\t\t\tint[] coordsPorte = {-1,-1};\n\t\t\t\t\tfor (int i = 0 ; i < this.laby.getHauteur() && coordsPorte[1] == -1 ; i++) {\n\t\t\t\t\t\tfor (int j = 0 ; j < this.laby.getLargeur() && coordsPorte[1] == -1 ; j++) {\n\t\t\t\t\t\t\tif (this.laby.getLabyrinthe()[i][j] instanceof Porte) {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcoordsPorte[0] = j;\n\t\t\t\t\t\t\t\tcoordsPorte[1] = i;\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\tpartie.laby.getLabyrinthe()[coordsPorte[1]][coordsPorte[0]].setEtat(true);\n\t\t\t\t\t((JLabel)grille.getComponents()[coordsPorte[1]*this.laby.getLargeur()+coordsPorte[0]]).setIcon(this.laby.getLabyrinthe()[coordsPorte[1]][coordsPorte[0]].imageCase(themeJeu));\n\t\t\t\t\tSystem.out.println(\"\\nClef ramassee !\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void pierdeUnaVida() {\n numeroDeVidas--;\n }",
"public void nuevoJuego() {\n fallos = 0;\n finDePartida = false;\n\n for (TextView b : botonesLetras) {\n b.setTextColor(Color.BLACK);\n b.setOnClickListener(clickListenerLetras);\n b.setPaintFlags(b.getPaintFlags() & (~ Paint.STRIKE_THRU_TEXT_FLAG));\n }\n ImageView img_ahorcado = (ImageView) findViewById(es.makingapps.ahorcado.R.id.img_ahorcado);\n img_ahorcado.setImageResource(R.drawable.ahorcado_0);\n\n BaseDatos bd = new BaseDatos(this);\n palabraActual = bd.queryPalabraAleatoria(nivelSeleccionado, esAcumulativo);\n\n palabraEspaniol.setText(palabraActual.getEspaniol());\n\n progreso = \"\";\n boolean parentesis = false;\n for(int i = 0; i<palabraActual.getIngles().length(); i++) {\n if(parentesis){\n progreso += palabraActual.getIngles().charAt(i);\n }\n else {\n// if (palabraActual.getIngles().charAt(i) == ' ')\n// progreso += ' ';\n// else if (palabraActual.getIngles().charAt(i) == '-')\n// progreso += '-';\n// else if (palabraActual.getIngles().charAt(i) == '/')\n// progreso += '/';\n// else if (palabraActual.getIngles().charAt(i) == '(') {\n// progreso += '(';\n// parentesis = true;\n// }\n// else if (palabraActual.getIngles().charAt(i) == ')') {\n// progreso += ')';\n// parentesis = false;\n// }\n// else\n// progreso += '_';\n if(Character.isLowerCase(palabraActual.getIngles().charAt(i)))\n progreso += '_';\n else if (palabraActual.getIngles().charAt(i) == '(') {\n progreso += '(';\n parentesis = true;\n }\n else if (palabraActual.getIngles().charAt(i) == ')') {\n progreso += ')';\n parentesis = false;\n }\n else\n progreso += palabraActual.getIngles().charAt(i);\n }\n }\n\n palabraIngles.setText( progreso );\n }",
"public static void monopolychecker(){\n\t\tfor(int x = 0; x < 40;x++){\r\n\t\t\trent[x] = baseRent[x];\r\n\t\t}\r\n\t\tfor(int x = 0; x < 8; x++){\r\n\t\t\tif(x == 0){//brown {1,3}\r\n\t\t\t\tif(whoOwnsIt[1] != 4 && whoOwnsIt[3] != 4){//see if come owns it\r\n\t\t\t\t\tif(whoOwnsIt[1] == whoOwnsIt[3]){//if the same person owns it;\r\n\t\t\t\t\t\tif(avenueLevel[1] == 0){\r\n\t\t\t\t\t\t\trent[1] = rent[1]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(avenueLevel[3] == 0){\r\n\t\t\t\t\t\t\trent[3] = rent[3]*2;\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} else if(x == 1){//light blue {6,8,9}\r\n\t\t\t\tint a = 6; int b = 8; int c = 9;\r\n\t\t\t\tif(whoOwnsIt[a] != 4 && whoOwnsIt[b] != 4 && whoOwnsIt[c] != 4){//see if come owns it\r\n\t\t\t\t\tif((whoOwnsIt[a] == whoOwnsIt[b]) && (whoOwnsIt[a] == whoOwnsIt[c])){//if the same person owns it;\r\n\t\t\t\t\t\tif(avenueLevel[a] == 0){\r\n\t\t\t\t\t\t\trent[a] = rent[a]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(avenueLevel[b] == 0){\r\n\t\t\t\t\t\t\trent[b] = rent[b]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(avenueLevel[c] == 0){\r\n\t\t\t\t\t\t\trent[c] = rent[c]*2;\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} else if(x == 2){//purple {11,13,14}\r\n\t\t\t\tint a = 11; int b = 13; int c = 14;\r\n\t\t\t\tif(whoOwnsIt[a] != 4 && whoOwnsIt[b] != 4 && whoOwnsIt[c] != 4){//see if come owns it\r\n\t\t\t\t\tif((whoOwnsIt[a] == whoOwnsIt[b]) && (whoOwnsIt[a] == whoOwnsIt[c])){//if the same person owns it;\r\n\t\t\t\t\t\tif(avenueLevel[a] == 0){\r\n\t\t\t\t\t\t\trent[a] = rent[a]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(avenueLevel[b] == 0){\r\n\t\t\t\t\t\t\trent[b] = rent[b]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(avenueLevel[c] == 0){\r\n\t\t\t\t\t\t\trent[c] = rent[c]*2;\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} else if(x == 3){//orange {16,18,19}\r\n\t\t\t\tint a = 16; int b = 18; int c = 19;\r\n\t\t\t\tif(whoOwnsIt[a] != 4 && whoOwnsIt[b] != 4 && whoOwnsIt[c] != 4){//see if come owns it\r\n\t\t\t\t\tif((whoOwnsIt[a] == whoOwnsIt[b]) && (whoOwnsIt[a] == whoOwnsIt[c])){//if the same person owns it;\r\n\t\t\t\t\t\tif(avenueLevel[a] == 0){\r\n\t\t\t\t\t\t\trent[a] = rent[a]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(avenueLevel[b] == 0){\r\n\t\t\t\t\t\t\trent[b] = rent[b]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(avenueLevel[c] == 0){\r\n\t\t\t\t\t\t\trent[c] = rent[c]*2;\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} else if(x == 4){//red {21,23,24}\r\n\t\t\t\tint a = 21; int b = 23; int c = 24;\r\n\t\t\t\tif(whoOwnsIt[a] != 4 && whoOwnsIt[b] != 4 && whoOwnsIt[c] != 4){//see if come owns it\r\n\t\t\t\t\tif((whoOwnsIt[a] == whoOwnsIt[b]) && (whoOwnsIt[a] == whoOwnsIt[c])){//if the same person owns it;\r\n\t\t\t\t\t\tif(avenueLevel[a] == 0){\r\n\t\t\t\t\t\t\trent[a] = rent[a]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(avenueLevel[b] == 0){\r\n\t\t\t\t\t\t\trent[b] = rent[b]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(avenueLevel[c] == 0){\r\n\t\t\t\t\t\t\trent[c] = rent[c]*2;\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} else if(x == 5){//yellow {26,27,29}\r\n\t\t\t\tint a = 26; int b = 27; int c = 29;\r\n\t\t\t\tif(whoOwnsIt[a] != 4 && whoOwnsIt[b] != 4 && whoOwnsIt[c] != 4){//see if come owns it\r\n\t\t\t\t\tif((whoOwnsIt[a] == whoOwnsIt[b]) && (whoOwnsIt[a] == whoOwnsIt[c])){//if the same person owns it;\r\n\t\t\t\t\t\tif(avenueLevel[a] == 0){\r\n\t\t\t\t\t\t\trent[a] = rent[a]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(avenueLevel[b] == 0){\r\n\t\t\t\t\t\t\trent[b] = rent[b]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(avenueLevel[c] == 0){\r\n\t\t\t\t\t\t\trent[c] = rent[c]*2;\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} else if(x == 6){//green {31,32,34}\r\n\t\t\t\tint a = 31; int b = 32; int c = 34;\r\n\t\t\t\tif(whoOwnsIt[a] != 4 && whoOwnsIt[b] != 4 && whoOwnsIt[c] != 4){//see if come owns it\r\n\t\t\t\t\tif((whoOwnsIt[a] == whoOwnsIt[b]) && (whoOwnsIt[a] == whoOwnsIt[c])){//if the same person owns it;\r\n\t\t\t\t\t\tif(avenueLevel[a] == 0){\r\n\t\t\t\t\t\t\trent[a] = rent[a]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(avenueLevel[b] == 0){\r\n\t\t\t\t\t\t\trent[b] = rent[b]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(avenueLevel[c] == 0){\r\n\t\t\t\t\t\t\trent[c] = rent[c]*2;\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} else if(x == 7){//blue {37,39}\r\n\t\t\t\tint a = 37; int b = 39;\r\n\t\t\t\tif(whoOwnsIt[a] != 4 && whoOwnsIt[b] != 4){//see if come owns it\r\n\t\t\t\t\tif((whoOwnsIt[a] == whoOwnsIt[b])){//if the same person owns it;\r\n\t\t\t\t\t\tif(avenueLevel[a] == 0){\r\n\t\t\t\t\t\t\trent[a] = rent[a]*2;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(avenueLevel[b] == 0){\r\n\t\t\t\t\t\t\trent[b] = rent[b]*2;\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}\r\n\r\n\t\t}\r\n\t}",
"private void deductGamePoints(List<Integer> prevGamePoints) {\n for (int i = 0; i < numAlive; i++) {\n int playerTrickPoints = trickPoints.get(i);\n if (playerTrickPoints < 0) {\n int prevPoints = prevGamePoints.get(i);\n int newPoints = prevPoints + playerTrickPoints;\n \n if (newPoints < 0) {\n // Cannot have negative points\n gamePoints.set(i, 0);\n } else {\n gamePoints.set(i, newPoints);\n }\n }\n }\n }",
"public int limitesX(){\n int v=0;\n if (fila==0 && columna>0 && columna<15){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n }\n else if (fila==15 && columna>0 && columna<15){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n }\n else{v=limitesY();}\n return v;\n }",
"public void notaFinal() {\n\n for (int i = 0; i <= (nombres.size() - 1); i++) {\n\n notaFinal.add((notas.get(0) + notas.get(1) + notas.get(2)) / 3);\n\n }\n\n }",
"ArrayList<Float> pierwszaPredykcjaNormal()\n\t{\n\t\tif (Stale.cenyZGeneratora)\n\t\t{\n\t\t\tArrayList<Float> listaSumarycznejGeneracji = listaProsumentowWrap.getListaSumarycznejGeneracji(LokalneCentrum.getTimeIndex());\n\t\t\tArrayList<Float> listaSumarycznejKonsumpcji = listaProsumentowWrap.getListaSumarycznejKonsumpcji(LokalneCentrum.getTimeIndex());\n\n\t\t\treturn predictPrice(listaSumarycznejGeneracji,listaSumarycznejKonsumpcji);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tArrayList<Float> proposedPriceVector = pierwszaPredykcjaWezPredykcjeZListy();\n\t\t\t\n\t\t\t//jezeli brakuje elementow w plikyu do pelnej predykcji an horyzont czasowy to uuzplenij dnaymi z modelu\n\t\t\tif (proposedPriceVector.size()<Stale.horyzontCzasowy)\n\t\t\t{\n\t\t\t\tArrayList<Float> listaSumarycznejGeneracji = listaProsumentowWrap.getListaSumarycznejGeneracji(LokalneCentrum.getTimeIndex());\n\t\t\t\tArrayList<Float> listaSumarycznejKonsumpcji = listaProsumentowWrap.getListaSumarycznejKonsumpcji(LokalneCentrum.getTimeIndex());\n\t\t\t\tArrayList<Float> cenyZmodelu =predictPrice(listaSumarycznejGeneracji,listaSumarycznejKonsumpcji);\n\t\t\t\t\n\t\t\t\tproposedPriceVector = polaczListy(proposedPriceVector, cenyZmodelu);\n\t\t\t\t\n\t\t\t\tif (proposedPriceVector.size()!=Stale.horyzontCzasowy)\n\t\t\t\t{\n\t\t\t\t\tgetInput(\"ERROR in pierwszaPredykcjaNormal\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn proposedPriceVector;\n\t\t\t//podaj predykcje taka jak wynika z podanego pliku\n\t\t\t//getInput(\"Fill this part out - wczytaj rpedykcje z pliku!\");\n\t\t\t//return new ArrayList<Float>();\n\t\t}\n\t}",
"@Override\n\tpublic void verVehiculosDisponibles() {\n\t\tif(getCapacidad() > 0) {\n\t\t\tSystem.out.println(\"Plazas disponibles : \" + getCapacidad() + \" plazas, peso disponible : \" + getPeso() + \" kg, Carros disponibles: \" + \" 1 \" + \" Carro disponible, Capacidad de Personas : 4 personas, Peso maximo : 500 kg\");\n\t\t}else\n\t\t{\n\t\t\tSystem.out.println(\"Plazas disponibles : \" + getCapacidad() + \" plazas, peso disponible : \" + getPeso() + \" kg, Carros disponibles: \" + \" 0 \" + \" Carro disponibles, Capacidad de Personas : 4 personas, Peso maximo : 500 kg\");\n\t\t}\n\t\t\n\t}",
"protected void ligneDroite() {\n\t\tboolean accelerer = true;\n\t\twhile (ev3.SUIVRE == seenColor) {\n\t\t\tev3.begSync();\n\t\t\tev3.avance();\n\t\t\tev3.endSync();\n\t\t\tif (ev3.getLigne() < 15 && accelerer) {\n\t\t\t\tev3.accelerer();\n\t\t\t\tev3.setLigne(ev3.getLigne() + 1);\n\t\t\t} else if (ev3.getLigne() == 30 && accelerer) {\n\t\t\t\taccelerer = false;\n\t\t\t} else if (ev3.getLigne() == 7) {\n\t\t\t\taccelerer = true;\n\t\t\t} else if (accelerer == false) {\n\t\t\t\tev3.decelerer();\n\t\t\t\tev3.setLigne(ev3.getLigne() - 1);\n\t\t\t}\n\t\t\tseenColor = find.whatColor(ev3.lireColor());\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\t\r\n\t\t/*\r\n\t\t * Exercicio 1\r\n\t\t*/\r\n\t\t\r\n\t\tint c = 0;\r\n\t\tint s = 1;\r\n\t\tint f = 0;\r\n\t\tint b = 0;\r\n\t\t\r\n\t\twhile( c < 8 ) {\r\n\t\t\t\r\n\t\t\tb = f + s;\r\n\t\t\tf = s;\r\n\t\t\ts = b;\r\n\t\t\tc++;\r\n\t\t\tSystem.out.println(b);\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t * Exercicio 2\r\n\t\t */\r\n\t\t\r\n\t\tdouble[][] notas = new double[6][2];\r\n\t\tSystem.out.println(\"Digite a notas dos 6 alunos, em ordem (primeiro aluno: primeira nota depois segunda nota)\");\r\n\t\tfor(int i = 0; i <6; i++) {\r\n\t\t\tfor(int j = 0; i <2; i++) {\r\n\t\t\t\tnotas[i][j] = scan.nextDouble();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0; i < 6; i++) {\r\n\t\t\tdouble m = (notas[i][0] + notas[i][1]) / 2;\r\n\t\t\tnotas[i][2] = m;\r\n\t\t\tSystem.out.println(notas[i][2]);\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0; i < 6; i++) {\r\n\t\t\tSystem.out.println(notas[i][2] >= 6 ? \"Aluno \"+(i)+\" Passou\" : \"Aluno \"+(i)+\" Recuperação\");\r\n\t\t}\r\n\t\t\r\n\t\tint a = 0;\r\n\t\t\r\n\t\tfor(int i = 0; i < 6; i++) {\r\n\t\t\tif(notas[i][2] >= 6) {\r\n\t\t\t\ta++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(a+\" Alunos passaram\");\r\n\t\t\r\n\t\tint d = 0;\r\n\t\t\r\n\t\tfor(int i = 0; i < 6; i++) {\r\n\t\t\tif(notas[i][2] <= 3) {\r\n\t\t\t\td++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(d+\" Alunos reprovaram\");\r\n\t\t\r\n\t\tint e = 0;\r\n\t\t\r\n\t\tfor(int i = 0; i < 6; i++) {\r\n\t\t\tif((notas[i][2] <= 6)||(notas[i][2] >= 3)) {\r\n\t\t\t\te++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(e+\" Alunos de recuperação\");\r\n\t\t\r\n\t\tdouble g = 0;\r\n\t\t\r\n\t\tfor(int i = 0; i < 6; i++) {\r\n\t\t\tg = g + notas[i][2];\r\n\t\t}\r\n\t\tSystem.out.println(\"Media da sala: \"+g/6);\r\n\t\t\r\n\t\t/*\r\n\t\t * Exercicio 3\r\n\t\t */\r\n\t\t\r\n\t\tboolean prime = true;\r\n\t\tSystem.out.println(\"Insira o numero que desejas saber se é primo ou não (inteiro positivo) \");\r\n\t\tint h = scan.nextInt();\r\n\t\tfor(int i = 2; i <= h; i ++) {\r\n\t\t\tif( (h % i == 0) && (i != h) ) {\r\n\t\t\t\tprime = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(prime)\r\n\t\t\tSystem.out.print(\"O numero \"+h+\" é primo\");\r\n\t\telse\r\n\t\t\tSystem.out.print(\"O numero \"+h+\" não é primo\");\r\n\t\t\r\n\t\t/*\r\n\t\t * Exercicio 4\r\n\t\t */\r\n\t\t\r\n\t\tSystem.out.println(\"Insira notas dos alunos (Ordem: Primeira nota, segunda nota, presença)\");\r\n\t\tint[][] Sala = new int[5][3];\r\n\t\tfor(int i = 0; i < 5; i++) {\r\n\t\t\tfor(int j = 0; j < 3; j++) {\r\n\t\t\t\tSala[i][j] = scan.nextInt();\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < 5; i++) {\r\n\t\t\tif((Sala[i][0] + Sala[i][1] >= 6) && (Sala[i][2] / 18 >= 0.75)){\r\n\t\t\t\tSystem.out.println(\"Aluno \"+i+\" aprovado\");\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(\"Aluno \"+i+\" reprovado\");\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t * Exercicio 5\r\n\t\t */\r\n\t\t\r\n\t\tint[] first = {1,2,3,4,5,};\r\n\t\tint[] second = {10,9,8,7,6,5,4,3,2,1,};\r\n\t\tint[][] third = {{1,2,3,},\r\n\t\t\t\t\t {4,5,6},\r\n\t\t\t\t\t {7,8,9},\r\n\t\t\t\t\t {10,11,12}};\r\n\t\tint[][] fourth = new int[4][3]; \r\n\t\tint m = 0;\r\n\t\t//If they were random numbers, would i need to use the lowest integer? or just be clever\r\n\t\tint n = 1;\r\n\t\t\r\n\t\tfor(int i = 0; i < first.length; i++) {\r\n\t\t\tif(first[i] > m)\r\n\t\t\t\tm = first[i];\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0; i < second.length; i++) {\r\n\t\t\tif(second[i] < n)\r\n\t\t\t\tn = second[i];\r\n\t\t}\r\n\t\t\r\n\t\tint x = n*m;\r\n\t\tint k = 0;\r\n\t\tint l = 0;\r\n\t\tint o = 0;\r\n\t\tint p = 0;\r\n\t\t\r\n\t\tfor(int i = 0; i < 4; i ++) {\r\n\t\t\tfor(int j = 0; j < 3; j++) {\r\n\t\t\t\tfourth[i][j] = third[i][j] + x;\r\n\t\t\t\r\n\t\t\t\tif(fourth[0][j] % 2 == 0) {\r\n\t\t\t\t\tk += fourth[0][j]; \r\n\t\t\t\t}\r\n\t\t\t\tif(fourth[1][j] % 2 == 0) {\r\n\t\t\t\t\tl += fourth[1][j];\r\n\t\t\t\t}\t\r\n\t\t\t\tif(fourth[0][j] % 2 == 0) {\r\n\t\t\t\t\to += fourth[2][j];\r\n\t\t\t\t}\r\n\t\t\t\tif(fourth[3][j] % 2 == 0) {\r\n\t\t\t\t\tp += fourth[3][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t * Exercicio 6\r\n\t\t */\r\n\t\t\r\n\t\tboolean[][] assentos = new boolean[2][5];\r\n\t\tfor(int i = 0; i < 2; i++) {\r\n\t\t\tfor(int j = 0; j < 5; j++) {\r\n\t\t\t\tassentos[i][j] = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tscan.close();\r\n\t}",
"public boolean potezGore() {\n\t\t//koordinate glave\n\t\tint i = this.zmija.get(0).i;\n\t\tint j = this.zmija.get(0).j;\n\t\t\n\t\tthis.smjer='w';\n\t\t\n\t\tif (i-1 >= 0) {\n\t\t\tif ((this.tabla[i-1][j] == '#')||(this.tabla[i-1][j] == 'o')) \n\t\t\t\treturn false;\n\t\t\telse if (this.tabla[i-1][j] == '*')\n\t\t\t\tthis.pojedi(i-1, j);\n\t\t\telse \n\t\t\t\tthis.pomjeri(i-1, j);\n\t\t}\n\t\telse if (i-1 < 0 ) {\n\t\t\tif ((this.tabla[this.visinaTable-1][j] == '#')||(this.tabla[this.visinaTable-1][j] == 'o')) \n\t\t\t\treturn false;\n\t\t\telse if (this.tabla[this.visinaTable-1][j] == '*') \n\t\t\t\tthis.pojedi(this.visinaTable-1, j);\n\t\t\telse \n\t\t\t\tthis.pomjeri(this.visinaTable-1, j);\n\t\t}\n\t\treturn true;\n\t}",
"public void distribuirAportes1(){\n\n if(null == comprobanteSeleccionado.getAporteuniversidad()){\n System.out.println(\"comprobanteSeleccionado.getAporteuniversidad() >> NULO\");\n }\n\n if(null == comprobanteSeleccionado.getAporteorganismo()){\n System.out.println(\"comprobanteSeleccionado.getAporteorganismo() >> NULO\");\n }\n\n if(null == comprobanteSeleccionado.getMontoaprobado()){\n System.out.println(\"comprobanteSeleccionado.getMontoaprobado() >> NULO\");\n }\n\n try{\n if(comprobanteSeleccionado.getAporteuniversidad().floatValue() > 0f){\n comprobanteSeleccionado.setAporteorganismo(comprobanteSeleccionado.getMontoaprobado().subtract(comprobanteSeleccionado.getAporteuniversidad()));\n comprobanteSeleccionado.setAportecomitente(BigDecimal.ZERO);\n }\n } catch(NullPointerException npe){\n System.out.println(\"Error de NullPointerException\");\n npe.printStackTrace();\n }\n\n }",
"public boolean isClearingMines();",
"private void compruebaMinas(boolean add, int i, int j) {\n\tif (add) {\n\t contadorInterrogaciones++;\n\t if (arrayBotones[i][j].getMina() == 1) {\n\t\tcontadorMinas++;\n\t }\n\t} else {\n\t contadorInterrogaciones--;\n\t if (arrayBotones[i][j].getMina() == 1) {\n\t\tcontadorMinas--;\n\t }\n\t}\n\tif ((contadorMinas == numMinas) && (contadorInterrogaciones == numMinas)) {\n\t this.setVisible(false);\n\t ventanaReset.setVisible(true);\n\t labelGanador.setVisible(true);\n\t}\n }",
"public void despegar(){\n if(this.posicion == 1){\n this.setPosicion(2);\n this.indicarEstado(\"Volando\");\n } else{\n System.out.println(\"No estoy preparado para el despegue\");\n }\n }",
"private static void estadisticaClase() {\n int numeroAlumnos;\n int aprobados = 0, suspensos = 0; // definición e instanciación de varias a la vez\n int suficentes = 0, bienes = 0, notables = 0, sobresalientes = 0;\n float totalNotas = 0;\n float media;\n Scanner in = new Scanner(System.in);\n\n // Salismos del bucle sólo si nos introduce un número positivo\n do {\n System.out.println(\"Introduzca el número de alumnos/as: \");\n numeroAlumnos = in.nextInt();\n } while (numeroAlumnos <= 0);\n\n // Como sabemos el número de alumnos es un bucle definido\n for (int i = 1; i <= numeroAlumnos; i++) {\n float nota = 0;\n\n // nota solo existe dentro de este for, por eso la definimos aquí.\n do {\n System.out.println(\"Nota del alumno \" + i + \" [0-10]: \");\n nota = in.nextFloat();\n } while (nota < 0 || nota > 10);\n\n // Sumamos el total de notas\n totalNotas += nota;\n\n if (nota < 5) {\n suspensos++;\n } else if (nota >= 5 && nota < 6) {\n aprobados++;\n suficentes++;\n } else if (nota >= 6 && nota < 7) {\n aprobados++;\n bienes++;\n } else if (nota >= 7 && nota < 9) {\n aprobados++;\n notables++;\n } else if (nota >= 9) {\n aprobados++;\n sobresalientes++;\n }\n }\n // De esta manera redondeo a dos decimales. Tengo que hacer un casting porque de Double quiero float\n // Si no debería trabajar con double siempre.\n media = (float) (Math.round((totalNotas / numeroAlumnos) * 100.0) / 100.0);\n\n // Sacamos las estadísticas\n System.out.println(\"Número de alumnos/as: \" + numeroAlumnos);\n System.out.println(\"Número de aprobados/as: \" + aprobados);\n System.out.println(\"Número de suspensos: \" + suspensos);\n System.out.println(\"Nota media: \" + media);\n System.out.println(\"Nº Suficientes: \" + suficentes);\n System.out.println(\"Nº Bienes: \" + bienes);\n System.out.println(\"Nº Notables: \" + notables);\n System.out.println(\"Nº Sobresalientes: \" + sobresalientes);\n\n\n }",
"private boolean temMunicao() {\n\t\t\n\t\tif (round<1) {\n\t\t\tsetSemMunicao(true);\n\t\t\treturn false;\n\t\t\t\n\t\t}else \n\t\t\tsetSemMunicao(false);\n\t\t\n\t\t\n\t\treturn true;\n\t}",
"public void Dios()\r\n {\r\n \tif(!dios)\r\n \t\tgrafico.cambiarA(0);\r\n \telse\r\n \t\tgrafico.cambiarA(1);\r\n dios=!dios;\r\n }",
"private void mueveObjetos()\n {\n // Mueve las naves Ufo\n for (Ufo ufo : ufos) {\n ufo.moverUfo();\n }\n \n // Cambia el movimiento de los Ufos\n if (cambiaUfos) {\n for (Ufo ufo : ufos) {\n ufo.cambiaMoverUfo();\n }\n cambiaUfos = false;\n }\n\n // Mueve los disparos y los elimina los disparos de la nave Guardian\n if (disparoGuardian.getVisible()) {\n disparoGuardian.moverArriba();\n if (disparoGuardian.getPosicionY() <= 0) {\n disparoGuardian.setVisible(false);\n }\n }\n\n // Dispara, mueve y elimina los disparos de las naves Ufo\n disparaUfo();\n if (disparoUfo.getVisible()) {\n disparoUfo.moverAbajo();\n if (disparoUfo.getPosicionY() >= altoVentana) {\n disparoUfo.setVisible(false);\n }\n }\n\n // Mueve la nave Guardian hacia la izquierda\n if (moverIzquierda) {\n guardian.moverIzquierda();\n }\n // Mueve la nave Guardian hacia la derecha\n if (moverDerecha) {\n guardian.moverDerecha();\n }\n // Hace que la nave Guardian dispare\n if (disparar) {\n disparaGuardian();\n }\n }",
"public void supprimerImproductifs(){\n grammaireCleaner.nettoyNonProdGramm();\n setChanged();\n notifyObservers(\"2\");\n }",
"private static int removeStatPoints(int statPoints){\r\n statPoints--;\r\n return statPoints;\r\n }"
]
| [
"0.62180907",
"0.61654717",
"0.61524",
"0.61198723",
"0.60555387",
"0.603732",
"0.59978753",
"0.5964482",
"0.5957268",
"0.5935358",
"0.5904857",
"0.58952963",
"0.58834785",
"0.5880955",
"0.58690834",
"0.57882744",
"0.5786413",
"0.5782942",
"0.5782263",
"0.5780053",
"0.5760317",
"0.5751009",
"0.5737019",
"0.5732236",
"0.5724129",
"0.57166445",
"0.5700775",
"0.5692874",
"0.56905985",
"0.5690505",
"0.5687761",
"0.568239",
"0.5668307",
"0.5649642",
"0.56401694",
"0.5639679",
"0.5633254",
"0.56294996",
"0.56198025",
"0.56151205",
"0.5612172",
"0.5608449",
"0.5605309",
"0.5599674",
"0.5588157",
"0.5567261",
"0.55635244",
"0.5561272",
"0.55597585",
"0.55596584",
"0.55503356",
"0.5548687",
"0.5541884",
"0.554075",
"0.5519166",
"0.55153394",
"0.5513757",
"0.5503273",
"0.54921776",
"0.5491717",
"0.54913217",
"0.54911304",
"0.54907835",
"0.5483882",
"0.5479486",
"0.5474631",
"0.5474107",
"0.54673696",
"0.54654336",
"0.5464172",
"0.54612297",
"0.54497886",
"0.54434353",
"0.54354465",
"0.5429458",
"0.54201645",
"0.541744",
"0.5411018",
"0.5408715",
"0.5406472",
"0.540238",
"0.5400848",
"0.5395909",
"0.5395477",
"0.5392826",
"0.53841925",
"0.5382336",
"0.53808016",
"0.5372315",
"0.53705585",
"0.53698367",
"0.5367335",
"0.536499",
"0.5364894",
"0.5361177",
"0.53606224",
"0.53591126",
"0.5358471",
"0.535283",
"0.5352055",
"0.535028"
]
| 0.0 | -1 |
Main Converts user input to useable state. | int getNumericalUserInput() {
String input = userInput.next();
int i = -1; //holds converted input
boolean success = false;
while (!success) {
if (input.toLowerCase().equals("c")) {
i = -1;
success = true;
} else {
try {
i = Integer.parseInt(input);
success = true;
} catch (NumberFormatException e) {
System.out.println("Invalid entry.");
break;
}
}
}
return i;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void takeInUserInput(){\n\t\t// only take in input when it is in the ANSWERING phase\n\t\tif(spellList.status == QuizState.Answering){\n\t\t\tspellList.setAnswer(getAndClrInput());\n\t\t\tspellList.status = QuizState.Answered;\n\t\t\tansChecker=spellList.getAnswerChecker();\n\t\t\tansChecker.execute();\n\t\t}\t\n\n\t}",
"public void takeUserInput() {\n\t\t\r\n\t}",
"public void takeInput() {\n\t\tboolean flag = true;\n\t\tMain test = new Main();\n\t\twhile(flag) {\n\t\t\tLOGGER.info(\"Enter an option 1.Calculate Simple Interest 2.Calculate Compound Interest 3.exit\");\n\t\t\tint val = sc.nextInt();\n\t\t\tswitch(val) {\n\t\t\tcase 1:\n\t\t\t\ttest.takeInputForSimpleInterest();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\ttest.takeInputForCompoundInterest();\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tflag = false;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tLOGGER.info(\"Enter valid input\");\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"public void userInput() {\r\n System.out.println(\"You want to convert from:\");\r\n this.fromUnit = in.nextLine();\r\n System.out.print(\"to: \");\r\n this.toUnit = in.nextLine();\r\n System.out.print(\"The value is \");\r\n this.value = in.nextDouble();\r\n }",
"public void parseInput(Map gameMap, Player player) {\n String[] splitInput = playerInput.split(\" \", 0); // Splits the input into an action and an object.\n String action; // Stores the action that the user input\n String predic; // Stores the predicate of the input\n String object; // Stores the object to do action on of the input\n String object2; // Stores extra words from the input\n String ANSI_RED = \"\\u001B[31m\"; // Red text color\n String ANSI_BLUE = \"\\u001B[34m\"; // Blue text color\n prevInputs.add(splitInput);\n\n // Parses single word inputs\n // Stores the action of the input\n if (splitInput.length == 1) {\n action = splitInput[0];\n switch (action.toLowerCase()) {\n case \"cheat\":\n System.out.println(player.getHint());\n break;\n case \"superbrief\":\n System.out.println(\"Dialogue length set to superbrief.\");\n player.changeDialogueState(\"superbrief\");\n break;\n case \"brief\":\n System.out.println(\"Dialogue length set to brief.\");\n player.changeDialogueState(\"brief\");\n break;\n case \"verbose\":\n System.out.println(\"Dialogue length set to verbose.\");\n player.changeDialogueState(\"verbose\");\n break;\n case \"autoplay\":\n case \"auto\":\n System.out.println(\"Turning on autoplay.\");\n player.changeDialogueState(\"autoplay\");\n break;\n case \"again\":\n case \"g\":\n prevInputs.remove(splitInput);\n playerInput = \"\";\n for (int i = 0; i < prevInputs.get(prevInputs.size() - 1).length; i++) {\n playerInput = playerInput.concat(prevInputs.get(prevInputs.size() - 1)[i]);\n playerInput = playerInput.concat(\" \");\n }\n parseInput(gameMap, player);\n return;\n case \"i\":\n case \"inventory\":\n case \"inv\":\n player.getInventory();\n break;\n case \"look\":\n case \"l\":\n player.checkArea();\n player.incrementTurn();\n break;\n case \"equipment\":\n player.getEquipment();\n break;\n case \"diagnose\":\n player.diagnose();\n player.incrementTurn();\n break;\n case \"hi\":\n case \"hello\":\n System.out.println(\"You said 'Hello'\");\n player.incrementTurn();\n break;\n case \"jump\":\n System.out.println(\"For whatever reason, you jumped in place.\");\n player.incrementTurn();\n break;\n case \"walk\":\n System.out.println(\"You walked around the area but you've already seen everything.\");\n player.incrementTurn();\n break;\n case \"save\":\n System.out.println(\"Saving Game...\");\n try {\n TimeUnit.SECONDS.sleep(1);\n }\n catch (Exception e) {\n System.out.println(\"Error: \" + e);\n }\n player.save();\n break;\n case \"restore\":\n System.out.println(\"Loading Game...\");\n try {\n TimeUnit.SECONDS.sleep(1);\n }\n catch (Exception e) {\n System.out.println(\"Error: \" + e);\n }\n player.load(gameMap);\n player.checkArea();\n break;\n case \"restart\":\n player.setHealth(0);\n break;\n case \"status\":\n player.getStatus();\n break;\n case \"score\":\n System.out.println(\"SCORE: \" + player.getScore());\n break;\n case \"quit\":\n case \"q\":\n System.out.print(\"Thank you for playing!\");\n System.exit(0);\n case \"wait\":\n case \"z\":\n case \"stay\":\n System.out.println(\"You stood in place.\");\n player.incrementTurn();\n break;\n case \"north\":\n case \"south\":\n case \"east\":\n case \"west\":\n case \"northeast\":\n case \"northwest\":\n case \"southeast\":\n case \"southwest\":\n case \"n\":\n case \"s\":\n case \"e\":\n case \"w\":\n case \"ne\":\n case \"nw\":\n case \"se\":\n case \"sw\":\n if (player.getLocation().getConnectedRoom(action.toLowerCase()) != null)\n player.enterDoor(player.getLocation().getConnectedRoom(action.toLowerCase()));\n player.incrementTurn();\n break;\n case \"version\":\n System.out.println(\"Version: \" + VERSION);\n return;\n default:\n System.out.println(\"Invalid Command\");\n return;\n }\n }\n\n // Parses two word inputs\n if (splitInput.length == 2) {\n action = splitInput[0]; // Stores the action that the user inputs\n object = splitInput[1]; // Stores the object that the user inputs\n switch (action.toLowerCase()) {\n case \"attack\":\n if (player.getLocation().isCharaInRoom(object.toUpperCase())) {\n player.attack(player.getLocation().getChara(object.toUpperCase()));\n }\n else {\n System.out.println(\"There is no \" + ANSI_RED + object.toLowerCase() + ANSI_RESET + \" here.\");\n }\n player.incrementTurn();\n break;\n case \"go\":\n if (player.getLocation().getConnectedRoom(object.toLowerCase()) != null)\n player.enterDoor(player.getLocation().getConnectedRoom(object.toLowerCase()));\n else\n System.out.println(\"There is nothing in that direction.\");\n player.incrementTurn();\n break;\n case \"enter\":\n case \"exit\":\n if (player.getLocation().getConnectedRoom(action.toLowerCase(), object.toLowerCase()) != null)\n player.enterDoor(player.getLocation().getConnectedRoom(action.toLowerCase(), object.toLowerCase()));\n player.incrementTurn();\n break;\n case \"break\":\n if (player.getLocation().getConnectedRoom(object.toLowerCase()) != null) {\n if (player.getLocation().getConnectedRoom(object.toLowerCase()).getLocked()) {\n player.getLocation().getConnectedRoom(object.toLowerCase()).unlock();\n System.out.println(\"You broke down the door.\");\n } else\n System.out.println(\"There is nothing to break down.\");\n }\n else\n System.out.println(\"There is nothing to break down.\");\n player.incrementTurn();\n break;\n case \"equip\":\n player.equipFromInv(object.toUpperCase());\n player.incrementTurn();\n break;\n case \"unequip\":\n player.equipToInv(object.toUpperCase());\n player.incrementTurn();\n break;\n case \"examine\":\n if (player.inInventory(object.toUpperCase()))\n player.examineInv(player.getItem(object.toUpperCase()));\n else if (player.inEquip(object.toUpperCase()))\n player.examineInv(player.getEquip(object.toUpperCase()));\n else\n System.out.println(\"You do not have: \" + ANSI_BLUE + object.toUpperCase() + ANSI_RESET);\n break;\n case \"read\":\n if (player.inInventory(object.toUpperCase()))\n player.examineInv(player.getItem(object.toUpperCase()));\n else\n System.out.println(\"You do not have: \" + ANSI_BLUE + object.toUpperCase() + ANSI_RESET);\n break;\n case \"get\":\n case \"take\":\n if (player.getLocation().isObjInRoom(object.toUpperCase())) {\n ZorkObj zorkObj = player.getLocation().getObj(object.toUpperCase());\n if (player.checkWeight(zorkObj))\n player.addItemToInventory(zorkObj);\n else {\n System.out.println(ANSI_BLUE + zorkObj.getName() + ANSI_RESET + \" is too heavy to pick up.\");\n player.getLocation().addObject(zorkObj);\n }\n }\n else if (object.toLowerCase().equals(\"all\")) {\n int objectsInRoom = player.getLocation().getObjLength();\n\n if (objectsInRoom == 0)\n System.out.println(\"There are no items in this room.\");\n\n for (int i = 0; i < objectsInRoom; i++) {\n ZorkObj zorkObj = player.getLocation().getObj();\n if (player.checkWeight(zorkObj) && player.checkInvSize()){\n player.addItemToInventory(zorkObj);\n }\n else if (!player.checkInvSize()) {\n System.out.println(\"Your inventory is too full.\");\n player.getLocation().addObject(zorkObj);\n }\n else {\n System.out.println(ANSI_BLUE + zorkObj.getName() + ANSI_RESET + \" is too heavy to pick up.\");\n player.getLocation().addObject(zorkObj);\n }\n }\n }\n else\n System.out.println(\"There is no item named \" + ANSI_BLUE + object + ANSI_RESET + \" in this area.\");\n player.incrementTurn();\n break;\n case \"drop\":\n player.removeItemFromChara(object.toUpperCase());\n player.incrementTurn();\n break;\n default:\n System.out.println(\"Invalid Command\");\n return;\n }\n }\n\n else if (splitInput.length == 3) {\n action = splitInput[0]; // Stores the action that the user inputs\n predic = splitInput[1]; // Stores the predicate of the input\n object = splitInput[2]; // Stores the object that the user inputs\n switch (action.toLowerCase()) {\n case \"attack\":\n if (player.getLocation().isCharaInRoom((predic + \" \" + object).toUpperCase())) {\n player.attack(player.getLocation().getChara((predic + \" \" + object).toUpperCase()));\n }\n else {\n System.out.println(\"There is no \" + ANSI_RED + (predic + \" \" + object).toLowerCase() + ANSI_RESET + \" here.\");\n }\n player.incrementTurn();\n break;\n case \"go\":\n switch (predic.toLowerCase()) {\n case \"down\":\n case \"up\":\n case \"in\":\n case \"out\":\n if (player.getLocation().getConnectedRoom(predic.toLowerCase(), object.toLowerCase()) != null)\n player.enterDoor(player.getLocation().getConnectedRoom(predic.toLowerCase(), object.toLowerCase()));\n player.incrementTurn();\n break;\n default:\n System.out.println(\"Invalid Command.\");\n break;\n }\n break;\n case \"look\":\n switch (predic.toLowerCase()) {\n case \"inside\":\n if (player.getLocation().isObjInRoom(object.toUpperCase()))\n System.out.println(player.getLocation().getObjNoDel(object.toUpperCase()).getInsideDesc());\n else if(player.getLocation().isCharaInRoom((object).toUpperCase()))\n System.out.println(player.getLocation().getChara((object).toUpperCase()).getInsideDesc());\n else\n System.out.println(\"Object is not found in this area.\");\n player.incrementTurn();\n break;\n case \"under\":\n case \"below\":\n if (player.getLocation().isObjInRoom(object.toUpperCase()))\n System.out.println(player.getLocation().getObjNoDel(object.toUpperCase()).getUnderDesc());\n else if(player.getLocation().isCharaInRoom((object).toUpperCase()))\n System.out.println(player.getLocation().getChara((object).toUpperCase()).getUnderDesc());\n else\n System.out.println(\"Object is not found in this area.\");\n player.incrementTurn();\n break;\n case \"behind\":\n if (player.getLocation().isObjInRoom(object.toUpperCase()))\n System.out.println(player.getLocation().getObjNoDel(object.toUpperCase()).getBehindDesc());\n else if(player.getLocation().isCharaInRoom((object).toUpperCase()))\n System.out.println(player.getLocation().getChara((object).toUpperCase()).getBehindDesc());\n else\n System.out.println(\"Object is not found in this area.\");\n player.incrementTurn();\n break;\n case \"through\":\n if (player.getLocation().isObjInRoom(object.toUpperCase()))\n System.out.println(player.getLocation().getObjNoDel(object.toUpperCase()).getThroughDesc());\n else if(player.getLocation().isCharaInRoom((object).toUpperCase()))\n System.out.println(player.getLocation().getChara((object).toUpperCase()).getThroughDesc());\n else\n System.out.println(\"Object is not found in this area.\");\n player.incrementTurn();\n break;\n case \"at\":\n if (player.getLocation().isObjInRoom(object.toUpperCase()))\n System.out.println(player.getLocation().getObjNoDel(object.toUpperCase()).getDescription());\n else if (player.getLocation().isCharaInRoom(object.toUpperCase()))\n player.examineChara(player.getLocation().getChara(object.toUpperCase()));\n else\n System.out.println(\"Object is not found in this area.\");\n player.incrementTurn();\n break;\n default:\n System.out.println(\"Invalid Command.\");\n return;\n }\n break;\n case \"talk\":\n case \"speak\":\n if (\"to\".equals(predic)) {\n if (player.getLocation().isObjInRoom(object.toUpperCase()))\n System.out.println(player.getLocation().getObjNoDel(object.toUpperCase()).getDialogue());\n else if (player.getLocation().isCharaInRoom(object.toUpperCase()))\n System.out.println(player.getLocation().getChara(object.toUpperCase()).getDialogue());\n else\n System.out.println(\"There is nothing to talk to.\");\n player.incrementTurn();\n } else {\n System.out.println(\"Invalid Command.\");\n }\n break;\n case \"in\":\n case \"enter\":\n if (player.getLocation().getConnectedRoom(action.toLowerCase(), object.toLowerCase()) != null)\n player.enterDoor(player.getLocation().getConnectedRoom(action.toLowerCase(), object.toLowerCase()));\n else\n System.out.println(\"There is nothing to enter.\");\n player.incrementTurn();\n break;\n case \"out\":\n case \"exit\":\n if (player.getLocation().getConnectedRoom(action.toLowerCase(), object.toLowerCase()) != null)\n player.enterDoor(player.getLocation().getConnectedRoom(action.toLowerCase(), object.toLowerCase()));\n else\n System.out.println(\"There is nothing to exit.\");\n player.incrementTurn();\n break;\n case \"get\":\n case \"take\":\n if (predic.toLowerCase().equals(\"off\")) {\n player.equipToInv(object.toUpperCase());\n player.incrementTurn();\n break;\n }\n else if (player.getLocation().getObj((predic + object).toUpperCase()) != null) {\n player.addItemToInventory(player.getLocation().getObj((predic + object).toUpperCase()));\n System.out.println(\"You have picked up: \" + predic + \" \" + object);\n }\n else\n System.out.println(\"There is no item named \" + predic + \" \" + object + \" in this area.\");\n player.incrementTurn();\n break;\n default:\n System.out.println(\"Invalid Command\");\n return;\n }\n }\n\n else if (splitInput.length == 4) {\n action = splitInput[0]; // Stores the action that the user inputs\n predic = splitInput[1]; // Stores the predicate of the input\n object = splitInput[2]; // Stores the object that the user inputs\n object2 = splitInput[3]; // Stores extra words that the user inputs\n switch (action.toLowerCase()) {\n case \"attack\":\n if (player.getLocation().isCharaInRoom((predic + \" \" + object + \" \" + object2).toUpperCase())) {\n player.attack(player.getLocation().getChara((predic + \" \" + object + \" \" + object2).toUpperCase()));\n }\n else {\n System.out.println(\"There is no \" + ANSI_RED + (predic + \" \" + object + \" \" + object2).toLowerCase() + ANSI_RESET + \" here.\");\n }\n player.incrementTurn();\n break;\n case \"look\":\n switch (predic.toLowerCase()) {\n case \"inside\":\n if (player.getLocation().isObjInRoom((object + \" \" + object2).toUpperCase()))\n System.out.println(player.getLocation().getObjNoDel((object + \" \" + object2).toUpperCase()).getInsideDesc());\n else if(player.getLocation().isCharaInRoom(((object + \" \" + object2)).toUpperCase()))\n System.out.println(player.getLocation().getChara(((object + \" \" + object2)).toUpperCase()).getInsideDesc());\n else\n System.out.println(\"Object is not found in this area.\");\n player.incrementTurn();\n break;\n case \"under\":\n case \"below\":\n if (player.getLocation().isObjInRoom((object + \" \" + object2).toUpperCase()))\n System.out.println(player.getLocation().getObjNoDel((object + \" \" + object2).toUpperCase()).getUnderDesc());\n else if(player.getLocation().isCharaInRoom(((object + \" \" + object2)).toUpperCase()))\n System.out.println(player.getLocation().getChara(((object + \" \" + object2)).toUpperCase()).getUnderDesc());\n else\n System.out.println(\"Object is not found in this area.\");\n player.incrementTurn();\n break;\n case \"behind\":\n if (player.getLocation().isObjInRoom((object + \" \" + object2).toUpperCase()))\n System.out.println(player.getLocation().getObjNoDel((object + \" \" + object2).toUpperCase()).getBehindDesc());\n else if(player.getLocation().isCharaInRoom(((object + \" \" + object2)).toUpperCase()))\n System.out.println(player.getLocation().getChara(((object + \" \" + object2)).toUpperCase()).getBehindDesc());\n else\n System.out.println(\"Object is not found in this area.\");\n player.incrementTurn();\n break;\n case \"through\":\n if (player.getLocation().isObjInRoom((object + \" \" + object2).toUpperCase()))\n System.out.println(player.getLocation().getObjNoDel((object + \" \" + object2).toUpperCase()).getThroughDesc());\n else if(player.getLocation().isCharaInRoom(((object + \" \" + object2)).toUpperCase()))\n System.out.println(player.getLocation().getChara(((object + \" \" + object2)).toUpperCase()).getThroughDesc());\n else\n System.out.println(\"Object is not found in this area.\");\n player.incrementTurn();\n break;\n case \"at\":\n if (player.getLocation().isObjInRoom((object + \" \" + object2).toUpperCase()))\n System.out.println(player.getLocation().getObjNoDel((object + \" \" + object2).toUpperCase()).getDescription());\n else if (player.getLocation().isCharaInRoom((object + \" \" + object2).toUpperCase()))\n player.examineChara(player.getLocation().getChara((object + \" \" + object2).toUpperCase()));\n else\n System.out.println(\"Object is not found in this area.\");\n player.incrementTurn();\n break;\n default:\n System.out.println(\"Invalid Command.\");\n break;\n }\n break;\n case \"talk\":\n case \"speak\":\n if (\"to\".equals(predic)) {\n if (player.getLocation().isObjInRoom((object + \" \" + object2).toUpperCase()))\n System.out.println(player.getLocation().getObjNoDel((object + \" \" + object2).toUpperCase()).getDialogue());\n else if (player.getLocation().isCharaInRoom((object + \" \" + object2).toUpperCase()))\n System.out.println(player.getLocation().getChara((object + \" \" + object2).toUpperCase()).getDialogue());\n else\n System.out.println(\"There is nothing to talk to.\");\n player.incrementTurn();\n } else {\n System.out.println(\"Invalid Command.\");\n }\n break;\n case \"use\":\n if (predic.toUpperCase().equals(\"KEY\")) {\n if (object.toUpperCase().equals(\"ON\")) {\n if (player.getLocation().getConnectedRoom(action.toLowerCase(), object2.toLowerCase()) != null) {\n if (player.getLocation().getConnectedRoom(action.toLowerCase(), object2.toLowerCase()).getLocked()) {\n player.getLocation().getConnectedRoom(action.toLowerCase(), object2.toLowerCase()).unlock();\n System.out.println(\"You unlocked the door.\");\n } else\n System.out.println(\"You do not have a key.\");\n } else {\n if (player.inInventory(\"KEY\"))\n System.out.println(\"There is nothing to use a key on.\");\n else\n System.out.println(\"You do not have a key.\");\n }\n }\n }\n player.incrementTurn();\n break;\n default:\n System.out.println(\"Invalid Command\");\n return;\n }\n }\n else if (splitInput.length > 4) {\n System.out.println(\"Invalid Command\");\n return;\n }\n\n // Makes the enemies that are in the 'aggressive' state in the same room as the player attack the player.\n ArrayList<Character> NPCsInRoom = player.getLocation().getCharacters();\n if (NPCsInRoom.size() > 0) {\n for (Character character : NPCsInRoom) {\n if (character.getHealth() > 0 && character.getState().getStateName().equals(\"agg\")) {\n try {\n TimeUnit.SECONDS.sleep(1);\n } catch (Exception e) {\n System.out.println(\"Error: \" + e);\n }\n System.out.println(ANSI_RED + character.getName() + ANSI_RESET + \" is attacking!\");\n try {\n TimeUnit.SECONDS.sleep(1);\n } catch (Exception e) {\n System.out.println(\"Error: \" + e);\n }\n character.attack(player);\n }\n }\n }\n }",
"public void readInput()\n\t{\n\t\tString userInput;\n\t\tChoices choice;\n\t\t\n\t\tdo {\n\t\t\tlog.log(Level.INFO, \"Please give the inputs as:\\n\"\n\t\t\t\t\t+ \"ADDACCOUNT to add the account\\n\" \n\t\t\t\t\t+ \"DISPLAYALL to display all accounts\\n\"\n\t\t\t\t\t+ \"SEARCHBYACCOUNT to search by account\\n\"\n\t\t\t\t\t+ \"DEPOSIT to deposit into account\\n\"\n\t\t\t\t\t+ \"WITHDRAW to withdraw from the account\\n\"\n\t\t\t\t\t+ \"EXIT to end the application\"\n\t\t\t\t\t);\n userInput = scan.next();\n choice = Choices.valueOf(userInput);\n\n switch (choice) {\n case ADDACCOUNT : \taddAccount();\n \t\t\t\t\t\tbreak;\n \n case DISPLAYALL :\t\tdisplayAll();\n \t\t\t\t\t\tbreak;\n\n case SEARCHBYACCOUNT :\tsearchByAccount();\n \t\t\t\t\t\tbreak;\n \n case DEPOSIT :\t\t\tdepositAmount();\n \t\t\t\t\t\tbreak;\n \n case WITHDRAW :\t\t\twithDrawAmount();\n \t\t\t\t\t\tbreak;\n \n case EXIT:\t\t\t\tlog.log(Level.INFO, \"Application has ended successfully\");\n \t\t\t\t\t\tbreak;\n \n default: break;\n }\n } while(choice != Choices.EXIT);\n\t\t\n\t\tscan.close();\n\t}",
"public static void main(String[] args) {\n\t\t\t\tScanner input;\n\t\t\t\tboolean valid;\n\t\t\t\t\n\t\t\t\tdo {\n\t\t\t\t\t// Prompt the user for input\n\t\t\t\t\tSystem.out.println(\"Please enter a number: \");\n\t\t\t\t\t\n\t\t\t\t\t// re-initialize the scanner\n\t\t\t\t\tinput = new Scanner(System.in);\n\t\t\t\t\t\n\t\t\t\t\t// verify the right kind of input\n\t\t\t\t\tvalid = input.hasNextInt();\n\t\t\t\t\tSystem.out.println(valid);\n\t\t\t\t\t\n\t\t\t\t\t// we only read the user input if it is valid\n\t\t\t\t\tif(valid) {\n\t\t\t\t\t\t// this is the actual reading \n\t\t\t\t\t\tint userInput = input.nextInt();\n\t\t\t\t\t}\n\t\t\t\t} while (!valid);\n\t\t\t\t//Flow Control Demo Starts here:\n\t\t\t\t\n\t\t\t\t// Conditionals (If and Switch)\n\t\t\t\t\n//\t\t\t\tboolean condition = userInput >= 0;\n//\t\t\t\t\n//\t\t\t\tif (condition) {\n//\t\t\t\t\tSystem.out.println(\"Your number is Positive: \");\n//\t\t\t\t}\n////\t\t\t\tif (userInput > 50) {\n////\t\t\t\t\tSystem.out.println(\"Your in the magic range: \");\n////\t\t\t\t}\n//\t\t\t\telse {\n//\t\t\t\t\tSystem.out.println(\"Your number is Negative: \");\n//\t\t\t\t}\n//\t\t\t\t\n\t\t\t\t// Switch\n\t\t\t\t\n\t\t\t\tswitch (userInput) {\n\t\t\t\tcase 1:\n\t\t\t\t\tSystem.out.println(\"Home Menu: \");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tSystem.out.println(\"User Settings: \");\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"No Options valid: \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// similar code with if\n//\t\t\t\tif(userInput <= 5) {\n//\t\t\t\t\tif (userInput > 1) {\n//\t\t\t\t\t\tif(userInput %2 ==0) {\n//\t\t\t\t\t\t\tSystem.out.println(\"Target Range: \");\n//\t\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\t\n\t\t\t\t// Loops\n\t\t\t\t// While loop\n\t\t\t\t\n//\t\t\t\tint counter = 0;\n\t\t\t\t\n\t\t\t\t\n//\t\t\t\twhile(counter < 10) {\n//\t\t\t\t\tSystem.out.println(counter);\n//\t\t\t\t\tcounter++;\n//\t\t\t\t}\n\t\t\t\t\n//\t\t\t\twhile(userInput < 0){\n//\t\t\t\t\tSystem.out.println(\"Enter a number: \");\n//\t\t\t\t\tuserInput = input.nextInt();\n//\t\t\t\t\tSystem.out.println(userInput);\n//\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Do While Loop\n\t\t\t\t\n//\t\t\t\tdo {\n//\t\t\t\t\t\n//\t\t\t\t\tSystem.out.println(\"Enter a Positive number only: \");\n//\t\t\t\t\tuserInput = input.nextInt();\n//\t\t\t\t\tSystem.out.println(\"Iterating through Do-while\");\n//\t\t\t\n//\t\t\t\t} while (userInput < 0);\n//\t\t\t\t\n//\t\t\t\t\n\t\t\t\t// Print the input to show that we stored / received it\n//\t\t\t\tSystem.out.println(userInput);\n\t\t\t\t\n\t\t\t\t// For Loop \n\t\t\t\t\n\t\t\t\tfor(int i = 0; i < 10; i++) {\n\t\t\t\t\tSystem.out.println(i);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfor(int i = 9; i >=0; i-= 2) {\n\t\t\t\t\tSystem.out.println(i);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Sample Code from Powerpoint\n\t\t\t\tboolean condition = true;\n\t\t\t\tfor(int i = 1; condition; i += 4) {\n\t\t\t\t\tif (i % 3 == 0) {\n\t\t\t\t\t\tcondition = false;\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(i);\n\t\t\t\t}\n\t\t\t\n\t\t\t\t// Nested for loop\n\t\t\t\tfor(int i = 0 ; i < 10; i++) {\n\t\t\t\t\t\n\t\t\t\t\tfor(int j = 0; j < 10; j++) {\n\t\t\t\t\t\tSystem.out.println(i + \":\" + j);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t// Close the input\n\t\t\t\tinput.close();\n\n\t}",
"public static void mainMenu() {\n\t\tSystem.out.println(\"1. Train the autocomplete algorithm with input text\");\r\n\t\tSystem.out.println(\"2. Test the algorithm by entering a word fragment\");\r\n\t\tSystem.out.println(\"3. Exit (The algorithm will be reset on subsequent runs of the program)\");\r\n\t\tint choice = getValidInt(1, 3); // get the user's selection\r\n\t\tSystem.out.println(\"\"); // for appearances\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\t\r\n\t\t//evaluate the user's choice\r\n\t\tswitch (choice) {\r\n\t\tcase CONSTANTS.TRAIN:\r\n\t\t\t\r\n\t\t\tSystem.out.print(\"Enter a passage to train the algorithm (press enter to end the passage): \");\r\n\t\t\tString passage = scan.nextLine();\r\n\t\t\tprovider.train(passage);\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tcase CONSTANTS.TEST:\r\n\t\t\t\r\n\t\t\tString prefix;\r\n\t\t\tdo { // keep asking for input until a valid alphabetical string is given\r\n\t\t\t\tSystem.out.print(\"Enter a prefix to test autocomplete (alphabetic characters only): \");\r\n\t\t\t\tprefix = scan.nextLine();\r\n\t\t\t} while (!prefix.matches(\"[a-zA-z]+\"));\r\n\t\t\tSystem.out.println(\"\"); // for appearances\r\n\t\t\tshowResults(provider.getWords(prefix.toLowerCase()));\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase CONSTANTS.EXIT:\r\n\t\t\t\r\n\t\t\tSystem.exit(0);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tmainMenu();\r\n\t}",
"private void run()\r\n\t{\r\n\t\tboolean programLoop = true;\r\n\t\t\r\n\t\twhile(programLoop)\r\n\t\t{\r\n\t\t\tmenu();\r\n\t\t\tSystem.out.print(\"Selection: \");\r\n\t\t\tString userInput = input.nextLine();\r\n\t\t\t\r\n\t\t\tint validInput = -1;\r\n\t\t\t\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tvalidInput = Integer.parseInt(userInput);\r\n\t\t\t}\r\n\t\t\tcatch(NumberFormatException e)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Please enter a valid selection.\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tswitch(validInput)\r\n\t\t\t{\r\n\t\t\t\tcase 0: forInstructor();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1: addSeedURL();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2: addConsumer();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3: addProducer();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4: addKeywordSearch();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5: printStats();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t//case 10: debug(); //Not synchronized and will most likely cause a ConcurrentModificationException\r\n\t\t\t\t\t\t //break;\t//if multiple Producer and Consumer Threads are running.\r\n\t\t\t\tdefault: break;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}",
"public void input(){\n\t\tboolean[] inputKeyArray = inputHandler.processKeys();\n\t\tint[] inputMouseArray = inputHandler.processMouse();\n\t\tcurrentLevel.userInput(inputKeyArray, inputMouseArray);\n\t}",
"private void processInputUntilRoomChange() {\n while (true) {\n // Get the user input\n System.out.print(\"> \");\n String input = scan.nextLine();\n\n // Determine which command they used and act accordingly\n if (input.startsWith(\"help\")) {\n this.displayCommands();\n } else if (input.startsWith(\"look\")) {\n this.displayDescription(input.substring(input.indexOf(\" \") + 1));\n } else if (input.startsWith(\"get\")) {\n this.acquireItem(input.substring(input.indexOf(\" \") + 1));\n } else if (input.startsWith(\"go\")) {\n if (this.movePlayer(input.substring(input.indexOf(\" \") + 1))) {\n break;\n }\n } else if (input.startsWith(\"use\")) {\n this.useItem(input.substring(input.indexOf(\" \") + 1));\n } else if (input.startsWith(\"inventory\")) {\n System.out.print(player.listInventory());\n } // The player did not enter a valid command.\n else {\n System.out.println(\"I don't know how to \" + input);\n }\n }\n }",
"public UserInput()\n {\n try\n {\n scanner = new Scanner(System.in);\n input = new InputMethods();\n citiesTotal = new CityContainer();\n\n if(scanner != null)\n {\n askUser();\n }\n } catch(Exception ex)\n {\n }\n }",
"public static void main(String[] args) {\n\t\tUserInput ui = new UserInput();\n\n\t}",
"public void start() {\r\n\t\tboolean running = true;\r\n\t\twhile(running) {\r\n\t\t\t// Storage variable for user input\r\n\t\t\tString userInput = null;\r\n\t\t\tString[] systemOutput = null;\r\n\t\t\t\r\n\t\t\t// Check first input\r\n\t\t\tuserInput = getUserFirstInput(input);\r\n\t\t\t\r\n\t\t\t// If first prompt is valid, process accordingly\r\n\t\t\tif(userInput != null) {\r\n\t\t\t\tswitch(userInput) {\r\n\t\t\t\t\tcase \"0\": \r\n\t\t\t\t\t\tSystem.out.println(\"Thanks for using!\");\r\n\t\t\t\t\t\trunning = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tcase \"1\":\r\n\t\t\t\t\t\tsystemOutput = processor.calculateData(\"1\", null);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"2\":\r\n\t\t\t\t\t\tuserInput = getUserPartialOrFull(input);\r\n\t\t\t\t\t\tsystemOutput = processor.calculateData(\"2\", userInput);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"3\":\r\n\t\t\t\t\t\tuserInput = getUserZipCode(input);\r\n\t\t\t\t\t\tsystemOutput = processor.calculateData(\"3\", userInput);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tcase \"4\":\r\n\t\t\t\t\t\tuserInput = getUserZipCode(input);\r\n\t\t\t\t\t\tsystemOutput = processor.calculateData(\"4\", userInput);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tcase \"5\":\r\n\t\t\t\t\t\tuserInput = getUserZipCode(input);\r\n\t\t\t\t\t\tsystemOutput = processor.calculateData(\"5\", userInput);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tcase \"6\":\r\n\t\t\t\t\t\tsystemOutput = processor.calculateData(\"6\", null);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Print the output\r\n\t\t\t\tif(systemOutput != null) {\r\n\t\t\t\t\tSystem.out.println(\" \");\r\n\t\t\t\t\tSystem.out.println(\"BEGIN OUTPUT\");\r\n\t\t\t\t\tfor(String str : systemOutput) {\r\n\t\t\t\t\t\tSystem.out.println(str);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(\"END OUTPUT\");\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t}\r\n\t\tinput.close();\r\n\t}",
"public void readUserInput(){\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n try {\n String input = reader.readLine();\n while (!userValidation.validateUserInput(input)){\n input = reader.readLine();\n }\n elevatorController.configureNumberOfElevators(input);\n\n } catch (\n IOException e) {\n logger.error(e);\n }\n\n }",
"public int cmd_string(String input) {\n\t\tif (current_state == LEARN) {\r\n\t\t\t// By this point learn has hopefully been told its parent and how to send...\r\n\t\t\tcurrent_state = learningProgram.cmd_string(input);\r\n\t\t}\r\n\r\n\t\t// If we are still exploring the root menu...\r\n\t\tif (current_state == ROOT_MENU) {\r\n//\t\t\tSystem.out.print(\"\\\"\"+input+\"\\\" \\\"\"+Integer.toString(LEARN)+\"\\\"\\n\");\r\n\t\t\tif (input.equals(Integer.toString(LEARN))) {\r\n\t\t\t\tclearTerminal();\r\n\t\t\t\tsendOutput(\"You have chosen to learn!\");\r\n\t\t\t\tlearningProgram.printMenu();\r\n\t\t\t\tcurrent_state = LEARN;\r\n\t\t\t\tmessage = null;\r\n\t\t\t} else if (input.equals(Integer.toString(GAME))) {\r\n\t\t\t\tclearTerminal();\r\n\t\t\t\tif (gameProgram == null) {\r\n\t\t\t\t\tgameProgram = new GameProgram(this);\r\n\t\t\t\t\tSystem.out.println(\"New game created: \" + gameProgram);\r\n\t\t\t\t}\r\n//\t\t\t\tsend(\"You have chosen to play a game!\");\r\n\t\t\t\t// String newString = new String();\r\n\t\t\t\t// send(Integer.toString(newString.length()));\r\n\t\t\t\tsendOutput(gameProgram.getBoardString());\r\n\t\t\t\tsendOutput(\"\");\r\n\t\t\t\tsendOutput(\"Score: \" + gameProgram.getScoreString());\r\n\t\t\t\tsendOutput(\"\");\r\n\t\t\t\tsendOutput(gameProgram.getControlString());\r\n\t\t\t\tsendOutput(\"\");\r\n\t\t\t\tsendOutput(gameProgram.getKeyString());\r\n\t\t\t\tcurrent_state = GAME;\r\n\t\t\t\tmessage = null;\r\n\t\t\t} else if (input.equals(Integer.toString(EXIT))) {\r\n\t\t\t\tclearTerminal();\r\n\t\t\t\tsendOutput(\"You have chosen to quit!\");\r\n\t\t\t\tcurrent_state = EXIT;\r\n\t\t\t\tmessage = null;\r\n\t\t\t\t// Signal to quit\r\n\t\t\t\tinputSource.fireInputEvent(new InputEvent(this, \"quit\", InputEvent.SIGNAL));\r\n//\t\t\t\tmyFrame.quit();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (current_state == ROOT_MENU) {\r\n\t\t\tclearTerminal();\r\n\t\t\tif (message != null) {\r\n\t\t\t\tsendOutput(message);\r\n//\t\t\t\tmessage = null;\r\n\t\t\t}\r\n\t\t\tsendOutput(splashString);\r\n\r\n\t\t\tsendOutput(\"Version \" + versionNum);\r\n\t\t\tsendOutput(\"by \" + author);\r\n\r\n//\t\t\tsend(\"Main menu\");\r\n\t\t\tthis.printMenu();\r\n\t\t}\r\n\r\n\t\tif (current_state == EXIT) {\r\n\t\t\treturn this.EXIT;\r\n\t\t}\r\n\r\n\t\treturn this.ROOT_MENU;\r\n\r\n\t}",
"public static void getInput() {\n\t\tselectOption();\n\t\tsc = new Scanner(System.in);\n\t userInput2 = sc.nextInt();\n\t \n\t switch (userInput2) {\n\t \tcase 1: System.out.print(\"Enter the number for the factorial function: \");\n\t \t\t\tsc = new Scanner(System.in);\n\t\t\t\t userInput2 = sc.nextInt();\n\t\t\t\t System.out.println(\"The factorial of \" + userInput2 + \" is \" + factorial(userInput2));\n\t\t\t\t getInput();\n\t\t \t\tbreak;\n\t \tcase 2: System.out.print(\"Enter the Fibonacci position: \");\n\t\t\t\t\tsc = new Scanner(System.in);\n\t\t\t\t userInput2 = sc.nextInt();\n\t\t\t\t System.out.println(\"The fibonacci number at position \" + userInput2 + \" is \" + fib(userInput2));\n\t\t\t\t getInput();\n\t\t \t\tbreak;\n\t \tcase 3: System.out.print(\"Enter the first number: \");\n\t\t\t\t\tsc = new Scanner(System.in);\n\t\t\t\t userInput2 = sc.nextInt();\n\t\t\t\t System.out.print(\"Enter the second number: \");\n\t\t\t\t sc = new Scanner(System.in);\n\t\t\t\t userInput3 = sc.nextInt();\n\t\t\t\t System.out.println(\"The GCD of the numbers \" + userInput2 + \" and \" + userInput3 + \" is \" + GCD(userInput2, userInput3));\n\t\t\t\t getInput();\n\t\t \t\tbreak;\n\t \tcase 4: System.out.print(\"Enter n: \");\n\t\t\t\t\tsc = new Scanner(System.in);\n\t\t\t\t userInput2 = sc.nextInt();\n\t\t\t\t System.out.print(\"Enter r: \");\n\t\t\t\t sc = new Scanner(System.in);\n\t\t\t\t userInput3 = sc.nextInt();\n\t\t\t\t System.out.println(userInput2 + \" choose \" + userInput3 + \" is \" + choose(userInput2, userInput3));\n\t\t\t\t getInput();\n\t\t \t\tbreak;\n\t \tcase 5: System.out.print(\"Enter n: \");\n\t\t\t\t\tsc = new Scanner(System.in);\n\t\t\t\t userInput2 = sc.nextInt();\n\t\t\t\t System.out.print(\"Enter k: \");\n\t\t\t\t sc = new Scanner(System.in);\n\t\t\t\t userInput3 = sc.nextInt();\n\t\t\t\t System.out.println(\"The Josephus of \" + userInput2 + \" and \" + userInput3 + \" is \" + josephus(userInput2, userInput3));\n\t\t\t\t getInput();\n\t\t \t\tbreak;\n\t \tcase 6: System.out.println(\"Ending program...\");\n \t\t\t\tSystem.exit(0);\n \t\t\t\tbreak;\n \t\tdefault: System.out.println(\"\\nPlease enter number between 1 and 6\\n\");\n\t \t\t\tgetInput();\n\t \t\t\tbreak;\n\t }\t\n\t}",
"private void changeGame() {\n switch (input) {\n case \"1\":\n new Lotto().generate();\n break;\n case \"2\":\n new SmallLotto().generate();\n break;\n case \"3\":\n System.out.println(\"Good bye\");\n System.exit(0);\n break;\n default:\n startGame();\n }\n continueGame();\n }",
"public static void processUserInput(String input){\n\t\t\n\t\t\tAlgorithm1 alg1 = new Algorithm1(input, distance, inputMap);\n\t\t\t// Calculates shortest path using distance file for distance metric\n\t\t\t// Prints the path nodes\n\t\t\t// Prints the distance\n\t\t\talg1.getShortestPath();\n\t\t\t\n\t\t\t\n\t\t\tAlgorithm2 alg2 = new Algorithm2(input, distance, inputMap);\n\t\t\t// Calculates shortest path using both input and distance file for distance metric\n\t\t\t// Prints the path nodes\n\t\t\t// Prints the distance\n\t\t\talg2.getShortestPath();\n\t\t\t\n\t\t\t\n\t}",
"public static void processUserCommandLine(String command) throws InputMismatchException {\n String[] input = command.trim().split(\" \");\n Scanner scnr;\n String serial = \"\";\n String itemName = \"\";\n double price = 0;\n int quantity = 0;\n int location = 0;\n switch (input[0].toUpperCase()) {\n case \"A\":\n while (true) {\n try {\n scnr = new Scanner(System.in);\n System.out.print(\"Enter 12 Digit Serial Number (12 numerical digits): \");\n serial = scnr.next();\n backEnd.serialValidity(serial);\n backEnd.alreadyExists(serial);\n } catch (Exception e) {\n System.out.println(e.getMessage());\n continue;\n }\n break;\n }\n System.out.print(\"Enter Item Name: \");\n itemName = scnr.next();\n while (true) {\n try {\n scnr = new Scanner(System.in);\n System.out.print(\"Enter Item Price (A 2 decimal number such as 3.00): \");\n price = scnr.nextDouble();\n } catch (InputMismatchException e) {\n System.out.println(\"Not a valid price!\");\n continue;\n }\n break;\n }\n while (true) {\n try {\n scnr = new Scanner(System.in);\n System.out.print(\"Enter the Quantity Currently Available: \");\n quantity = scnr.nextInt();\n } catch (InputMismatchException e) {\n System.out.println(\"Not a Number!\");\n continue;\n }\n break;\n }\n while (true) {\n try {\n scnr = new Scanner(System.in);\n System.out.print(\"Enter the Location in the Store (0-9): \");\n location = scnr.nextInt();\n if (location > 9 || location < 0) {\n System.out.println(\"Location is not in range\");\n continue;\n }\n } catch (InputMismatchException e) {\n System.out.println(\"Not a Number!\");\n continue;\n }\n break;\n }\n GroceryStoreItem itemToAdd =\n new GroceryStoreItem(serial, itemName, price, quantity, location);\n backEnd.add(itemToAdd);\n break;\n\n case \"S\":\n scnr = new Scanner(System.in);\n System.out.print(\"Enter the Serial Number of the Item You Are Looking for: \");\n serial = scnr.next();\n GroceryStoreItem itemInfo = null;\n try {\n itemInfo = (GroceryStoreItem) backEnd.search(serial);\n } catch (NoSuchElementException e) {\n System.out.println(e.getMessage());\n break;\n }\n System.out.println(\"Item Serial Number: \" + itemInfo.getSerialNumber());\n System.out.println(\"Item Name: \" + itemInfo.getName());\n System.out.println(\"Item Price: \" + itemInfo.getCost());\n System.out.println(\"Item Quantity in Store: \" + itemInfo.getQuantity());\n System.out.println(\"Item Location: \" + itemInfo.getLocation());\n break;\n\n case \"R\":\n try {\n scnr = new Scanner(System.in);\n System.out.print(\"Enter the serial number of the item you would like removed: \");\n serial = scnr.next();\n } catch (NoSuchElementException e) {\n System.out.println(\"Not a valid Serial Number!\");\n }\n GroceryStoreItem removedItem = null;\n removedItem = (GroceryStoreItem) backEnd.remove(serial);\n if (removedItem == null) {\n System.out.println(\"Serial number either invalid or not found!\");\n } else {\n System.out.println(\"Removed Item Serial Number: \" + removedItem.getSerialNumber());\n System.out.println(\"Removed Item Name: \" + removedItem.getName());\n System.out.println(\"Removed Item Price: \" + removedItem.getCost());\n System.out.println(\"Removed Item Quantity: \" + removedItem.getQuantity());\n System.out.println(\"Removed Item Location: \" + removedItem.getLocation());\n }\n break;\n\n case \"C\":\n backEnd.clear();\n System.out.println(\"All items removed from table\");\n break;\n\n case \"L\":\n String[] serialNumbersInList = backEnd.list();\n GroceryStoreItem currentItem;\n String currentSerialNumber;\n String currentName;\n double currentPrice;\n int currentQuantity;\n int currentLocation;\n for (int i = 0; i < serialNumbersInList.length; i++) {\n currentItem = (GroceryStoreItem) backEnd.search(serialNumbersInList[i]);\n currentSerialNumber = (String) currentItem.getSerialNumber();\n currentName = (String) currentItem.getName();\n currentPrice = (double) currentItem.getCost();\n currentQuantity = (int) currentItem.getQuantity();\n currentLocation = (int) currentItem.getLocation();\n System.out.println(\"Item \" + (i + 1) + \": \");\n System.out.println(\"Serial Number: \" + currentSerialNumber);\n System.out.println(\"Name: \" + currentName);\n System.out.println(\"Price: $\" + currentPrice);\n System.out.println(\"Quantity: \" + currentQuantity);\n System.out.println(\"Location: \" + currentLocation);\n System.out.println();\n }\n System.out.println(\"==========================================\");\n System.out.println(\"Total net worth of store: $\" + backEnd.sumGrocery());\n break;\n case \"F\":\n DataWrangler dataWrangler = new DataWrangler(backEnd);\n scnr = new Scanner(System.in);\n System.out.println(\"What is the name of the file that you would like to read from: \");\n String fileToRead = scnr.next();\n dataWrangler.readFile(fileToRead);\n break;\n\n\n case \"H\":\n System.out.println(MENU);\n break;\n\n default:\n System.out.println(\"WARNING. Invalid command. Please enter H to refer to the menu.\");\n }\n }",
"public static void userSelection(){\n\t\tint selection;\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Which program would you like to run?\");\n\t\tselection=input.nextInt();\n\n\t\tif(selection == 1)\n\t\t\tmazeUnion();\n\t\tif(selection == 2)\n\t\t\tunionPathCompression();\n\t\tif(selection == 3)\n\t\t\tmazeHeight();\n\t\tif(selection == 4)\n\t\t\tmazeSize();\n\t\tif(selection == 5)\n\t\t\tsizePathCompression();\n\t}",
"public static String getUserInput() {\n\t\tif (testType == null) {\n\t\t\tuserInput = inputScanner.nextLine();\n\t\t} else if (testType.equalsIgnoreCase(\"makeReady\")) {\n\t\t\tcreateEnterTestSet();\n\t\t\tif (enterTestCount < enterCount)\n\t\t\t\tuserInput = (String) makeReadyEnters.get(enterTestCount++);\n\t\t}else if (testType.equalsIgnoreCase(\"sequenceTest\")) {\n\t\t\tcreateWrongSequenceTestSet();\n\t\t\tif (sequenceTestCount<wrongSeqCount)\n\t\t\t\tuserInput = (String) wrongSequenceAnswers.get(sequenceTestCount++);\n\t\t}\n\t\telse if (testType.equalsIgnoreCase(\"randomKeyPress\")) {\n\t\t\tcreatePlayfulSet();\n\t\t\tif (randomTestCount<randomCount)\n\t\t\t\tuserInput = (String) randomKeys.get(randomTestCount++);\n\t\t}\n\n\t\treturn userInput;\n\t}",
"String getUserInput();",
"public void getInput() {\r\n System.out.print(\"Is the car silent when you turn the key? \");\r\n setAnswer1(in.nextLine());\r\n if(getAnswer1().equals(YES)) {\r\n System.out.print(\"Are the battery terminals corroded? \");\r\n setAnswer2(in.nextLine());\r\n if(getAnswer2().equals(YES)){\r\n printString(\"Clean the terminals and try again\");\r\n }\r\n else {\r\n printString(\"The battery may be damaged.\\nReplace the cables and try again\");\r\n }\r\n\r\n }\r\n else {\r\n System.out.print(\"Does the car make a slicking noise? \");\r\n setAnswer3(in.nextLine());\r\n if(getAnswer3().equals(YES)) {\r\n printString(\"Replace the battery\");\r\n }\r\n else {\r\n System.out.print(\"Does the car crank up but fail to start? \");\r\n setAnswer4(in.nextLine());\r\n if(getAnswer4().equals(YES)) {\r\n printString(\"Check spark plug connections.\");\r\n }\r\n else{\r\n System.out.print(\"Does the engine start and then die? \");\r\n setAnswer5(in.nextLine());\r\n if(getAnswer5().equals(YES)){\r\n System.out.print(\"Does your care have fuel injection? \");\r\n setAnswer6(in.nextLine());\r\n if(getAnswer6().equals(YES)){\r\n printString(\"Get it in for service\");\r\n }\r\n else{\r\n printString(\"Check to insure the chock is opening and closing\");\r\n }\r\n }\r\n else {\r\n printString(\"This should be impossible\");\r\n }\r\n }\r\n }\r\n\r\n }\r\n\r\n\r\n\r\n }",
"@Override\n\tpublic void enterMain() {\n\t\tIsland island = game.getCurrentLocation();\n\t\tif (game.checkAccessibleIsland(island)) \n\t\t{\n\t\t\tboolean state = false;\n\t\t\twhile (state == false) {\n\t\t\t\tArrayList<Island> islands = game.getAvailableIslands();\n\t\t\t\tSystem.out.println(\"Your current money: \" + game.getMoney()+ \" coins.\");\n\t\t\t\tSystem.out.println(\"You have : \" + game.getRemainingDays() + \" days left.\");\n\t\t\t\tIsland currentLoc = game.getCurrentLocation();\n\t\t\t\tString islandName = currentLoc.getIslandName();\n\t\t\t\tSystem.out.println(\"Your current location is: \" + islandName + \" Island.\" + \"\\n\");\n\t\t\t\tSystem.out.println(\"What do you want to do? \");\n\t\t\t\tSystem.out.println(\"(1) See ship's specification\");\n\t\t\t\tSystem.out.println(\"(2) Go to other Island\");\n\t\t\t\tSystem.out.println(\"(3) Go to store in your current location\");\n\t\t\t\tSystem.out.println(\"(4) End game\");\n\t\t\t\ttry {\n\t\t\t\t\tint selectedAction = scanner.nextInt();\n\t\t\t\t\tif (selectedAction <= 4 && selectedAction > 0) {\n\t\t\t\t\t\tstate = true;\n\t\t\t\t\t\tif (selectedAction == 1) {\n\t\t\t\t\t\t\tgame.seeShipSpec();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (selectedAction == 2) {\n\t\t\t\t\t\t\tprintAvailableIslands(islands);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (selectedAction == 3) {\n\t\t\t\t\t\t\tgame.goToStore();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tgame.gameOver(\"You ended the game\");\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\tSystem.out.println(\"Please choose from actions above\");\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(INPUT_REQUIREMENTS);\n\t\t\t\t\tscanner.nextLine();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tboolean state = false;\n\t\t\twhile (state == false)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Your current money: \" + game.getMoney()+ \" coins.\");\n\t\t\t\tSystem.out.println(\"You have : \" + game.getRemainingDays() + \" days left.\");\n\t\t\t\tIsland currentLoc = game.getCurrentLocation();\n\t\t\t\tString islandName = currentLoc.getIslandName();\n\t\t\t\tSystem.out.println(\"Your current location is: \" + islandName + \" Island.\" + \"\\n\");\n\t\t\t\tSystem.out.println(\"What do you want to do? \");\n\t\t\t\tSystem.out.println(\"(1) See ship's specification\");\n\t\t\t\tSystem.out.println(\"(2) Go to store in your current location\");\n\t\t\t\tSystem.out.println(\"(3) End Game\");\n\t\t\t\ttry {\n\t\t\t\t\tint selectedAction = scanner.nextInt();\n\t\t\t\t\tif (selectedAction <= 3 && selectedAction > 0) {\n\t\t\t\t\t\tstate = true;\n\t\t\t\t\t\tif (selectedAction == 1) {\n\t\t\t\t\t\t\tgame.seeShipSpec();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (selectedAction == 2) {\n\t\t\t\t\t\t\tgame.goToStore();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tgame.gameOver(\"You ended the game\");\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\tSystem.out.println(\"Please choose from actions above\");\n\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.out.println(INPUT_REQUIREMENTS);\n\t\t\t\t\tscanner.nextLine();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@FXML\n private void handleUserInput() {\n String input = inputTextField.getText();\n storeUserInputHistory(input);\n try {\n Command command = ParserFactory.parse(input);\n command.execute(tasks, storage, history);\n } catch (ChronologerException e) {\n e.printStackTrace();\n }\n printUserMessage(\" \" + input);\n printChronologerMessage(UiMessageHandler.getOutputForGui());\n inputTextField.clear();\n }",
"protected void handleInput(String input) {}",
"public void processUser() {\r\n Scanner sc = new Scanner(System.in);\r\n model.setAllparameters(inputIntValueWithScanner(sc, View.INPUT_INT_HOUR_DATA, GlobalConstants.PRIMARY_HOUR_MAX_BARRIER),// the correct input (hour,minute,second) is sent to the model\r\n inputIntValueWithScanner(sc, View.INPUT_INT_MINUTE_DATA, GlobalConstants.PRIMARY_MINUTE_MAX_BARRIER),\r\n inputIntValueWithScanner(sc, View.INPUT_INT_SECOND_DATA, GlobalConstants.PRIMARY_SECOND_MAX_BARRIER));\r\n int k = 0;\r\n do { //at least once the menu option is chosen (for option number 6 (break) for example)\r\n k = inputIntValueWithScanner(sc, View.CHOOSE_OPERATION, GlobalConstants.MENU_OPTION_MAX_VALUE);\r\n chooseOperation(k);\r\n } while (k != GlobalConstants.MENU_OPTION_MAX_VALUE); //menu loop until break option isn't chosen\r\n\r\n }",
"public void processInput() {\n\n\t}",
"private static void handleInput(int input){\n In in = new In(); \n \n int i, j;\n double x;\n \n switch(input){\n case 1: //report\n graph.report();\n break;\n case 2: //MST\n graph.mst();\n break;\n case 3: //shortest path\n //GET 2 INPUTS and pass to shortest()\n System.out.print(\"Enter from vertex: \");\n i = in.readInt();\n System.out.print(\"Enter to vertex: \");\n j = in.readInt();\n graph.shortest(i, j);\n break;\n case 4: //down\n System.out.print(\"Enter from vertex: \");\n i = in.readInt();\n System.out.print(\"Enter to vertex: \");\n j = in.readInt();\n graph.edgeDown(i, j);\n break;\n case 5: //up\n System.out.print(\"Enter from vertex: \");\n i = in.readInt();\n System.out.print(\"Enter to vertex: \");\n j = in.readInt();\n graph.edgeUp(i, j);\n break;\n case 6: //change\n System.out.print(\"Enter from vertex: \");\n i = in.readInt();\n System.out.print(\"Enter to vertex: \");\n j = in.readInt();\n System.out.print(\"Enter weight: \");\n x = in.readDouble();\n graph.changeWeight(i, j, x);\n break;\n case 7: //eulerian\n graph.eulerian();\n break;\n case 8: //quit\n System.out.println(\"Exiting...\");\n quit = true;\n break;\n default:\n //nothing -- should never get here if all input is verified\n }\n \n }",
"public void parseInput(String userInput) {\n this.userIn = userInput;\n\n this.identifier = userIn.split(\" \")[0];\n\n switch (identifier) {\n case \"done\":\n completeTask();\n return;\n\n case \"list\":\n listAllTasks();\n return;\n\n case \"todo\":\n addToDo();\n return;\n\n case \"event\":\n addEvent();\n return;\n\n case \"deadline\":\n addDeadline();\n return;\n\n case \"delete\":\n deleteTask();\n return;\n\n case \"find\":\n findTask();\n return;\n\n default:\n ui.showListOfCommands();\n }\n }",
"public static void main(String[] args) {\n char option;\n Scanner scan = new Scanner(System.in);\n System.out.println(\"Welcome to MG's adventure world. Now your journey begins. Good luck!\");\n System.out.println(\"Please hit 'C' or 'c' to continue, anything else to quit-\");\n String input = getInput(scan, \"Cc\");\n System.out.println(\"You are in a dead valley.\");\n System.out.println(\"Please hit 'C' or 'c' to continue, anything else to quit-\");\n input = getInput(scan, \"Cc\");\n System.out.println(\"You walked and walked and walked and you saw a cave!\");\n cave();\n System.out.println(\"Please hit 'C' or 'c' to continue, anything else to quit-\");\n input = getInput(scan, \"Cc\");\n System.out.println(\"You entered a cave!\");\n System.out.println(\"Please hit 'C' or 'c' to continue, anything else to quit-\");\n input = getInput(scan, \"Cc\");\n System.out.println(\"Unfortunately, you ran into a GIANT!\");\n giant();\n System.out.println(\"Enter 'A' or 'a' to Attack, 'E' or 'E' to Escape, ANYTHING else is to YIELD\");\n input = getInput(scan, \"AaEe\", 10);\n System.out.println(\"Congratulations! You SURVIVED! Get your REWARD!\");\n System.out.println(\"There are three 3 tressure box in front of you! Enter the box number you want to open!\");\n box();\n input = getInput(scan);\n System.out.println(\"Hero! Have a good day!\");\n }",
"public static void main(String[] args) {\n int restingHeartRate = readFromUser(\"What is your resting heart rate?\");\n int age = readFromUser(\"What is your age?\");\n\n TargetCalculator userTarget = new TargetCalculator(restingHeartRate,age);\n }",
"public static void main(String[] args) {\n\t\tSystem.out.print(\"Enter a binary number:\");\r\n\t\tString input = GetInput();\r\n\r\n\t\t// if CheckInputCorrect(input) is false then the user is asked to re\r\n\t\t// input a number\r\n\r\n\t\twhile (!CheckInputCorrect(input)) {\r\n\t\t\tSystem.out.println(input + \" is not a binary number\");\r\n\t\t\tSystem.out.print(\"Enter a binary number:\");\r\n\t\t\tinput = GetInput();\r\n\t\t}\r\n\r\n\t\t// Once it is verified that the number that was input was binary the\r\n\t\t// input is stored in the variable numberInput. Then BinaryToNumber() is\r\n\t\t// called.\r\n\t\tString numberInput = input;\r\n\t\t// BinaryToNumber(numberInput);\r\n\t\tSystem.out.println(\"The base ten form of \" + input + \" is \"\r\n\t\t\t\t+ BinaryToNumber(numberInput));\r\n\r\n\t}",
"private static void takeInput() throws IOException {\n\n System.out.println(\"Enter number 1\");\n BufferedReader br= new BufferedReader(new InputStreamReader(System.in));\n String number1=br.readLine();\n System.out.println(\"Enter number 2\");\n String number2=br.readLine();\n System.out.println(\"Operation\");\n String op=br.readLine();\n //WhiteHatHacker processes the input\n WhiteHatHacker hack=new WhiteHatHacker(number1,number2,op);\n hack.processInput();\n }",
"public void state() {\n System.out.print(\"Enter a temperature: \");\n double temp = in.nextDouble();\n System.out.print(\"Enter a scale: \");\n in.nextLine();\n String scale = in.nextLine().toUpperCase();\n\n if (scale.equals(\"F\") || scale.equals(\"f\")) {\n if (temp <= 32) {\n System.out.println(\"\\nSolid.\\n\");\n } else if (temp < 212) {\n System.out.println(\"\\nLiquid.\\n\");\n } else {\n System.out.println(\"\\nGas.\\n\");\n }\n } else if (scale.equals(\"C\") || scale.equals(\"c\")) {\n if (temp <= 0) {\n System.out.println(\"\\nSolid.\\n\");\n } else if (temp < 100) {\n System.out.println(\"\\nLiquid.\\n\");\n } else {\n System.out.println(\"\\nGas.\\n\");\n }\n } else {\n System.out.println(\"\\nThat's not a valid scale.\\n\");\n }\n }",
"private static void input(String[] args) {\n try (BufferedReader scanner = new BufferedReader(\n new InputStreamReader(args.length > 0 ? new FileInputStream(args[0]) : System.in))) {\n\n String linija;\n\n // regularne definicije\n while ((linija = scanner.readLine()) != null && linija.startsWith(\"{\")) {\n String tmp[] = linija.split(\" \");\n\n tmp[0] = tmp[0].substring(1, tmp[0].length() - 1);\n String naziv = tmp[0];\n String izraz = expandRegularDefinition(tmp[1]);\n\n regularneDefinicije.put(naziv, izraz);\n\n // System.out.println(naziv + \", \" + izraz);\n }\n\n // stanja\n while (!linija.startsWith(\"%X\")) {\n linija = scanner.readLine().trim();\n }\n\n skipSplitAdd(linija, stanjaLA);\n\n // leksicke jedinke\n while (!linija.startsWith(\"%L\")) {\n linija = scanner.readLine().trim();\n }\n\n skipSplitAdd(linija, leksickeJedinke);\n\n // pravila leksickog analizatora\n\n while ((linija = scanner.readLine()) != null) {\n while (!linija.startsWith(\"<\")) {\n linija = scanner.readLine();\n }\n\n String tmp[] = linija.split(\">\", 2);\n\n String stateName = tmp[0].substring(1, tmp[0].length());\n String regDef = tmp[1];\n\n regDef = expandRegularDefinition(regDef);\n\n // System.out.println(stateName + \"<> \" + regDef);\n LexerRule lexerRule = new LexerRule(regDef, stateName, 1, \"<\" + stateName + \">\" + regDef);\n lexerRules.add(lexerRule);\n\n scanner.readLine(); // preskoci {\n\n linija = scanner.readLine().trim();\n while (linija != null && scanner.ready() && !linija.equals(\"}\")) {\n // radi nesto s naredbom\n lexerRule.addAction(linija);\n linija = scanner.readLine().trim();\n }\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void checkUserInput() {\n }",
"void readInput() {\n\t\ttry {\n\t\t\tBufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tString line = input.readLine();\n\t\t\tString [] numbers = line.split(\" \");\n\n\t\t\tlenA = Integer.parseInt(numbers[0]);\n\t\t\tlenB = Integer.parseInt(numbers[1]); \n\n\t\t\twordA = input.readLine().toLowerCase(); \n\t\t\twordB = input.readLine().toLowerCase();\n\n\t\t\tg = Integer.parseInt(input.readLine());\n\n\t\t\tString key; \n\t\t\tString [] chars;\n\t\t\tpenaltyMap = new HashMap<String, Integer>();\n\n\t\t\tfor(int i=0;i<676;i++) {\n\t\t\t\tline = input.readLine();\n\t\t\t\tchars = line.split(\" \");\n\t\t\t\tkey = chars[0] + \" \" + chars[1];\n\t\t\t\tpenaltyMap.put(key, Integer.parseInt(chars[2]));\n\n\t\t\t}\n\n\t\t\tinput.close();\n\n\t\t} catch (IOException io) {\n\t\t\tio.printStackTrace();\n\t\t}\n\t}",
"String getInput();",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"Key \t Description\");\n\t\tSystem.out.println(\"-----------------------------\");\n\t\tSystem.out.println(\"FC \t\tFahrenheit -> Celsius\");\n\t\tSystem.out.println(\"CF\t\tCelsius -> Fahrenheit\");\n\t\tString key = RUI.readUserStringInput(\"Enter Key:\");\n\t\tString input = key.toUpperCase();\n\t\tif (input.equals(\"FC\")) {\n\t\t\tfloat far = RUI.readUserIntInput(\"Enter Fahrenheit Measurement: \");\n\t\t\tfloat toCel = (far - 32) * 5/9;\n\t\t\tSystem.out.println(far + \" degrees Fahrenheit is \" + toCel + \" degrees Celsius\");\n\t\t\t\n\t\t} else if (input.equals(\"CF\")) {\n\t\t\tfloat cel = RUI.readUserIntInput(\"Enter Celsius Measurement: \");\n\t\t\tfloat toFar = (cel * 9/5) + 32;\n\t\t\tSystem.out.println(cel + \" degrees Celsius is \" + toFar + \" degrees Fahrenheit\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Invalid Input, Please Try Again\");\n\t\t} \n\t\t\n\t\t\n\t\t\n\t}",
"private void getInput() {\n\t\tSystem.out.println(\"****Welcome to TNEB online Payment*****\");\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter your current unit\");\r\n\t\tunit = scan.nextInt();\r\n\t}",
"public abstract void input();",
"private void getUserInput() {\n getUserTextInput();\n getUserPhotoChoice();\n getUserRoomChoice();\n getUserBedroomsChoice();\n getUserBathroomsChoice();\n getUserCoownerChoice();\n getUserIsSoldChoice();\n getUserTypeChoice();\n mAmenitiesInput = Utils.getUserAmenitiesChoice(mBinding.chipGroupAmenities.chipSchool,\n mBinding.chipGroupAmenities.chipShop, mBinding.chipGroupAmenities.chipTransport,\n mBinding.chipGroupAmenities.chipGarden);\n }",
"public void readInput()\n\t{\n\t\t//wrap input stream read input from user\n\t\tBufferedReader in = new BufferedReader( new InputStreamReader( System.in ));\n\t\t\n\t\t//prompt user for input\n\t\tSystem.out.println( \"Please enter a letter or type Quit to end.\");\n\t\t\n\t\ttry{\n\t\t\tString userGuess = in.readLine();\n\t\t\t\n\t\t\t//loop until the user types \"Quit\"\n\t\t\tdo{\n\t\t\t\t//invoke guessletter function with String input\n\t\t\t\thangmanGame.guessLetter(userGuess);\n\t\t\t\t//update currentGuessText\n\t\t\t\tcurrentGuessText = hangmanGame.getCurrentGuess();\n\t\t\t\t//trace out current guess\n\t\t\t\tSystem.out.println(\"Your current guess is: \" + currentGuessText);\n\t\t\t\t//update remainingStrikes\n\t\t\t\thangmanGame.numberOfRemainingStrikes();\n\t\t\t\t//trace out remaining number of strikes\n\t\t\t\tSystem.out.println(\"You currently have \" + hangmanGame);\n\t\t\t\t//invoke revealAnswer function to check over gameOver, gameWon, and getAnswer\n\t\t\t\trevealAnswer();\n\t\t\t}while ( userGuess != \"Quit\" );\n\t\t}\n\t\t//catch IOException ioe\n\t\tcatch (IOException ioe)\n\t\t{\n\t\t\t//tell exception to print its error log\n\t\t\tioe.printStackTrace();\n\t\t}\n\t}",
"public static void main(String[] args) {\n\n Scanner scanner = new Scanner(System.in);\n\n final String gameType = scanner.nextLine();\n final int playerCount = scanner.nextInt();\n\n log.info(\"[{}] was selected.\", gameType);\n log.info(\"Player count is [{}].\", playerCount);\n\n final Game game = GameFactory.build(gameType, playerCount);\n\n game.populate();\n game.shuffle();\n game.deal();\n game.start();\n\n scanner.close();\n }",
"public static void main(String[] args) {\n\n printRule();\n\n while (true) {\n // Asks if the user wants to play or quit the game\n System.out.print(\"\\n\\n\\tTo Start enter S\"\n + \"\\n\\tTo Quit enter Q: \");\n String command = input.next();\n char gameStatus = command.charAt(0);\n\n // If s is entered, the game will begin\n switch (gameStatus) {\n case 's':\n case 'S':\n clearBoard(); // initialize the board to zero\n gameOn();\n break;\n case 'q':\n case 'Q':\n System.exit(0);\n default:\n System.out.print(\"Invalid command.\");\n break;\n }\n }\n }",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\r\n int choice;\r\n int exit=1;\r\n while(exit!=0){\r\n System.out.print(\"1-Check Palindrome number\\n2-Extract Vowel and Consonant\\n3-Extract Alphabet\\n0-exit\\n\");\r\n System.out.print(\"Enter Your Choice: \");\r\n choice=sc.nextInt();\r\n switch (choice){\r\n case 1:\r\n palindrome palindrome=new palindrome();\r\n System.out.print(\"Enter number: \");\r\n int num=sc.nextInt();\r\n palindrome.setNum(num);\r\n System.out.println(palindrome.getResult()+\"\\n\");\r\n break;\r\n case 2:\r\n VowelandConsonant vc =new VowelandConsonant();\r\n System.out.print(\"Enter string: \");\r\n String string=sc.next();\r\n vc.setString(string);\r\n System.out.println(vc.getResult()+\"\\n\");\r\n break;\r\n case 3:\r\n System.out.print(\"Enter string: \");\r\n Alphabet alphabet=new Alphabet();\r\n String str=sc.next();\r\n alphabet.setStr(str);\r\n System.out.println(alphabet.getResult()+\"\\n\");\r\n break;\r\n case 0:\r\n exit=0;\r\n break;\r\n default:\r\n System.out.println(\"Please enter your choice according to the command provided\\n\");\r\n }\r\n }\r\n }",
"public String getState() {\n Scanner scanner = new Scanner(System.in);\n\n // Tell User to enter two digit state\n System.out.println(\"Enter state name: \");\n\n // Get the two digit state\n String state = scanner.next();\n\n return state;\n }",
"public static void main(String[]args) {\n\t\n\t \n\tArgsHandler handler = new ArgsHandler(args);\n if (!handler.empty()) {\n handler.execute();\n }\n \n final int exit = 0;\n final int setValues = 1;\n final int getValues = 2;\n final int execute2 = 3;\n final int printResult = 4;\n String word = null;\n \n /**\n * Our dialog menu with checking of input argumet's of program \n */\n do {\n UI.mainMenu();\n UI.enterChoice();\n switch (UI.getChoice()) {\n case exit:\n if (ArgsHandler.isDebug()) {\n System.out.println(\"\\nYou chosen 0. Exiting...\");\n System.out.format(\"%n############################################################### DEBUG #############################################################\");\n }\n break;\n case setValues:\n if (ArgsHandler.isDebug()) {\n \tSystem.out.format(\"%n############################################################### DEBUG #############################################################\");\n System.out.println(\"\\nYou chosen 1. Setting values...\");\n }\n word = UI.enterValues();\n break;\n case getValues:\n if (ArgsHandler.isDebug()) {\n \tSystem.out.format(\"%n############################################################### DEBUG #############################################################\");\n System.out.println(\"\\nYou chosen 2. Getting values...\");\n }\n if (word != null ) {\n UI.printText(word);\n } else {\n System.out.format(\"%nFirst you need to add values.\");\n }\n break; \n case execute2:\n if (ArgsHandler.isDebug()) {\n \tSystem.out.format(\"%n############################################################### DEBUG #############################################################\");\n System.out.println(\"\\nYou chosen 3. Executing task...\");\n }\n if (word != null) {\n \t final String []lines = NewHelper.DivString(word);\n \t System.out.println(\"\\nTask done...\");\n \t if (ArgsHandler.isDebug()) {\n \t System.out.format(\"%n############################################################### DEBUG #############################################################\");\n \t }\n } else {\n System.out.format(\"%nFirst you need to add values.\");\n }\n break;\n case printResult:\n if (ArgsHandler.isDebug()) {\n \tSystem.out.format(\"%n############################################################### DEBUG #############################################################\");\n System.out.format(\"%nYou chosen 4. \"\n + \"Printing out result...%n\");\n }\n if (word != null) {\n \tfinal String[] lines2 = NewHelper.DivString(word);\n \tfor (final String line2 : lines2) {\n NewHelper.printSymbols(line2);\n NewHelper.printSymbolNumbers(line2);\n \t}\n \tif(ArgsHandler.isDebug()) {\n \tSystem.out.format(\"%n############################################################### DEBUG #############################################################\");\n } \n \telse {\n System.out.format(\"%nFirst you need to add values.\"); \n }\n break;\n }\n default:\n System.out.println(\"\\nEnter correct number.\");\n }\n } while (UI.getChoice() != 0);\n}",
"public static void main(String[] args) {\n \n String MaritalStatus=\"D\";\n \n Scanner in = new Scanner(System.in);\n \n System.out.print(\"Please enter your Marital status:\");\n String userInput = in.nextLine();\n \n switch (MaritalStatus) \n { \n case \"D\":\n System.out.print(\"status: divorced\");\n break;\n case \"S\":\n System.out.print(\"status: single\");\n break;\n case \"M\":\n System.out.print(\"status: married\");\n break;\n case \"W\":\n System.out.print(\"status: widowed\");\n break; \n default:\n System.out.print(\"Invalid Date\");\n }\n \n \n }",
"@Override\n public String readUserInput() {\n while (true) {\n System.out.println(\"\");\n System.out.print(\"Enter Information: \");\n Scanner in = new Scanner(System.in);\n String userInput = in.nextLine();\n\n if (!userInput.equals(\"0\")) {\n String[] parts = userInput.split(\",\");\n if (parts.length == 5) {\n if (DateSorting.isDateValid(\"dd-MM-yyyy\", parts[2])) {\n if (TodoList.tasks.get(parts[0]) == null) {\n return userInput;\n } else {\n System.out.println(\"A task with this ID already exists, try again: \");\n }\n } else {\n System.out.println(\"The date entered is invalid, try again: \");\n }\n } else {\n System.out.println(\"Please follow instructions, try again: \");\n }\n } else {\n return userInput;\n }\n }\n }",
"private void handleInput()\n {\n String instructions = \"Options:\\n<q> to disconnect\\n<s> to set a value to the current time\\n<p> to print the map contents\\n<?> to display this message\";\n System.out.println(instructions);\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {\n while (true) {\n String line = br.readLine();\n if (line.equals(\"q\")) {\n System.out.println(\"Closing...\");\n break;\n } else if (line.equals(\"s\")) {\n System.out.println(\"setting value cli_app to current time\");\n collabMap.set(\"cli_app\", System.currentTimeMillis());\n } else if (line.equals(\"?\")) {\n System.out.println(instructions);\n } else if (line.equals(\"p\")) {\n System.out.println(\"Map contents:\");\n for (String key : collabMap.keys()) {\n System.out.println(key + \": \" + collabMap.get(key));\n }\n }\n }\n } catch (Exception ex) {\n }\n\n if (document != null)\n document.close();\n System.out.println(\"Closed\");\n }",
"public static void main(String[] args) {\n menu();\r\n int num = 0;\r\n try {\r\n Scanner scan = new Scanner(System.in);\r\n num = scan.nextInt();\r\n } catch (InputMismatchException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n switch (num)\r\n {\r\n case 1:\r\n commercial();\r\n break;\r\n case 2:\r\n residential();\r\n case 3:\r\n System.out.println(\"Your session is over\");\r\n default:\r\n System.out.println(\"\");\r\n }\r\n\r\n }",
"public static void main(String[] args) {\n Scanner userInput = new Scanner(System.in);\n boolean quit =false;\n Bank bank = new Bank(\"Dummy\");\n while(!quit){\n System.out.println(\"Please provide the input now\");\n switch (userInput.nextInt()){\n case 1:\n printInstructions();\n break;\n case 2:\n System.out.println(\"Good Please provide the name of the bank\");\n bank = startBank();\n break;\n case 3:\n startBranch(bank);\n break;\n case 4:\n bank.addCustomer();\n break;\n case 5:\n bank.customerTransaction();\n break;\n case 6:\n bank.updateTransaction();\n break;\n case 7:\n getBankDetail(bank);\n break;\n case 8:\n bank.getBalancePerBranch();\n break;\n case 9:\n quit = true;\n System.out.println(\"quitting the applicaiton\");\n break;\n default:\n System.out.println(\"Please give correct input\");\n }\n\n }\n }",
"private void processInput() {\r\n\t\ttry {\r\n\t\t\thandleInput(readLine());\r\n\t\t} catch (WrongFormatException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public String doInput() throws Exception\n\t{\n\t\tstandardReplacement = \"stateYourOldSiteName=stateYourNewSiteName\";\n\n\t\treturn \"input\";\n\t}",
"public static void main(String args[]) {\n\n if (args.length < 1) {\n System.err.println(USAGE_MSG);\n System.exit(1);\n }\n\n String command;\n Scanner commandLine = new Scanner(System.in);\n\n try {\n state = GameState.instance();\n if (args[0].endsWith(\".zork\")||args[0].endsWith(\".bork\")) {\n state.initialize(new Dungeon(args[0]));\n System.out.println(\"\\n\\n\\n\\n\\nWelcome to \" + \n state.getDungeon().getName() + \"!\");\n } else if (args[0].endsWith(\".sav\")) {\n state.restore(args[0]);\n System.out.println(\"\\nWelcome back to \" + \n state.getDungeon().getName() + \"!\");\n } else {\n System.err.println(USAGE_MSG);\n System.exit(2);\n }\n\n System.out.print(\"\\n\" + \n state.getAdventurersCurrentRoom().describe() + \"\\n\");\n\n command = promptUser(commandLine);\n\n while (!command.equals(\"q\")) {\n\t\tif(command.equals(\"EVENT\")){\n\t\t System.out.println(\"Welcome, hacker. These hacks may be gameBreaking and or dangerous to your health if typed wrong, be warned. Enter the Event name CAPS matters.\");\n\t\t command = promptUser(commandLine);\n\t\t System.out.print(EventFactory.instance().parse(command).execute());\n\t\t \n\t\t} else {\n\t\t//System.out.print(\"\\n\\n\\n\"); \t\t//Spacer that makes it look cleaner\n\t\tSystem.out.print(\n CommandFactory.instance().parse(command).execute());\n\n command = promptUser(commandLine);\n\t\t}\n\t }\n\n System.out.println(\"Bye!\");\n\n } catch(Exception e) { \n e.printStackTrace(); \n }\n }",
"String userInput(String question);",
"public static void main(String[] args) {\n System.out.println(\"This is Tasker, the place where you can handle all your tasks. With this, maintaining good health and well-being has never been easier!\\n\"); // introduces/presents the app\n ArrayList<Task> taskList; // declaring the ArrayList of tasks\n taskList = deser(); // deserializes any existing .ser file for ArrayList Object\n do { // runs the main program loop\n System.out.println(\"In Tasker, you can choose from...\\na. Check task list\\nb. Add a task\\nc. Remove a task\\nd. Mark a task as complete\\ne. Change a task's date\\nf. Save & Exit Tasker\"); // options menu \n System.out.print(\"Please select an option: \"); // prompting the user\n response = input.nextLine(); // receiving the user's input\n System.out.print(\"\\n\"); // printing a newline for formatting\n if (response.equalsIgnoreCase(\"a\")) { // if the user choes to look at task list\n printTaskList(taskList); // printing the task list to the user\n } else if (response.equalsIgnoreCase(\"b\")) { // if the user wants to add a task\n addTask(taskList); // allows the user to add a task\n } else if (response.equalsIgnoreCase(\"c\")) { // if the user wants to remove a task\n delTask(taskList); // allows the user to remove a task\n } else if (response.equalsIgnoreCase(\"d\")) { // if the user wants to mark a task as complete\n markComplete(taskList); // allows the user to mark a task as complete\n } else if (response.equalsIgnoreCase(\"e\")) { // if the user wants to change a task's date\n promptDate(taskList); // allows the user to change the date of a task\n } else if (!response.equalsIgnoreCase(\"f\")){\n System.out.println(\"Invalid input.\"); // telling the user they entered an invalid input\n }\n } while (!response.equalsIgnoreCase(\"f\")); // while the user does not want to exit \n ser(taskList); // serializes the ArrayList of the task objects the user created\n }",
"@Override\n\tpublic void run() {\n\t\tString algorithem = \"LRU\";\n\t\tInteger capacity = 5;\n\t\t// TODO Auto-generated method stub\n\t\twhile (true) {\n\n\t\t\twrite(\"Please enter your command\");\n\t\t\tString input = this.m_Scanner.nextLine();\n\t\t\tif (input.equalsIgnoreCase(\"stop\")) {\n\t\t\t\twrite(\"Thank you\");\n\t\t\t\tpcs.firePropertyChange(\"statechange\", this.state, StateEnum.STOP);\n\t\t\t\tthis.state = StateEnum.STOP;\n\t\t\t\tbreak;\n\t\t\t} else if (input.contains(\"Cache_unit_config\")) {\n\t\t\t\twhile (true) {\n\t\t\t\t\tString[] splited = input.split(\"\\\\s+\");\n\t\t\t\t\tif (splited.length != 3) {\n\t\t\t\t\t\twrite(\"Worng params, Please enter your command\");\n\t\t\t\t\t\tinput = this.m_Scanner.nextLine();\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tboolean found = false;\n\t\t\t\t\tfor (String algo : this.m_AlgoNames) {\n\t\t\t\t\t\tif (splited[1].contains(algo)) {\n\t\t\t\t\t\t\tpcs.firePropertyChange(\"algochange\", algorithem, algo);\n\t\t\t\t\t\t\talgorithem = algo;\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (found == false) {\n\t\t\t\t\t\twrite(\"Unknown alogrithem, Please enter your command\");\n\t\t\t\t\t\tinput = this.m_Scanner.nextLine();\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tInteger cap = Integer.parseInt(splited[2]);\n\t\t\t\t\t\tpcs.firePropertyChange(\"capcitychange\", capacity, cap);\n\t\t\t\t\t\tcapacity = cap;\n\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\twrite(\"Capcity is alogrithem, Please enter your command\");\n\t\t\t\t\t\tinput = this.m_Scanner.nextLine();\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else if (input.equalsIgnoreCase(\"start\")) {\n\t\t\t\tpcs.firePropertyChange(\"statechange\", this.state, StateEnum.START);\n\t\t\t\tthis.state = StateEnum.START;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n LuuPhuongUyen L = new LuuPhuongUyen();\n L.addLast(\"00\", \"aa\", 2, 2);\n L.addLast(\"11\", \"bb\", 3, 2);\n while (true) {\n L.menu();\n int choice = sc.nextInt();\n switch (choice) {\n case 1:\n L.addItem();\n break;\n case 2:\n L.searchItem();\n break;\n case 3:\n L.deleteItem();\n break;\n case 4:\n L.traverse();\n break;\n case 5:\n return;\n }\n }\n }",
"public static void main(String[] args){\n boolean allGood;\n //create a new logic object so we can get the user information properly\n Logic logic = new Logic();\n //create a new menu object so we can display the correct options\n Menu menu = new Menu();\n\n //load the json information so we can use it later in the program\n allGood = logic.loadData();\n if(allGood){\n //ask the user for their information so we can use it later\n logic.Intro();\n\n\n do{\n //print the first menu and ask the user what they want to do\n menu.printMenu1();\n menu.askForOption();\n\n //if the user does not input a valid option\n while(!menu.validOption1()){\n System.out.println(\"Please Insert a valid option\");\n //re-print the menu and ask again\n menu.printMenu1();\n menu.askForOption();\n }\n\n //choose which function to run depending on what option the user chose\n logic.whichOptionM1(menu.getOption1());\n\n //if the user chose option 1, display the second menu\n if(menu.getOption1() == 1) {\n do {\n //display menu 2 and ask the user for their option\n menu.printMenu2();\n menu.askForOptionString();\n\n //if the user enters an invalid option\n while (!menu.validOption2()){\n //print an error message and ask for the option again\n System.out.println(\"Please Insert a valid option\");\n menu.printMenu2();\n menu.askForOptionString();\n }\n\n //choose which function to run depending on what the user inputs\n logic.whichOptionM2(menu.getOption2());\n\n }while (!menu.getOption2().equalsIgnoreCase(\"f\"));\n }\n }while(!menu.exitMenu1());\n\n }\n }",
"Main(String[] args) {\n if (args.length < 1 || args.length > 3) {\n throw error(\"Only 1, 2, or 3 command-line arguments allowed\");\n }\n\n _config = getInput(args[0]);\n\n if (args.length > 1) {\n _input = getInput(args[1]);\n } else {\n _input = new Scanner(System.in);\n }\n\n if (args.length > 2) {\n _output = getOutput(args[2]);\n } else {\n _output = System.out;\n }\n }",
"public static void main(String[] args) throws IOException\n {\n boolean metric = false;\n double[] gravity = new double[8];\n double[] weightOnPlanets = new double[8];\n double weight = 0.0;\n String[] names = {\"Mercury\", \"Venus\", \"Earth\", \"Mars\", \"Jupiter\", \"Saturn\", \"Uranus\", \"Neptune\"};\n String input = \"\";\n \n \n Scanner in = new Scanner(System.in);\n \n \n //INPUT AND DATA MANIPULATIONS\n System.out.print(\"Please enter your weight on Earth: \");\n weight = in.nextDouble();\n System.out.print(\"Is your weight in kilograms [Y/N]: \");\n input = in.next();\n \n //Since metric is already false, I don't need an else statement here\n if(input.substring(0,1).equalsIgnoreCase(\"Y\"))\n {\n metric = true;\n }\n \n gravity = getGravity(gravity);\n weightOnPlanets = weightOnPlanets(weightOnPlanets, metric, gravity, weight);\n output(gravity, metric, weightOnPlanets, names);\n }",
"public static void main(String[] args) throws Exception{\n locations = World.getInstance();\n player = Player.getInstance();\n\n startMessage();\n\n try(BufferedReader reader = new BufferedReader(new InputStreamReader(System.in))){\n playerName = reader.readLine();\n printConstantMessage(Constants.HELLO_MSG, playerName);\n System.out.println();\n\n player.moveTo(locations.stream().findFirst().get());\n\n while(runGame){\n System.out.print(Constants.PRE_INPUT_TEXT);\n parseInput(reader.readLine());\n }\n }\n }",
"public static void launch(Scanner userinput) {\n int userint; //initializes the variable before hand so it can be modified to catch exception without compile issues\n userint = userinput.nextInt();//handled to take int for the function poschecker\n methods.poschecker(userint);//function to validate if its positive\n }",
"public void userForm(){\n\t\tSystem.out.print(menu);\n\t\tScanner input = new Scanner(System.in);\n\t\tselection = input.nextInt();\n\t\tmenuActions(selection);\n\t\t}",
"public static Command parser(String input) {\r\n\t\tCommand command;\r\n\t\tif (input.equals(\"\")) {\r\n\t\t\treturn new CommandInvalid(\"User input cannot be empty\");\r\n\t\t}\r\n\r\n\t\tif ((command = parserAdd(input)) != null) {\r\n\t\t\tcurrent_status = NATURAL_STATE;\r\n\t\t\treturn command;\r\n\t\t} else if ((command = parserEdit(input)) != null) {\r\n\t\t\tcurrent_status = NATURAL_STATE;\r\n\t\t\treturn command;\r\n\t\t} else if ((command = parserShow(input)) != null) {\r\n\t\t\tcurrent_status = SHOW_STATE;\r\n\t\t\treturn command;\r\n\t\t} else if ((command = parserExit(input)) != null) {\r\n\t\t\treturn command;\r\n\t\t} else if ((command = parserDelete(input)) != null) {\r\n\t\t\tcurrent_status = NATURAL_STATE;\r\n\t\t\treturn command;\r\n\t\t} else if ((command = parserSave(input)) != null) {\r\n\t\t\tcurrent_status = NATURAL_STATE;\r\n\t\t\treturn command;\r\n\t\t} else if ((command = parserClear(input)) != null) {\r\n\t\t\tcurrent_status = NATURAL_STATE;\r\n\t\t\treturn command;\r\n\t\t} else if ((command = parserUndo(input)) != null) {\r\n\t\t\tcurrent_status = NATURAL_STATE;\r\n\t\t\treturn command;\r\n\t\t} else if ((command = parserOpen(input)) != null) {\r\n\t\t\tcurrent_status = NATURAL_STATE;\r\n\t\t\treturn command;\r\n\t\t} else if ((command = parserCheck(input)) != null) {\r\n\t\t\treturn command;\r\n\t\t} else if ((command = parserSearch(input)) != null) {\r\n\t\t\tcurrent_status = SEARCH_STATE;\r\n\t\t\treturn command;\r\n\t\t} else if ((command = parserRedo(input)) != null) {\r\n\t\t\tcurrent_status = NATURAL_STATE;\r\n\t\t\treturn command;\r\n\t\t} else if ((command = parserHelp(input)) != null) {\r\n\t\t\treturn command;\r\n\t\t} else if ((command = parserDisplayAll(input)) != null) {\r\n\t\t\tcurrent_status = NATURAL_STATE;\r\n\t\t\treturn command;\r\n\t\t} else if ((command = parserSort(input)) != null) {\r\n\t\t\tcurrent_status = SORT_STATE;\r\n\t\t\treturn command;\r\n\t\t}\r\n\t\treturn new CommandInvalid(\"Invalid Command. Please check 'Help' for proper input.\");\r\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 static void main(String[] args)\r\n\t{\r\n\t\tSystem.out.print(\"Choose task todo: [G]et all task, [C]reate new task, [S]tart task, [E]nd task :\");\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tString input = sc.next();\r\n\r\n\t\ttaskProcess(input);\r\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\tString userInput= in.nextLine();\n\t\tuserInput.intern();\n\t\tString first = \"anton\";\n\t\tSystem.out.println(first==userInput);\n\t\t\n\t}",
"static void take_the_input() throws IOException{\n\t\tSystem.out.print(\"ENTER THE ADDRESS : \");\n\n\t\taddress = hexa_to_deci(scan.readLine());\n\t\tSystem.out.println();\n\n\t\twhile(true){\n\t\t\tprint_the_address(address);\n\t\t\tString instruction = scan.readLine();\n\t\t\tint label_size = check_for_label(instruction);\n\t\t\tinstruction = instruction.substring(label_size);\n\t\t\tmemory.put(address, instruction);\n\t\t\tif(stop_instruction(instruction))\n\t\t\t\tbreak;\n\t\t\taddress+=size_of_code(instruction);\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"DO YOU WANT TO ENTER ANY FURTHUR CODE (Y/N) : \");\n\t\tString choice = scan.readLine();\n\t\tSystem.out.println();\n\t\tif(choice.equals(\"Y\"))\n\t\t\ttake_the_input();\n\t}",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"What task: \");\r\n\t\tint option = scan.nextInt();\r\n\t\tswitch (option) {\r\n\t\tcase 1:\r\n\t\t\tpositionalNumbers();\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tpassword();\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tmean();\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tbase();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"public static String readUserInput() {\n return in.nextLine();\n }",
"private void start() {\n Scanner scanner = new Scanner(System.in);\n \n // While there is input, read line and parse it.\n String input = scanner.nextLine();\n TokenList parsedTokens = readTokens(input);\n }",
"public void run() {\n\n\t\tString type = \"\";\n\t\tboolean done = false;\n\t\tboolean done2 = false;\n\t\t\n\t\twhile (done2 == false) { //Outer loop to process errors without program terminating\n\t\t\ttry {\n\n\t\t\t\twhile (done == false) { //Taking user input and throwing errors\n\t\t\t\t\tif (type != null && loan == null) {\n\t\t\t\t\t\tSystem.out.println(\"Please type 'Simple' or 'Amortized' for your loan type. Or type 'Q' to quit.\");\n\t\t\t\t\t\ttype = scnr.next();\n\t\t\t\t\t}\n\t\t\t\t\tif (type.equals(\"Simple\") || type.equals(\"simple\") && loan == null) {\n\t\t\t\t\t\tloan = new SimpleLoan();\n\t\t\t\t\t}\n\t\t\t\t\tif (type.equals(\"Amortized\") || type.equals(\"amortized\") && loan == null) {\n\t\t\t\t\t\tloan = new AmortizedLoan();\n\t\t\t\t\t}\n\t\t\t\t\tif (type.equals(\"q\") || type.equals(\"Q\")) {\n\t\t\t\t\t\tdone = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if (loan == null) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\tSystem.out.println(\"Enter applicant name: \");\n\t\t\tloan.name = scnr.next();\n\t\t\tSystem.out.println(\"Enter interest rate as a percentage (not a decimal): \");\n\t\t\tloan.interestRate = scnr.nextDouble();\n\t\t\tSystem.out.println(\"Enter length of loan in years: \");\n\t\t\tloan.length = scnr.nextInt();\n\t\t\tSystem.out.println(\"Enter principal amount: \");\n\t\t\tloan.principal = scnr.nextDouble();\n\t\t\tString summary = loan.process();\n\t\t\tloan = null;\n\t\t}\n\t\t\n\t\tSystem.out.print(\"Loan application processing complete.\");\n\t\tdone2 = true;\n\t\t\n\t\t}\n\t\tcatch (NullPointerException e) {\n\t\t\tSystem.out.println(\"Only specify simple or amortized as loan type. Try again.\");\n\t\t\tcontinue;\n\t\t}\n\t\tcatch (InputMismatchException e) {\n\t\t\tSystem.out.println(\"Input specified is in the wrong format. Try again.\");\n\t\t\tscnr.next();\n\t\t}\n\t\t}\n\n\t}",
"public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\r\n\t\t\r\n\t\t//prompt for user input \r\n\t\tSystem.out.println(\"Enter a line of text to control the machine.\\n\");\r\n\t\t\r\n\t\t//enter the text\r\n\t\tString text = input.nextLine();\r\n\t\t\r\n\t\t//create a switch statement for text\r\n\t\tswitch(text){\r\n\t\t\tcase \"start\":\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"\\nMachine Started!!\\n\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase \"stop\":\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Machine Stopped!!\\n\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase \"speed up\":\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Speed increased!!\\n\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase \"speed down\":\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Speed Decreased!!\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tdefault:\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Wrong input.Please try again.\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void run() {\n\n ui.startDuke();\n storage.readFile(lists, ui);\n\n Scanner reader = new Scanner(System.in);\n\n while (true) {\n\n String inp = reader.nextLine();\n parse.checkInstruction(inp, storage, ui, lists, tasks);\n }\n }",
"private void getInput() { \n\t\txMove = 0;\n\t\tyMove = 0;\n\t\tif(handler.getKeyManager().pause) {\n\t\t\tMenuState menu = new MenuState(handler);\n\t\t\tState.setState(menu);\n\t\t}\n\t\t\n\t\tif(handler.getKeyManager().pKey) {\n\t\t\tif(gear != 0)\n\t\t\t\tchangeGear(0);\n\t\t}\n\t\tif(handler.getKeyManager().oKey) {\n\t\t\tif(gear != 1 && vector[0] == 0)\n\t\t\t\tchangeGear(1);\n\t\t}\n\t\tif(handler.getKeyManager().iKey) {\n\t\t\tif(gear != 2)\n\t\t\t\tchangeGear(2);\n\t\t}\n\t\tif(handler.getKeyManager().uKey) {\n\t\t\tif(gear != 3 && vector[0] == 0)\n\t\t\t\tchangeGear(3);\n\t\t}\n\t\t\n\t\t\t\n\t\tif(handler.getKeyManager().gas) {\n\t\t\tif(GameState.getGameActive() == 0 || GameState.getGameActive() == 4) {\n\t\t\t\tif(vector[0] < topSpeed && gear != 2 && gear != 0)\n\t\t\t\t\tvector[0] += accel;\n\t\t\t} else if (GameState.getGameActive() == 1 || GameState.getGameActive() == 2) {\n\t\t\t\tif(overSelector == 0) {\n\t\t\t\t\tConfigState config = new ConfigState(handler);\n\t\t\t\t\tState.setState(config);\n\t\t\t\t}else if(overSelector == 1) {\n\t\t\t\t\tMenuState menustate = new MenuState(handler);\n\t\t\t\t\tState.setState(menustate);\n\t\t\t\t}else if(overSelector == 2) {\n\t\t\t\t\tSystem.exit(1);\n\t\t\t\t}\n\t\t\t}\n\t\t}else if(!handler.getKeyManager().gas || gear == 2) {\n\t\t\t\tif(vector[0] > accel)\n\t\t\t\t\tvector[0] -= accel;\n\t\t\t\telse if(vector[0] > 0 && vector [0] <= 5 * accel)\n\t\t\t\t\tvector[0] = 0;\n\t\t}\n\t\t\n\t\tif(handler.getKeyManager().brake || (gear == 0 && vector[0] > 0)) {\n\t\t\tif(vector[0] > 0 && vector[0] - 5 * accel > 0)\n\t\t\t\tvector[0] -= 5 * accel;\n\t\t\telse if(vector[0] > 0)\n\t\t\t\tvector[0] = 0;\n\t\t}\n\t\t\n\t\tif(handler.getKeyManager().left) {\n\t\t\tif((GameState.getGameActive() == 0 || GameState.getGameActive() == 4) && vector[0] > 0) {\n\t\t\t\tif(dTurn < 0.1)\n\t\t\t\t\tdTurn += 0.02;\n\t\t\t\tif(vector[1] - dTurn <= 0)\n\t\t\t\t\tvector[1] = (double)(2 * Math.PI);\n\t\t\t\tvector[1] -= dTurn;\n\t\t\t\tif(dTurn < 0.05)\n\t\t\t\t\tdTurn += 0.01;\n\t\t\t\t//System.out.println(\"R\");\n\t\t\t} else if(GameState.getGameActive() == 1 || GameState.getGameActive() == 2) {\n\t\t\t\tif(overSelector > 0) {\n\t\t\t\t\toverSelector--;\n\t\t\t\t}\n\t\t\t}\n\t\t}else if(!handler.getKeyManager().left && dTurn > 0) {\n\t\t\tdTurn = 0;\n\t\t}\n\t\t\n\t\tif(handler.getKeyManager().right) {\n\t\t\tif((GameState.getGameActive() == 0 || GameState.getGameActive() == 4) && vector[0] > 0) {\n\t\t\t\tif(dTurn < 0.1)\n\t\t\t\t\tdTurn += 0.02;\n\t\t\t\tvector[1] += dTurn;\n\t\t\t\t//System.out.println(dTurn);\n\t\t\t\tif(vector[1] >= (double)(2 * Math.PI))\n\t\t\t\t\tvector[1] = 0;\n\t\t\t}else if(GameState.getGameActive() == 1 || GameState.getGameActive() == 2) {\n\t\t\t\tif(overSelector < buttons.length - 1) {\n\t\t\t\t\toverSelector++;\n\t\t\t\t}\n\t\t\t}\n\t\t}else if(!handler.getKeyManager().right && dTurn > 0) {\n\t\t\tdTurn = 0;\n\t\t}\n\t\t\n\t\tif((gear == 3) || ((gear == 2 || gear== 0) && prevGear == 3)) {\n\t\t\txMove = (double)(vector[0] * Math.cos(vector[1]));\n\t\t\tyMove = (double)(vector[0] * Math.sin(vector[1]));\n\t\t}else if(gear == 1 || ((gear == 2 || gear == 0) && prevGear == 1)) {\n\t\t\txMove = (double)(-vector[0] * Math.cos(vector[1]));\n\t\t\tyMove = (double)(-vector[0] * Math.sin(vector[1]));\n\t\t}\n\t}",
"public static void take_inputs(){\n\t\tScanner in = new Scanner(System.in);\n\t\tSystem.out.println(\"Input the ideal restaurant attributes:\");\n\t\tSystem.out.print(\"Cheap: \"); cheap = in.nextFloat();\n\t\tSystem.out.print(\"Nice: \"); nice = in.nextFloat();\n\t\tSystem.out.print(\"Traditional: \"); traditional = in.nextFloat();\n\t\tSystem.out.print(\"creative: \"); creative = in.nextFloat();\n\t\tSystem.out.print(\"Lively: \"); lively = in.nextFloat();\n\t\tSystem.out.print(\"Quiet: \"); quiet = in.nextFloat();\n\t\t\n\t\tSystem.out.println(\"Input the attributes weights:\");\n\t\tSystem.out.print(\"Weight for Cheap: \"); wt_cheap = in.nextFloat();\n\t\tSystem.out.print(\"Weight for Nice: \"); wt_nice = in.nextFloat();\n\t\tSystem.out.print(\"Weight for Traditional: \"); wt_traditional = in.nextFloat();\n\t\tSystem.out.print(\"Weight for creative: \"); wt_creative = in.nextFloat();\n\t\tSystem.out.print(\"Weight for Lively: \"); wt_lively = in.nextFloat();\n\t\tSystem.out.print(\"Weight for Quiet: \"); wt_quiet = in.nextFloat();\n\t}",
"public void run() {\n Scanner reader = new Scanner(System.in);\n char input = reader.next().charAt(0);\n if(input == 'w'){\n robotMovement.forward();\n }\n else if(input == 's') {\n robotMovement.backward();\n }\n else if(input == 'a') {\n robotMovement.left();\n }\n else if(input == 'd') {\n robotMovement.right();\n }\n else {\n robotMovement.stop();\n }\n }",
"public void get_UserInput(){\r\n\t Scanner s = new Scanner(System.in);\r\n\t // get User inputs \r\n\t System.out.println(\"Please enter a number for Dry (double):\");\r\n\t DRY = s.nextDouble();\r\n\t System.out.println(\"Please enter a number for Wet (double):\");\r\n\t WET = s.nextDouble(); \r\n\t System.out.println(\"Please enter a number for ISNOW (double):\");\r\n\t ISNOW = s.nextDouble();\r\n\t System.out.println(\"Please enter a number for Wind(double):\");\r\n\t WIND = s.nextDouble(); \r\n\t System.out.println(\"Please enter a number for BUO (double):\");\r\n\t BUO = s.nextDouble();\r\n\t System.out.println(\"Please enter a number for Iherb (int):\");\r\n\t IHERB = s.nextInt(); \r\n\t System.out.println(\"****Data for parameters are collected****.\");\r\n\t System.out.println(\"Data for parameters are collected.\");\r\n\t dry=DRY;\r\n\t wet=WET;\r\n}",
"public void FSMProcess(String currentInput) throws BadInputException{\n if (contentsMap.containsKey(currentState + currentInput)) {\n System.out.print(contentsMap.get(currentState + currentInput).getOutputSymbol());\n this.currentState = contentsMap.get(currentState + currentInput).getNextState();\n }\n else throw new BadInputException();\n }",
"public static void main(String[] args) {\n final Scanner scanner = new Scanner(System.in);\n boolean exit = false;\n String select;\n loadFromFile();\n do {\n System.out.println(\"Premier League Manager\");\n System.out.println(\"=================================\");\n System.out.println(\"Please enter A to Add Football Club\");\n System.out.println(\"Please enter D to Delete Football Club\");\n System.out.println(\"Please enter S to Display Club Statistics\");\n System.out.println(\"Please enter P to Display League Table\");\n System.out.println(\"Please enter M to Add Played Match\");\n System.out.println(\"Please enter G to Start GUI\");\n System.out.println(\"Please enter Q to Exit\");\n System.out.print(\"Please enter your choice: \");\n select = scanner.nextLine();\n switch (select){\n case \"A\":\n case \"a\" :\n addFootballClub();\n exit = false;\n break;\n case \"D\":\n case \"d\":\n deleteFootballClub();\n exit = false;\n break;\n case \"S\":\n case \"s\":\n displayStatistics();\n exit = false;\n break;\n case \"P\":\n case \"p\":\n displayLeagueTable();\n exit = false;\n break;\n case \"M\":\n case \"m\":\n addPlayedMatch();\n exit = false;\n break;\n case \"G\":\n case \"g\":\n gui();\n exit = false;\n break;\n case \"Q\":\n case \"q\":\n //saveToFile();\n System.exit(0);\n exit = true;\n default:\n System.out.println(\"Invalid choice! please try again\");\n exit = false;\n\n }\n }while (!exit);\n\n\n }",
"public synchronized void parseInput(String message) {\n\n try {\n int row, column, worker;\n String[] parts = message.split(\" \");\n String name = parts[0];\n InputString action = InputString.valueOf(parts[1].toLowerCase());\n boolean actionExecuted = false;\n UndoHandler undoThread = null;\n\n // The name is set by the connection so only the current player can execute actions\n if (name.equals(game.getCurrentPlayer().getName())) {\n\n\n switch (action) {\n case usepower -> {\n // Set the path of fsm as the one of the divinity\n if (fsm.getState() == State.start)\n fsm.setPath(game.getCurrentPlayer().getGodPower().getDivinity());\n String msg = \"Insert \" + game.getCurrentPlayer().getName() + \" wants to use the God Power\";\n game.sendBoard(new LiteBoard(msg, game.getBoard(), game));\n actionExecuted = true;\n lastAction = fsm.getState();\n }\n case normal -> {\n // Set the default path\n if (fsm.getState() == State.start) fsm.setPath(Divinity.Default);\n String msg = \"Insert \" + game.getCurrentPlayer().getName() + \" doesn't want to use the God Power\";\n game.sendBoard(new LiteBoard(msg, game.getBoard(), game));\n actionExecuted = true;\n lastAction = fsm.getState();\n }\n case placeworker -> {\n // Place the worker on the map\n // There isn't a state.placeworker because it happen only once\n if (fsm.getState() == State.start) fsm.setPath(Divinity.Default);\n if (fsm.getState() == State.move) fsm.setState(State.build);\n row = Integer.parseInt(parts[2]) - 1;\n column = Integer.parseInt(parts[3]) - 1;\n undoThread = new UndoHandler(game, this, fsm.getState());\n actionExecuted = game.placeWorker(row, column);\n lastAction = fsm.getState();\n }\n case move -> {\n // Move the worker\n row = Integer.parseInt(parts[2]) - 1;\n column = Integer.parseInt(parts[3]) - 1;\n worker = Integer.parseInt(parts[4]) - 1;\n if (fsm.getState() == State.move) {\n undoThread = new UndoHandler(game, this, fsm.getState());\n actionExecuted = game.move(row, column, worker);\n }\n if (fsm.getState() == State.superMove || fsm.getState() == State.secondTimeState) {\n undoThread = new UndoHandler(game, this, fsm.getState());\n actionExecuted = game.useGodPower(row, column, worker);\n }\n lastAction = fsm.getState();\n }\n case build -> {\n // Build with the worker\n row = Integer.parseInt(parts[2]) - 1;\n column = Integer.parseInt(parts[3]) - 1;\n worker = Integer.parseInt(parts[4]) - 1;\n if (fsm.getState() == State.build) {\n undoThread = new UndoHandler(game, this, fsm.getState());\n actionExecuted = game.build(row, column, worker);\n }\n if (fsm.getState() == State.superBuild || fsm.getState() == State.secondTimeState) {\n undoThread = new UndoHandler(game, this, fsm.getState());\n actionExecuted = game.useGodPower(row, column, worker);\n }\n lastAction = fsm.getState();\n }\n\n case undo -> {\n undoing = true;\n actionExecuted = false;\n undoThread = new UndoHandler(game, this, State.undo);\n new Thread(undoThread).start();\n String msg = \"Undo: \" + game.getCurrentPlayer().getName() + \" undoing\";\n game.sendBoard(new LiteBoard(msg, game.getBoard(), game));\n }\n\n case endturn -> {\n if (fsm.getState() == State.endTurn) {\n setUndoing(true);\n actionExecuted = game.endTurn();\n lastAction = fsm.getState();\n }\n }\n\n }\n\n // If something went wrong:\n // actionExecuted will be false,\n // the fsm stay in the current state and\n // the undoThread doesn't start so it can't undo last action\n if (actionExecuted) {\n setUndoing(false);\n fsm.nextState();\n if (undoThread != null) new Thread(undoThread).start();\n }\n }\n else throw new IllegalArgumentException();\n\n } catch (IllegalArgumentException | IndexOutOfBoundsException exception) {\n game.sendBoard(new LiteBoard(\"Please, be sure you're using the official software since last message was unexpected or had a wrong format\"));\n }\n }",
"public static void main(String[] args)\r\n {\n String input;\r\n char selection = '\\0';\r\n\r\n // keep repeating the menu until the user chooses to exit\r\n do\r\n {\r\n // display menu options\r\n System.out.println(\"******* Tour Booking System Menu *******\");\r\n System.out.println(\"\");\r\n System.out.println(\"A - Add New Attraction\");\r\n System.out.println(\"B - Display Attraction Summary\");\r\n System.out.println(\"C - Sell Passes\");\r\n System.out.println(\"D - Refund Passes\");\r\n System.out.println(\"E - Add New Scheduled Tour\");\r\n System.out.println(\"F - Update Maximum Group Size\");\r\n System.out.println(\"X - Exit Program\");\r\n System.out.println();\r\n\r\n // prompt the user to enter their selection\r\n System.out.print(\"Enter your selection: \");\r\n input = sc.nextLine();\r\n\r\n System.out.println();\r\n\r\n // check to see if the user failed to enter exactly one character\r\n // for their menu selection\r\n\r\n if (input.length() != 1)\r\n {\r\n System.out.println(\"Error - selection must be a single character!\");\r\n\r\n }\r\n else\r\n {\r\n // extract the user's menu selection as a char value and\r\n // convert it to upper case so that the menu becomes\r\n // case-insensitive\r\n\r\n selection = Character.toUpperCase(input.charAt(0));\r\n\r\n // process the user's selection\r\n switch (selection)\r\n {\r\n case 'A':\r\n \r\n // call addNewAttraction() helper method\r\n addNewAttraction();\r\n break;\r\n\r\n case 'B':\r\n\r\n // call displayAttractionSummary() helper method\r\n displayAttractionSummary();\r\n break;\r\n\r\n case 'C':\r\n\r\n // call sellPasses() helper method\r\n sellPasses();\r\n break;\r\n\r\n case 'D':\r\n\r\n // call refundPasses() helper method\r\n refundPasses();\r\n break;\r\n\r\n case 'E':\r\n\r\n // call addNewScheduledTour() helper method\r\n addNewScheduledTour();\r\n break;\r\n \r\n case 'F':\r\n\r\n // call updateMaxTourGroupSize() helper method\r\n updateMaxGroupSize();\r\n break;\r\n \r\n case 'X':\r\n\r\n System.out.println(\"Booking system shutting down – goodbye...\");\r\n break;\r\n\r\n default:\r\n\r\n // default case - handles invalid selections\r\n System.out.println(\"Error - invalid selection!\");\r\n\r\n }\r\n }\r\n System.out.println();\r\n\r\n } while (selection != 'X');\r\n\r\n }",
"state ask(state statea, state stateb) {\n\n //display options with the gamepad buttons to press\n telemetry.addData(\"A\", statea.name);\n telemetry.addData(\"B\", stateb.name);\n //show what was already added\n displayStates();\n telemetry.update();\n\n //check to make sure it is still in init\n while (!isStopRequested() && !opModeIsActive()) {\n if (gamepad1.a) {\n //loop while held to avoid double press\n while (gamepad1.a)\n idle();\n //return state to add to runList\n return statea;\n } else if (gamepad1.b) {\n //loop while held to avoid double press\n while (gamepad1.b)\n idle();\n //return state to add to runList\n return stateb;\n }\n }\n\n //return state if program was stopped to allow a quick restart\n return statea;\n }",
"public static void workoutTrackerDriver() {\n Scanner scan = new Scanner(System.in);\n\n /////////////////////////////////\n // OPTIONS FOR WORKOUT INPUTS //\n ///////////////////////////////\n System.out.println(\"Which workout do you want to track?\");\n System.out.println(\n \"- Enter O for OHP\"\n + \"\\n\"\n + \"- Enter B for Bench\"\n + \"\\n\"\n + \"- Enter D for Deadlift\"\n + \"\\n\"\n + \"- Enter S for Squats\"\n + \"\\n\"\n + \"- Enter C for Chinups\"\n + \"\\n\"\n + \"- Enter R for rows\"\n + \"\\n\"\n + \"- Enter 1 to exit program.\");\n\n //////////////////////////////////////////\n // SWITCH STATEMENT FOR WORKOUT INPUTS //\n ////////////////////////////////////////\n boolean keepGoing = true;\n while (keepGoing) {\n String wInput = scan.nextLine();\n switch (wInput) {\n case \"O\":\n System.out.println(\"Enter your max weight pushed today for Overhead Press:\");\n int ohpInput = scan.nextInt();\n ohpMax = ohpInput;\n System.out.println(\"Please select another option (O, B, D, S, C, R, or 1):\");\n break;\n case \"B\":\n System.out.println(\"Enter your max weight pushed today for Bench Press:\");\n int benchInput = scan.nextInt();\n benchMax = benchInput;\n System.out.println(\"Please select another option (O, B, D, S, C, R, or 1):\");\n break;\n case \"D\":\n System.out.println(\"Enter your max weight pulled today for Deadlift:\");\n int deadInput = scan.nextInt();\n deadMax = deadInput;\n System.out.println(\"Please select another option (O, B, D, S, C, R, or 1):\");\n break;\n case \"S\":\n System.out.println(\"Enter your max weight pushed today for Squats:\");\n int squatsInput = scan.nextInt();\n squatsMax = squatsInput;\n System.out.println(\"Please select another option (O, B, D, S, C, R, or 1):\");\n break;\n case \"C\":\n System.out.println(\"Enter your max reps for Chinups:\");\n int chinInput = scan.nextInt();\n chinMax = chinInput;\n System.out.println(\"Please select another option (O, B, D, S, C, R, or 1):\");\n break;\n case \"R\":\n System.out.println(\"Enter your max weight pulled today for Rows:\");\n int rowsInput = scan.nextInt();\n rowsMax = rowsInput;\n System.out.println(\"Please select another option (O, B, D, S, C, R, or 1):\");\n break;\n case \"1\":\n System.out.println(\"\\n\" + \"You have selected to terminate the input session.\");\n keepGoing = false;\n break;\n }\n }\n }",
"public void consoleGetOptions(){\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tString input;\n\t\tint diff=0,first=0;\n\t\tdo{\n\t\t\ttry{\n\t\t\t\tSystem.out.print(\"Who starts first (0-Player, 1-Computer): \");\n\t\t\t\tinput=in.readLine();\n\t\t\t\tfirst = Integer.parseInt(input);\n\t\t\t\tif (first<0 || first>1) throw new IllegalArgumentException();\n\t\t\t\tif (first==1) ttt.switchPlayer();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\tSystem.out.println(\"Invalid input\");\n\t\t\t}\n\t\t}while(true);\t\t\n\n\t\tdo{\n\t\t\ttry{\n\t\t\t\tSystem.out.print(\"Enter AI level (0-Noob, 1-Normal, 2-God Mode): \");\n\t\t\t\tinput=in.readLine();\n\t\t\t\tdiff = Integer.parseInt(input);\n\t\t\t\tif (diff<0 || diff>2) throw new IllegalArgumentException();\n\t\t\t\tttt.setDifficulty(diff);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\tSystem.out.println(\"Invalid input\");\n\t\t\t}\n\t\t}while(true);\t\t\n\t}",
"public synchronized void doStuff(String input) {\n\n\t\tif (input.equalsIgnoreCase(\"refresh\") || input.equalsIgnoreCase(\"\")) {\n\t\t\tgetSquare().refresh();\n\t\t} else if (input.equalsIgnoreCase(\"exit\")) {\n\t\t\tSystem.exit(0);\n\t\t} else if (input.equalsIgnoreCase(\"delete restaurants\")) {\n\t\t\tgetSquare().deleteAllPlaceblesOfType(Restaurant.class);\n\t\t\tSystem.out.println(\"All Restaurants deleted\");\n\t\t} else if (input.equalsIgnoreCase(\"delete hotels\")) {\n\t\t\tgetSquare().deleteAllPlaceblesOfType(Hotel.class);\n\t\t\tSystem.out.println(\"All Hotels deleted\");\n\t\t} else if (input.equalsIgnoreCase(\"delete fences\")) {\n\t\t\tgetSquare().deleteAllPlaceblesOfType(Fence.class);\n\t\t\tSystem.out.println(\"All Fences deleted\");\n\t\t} else if (input.equalsIgnoreCase(\"delete people\")) {\n\t\t\tgetSquare().deleteAllPlaceblesOfType(Person.class);\n\t\t\tSystem.out.println(\"All People deleted\");\n\t\t} else if (input.equalsIgnoreCase(\"clear\")) {\n\t\t\tgetSquare().clear();\n\t\t\tSystem.out.println(\"Square cleared\");\n\t\t} else if (input.startsWith(\"set sleep time to \")) {\n\t\t\ttry {\n\t\t\t\tchar[] sleepTimeStr = new char[input.length() - 18];\n\t\t\t\tinput.getChars(18, input.length(), sleepTimeStr, 0);\n\t\t\t\t\n\t\t\t\tint newSleepTime = Integer.parseInt(String.valueOf(sleepTimeStr));\n\t\t\t\tsetSleepTime(newSleepTime);\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tSystem.out.println(\"Invalid input\");\n\t\t\t}\n\t\t}\n\n\t\tdrawer.setPlacebles(square.getPlacebles());\n\t\tdrawer.repaint();\n\n\t}",
"public void menu() {\n\n\t\tVendingCoinChange vm = new VendingCoinChange();\n\n\t\tboolean running = true;\n\t\twhile (running) {\n\t\t\tSystem.out.println(\"\\nChoose your option (Enter a number)\");\n\t\t\tSystem.out.println(\"[0] Initialize\");\n\t\t\tSystem.out.println(\"[1] View Coins\");\n\t\t\tSystem.out.println(\"[2] Deposit Coin\");\n\t\t\tSystem.out.println(\"[3] Get Change\");\n\t\t\tSystem.out.println(\"[4] Exit\");\n\n\t\t\tString option = scan.next();\n\t\t\twhile (!option.matches(\"\\\\d+\") || Integer.valueOf(option) > 4) {\n\t\t\t\tSystem.out.println(\"Invalid input, please try again.\");\n\t\t\t\toption = scan.next();\n\t\t\t}\n\n\t\t\tswitch(Integer.valueOf(option)) {\n\t\t\t\tcase 0:\n\t\t\t\t\tvm.initialize(takeFloatInput());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tprintCoinBank(vm.getCoinBank());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tvm.depositCoin(takeCoinInput());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tvm.getChange(takeChangeInput());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\trunning = false;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"public static void main ( String[] args ) throws IOException {\n Scanner scn = new Scanner(System.in);\n System.out.print(\"What name do you want for your output file? \");\n String outputN = scn.nextLine();\n\n // Function that will change the word 'utilize' to 'use'\n modifytext(outputN);\n }",
"@Override\n\tprotected void processInput() {\n\t}",
"public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tString input = \"\";\n\t\t\n\t\tOriginator pic = new Originator(1,1,1);\n\t\tCareTaker ct = new CareTaker();\n\t\tct.addMemento(pic.save());\n\n\t\tint currentState = 0;\n\n\t\tSystem.out.println(\"current state: \" + currentState);\n\t\tSystem.out.println(\"width: \" + pic.getWidth());\n\t\tSystem.out.println(\"height: \" + pic.getHeight());\n\t\tSystem.out.println(\"opacity: \" + pic.getOpacity());\n\t\t\n\t\twhile(!input.equalsIgnoreCase(\"exit\")) {\n\t\t\tinput = in.nextLine();\n\t\t\t\n\t\t\tString parsed[] = input.split(\" \");\n\t\t\tif(parsed.length > 1) {\n\t\t\t\tif(parsed[0].equals(\"changeWidth\"))\n\t\t\t\t\tpic.setWidth(Integer.parseInt( parsed[1]));\n\t\t\t\telse if(parsed[0].equals(\"changeHeight\"))\n\t\t\t\t\tpic.setHeight(Integer.parseInt( parsed[1]));\n\t\t\t\telse if(parsed[0].equals(\"changeOpacity\"))\n\t\t\t\t\tpic.setOpacity(Integer.parseInt( parsed[1]));\n\t\t\t}else if(input.equals(\"save\")) {\n\t\t\t\tct.addMemento(pic.save());\n\t\t\t\tcurrentState++;\n\t\t\t}else if(input.equals(\"undo\")) {\n\t\t\t\tcurrentState--;\n\t\t\t\tpic.restore(ct.getMemento(currentState));\n\t\t\t}else if(input.equals(\"redo\")) {\n\t\t\t\tcurrentState++;\n\t\t\t\tpic.restore(ct.getMemento(currentState));\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"current state: \" + currentState);\n\t\t\tSystem.out.println(\"width: \" + pic.getWidth());\n\t\t\tSystem.out.println(\"height: \" + pic.getHeight());\n\t\t\tSystem.out.println(\"opacity: \" + pic.getOpacity());\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\n\tScanner myScanner = new Scanner(System.in);\n\t\n\tSystem.out.println(\"What Country are you from?\");\n\tString country = myScanner.nextLine();\n\t\n\tString favoriteFood;\n\t\n\tswitch (country) {\n\t\n\tcase \"USA\":\n\t\tfavoriteFood=\"Burger\";\n\t\tbreak;\n\tcase \"Afghanistan\":\n\t\tfavoriteFood= \"Palau\";\n\t\tbreak;\n\tcase \"Russia\":\n\t\tfavoriteFood= \"Pelmeni\";\n\t\tbreak;\n\tcase \"Colombia\":\n\t\tfavoriteFood= \"Arepas\";\n\t\tbreak;\n\tcase \"Italy\":\n\t\tfavoriteFood= \"Pasta\";\n\t\tbreak;\n\tcase \"Pakistan\":\n\t\tfavoriteFood= \"Biryani\";\n\t\tbreak;\n\tdefault:\n\t\tfavoriteFood= \"Unkown\";\n\t\tbreak;\n\t\t\n\t}\n\tSystem.out.println(\"favorite food is \"+favoriteFood);\n\t}",
"public static void main(String[] args) {\n\n\t\tStudentLogic stdobj = new StudentLogic();\n\t\tstdobj.userInput();\n\t\tstdobj.display();\n\t}",
"public static void main(String[] args) {\n\n Solution18 obj = new Solution18();\n final Scanner scan = new Scanner(System.in);\n\n String character;\n double temp;\n String output;\n\n System.out.print(\"Enter [F] to convert Fahrenheit to Celcius \\nOr [C] to convert Celcius to Fahrenheit: \");\n character = scan.next();\n scan.nextLine();\n\n System.out.print(\"\\nPlease enter the temperature: \");\n temp = scan.nextDouble();\n\n output = character.equalsIgnoreCase(\"f\")\n ? temp + \"F in C is \" + obj.cFromF(temp)\n : temp + \"C in F is \" + obj.fFromC(temp);\n\n System.out.println(output);\n scan.close();\n\n\n }",
"public String onInputMessage(String userInput) throws QuitException{\n if (!userInput.equals(\"\"))\n System.out.println(userInput);\n\n //Enter data using BufferReader \n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); \n \n // Reading data using readLine\n String input; \n try {\n input = reader.readLine();\n } catch (IOException e) {\n return null;\n }\n if (input.equals(\"sortir\"))\n throw new QuitException();\n\n // Printing the read line \n return input;\n }",
"public static int[] choice(String enemy, int enemyHealth, int enemyDamage, int playerHealth, int playerDamage, int elixirCount, int elixirHealth, int wins, boolean[] items, int itemCount, int level) {\r\n //ASK: Gets user input\r\n Scanner scnr = new Scanner(System.in);\r\n System.out.println(\"What would you like to do?\\n\\t> 1: Fight\\n\\t> 2: Drink elixir\\n\\t> 3: Run\");\r\n String userInput = scnr.next();\r\n //FIGHT\r\n switch (userInput) {\r\n case \"1\": {\r\n int[] returned = fight(enemy, enemyHealth, enemyDamage, playerHealth, playerDamage, elixirCount, elixirHealth, wins, items, itemCount, level);\r\n if (level == 3)\r\n playerHealth = returned[0];\r\n elixirCount = returned[1];\r\n wins = returned[2];\r\n itemCount = returned[3];\r\n return new int[]{playerHealth, elixirCount, wins, itemCount};\r\n }\r\n //ELIXIR\r\n case \"2\": {\r\n int[] returned = elixir(enemy, enemyHealth, enemyDamage, playerHealth, playerDamage, elixirCount, elixirHealth, wins, items, itemCount, level);\r\n if (level == 3)\r\n playerHealth = returned[0];\r\n elixirCount = returned[1];\r\n wins = returned[2];\r\n itemCount = returned[3];\r\n return new int[]{playerHealth, elixirCount, wins, itemCount};\r\n }\r\n //RUN/SKIP\r\n case \"3\":\r\n System.out.println(\"You chose to run.\\nHere comes another enemy!\");\r\n break;\r\n //NOTHING SELECTED\r\n default:\r\n System.out.println(\"What would you like to do?\\n\\t> 1: Fight\\n\\t> 2: Drink elixir\\n\\t> 3: Run\");\r\n userInput = scnr.next();\r\n break;\r\n }\r\n return new int[]{playerHealth, elixirCount, wins, itemCount};\r\n }",
"public void setInput(String input) { this.input = input; }"
]
| [
"0.65303206",
"0.6244055",
"0.6206723",
"0.61807245",
"0.6149257",
"0.60358906",
"0.6022566",
"0.6009899",
"0.59964114",
"0.5958939",
"0.59489566",
"0.59168184",
"0.58955103",
"0.5893383",
"0.5865095",
"0.5828112",
"0.5817328",
"0.5811734",
"0.58036697",
"0.5802168",
"0.580156",
"0.5782085",
"0.5781945",
"0.57760674",
"0.577463",
"0.57549334",
"0.5753271",
"0.57212704",
"0.5710983",
"0.57071793",
"0.57045466",
"0.5675163",
"0.5665535",
"0.5661834",
"0.5659222",
"0.56571317",
"0.5646547",
"0.56431884",
"0.5623478",
"0.5621854",
"0.5619595",
"0.56163114",
"0.5612249",
"0.5602316",
"0.55962145",
"0.55866534",
"0.5582357",
"0.55801076",
"0.5572901",
"0.557231",
"0.55706054",
"0.5565412",
"0.55532664",
"0.5543176",
"0.5531969",
"0.5531107",
"0.55301416",
"0.55284446",
"0.55157465",
"0.55152875",
"0.5513392",
"0.55104256",
"0.5508725",
"0.55063856",
"0.5505406",
"0.5500915",
"0.54910153",
"0.54905677",
"0.5486218",
"0.5483926",
"0.54822826",
"0.5481213",
"0.54763323",
"0.5472416",
"0.5466186",
"0.546405",
"0.5459006",
"0.54531825",
"0.5450951",
"0.54509133",
"0.5448751",
"0.54470545",
"0.5447021",
"0.5446847",
"0.5441333",
"0.5439282",
"0.54384565",
"0.5438363",
"0.543453",
"0.54313934",
"0.54277587",
"0.54163",
"0.5416138",
"0.5410248",
"0.540644",
"0.54037166",
"0.54024017",
"0.5402071",
"0.53970575",
"0.5392848",
"0.5390496"
]
| 0.0 | -1 |
The media locator tells where the audio/video track is located. <complexType name="MediaLocatorType"> <sequence> <choice minOccurs="0"> <element name="MediaUri" type="anyURI"/> <element name="InlineMedia" type="mpeg7:InlineMediaType"/> </choice> <element name="StreamID" type="nonNegativeInteger" minOccurs="0"/> </sequence> </complexType> | public interface MediaLocator extends XmlElement {
/**
* Returns the media uri of the track.
*
* @return the media uri
*/
URI getMediaURI();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static MobileLocator parseMobileLocator(String locator) {\n Pattern p = Pattern.compile(\"^([A-Za-z ]+)=([\\\\S\\\\s]+)\");\n Matcher m = p.matcher(locator);\n MobileLocator lc = new MobileLocator();\n if (m.find()) {\n lc.setType(MobileLocatorType.fromStrategy(m.group(1).toLowerCase()));\n lc.setValue(m.group(2));\n } else {\n if (locator.startsWith(\"/\")) {\n lc.setType(MobileLocatorType.XPATH);\n } else {\n lc.setType(MobileLocatorType.ACCESSIBILITY_ID);\n }\n lc.setValue(locator);\n }\n return lc;\n }",
"public void setMedia(String m) {\n\t\tmedia = m;\n\t}",
"URI getMediaURI();",
"public void setMedia(List<JRMediaObject> media) {\n mMedia = media;\n }",
"public String getMediaUrl() {\n return this.MediaUrl;\n }",
"public URI getMediaLinkUri() {\n return this.mediaLinkUri;\n }",
"public URI getMediaLink() {\n return this.mediaLink;\n }",
"public URI getMediaLink() {\n return this.mediaLink;\n }",
"public gov.nih.nlm.ncbi.www.soap.eutils.efetch_pmc.Media getMedia() {\r\n return media;\r\n }",
"public void setMediaUrl(String MediaUrl) {\n this.MediaUrl = MediaUrl;\n }",
"public void setMedia(gov.nih.nlm.ncbi.www.soap.eutils.efetch_pmc.Media media) {\r\n this.media = media;\r\n }",
"public void setMedia(java.lang.String media) {\n this.media = media;\n }",
"public By getMobileLocator(String elementName, String dynamicElementValue) {\n\n\t\tString locatorValue;\n\t\t// Read value using the logical name as Key\n\t\tString locator = properties.getProperty(elementName);\n\t\t// Split the value which contains locator type and locator value\n\t\tif(locator == null) {\n\t\tLoggers.logErrorMessage(\"The element name \"+elementName+\" is not present in locators file\",true);\n\t\t\tthrow new InvalidParameterException(MessageFormat.format(\"Missing value for key {0}!\", elementName));\n\t\t}\n\t\tString temp[] = locator.split(\":\", 2);\n\t\tString locatorType = temp[0];\n\t\tif (dynamicElementValue == null) {\n\t\t\tlocatorValue = temp[1];\n\t\t} else {\n\t\t\tlocatorValue = temp[1].replace(\"$1\", dynamicElementValue);\n\t\t}\n\t\t// Return a instance of By class based on type of locator\n\t\tif (locatorType.toLowerCase().equals(\"mid\")) {\n\t\t\treturn By.id(locatorValue);\n\t\t} else if (locatorType.toLowerCase().equals(\"aid\"))\n\t\t\treturn MobileBy.AccessibilityId(locatorValue);\n\t\telse if (locatorType.toLowerCase().equals(\"mname\"))\n\t\t\treturn MobileBy.name(locatorValue);\n\t\telse if ((locatorType.toLowerCase().equals(\"mclassname\")) || (locatorType.toLowerCase().equals(\"mclass\")))\n\t\t\treturn MobileBy.className(locatorValue);\n\t\telse if (locatorType.toLowerCase().equals(\"mxpath\"))\n\t\t\treturn MobileBy.xpath(locatorValue);\n\t\telse {\n\t\t\tLoggers.logErrorMessage(\"Locator type '\" + locatorType + \"' not defined!!\",true);\n\t\t\tAssert.fail(\"Locator type '\" + locatorType + \"' not defined!!\");\n\t\treturn null;\n\t\t}\n\t}",
"public String getLocatorDev() {\n MediaLocator locator = getLocator();\n if (locator == null) {\n return null;\n }\n String locatorDev = locator.getRemainder();\n if (locatorDev == null || locatorDev.length() > 0) {\n return locatorDev;\n }\n return null;\n }",
"@java.lang.Override\n public java.util.Map<java.lang.String, com.google.protobuf.Value> getMediaMap() {\n return internalGetMedia().getMap();\n }",
"@java.lang.Override\n public java.util.Map<java.lang.String, com.google.protobuf.Value> getMediaMap() {\n return internalGetMedia().getMap();\n }",
"void setContentLocator( ContentLocator locator );",
"public java.lang.String getMedia() {\n return media;\n }",
"public void setMediaField(MediaField m) {\n\tmediaField = m;\n }",
"public org.davic.net.Locator getStreamLocator()\n\t{return null;\n\t}",
"public void setMedia(JRMediaObject mediaObject) {\n if (mMedia == null)\n mMedia = new ArrayList<JRMediaObject>();\n mMedia.add(mediaObject);\n }",
"private Media(Element media)\n\t\t{\n\t\t\tthis.mediaElement = media;\n\t\t}",
"public interface MediaQueryList extends MediaList {\n\n\t/**\n\t * Get the media query at {@code index}.\n\t * \n\t * @param index the index.\n\t * @return the media query at the {@code index}-th position in this list, or\n\t * {@code null} if that is not a valid index or the query list is\n\t * invalid.\n\t */\n\tMediaQuery getMediaQuery(int index);\n\n\t/**\n\t * Get the serialized form of this media query list.\n\t * \n\t * @return the serialized form of this media query list.\n\t */\n\tString getMedia();\n\n\t/**\n\t * Get a minified serialized form of this media query list.\n\t * \n\t * @return the minified serialized form of this media query list.\n\t */\n\tString getMinifiedMedia();\n\n\t/**\n\t * Is this an all-media list?\n\t * \n\t * @return <code>true</code> if this list matches all media, <code>false</code>\n\t * otherwise.\n\t */\n\tboolean isAllMedia();\n\n\t/**\n\t * Determine if this list is composed only of queries that evaluate to\n\t * <code>not all</code>.\n\t * \n\t * @return <code>true</code> if this list matches no media, <code>false</code>\n\t * otherwise.\n\t */\n\tboolean isNotAllMedia();\n\n\t/**\n\t * Does the associated media query list match the state of the rendered Document?\n\t * \n\t * @param medium\n\t * the lowercase name of the medium to test for.\n\t * @param canvas\n\t * the canvas where the document is to be rendered.\n\t * @return <code>true</code> if the associated media query list matches the state\n\t * of the rendered Document and <code>false</code> if it does not.\n\t */\n\tboolean matches(String medium, CSSCanvas canvas);\n\n\t/**\n\t * Does the given media list contain any media present in this list?\n\t * <p>\n\t * If query A matches B, then if a medium matches B it will also match A. The\n\t * opposite may not be true.\n\t * \n\t * @param otherMedia the other media list to test.\n\t * @return <code>true</code> if the other media contains any media which applies\n\t * to this list, <code>false</code> otherwise.\n\t */\n\tboolean matches(MediaQueryList otherMedia);\n\n\t/**\n\t * Did this media query list produce errors when being parsed ?\n\t * \n\t * @return <code>true</code> if this list come from a media string that produced\n\t * errors when parsed, <code>false</code> otherwise.\n\t */\n\tboolean hasErrors();\n\n\t/**\n\t * Get the exceptions found while parsing the query, if any.\n\t * \n\t * @return the exceptions found while parsing the query, or <code>null</code> if\n\t * no errors were found while parsing the media query.\n\t */\n\tList<CSSParseException> getExceptions();\n\n\t/**\n\t * Appends a listener to the list of media query list listeners, unless it is\n\t * already in that list.\n\t * \n\t * @param listener\n\t * the listener to be appended.\n\t */\n\tvoid addListener(MediaQueryListListener listener);\n\n\t/**\n\t * Removes a listener from the list of media query list listeners.\n\t * \n\t * @param listener\n\t * the listener to be removed.\n\t */\n\tvoid removeListener(MediaQueryListListener listener);\n\n}",
"private static WebLocator parseWebLocator(String locator) {\n Pattern p = Pattern.compile(\"^([A-Za-z ]+)=([\\\\S\\\\s]+)\");\n Matcher m = p.matcher(locator);\n WebLocator lc = new WebLocator();\n if (m.find()) {\n lc.setType(WebLocatorType.fromStrategy(m.group(1).toLowerCase()));\n lc.setValue(m.group(2));\n } else {\n if (locator.startsWith(\"/\")) {\n lc.setType(WebLocatorType.XPATH);\n } else if (locator.startsWith(\"document\")) {\n lc.setType(WebLocatorType.DOM);\n } else {\n lc.setType(WebLocatorType.IDENTIFIER);\n }\n lc.setValue(locator);\n }\n return lc;\n }",
"Media getMedia(long mediaId);",
"public List<JRMediaObject> getMedia() {\n return mMedia;\n }",
"Builder addAssociatedMedia(MediaObject value);",
"public MediaField getMedia() {\n\treturn mediaField;\n \n }",
"public Locator getLocator() {\r\n\tif (locator == null) {\r\n\t\ttry {\r\n\t\t\tthis.locator = LocatorFactory.getInstance().createLocator(\r\n\t\t\t\tLocatorImpl.TransportStreamProtocol + description);\r\n\t\t} catch (Exception e) {\r\n\t\t\t;\r\n\t\t}\r\n\t}\r\n\treturn this.locator;\r\n }",
"@javax.annotation.Nullable\n @ApiModelProperty(value = \"Specify the CSS media type. Defaults to \\\"print\\\" but you may want to use \\\"screen\\\" for web styles.\")\n @JsonProperty(JSON_PROPERTY_MEDIA)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\n\n public String getMedia() {\n return media;\n }",
"public void setM_Locator_ID(int M_Locator_ID) {\n\t\tif (M_Locator_ID < 1)\n\t\t\tthrow new IllegalArgumentException(\"M_Locator_ID is mandatory.\");\n\t\tset_Value(\"M_Locator_ID\", new Integer(M_Locator_ID));\n\t}",
"public interface WMLMetaElement extends WMLElement {\n\n /**\n * 'name' attribute specific the property name\n */\n public void setName(String newValue);\n public String getName();\n\n /**\n * 'http-equiv' attribute indicates the property should be\n * interpret as HTTP header.\n */\n public void setHttpEquiv(String newValue);\n public String getHttpEquiv();\n\n /**\n * 'forua' attribute specifies whether a intermediate agent should\n * remove this meta element. A value of false means the\n * intermediate agent must remove the element.\n */\n public void setForua(boolean newValue);\n public boolean getForua();\n\n /**\n * 'scheme' attribute specifies a form that may be used to\n * interpret the property value \n */\n public void setScheme(String newValue);\n public String getScheme();\n\n /**\n * 'content' attribute specifies the property value \n */\n public void setContent(String newValue);\n public String getContent();\n}",
"public int getM_Locator_ID() {\n\t\tInteger ii = (Integer) get_Value(\"M_Locator_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}",
"public static java.util.Iterator<org.semanticwb.opensocial.model.data.MediaItem> listMediaItems()\r\n {\r\n java.util.Iterator it=sclass.listInstances();\r\n return new org.semanticwb.model.GenericIterator<org.semanticwb.opensocial.model.data.MediaItem>(it, true);\r\n }",
"public interface CwmResourceLocatorClass extends javax.jmi.reflect.RefClass {\n /**\n * The default factory operation used to create an instance object.\n * \n * @return The created instance object.\n */\n public CwmResourceLocator createCwmResourceLocator();\n\n /**\n * Creates an instance object having attributes initialized by the passed values.\n * \n * @param name\n * An identifier for the ModelElement within its containing Namespace.\n * @param visibility\n * Specifies extent of the visibility of the ModelElement within its owning Namespace.\n * @param url\n * Contains the text of the resource location. For Internet locations, this will be a web URL (Uniform\n * Resource Locator) but there is no requirement that this be so. In fact, the string can contain any text\n * meaningful to its intended use in a particular environment.\n * @return The created instance object.\n */\n public CwmResourceLocator createCwmResourceLocator( java.lang.String name,\n org.pentaho.pms.cwm.pentaho.meta.core.VisibilityKind visibility, java.lang.String url );\n}",
"List<Media> search(double latitude, double longitude);",
"Builder addAssociatedMedia(String value);",
"public HrCmsMedia(String alias) {\n this(alias, HR_CMS_MEDIA);\n }",
"public HrCmsMedia() {\n this(\"hr_cms_media\", null);\n }",
"private Uri getMedia(String mediaName) {\n if (URLUtil.isValidUrl(mediaName)) {\n // Media name is an external URL.\n return Uri.parse(mediaName);\n } else {\n\n // you can also put a video file in raw package and get file from there as shown below\n\n return Uri.parse(\"android.resource://\" + getPackageName() +\n \"/raw/\" + mediaName);\n\n\n }\n }",
"@java.lang.Override\n public boolean containsMedia(java.lang.String key) {\n if (key == null) {\n throw new NullPointerException(\"map key\");\n }\n return internalGetMedia().getMap().containsKey(key);\n }",
"public List<Media> getMedias()\n\t\t{\n\t\t\treturn mediasList;\n\t\t}",
"public LocatorType getLocatorType() {\n\t\treturn LocatorType;\n \t \n }",
"public interface MediaRangeSubType {}",
"@DISPID(1093) //= 0x445. The runtime will prefer the VTID if present\n @VTID(14)\n java.lang.String media();",
"@Accessor(qualifier = \"mediasExportMediaCode\", type = Accessor.Type.GETTER)\n\tpublic String getMediasExportMediaCode()\n\t{\n\t\tfinal String value = getPersistenceContext().getPropertyValue(MEDIASEXPORTMEDIACODE);\n\t\treturn value != null ? value : (\"mediasexport_\" + this.getCode());\n\t}",
"@java.lang.Override\n public boolean containsMedia(java.lang.String key) {\n if (key == null) {\n throw new NullPointerException(\"map key\");\n }\n return internalGetMedia().getMap().containsKey(key);\n }",
"public void setMedia(MediaField media)\n\tthrows SdpException {\n\tif (media == null)\n\t throw new SdpException(\"The media is null\");\n\tmediaField = media;\n }",
"public /*@NonNull*/ String getMediaId() {\n return mId;\n }",
"List<Media> search(double latitude, double longitude, int distance);",
"public static MobileElement element(By locator) {\n return w(driver.findElement(locator));\n }",
"com.google.ads.googleads.v6.resources.MediaFileOrBuilder getMediaFileOrBuilder();",
"public void addMedia(Media media)\n\t\t{\n\t\t\tMedia newMedia = addNewMedia(media.getId());\n\t\t\tnewMedia.setSrcId(media.getSrcId());\n\t\t\tnewMedia.setType(media.getType());\n\t\t\tnewMedia.setStatus(media.getStatus());\n\t\t}",
"com.google.ads.googleads.v6.resources.MediaFile getMediaFile();",
"private Endpoint(Element endpoint)\n\t\t{\n\t\t\tthis.endpointElement = endpoint;\n\t\t\tNodeList mediaNodeList = endpoint.getElementsByTagName(MEDIA_ELEMENT_NAME);\n\t\t\tfor (int i = 0; i < mediaNodeList.getLength(); i++) {\n\t\t\t\tMedia media = new Media((Element) mediaNodeList.item(i));\n\t\t\t\tmediasList.add(media);\n\t\t\t}\n\t\t}",
"@JsonSetter(\"media\")\r\n public void setMedia(List<String> media) {\r\n this.media = media;\r\n }",
"@DISPID(1093) //= 0x445. The runtime will prefer the VTID if present\n @VTID(13)\n void media(\n java.lang.String p);",
"public Volume mediaScan(VolumeMediaScanParams mediaScan) {\n this.mediaScan = mediaScan;\n return this;\n }",
"@Nullable\n public Single<List<Media>> getMediaList(String queryType, String keyword) {\n HttpUrl.Builder urlBuilder = HttpUrl\n .parse(commonsBaseUrl)\n .newBuilder()\n .addQueryParameter(\"action\", \"query\")\n .addQueryParameter(\"format\", \"json\")\n .addQueryParameter(\"formatversion\", \"2\");\n\n\n if (queryType.equals(\"search\")) {\n appendSearchParam(keyword, urlBuilder);\n } else {\n appendCategoryParams(keyword, urlBuilder);\n }\n\n appendQueryContinueValues(keyword, urlBuilder);\n\n Request request = new Request.Builder()\n .url(appendMediaProperties(urlBuilder).build())\n .build();\n\n return Single.fromCallable(() -> {\n Response response = okHttpClient.newCall(request).execute();\n List<Media> mediaList = new ArrayList<>();\n if (response.body() != null && response.isSuccessful()) {\n String json = response.body().string();\n MwQueryResponse mwQueryResponse = gson.fromJson(json, MwQueryResponse.class);\n if (null == mwQueryResponse\n || null == mwQueryResponse.query()\n || null == mwQueryResponse.query().pages()) {\n return mediaList;\n }\n putContinueValues(keyword, mwQueryResponse.continuation());\n\n List<MwQueryPage> pages = mwQueryResponse.query().pages();\n for (MwQueryPage page : pages) {\n Media media = Media.from(page);\n if (media != null) {\n mediaList.add(media);\n }\n }\n }\n return mediaList;\n });\n }",
"public void setMediaLink(final URI mediaLinkValue) {\n this.mediaLink = mediaLinkValue;\n }",
"public void setMediaLink(final URI mediaLinkValue) {\n this.mediaLink = mediaLinkValue;\n }",
"MediaSessionManager getMediaSessionManager() {\n Object object = this.mLock;\n synchronized (object) {\n return this.mMediaSessionManager;\n }\n }",
"public WebElement locateElement(String locatorValue) {\n\t\tWebElement findElementById = getter().findElement(By.id(locatorValue));\r\n\t\treturn findElementById;\r\n\t}",
"Builder addAssociatedMedia(MediaObject.Builder value);",
"public MediaField getMediaField() {\n\treturn mediaField;\n }",
"public DeviceLocator getDeviceLocator();",
"@Override\n default ManagerPrx ice_locator(com.zeroc.Ice.LocatorPrx locator)\n {\n return (ManagerPrx)_ice_locator(locator);\n }",
"public interface StreamsMediator {\n /**\n * Allows the switching to another Stream.\n * @param streamKind The {@link StreamKind} of the stream to switch to.\n */\n default void switchToStreamKind(@StreamKind int streamKind) {}\n\n /**\n * Request the immediate refresh of the contents of the active stream.\n */\n default void refreshStream() {}\n\n /**\n * Disable the follow button, used in case of an error scenario.\n */\n default void disableFollowButton() {}\n }",
"public final void setParentMediaManager(\n final MediaManagerLogicInterface aParentMediaManager) {\n this.parentMediaManager = aParentMediaManager;\n }",
"int getMediaMessagePosition(List<SlidableMediaInfo> mediaMessagesList, Message mediaMessage) {\n String url = null;\n\n if (mediaMessage instanceof ImageMessage) {\n url = ((ImageMessage) mediaMessage).getUrl();\n } else if (mediaMessage instanceof VideoMessage) {\n url = ((VideoMessage) mediaMessage).getUrl();\n }\n\n // sanity check\n if (null == url) {\n return -1;\n }\n\n for (int index = 0; index < mediaMessagesList.size(); index++) {\n if (mediaMessagesList.get(index).mMediaUrl.equals(url)) {\n return index;\n }\n }\n\n return -1;\n }",
"public MediaList getMediaList() {\n \n MediaList mediaList = mediaPlayerFactory.newMediaList();\n for (int i = 0; i < this.moviesByGenre.size(); i++) {\n mediaList.addMedia(this.moviesByGenre.get(i).path, \n formatRtspStream(this.genre),\n \":no-sout-rtp-sap\",\n \":no-sout-standard-sap\",\n \":sout-all\",\n \":sout-keep\",\n \":ttl=128\");\n }\n\n return mediaList;\n }",
"public final MediaManagerLogicInterface getParentMediaManager() {\n return parentMediaManager;\n }",
"MediaPackageElement.Type getElementType();",
"public interface MediaBrowserProvider {\n MediaBrowserCompat getMediaBrowser();\n}",
"public void setLocatorCurrent(String locatorCurrent) {\n\t\t\r\n\t}",
"public static native MediaRestriction newInstance() /*-{\n return new $wnd.google.gdata.mediarss.MediaRestriction();\n }-*/;",
"protected static interface ViewMediaUiBinder extends UiBinder<Widget, ViewMedia> {}",
"public void setAcceptedMediaTypes(\n List<Preference<MediaType>> acceptedMediaTypes) {\n this.acceptedMediaTypes = acceptedMediaTypes;\n }",
"public boolean isPositionParsedAsMediawiki(int pos) {\n\t\tArrayList<String> MWEscapeOpenText = MediawikiDataManager.MWEscapeOpenText;\n\t\tArrayList<String> MWEscapeCloseText = MediawikiDataManager.MWEscapeCloseText;\n\t\treturn isPositionParsedAsMediawiki(pos, MWEscapeOpenText, MWEscapeCloseText);\n\t}",
"public void setCalificacionMedia(double calificacionMedia) {\r\n this.calificacionMedia = calificacionMedia;\r\n }",
"public Media getMedia(String id)\n\t\t{\n\t\t\tif (id == null)\n\t\t\t\treturn null;\n\t\t\tfor (Media m : mediasList) {\n\t\t\t\tif (id.equals(m.getId()))\n\t\t\t\t\treturn m;\n\t\t\t}\n\t\t\treturn null;\n\t\t}",
"public List<MediaDevice> getMediaDevices() {\n\n List<MediaDevice> mediaDevices = new ArrayList<>();\n\n for (MediaDevice d : this.devices) {\n if (d.hasMediaInterface() && d.hasInstance()) {\n mediaDevices.add(d);\n }\n }\n\n return mediaDevices;\n }",
"public void setMediaLinkUri(final URI mediaLinkUriValue) {\n this.mediaLinkUri = mediaLinkUriValue;\n }",
"@Accessor(qualifier = \"jobMedia\", type = Accessor.Type.SETTER)\n\tpublic void setJobMedia(final ImpExMediaModel value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(JOBMEDIA, value);\n\t}",
"public Media(String url) {\n\t\tthis.url = url;\n\t}",
"public String getMediaDetails() {\n return mediaListPlayer.currentMrl();\n }",
"public RTWLocation element(RTWElementRef e);",
"public abstract String[] getSupportedMediaTypes();",
"public void setModel(MediaModel m)\n\t{\n\t\tthis.model = m;\n\t}",
"public static java.util.Iterator<org.semanticwb.opensocial.model.data.MediaItem> listMediaItems(org.semanticwb.model.SWBModel model)\r\n {\r\n java.util.Iterator it=model.getSemanticObject().getModel().listInstancesOfClass(sclass);\r\n return new org.semanticwb.model.GenericIterator<org.semanticwb.opensocial.model.data.MediaItem>(it, true);\r\n }",
"@Accessor(qualifier = \"jobMedia\", type = Accessor.Type.GETTER)\n\tpublic ImpExMediaModel getJobMedia()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(JOBMEDIA);\n\t}",
"@Override\n public void addMedia(AudioMedia media) {\n streamSpec.getAudioMedias().add(media);\n for (StreamListener streamListener : streamListeners) {\n streamListener.queueChanged();\n }\n }",
"MediaMetadata get(String uuid);",
"public Media addNewMedia(String id)\n\t\t{\n\t\t\tElement mediaElement = document.createElement(MEDIA_ELEMENT_NAME);\n\t\t\tMedia media = new Media(mediaElement);\n\t\t\tmedia.setId(id);\n\n\t\t\tendpointElement.appendChild(mediaElement);\n\t\t\tmediasList.add(media);\n\n\t\t\treturn media;\n\t\t}",
"public MediaStream getMediaStream() {\n\t\treturn stream;\n\t}",
"@JsonGetter(\"media\")\r\n public List<String> getMedia() {\r\n return media;\r\n }",
"public interface IMediaController {\n}",
"public MediaCell(Media media)\n\t{\n\t\tsuper(new File(media.getJacket()), (media instanceof SeriesEpisode) ? \"S\"+((SeriesEpisode)media).getSeasonNumber() + \"E\" + ((SeriesEpisode)media).getEpisodeNumber() + \" \" +media.getName() : media.getName());\n\t\t_media = media;\n\t\t_type = Type.MEDIA;\n\t}",
"public org.linphone.mediastream.Factory getMediastreamerFactory();",
"public boolean isMediaKey() {\n switch (this) {\n case MEDIA_PLAY:\n case MEDIA_PAUSE:\n case MEDIA_PLAY_PAUSE:\n case MUTE:\n case HEADSETHOOK:\n case MEDIA_STOP:\n case MEDIA_NEXT:\n case MEDIA_PREVIOUS:\n case MEDIA_REWIND:\n case MEDIA_RECORD:\n case MEDIA_FAST_FORWARD:\n return true;\n default:\n return false;\n }\n }"
]
| [
"0.5578847",
"0.52295625",
"0.5092815",
"0.50837",
"0.49760875",
"0.49334294",
"0.49154285",
"0.49154285",
"0.48830724",
"0.48687103",
"0.4846508",
"0.48446923",
"0.47787154",
"0.47505257",
"0.47202912",
"0.47022337",
"0.46731544",
"0.46606916",
"0.46180198",
"0.46121785",
"0.46106258",
"0.46037707",
"0.45901236",
"0.45771763",
"0.4553535",
"0.45337963",
"0.45062917",
"0.44661662",
"0.44638556",
"0.4456084",
"0.44477138",
"0.4440775",
"0.4418787",
"0.4407851",
"0.440199",
"0.4388301",
"0.4382267",
"0.43796203",
"0.43526047",
"0.43498823",
"0.43489525",
"0.43391684",
"0.4336692",
"0.43366155",
"0.43292916",
"0.43131378",
"0.43059996",
"0.429939",
"0.42961004",
"0.42954677",
"0.42752767",
"0.42675605",
"0.42599237",
"0.42595842",
"0.425852",
"0.42474076",
"0.4243911",
"0.4236443",
"0.42270544",
"0.4201144",
"0.4201144",
"0.41918072",
"0.41877002",
"0.4176618",
"0.41731107",
"0.41615757",
"0.41440624",
"0.41290417",
"0.41284007",
"0.41267332",
"0.4116678",
"0.41067863",
"0.40931976",
"0.40843686",
"0.4081775",
"0.4079077",
"0.40725586",
"0.4069621",
"0.40690368",
"0.40688077",
"0.40654635",
"0.40615585",
"0.40521187",
"0.404319",
"0.40323964",
"0.40080845",
"0.40065664",
"0.4000923",
"0.3999931",
"0.39991805",
"0.39983493",
"0.39907455",
"0.39790845",
"0.3974329",
"0.3973914",
"0.39737082",
"0.3967038",
"0.39606953",
"0.3955201",
"0.3954318"
]
| 0.6485912 | 0 |
Returns the media uri of the track. | URI getMediaURI(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getBaseMediaUrl() {\n return (String) get(\"base_media_url\");\n }",
"public URI getMediaLink() {\n return this.mediaLink;\n }",
"public URI getMediaLink() {\n return this.mediaLink;\n }",
"public URI getMediaLinkUri() {\n return this.mediaLinkUri;\n }",
"public String getMediaUrl() {\n return this.MediaUrl;\n }",
"Uri getRecordingUri(Uri channelUri);",
"public String getTrackUrl() {\n return trackUrl;\n }",
"public java.lang.String getPlayUri() {\n return localPlayUri;\n }",
"private Uri getOutputMediaFileUri(){\n\t\treturn Uri.fromFile( getOutputMediaFile() );\n\t}",
"public java.lang.String getPhotoUri() {\n return localPhotoUri;\n }",
"public String getUri()\r\n {\r\n return uri;\r\n }",
"java.lang.String getPictureUri();",
"public String getUri() {\n return uri;\n }",
"java.lang.String getUri();",
"java.lang.String getUri();",
"public byte[] uri() {\n return uri;\n }",
"public String getUri() {\n return uri;\n }",
"private String getThumbnailPath(String albumTrack) {\n String uriFile = \"\";\n MediaMetadataRetriever mmr = new MediaMetadataRetriever();\n mmr.setDataSource(albumTrack);\n byte[] data = mmr.getEmbeddedPicture();\n if (data != null) {\n Bitmap bitmapAlbumCover = BitmapFactory.decodeByteArray(data, 0, data.length);\n String trackName = albumTrack.substring(albumTrack.lastIndexOf('/') + 1);\n String imageOnlyWithoutExt = stripExtension(trackName);\n String imagePath = saveImageOnSDCARD(imageOnlyWithoutExt, bitmapAlbumCover);\n if (TextUtils.isEmpty(imagePath)) {\n uriFile = defaultImagePath;\n } else\n uriFile = imagePath;\n }\n return uriFile;\n }",
"private static Uri getOutputMediaFileUri(){\n return Uri.fromFile(getOutputMediaFile());\n }",
"public String getSecureBaseMediaUrl() {\n return (String) get(\"secure_base_media_url\");\n }",
"String getMedia();",
"public static String getURI() {\n return uri;\n }",
"public String getUri() {\r\n\t\treturn uri;\r\n\t}",
"public String getUri();",
"public java.lang.String getUri() {\n return uri;\n }",
"String getStreamUrl(T track) throws TrackSearchException;",
"public String uri() {\n return this.uri;\n }",
"public java.lang.String getMedia() {\n return media;\n }",
"public static Uri getPhotoUri() {\n Logger.d(TAG, \"getPhotoUri() entry\");\n Cursor cursor = null;\n int imageId = 0;\n try {\n cursor =\n mContext.getContentResolver().query(\n MediaStore.Images.Media.EXTERNAL_CONTENT_URI, null, null, null, null);\n cursor.moveToFirst();\n imageId = cursor.getInt(cursor.getColumnIndex(MediaStore.Images.ImageColumns._ID));\n } finally {\n if (cursor != null) {\n cursor.close();\n cursor = null;\n }\n }\n Uri photoUri = Uri.parse(PREFER_PHOTO_URI + imageId);\n Logger.d(TAG, \"getPhotoUri() exit with the uri \" + photoUri);\n return photoUri;\n }",
"public String getUri() {\n\t\treturn uri;\n\t}",
"private Uri getMedia(String mediaName) {\n if (URLUtil.isValidUrl(mediaName)) {\n // Media name is an external URL.\n return Uri.parse(mediaName);\n } else {\n\n // you can also put a video file in raw package and get file from there as shown below\n\n return Uri.parse(\"android.resource://\" + getPackageName() +\n \"/raw/\" + mediaName);\n\n\n }\n }",
"@Override\r\n\tpublic String getUri() {\n\t\treturn uri;\r\n\t}",
"String getUri();",
"public String getUri() {\n\t\t\treturn uri;\n\t\t}",
"public String getAlbumArtUri() {\n return albumArtUri;\n }",
"@Nullable\n public String getUri() {\n return mUri;\n }",
"public String mo13278q() {\n return ((PlaybackUrl) C13199w.m40589f((List) this.f9142e0)).getUrl();\n }",
"public String getPhysicalURI()\n {\n return physicalURI;\n }",
"public static String getURI(){\n\t\treturn uri;\n\t}",
"URI getUri();",
"private Uri getOutputMediaFileUri(int mediaType) {\n\t\t\tFile mediaStorageDir = null;\n\t\t\tif(isExternalStorageAvailable()) {\n\t\t\t\tmediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(\n\t\t\t Environment.DIRECTORY_PICTURES), \"SChat\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmediaStorageDir = new File(Environment.DIRECTORY_DCIM);\n\t\t\t\t//Toast.makeText(MainActivity.this, mediaStorageDir.getParent()+\"\", Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t\t if (! mediaStorageDir.exists()){\n\t\t\t if (! mediaStorageDir.mkdirs()){\n\t\t\t Log.d(\"MyCameraApp\", \"failed to create directory\");\n\t\t\t return null;\n\t\t\t }\n\t\t\t }\n\t\t\t\n\t\t\t String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n\t\t\t File mediaFile;\n\t\t\t if (mediaType == MEDIA_TYPE_IMAGE){\n\t\t\t mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n\t\t\t \"IMG_\"+ timeStamp + \".jpg\");\n\t\t\t Log.d(\"MyCameraApp\", mediaFile.toString());\n\t\t\t } else if(mediaType == MEDIA_TYPE_VIDEO) {\n\t\t\t mediaFile = new File(mediaStorageDir.getPath() + File.separator +\n\t\t\t \"VID_\"+ timeStamp + \".mp4\");\n\t\t\t } else {\n\t\t\t return null;\n\t\t\t }\n\t\t\t return Uri.fromFile(mediaFile);\n\t\t}",
"public String getUri() {\n\t\treturn Uri;\n\t}",
"String getUri( );",
"public String getPhotoUrl() {\n return fullPhoto.getPhotoUrl();\n }",
"public static String getArtworkUrl(TrackObject track, String size) {\n String defaultUrl = track.getArtworkUrl();\n String alternativeUrl = track.getAvatarUrl();\n if (defaultUrl == null || defaultUrl.equals(\"null\")) {\n if (alternativeUrl == null || alternativeUrl.equals(\"null\")) {\n return null;\n } else {\n defaultUrl = alternativeUrl;\n }\n }\n switch (size) {\n case MINI:\n case TINY:\n case SMALL:\n case BADGE:\n case LARGE:\n case XLARGE:\n case XXLARGE:\n case XXXLARGE:\n return defaultUrl.replace(LARGE, size);\n default:\n return defaultUrl;\n }\n }",
"public Uri getOutputMediaFileUri(int type) {\n\t\treturn Uri.fromFile(getOutputMediaFile(type));\n\t}",
"public java.lang.String getPictureUri() {\n java.lang.Object ref = pictureUri_;\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 pictureUri_ = s;\n }\n return s;\n }\n }",
"abstract String getUri();",
"public Optional<String> getUri() {\n return Optional.ofNullable(uri);\n }",
"public URI getUri()\n {\n return uri;\n }",
"public String getLocalUri() {\n return localUri;\n }",
"public java.lang.String getPictureUri() {\n java.lang.Object ref = pictureUri_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n pictureUri_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"private static String url(final Track track) {\n\t\treturn track.getLinks().isEmpty()\n\t\t\t? null\n\t\t\t: track.getLinks().get(0).getHref().toString();\n\t}",
"public Uri getOutputMediaFileUri(int type) {\n return Uri.fromFile(getOutputMediaFile(type));\n }",
"public Uri getOutputMediaFileUri(int type) {\n return Uri.fromFile(getOutputMediaFile(type));\n }",
"public static Uri getOutputMediaFileUri(Point point){\r\n return Uri.fromFile(getOutputMediaFile(point));\r\n }",
"private String getMediaPathFromUri(final Uri uri) {\n\t\t\tString[] projection = { MediaStore.Images.Media.DATA };\n\t\t\tCursor cursor = managedQuery(uri, projection, null, null, null);\n\t\t\tcursor.moveToFirst();\n\t\t\treturn cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA));\n\t\t}",
"public URI uri() {\n return uri;\n }",
"private Uri getOutputMediaFileUri(int mediaType) {\n //parvo triabva da se proveri dali ima external storage\n\n if (isExternalStorageAvailable()) {\n\n //sled tova vrashtame directoriata za pictures ili ia sazdavame\n //1.Get external storage directory\n String appName = SendMessage.this.getString(R.string.app_name);\n String environmentDirectory; //\n //ako snimame picture zapismave v papkata za kartiniki, ako ne v papkata za Movies\n\n if(mediaType == MEDIA_TYPE_IMAGE) {\n environmentDirectory = Environment.DIRECTORY_PICTURES;\n } else {\n environmentDirectory = Environment.DIRECTORY_MOVIES;\n }\n File mediaStorageDirectory = new File(\n Environment.getExternalStoragePublicDirectory(environmentDirectory),\n appName);\n\n //2.Create subdirectory if it does not exist\n if (! mediaStorageDirectory.exists()) {\n if (!mediaStorageDirectory.mkdirs()) {\n Log.e(TAG, \"failed to create directory\");\n return null;\n }\n }\n\n //3.Create file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (mediaType == MEDIA_TYPE_IMAGE) {\n mediaFile = new File(mediaStorageDirectory.getPath() + File.separator +\n \"IMG_\" + timeStamp + \".jpg\");\n } else if (mediaType == MEDIA_TYPE_VIDEO) {\n mediaFile = new File(mediaStorageDirectory.getPath() + File.separator +\n \"MOV_\" + timeStamp + \".mp4\");\n } else {\n return null;\n }\n //4.Return the file's URI\n Log.d(TAG, \"File path: \" + Uri.fromFile(mediaFile));\n return Uri.fromFile(mediaFile);\n\n } else //ako niama external storage\n Log.d(\"Vic\",\"no external strogage, mediaUri si null\");\n return null;\n\n }",
"@DISPID(1093) //= 0x445. The runtime will prefer the VTID if present\n @VTID(14)\n java.lang.String media();",
"public String getThumbPhotoLink() {\n return fullPhoto.getThumbPhotoLink();\n }",
"public static String getMediaPath (byte[] mediaHash, byte mimeType)\n {\n return getMediaPath(DeploymentConfig.mediaURL, mediaHash, mimeType);\n }",
"public File getMediaDir() {\r\n return mediaDir;\r\n }",
"public String getArtworkUrl(MediaFileType type) {\n String url = artworkUrlMap.get(type);\n return url == null ? \"\" : url;\n }",
"public URI getUri() {\n return this.uri;\n }",
"public URI getUri() {\r\n\t\treturn uri;\r\n\t}",
"public abstract String getResUri();",
"com.google.ads.googleads.v6.resources.MediaFile getMediaFile();",
"private Uri getOutputMediaFileUri(int type){\n return Uri.fromFile(getOutputMediaFile(type));\n }",
"public static Uri getOutputMediaFileUri(int type) {\n return Uri.fromFile(getOutputMediaFile(type));\n }",
"public /*@NonNull*/ String getMediaId() {\n return mId;\n }",
"@Override\r\n public String getURI() {\r\n if (uriString == null) {\r\n uriString = createURI();\r\n }\r\n return uriString;\r\n }",
"protected static String getMediaPath (String prefix, byte[] mediaHash, byte mimeType)\n {\n if (mediaHash == null) {\n return null;\n }\n\n return prefix + hashToString(mediaHash) + MediaMimeTypes.mimeTypeToSuffix(mimeType);\n }",
"public String getMediaDetails() {\n return mediaListPlayer.currentMrl();\n }",
"private static Uri getOutputMediaFileUri(int type){\n return Uri.fromFile(getOutputMediaFile(type));\n }",
"private static Uri getOutputMediaFileUri(int type){\n return Uri.fromFile(getOutputMediaFile(type));\n }",
"public URI getUri() {\n\t\treturn uri;\n\t}",
"java.lang.String getDidUri();",
"public String getPhotoUrl() {\n try {\n ParseFile pic = fetchIfNeeded().getParseFile(\"pic\");\n return pic.getUrl();\n }\n catch (ParseException e) {\n Log.d(TAG, \"Error in getting photo from Parse: \" + e);\n return null;\n }\n }",
"RaptureURI getBaseURI();",
"java.lang.String getResourceUri();",
"String getURI();",
"String getURI();",
"String getURI();",
"public String getRemoteUri() {\n return remoteUri;\n }",
"public String getBaseUri() {\n\t\treturn baseUri;\n\t}",
"private static Uri getOutputMediaFileUri(int type){\n\t return Uri.fromFile(getOutputMediaFile(type));\n\t}",
"public URI uri() {\n\t\treturn uri;\n\t}",
"@NotNull URI getURI();",
"public interface MediaLocator extends XmlElement {\n\n /**\n * Returns the media uri of the track.\n * \n * @return the media uri\n */\n URI getMediaURI();\n\n}",
"public URI getURI()\r\n/* 34: */ {\r\n/* 35:60 */ return this.uri;\r\n/* 36: */ }",
"@Value.Default\n public String getUri() {\n\treturn \"\";\n }",
"private static Uri getOutputMediaFileUri(int type){\r\n\t return Uri.fromFile(getOutputMediaFile(type));\r\n\t}",
"public String getURI() {\n/* 95 */ return this.uri;\n/* */ }",
"public String getURI() {\n if (filePath == null) {\n return null;\n }\n int ind = filePath.lastIndexOf(\"/\");\n if (ind != -1) {\n //int ind2 = filePath.substring(0, ind-1).lastIndexOf(\"/\");\n //if (ind2 != -1)\n // return filePath.substring(ind2+1, filePath.length());\n return filePath.substring(ind+1, filePath.length());\n }\n\n return new File(filePath).getName();\n }",
"public String getThumbnailUrl();",
"public String getThumbUrl() {\r\n return thumbUrl;\r\n }",
"String getBaseUri();",
"public Uri getOutputMediaFileUri(int type) {\n return Uri.fromFile(CommonUtils.getOutputMediaFile(this, type == CommonUtils.MEDIA_TYPE_IMAGE));\n }",
"public String getUriString() {\n return \"mina:\" + getProtocol() + \":\" + getHost() + \":\" + getPort();\n }"
]
| [
"0.68860614",
"0.68851435",
"0.68851435",
"0.6878603",
"0.681498",
"0.66432077",
"0.6562896",
"0.64827484",
"0.6385151",
"0.6383497",
"0.6324061",
"0.6315233",
"0.62822205",
"0.62763166",
"0.62763166",
"0.6269372",
"0.62665313",
"0.62224686",
"0.6218058",
"0.62050354",
"0.6182732",
"0.61563575",
"0.61464965",
"0.61420083",
"0.61231655",
"0.6107589",
"0.61015934",
"0.6084303",
"0.6060157",
"0.6059871",
"0.604837",
"0.6031815",
"0.6029975",
"0.60272",
"0.60105485",
"0.5985855",
"0.5980513",
"0.59720767",
"0.5962893",
"0.59598625",
"0.5948993",
"0.5948751",
"0.5929888",
"0.58999354",
"0.5883745",
"0.58762276",
"0.58551055",
"0.58442354",
"0.58413416",
"0.5825924",
"0.58218974",
"0.58153623",
"0.5809553",
"0.5801195",
"0.5801195",
"0.5796706",
"0.57666045",
"0.57645404",
"0.5738734",
"0.5737528",
"0.5735251",
"0.572693",
"0.5722698",
"0.57158685",
"0.57151467",
"0.5706171",
"0.5705821",
"0.56988144",
"0.5697487",
"0.56972605",
"0.56812674",
"0.566424",
"0.5655171",
"0.56540704",
"0.56506264",
"0.56506264",
"0.5616605",
"0.5613488",
"0.5599383",
"0.5595312",
"0.5569401",
"0.5558778",
"0.5558778",
"0.5558778",
"0.5555869",
"0.55416703",
"0.5535326",
"0.55136675",
"0.550293",
"0.5497535",
"0.5492878",
"0.54922086",
"0.54895556",
"0.54882926",
"0.54705817",
"0.5460649",
"0.54597354",
"0.5451848",
"0.5440165",
"0.5419129"
]
| 0.79337996 | 0 |
Creates a image scaling operation, defined by the bounding box of a certain width and height. | public ScaleImageOperation(int width, int height, boolean upscaling, ImageUtils.ScalingStrategy strategy) {
this(width, height, upscaling, strategy, 1f);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract BufferedImage scale(Dimension destinationSize);",
"private BufferedImage scale(final BufferedImage input,\n \t\tfinal int newWidth, final int newHeight)\n \t{\n \t\tfinal int oldWidth = input.getWidth(), oldHeight = input.getHeight();\n \t\tif (oldWidth == newWidth && oldHeight == newHeight) return input;\n \n \t\tfinal BufferedImage output =\n \t\t\tnew BufferedImage(newWidth, newHeight, input.getType());\n \t\tfinal AffineTransform at = new AffineTransform();\n \t\tat.scale((double) newWidth / oldWidth, (double) newHeight / oldHeight);\n \t\tfinal AffineTransformOp scaleOp =\n \t\t\tnew AffineTransformOp(at, AffineTransformOp.TYPE_BILINEAR);\n \t\treturn scaleOp.filter(input, output);\n \t}",
"public ScaleImageOperation(int width, int height, boolean upscaling, ImageUtils.ScalingStrategy strategy, float compressionQuality) {\n this.width = width;\n this.height = height;\n this.upscaling = upscaling;\n this.strategy = strategy;\n this.compressionQuality = compressionQuality;\n }",
"public final Shape scale(Vector fromPoint, Vector toPoint, Vector anchorPoint) {\n\t\treturn transform(new Scalation(fromPoint, toPoint, anchorPoint));\n\t}",
"@Override\n\tfinal public void scale(double x, double y)\n\t{\n\t\twidth *= x;\n\t\theight *= y;\n\t}",
"private BufferedImage scale(BufferedImage sourceImage) {\n GraphicsEnvironment graphicsEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment();\n GraphicsDevice graphicsDevice = graphicsEnvironment.getDefaultScreenDevice();\n GraphicsConfiguration graphicsConfiguration = graphicsDevice.getDefaultConfiguration();\n BufferedImage scaledImage = graphicsConfiguration.createCompatibleImage(IMAGE_DIMENSION, IMAGE_DIMENSION);\n\n Graphics2D newGraphicsImage = scaledImage.createGraphics();\n newGraphicsImage.setColor(Color.white);\n newGraphicsImage.fillRect(0, 0, IMAGE_DIMENSION, IMAGE_DIMENSION);\n\n double xScale = (double) IMAGE_DIMENSION / sourceImage.getWidth();\n double yScale = (double) IMAGE_DIMENSION / sourceImage.getHeight();\n AffineTransform affineTransform = AffineTransform.getScaleInstance(xScale,yScale);\n newGraphicsImage.drawRenderedImage(sourceImage, affineTransform);\n newGraphicsImage.dispose();\n\n return scaledImage;\n }",
"private static Bitmap createScaledBitmap(Bitmap source, int width, int height)\n\t{\n\t\tint sourceWidth = source.getWidth();\n\t\tint sourceHeight = source.getHeight();\n\t\tfloat scale = Math.min((float)width / sourceWidth, (float)height / sourceHeight);\n\t\tsourceWidth *= scale;\n\t\tsourceHeight *= scale;\n\t\treturn Bitmap.createScaledBitmap(source, sourceWidth, sourceHeight, false);\n\t}",
"BufferedImage scaledImage(BufferedImage image, int width, int height) {\r\n\t\tBufferedImage result = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);\r\n\t\tGraphics2D g2 = result.createGraphics();\r\n\t\tg2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);\r\n\t\t\r\n\t\tdouble sx = (double)width / image.getWidth();\r\n\t\tdouble sy = (double)height / image.getHeight();\r\n\t\tdouble scale = Math.min(sx, sy);\r\n\t\tint x = (int)((width - image.getWidth() * scale) / 2);\r\n\t\tint y = (int)((height - image.getHeight() * scale) / 2);\r\n\t\t// center the image\r\n\t\tg2.drawImage(image, x, y, (int)(image.getWidth() * scale), (int)(image.getHeight() * scale), null);\r\n\t\t\r\n\t\tg2.dispose();\r\n\t\treturn result;\r\n\t}",
"private Image getScaledImage(Image sourceImage)\n {\n //create storage for the new image\n BufferedImage resizedImage = new BufferedImage(50, 50,\n BufferedImage.TYPE_INT_ARGB);\n\n //create a graphic from the image\n Graphics2D g2 = resizedImage.createGraphics();\n\n //sets the rendering options\n g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,\n RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n\n //copies the source image into the new image\n g2.drawImage(sourceImage, 0, 0, 50, 50, null);\n\n //clean up\n g2.dispose();\n\n //return 50 x 50 image\n return resizedImage;\n }",
"public final Shape getScaled(Vector fromPoint, Vector toPoint, Vector anchorPoint) {\n\t\treturn getCopy().scale(fromPoint, toPoint, anchorPoint);\n\t}",
"public void scale(float x, float y);",
"private void ScaleImage(){\n\t\tBufferedImage resizedImage = new BufferedImage(this.getWidth(), this.getHeight(), BufferedImage.TYPE_INT_RGB);\n\t\tGraphics2D g2 = resizedImage.createGraphics();\n\t\tg2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n\t\tg2.drawImage(image, 0, 0, this.getWidth(), this.getHeight(), null);\n\t\tg2.dispose();\n\t\tthis.image = resizedImage;\n\t}",
"void addBounds(int x, int y, int width, int height);",
"@Override\n public void setBounds(int x, int y, int w, int h, int op) {\n setBounds(x, y, w, h, op, true, false);\n }",
"public void doScaling() {\n try {\n int orientation = getExifOrientation(file);\n System.out.println(file.getName());\n //Dimension d = Imaging.getImageSize(file);\n ImageInputStream imageInputStream = ImageIO.createImageInputStream(file);\n // Use a subsampled image from the original, avoids read images too large to fit in memory\n BufferedImage bufferedImage = subsampleImage(imageInputStream, TARGET_WIDTH * 2, TARGET_HEIGHT * 2);\n ImageInformation ii=new ImageInformation(orientation, bufferedImage.getWidth(), bufferedImage.getHeight());\n AffineTransform transform=getExifTransformation(ii);\n bufferedImage=transformImage(bufferedImage, transform); \n Scalr.Mode mode;\n // calculate which side will be largest/smaller\n // this works with any image size\n double scaleX=(TARGET_WIDTH*1.0)/(bufferedImage.getWidth()*1.0);\n double scaleY=(TARGET_HEIGHT*1.0)/(bufferedImage.getHeight()*1.0);\n if (scaleX<scaleY) {\n mode = Scalr.Mode.FIT_TO_WIDTH;\n } else {\n mode = Scalr.Mode.FIT_TO_HEIGHT;\n } \n \n BufferedImage thumbnail = Scalr.resize(bufferedImage,\n Scalr.Method.QUALITY,\n mode, TARGET_WIDTH, TARGET_HEIGHT,\n Scalr.OP_ANTIALIAS);\n BufferedImage combined = new BufferedImage(TARGET_WIDTH, TARGET_HEIGHT, BufferedImage.TYPE_INT_ARGB);\n int x = 0, y = 0;\n if (mode == Scalr.Mode.FIT_TO_HEIGHT) {\n x = (TARGET_WIDTH - thumbnail.getWidth()) / 2;\n }\n if (mode == Scalr.Mode.FIT_TO_WIDTH) {\n y = (TARGET_HEIGHT - thumbnail.getHeight()) / 2;\n }\n Graphics g = combined.getGraphics();\n g.setColor(new java.awt.Color(0.0f, 0.0f, 0.0f, 0.0f));\n g.fillRect(0, 0, combined.getWidth(), combined.getHeight());\n g.drawImage(thumbnail, x, y, null);\n g.dispose();\n //Writes test subsampled image taken from original\n if (saveSubSampled) {\n ImageIO.write(bufferedImage, OUTPUT_EXTENSION, new File(output));\n }\n //Writes thumbnail, created from the subsampled image.\n ImageIO.write(combined, OUTPUT_EXTENSION, new File(output_thumb));\n\n } catch (IOException ex) {\n Logger.getLogger(Scaler.class.getName()).log(Level.SEVERE, null, ex);\n } catch (Exception ex) {\n Logger.getLogger(Scaler.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"private javaxt.io.Image _transform_simple(javaxt.io.Image src_img, \n double[] src_bbox, int[] dst_size, double[] dst_bbox){\n\n double[] src_quad = new double[]{0, 0, src_img.getWidth(), src_img.getHeight()};\n SRS.transf to_src_px =SRS.make_lin_transf(src_bbox, src_quad);\n\n //minx, miny = to_src_px((dst_bbox[0], dst_bbox[3]));\n double[] min = to_src_px.transf(dst_bbox[0], dst_bbox[3]);\n double minx = min[0];\n double miny = min[1];\n\n //maxx, maxy = to_src_px((dst_bbox[2], dst_bbox[1]));\n double[] max = to_src_px.transf(dst_bbox[2], dst_bbox[1]);\n double maxx = max[0];\n double maxy = max[1];\n\n double src_res = (src_bbox[0]-src_bbox[2])/src_img.getWidth();\n double dst_res = (dst_bbox[0]-dst_bbox[2])/dst_size[0];\n\n double tenth_px_res = Math.abs(dst_res/(dst_size[0]*10));\n javaxt.io.Image img = new javaxt.io.Image(src_img.getBufferedImage());\n if (Math.abs(src_res-dst_res) < tenth_px_res){\n img.crop(cint(minx), cint(miny), dst_size[0], dst_size[1]);\n //src_img.crop(cint(minx), cint(miny), cint(minx)+dst_size[0], cint(miny)+dst_size[1]);\n return img; //src_img;\n }\n else{\n img.crop(cint(minx), cint(miny), cint(maxx)-cint(minx), cint(maxy)-cint(miny));\n img.resize(dst_size[0], dst_size[1]);\n //src_img.crop(cint(minx), cint(miny), cint(maxx), cint(maxy));\n //src_img.resize(dst_size[0], dst_size[1]);\n return img; //src_img;\n }\n //ImageSource(result, size=dst_size, transparent=src_img.transparent)\n }",
"@Test\n void testScaleUp() throws OperationFailedException {\n\n ScaledObjectAreaChecker checker = new ScaledObjectAreaChecker(SCALE_FACTOR);\n\n // Create an object that is a small circle\n ObjectMask unscaled = CircleObjectFixture.circleAt(new Point2d(8, 8), 7);\n checker.assertConnected(\"unscaled\", unscaled);\n\n ObjectMask scaled = unscaled.scale(checker.factor());\n\n checker.assertConnected(\"scaled\", scaled);\n checker.assertExpectedArea(unscaled, scaled);\n }",
"public PictureScaler() {\r\n try {\r\n URL url = getClass().getResource(\"images/BB.jpg\");\r\n picture = ImageIO.read(url);\r\n scaleW = (int)(SCALE_FACTOR * picture.getWidth());\r\n scaleH = (int)(SCALE_FACTOR * picture.getHeight());\r\n System.out.println(\"w, h = \" + picture.getWidth() + \", \" + picture.getHeight());\r\n setPreferredSize(new Dimension(PADDING + (5 * (scaleW + PADDING)), \r\n scaleH + (4 * PADDING)));\r\n } catch (Exception e) {\r\n System.out.println(\"Problem reading image file: \" + e);\r\n System.exit(0);\r\n }\r\n }",
"@Method(selector = \"scale:imageData:width:height:completionBlock:\")\n\tpublic native void scale(String name, NSData imageData, int width, int height, @Block App42ResponseBlock completionBlock);",
"public BufferedImage scaleImage(BufferedImage before, double scaleRateW, double scaleRateH) {\n\t\tint w = before.getWidth();\n\t\tint h = before.getHeight();\n\t\tBufferedImage after = new BufferedImage((int)(w*scaleRateW), (int)(h*scaleRateH), BufferedImage.TYPE_INT_ARGB);\n\t\tAffineTransform at = new AffineTransform();\n\t\tat.scale(scaleRateW,scaleRateH);\n\t\tAffineTransformOp scaleOp = new AffineTransformOp(at, AffineTransformOp.TYPE_BILINEAR);\n\t\tafter = scaleOp.filter(before, after);\n\t\treturn after;\n\t}",
"BasicScalingType createBasicScalingType();",
"RenderedImage createScaledRendering(Long id, \n\t\t\t\t\tint w, \n\t\t\t\t\tint h, \n\t\t\t\t\tSerializableState hintsState) \n\tthrows RemoteException;",
"@Method(selector = \"scale:imagePath:width:height:completionBlock:\")\n\tpublic native void scale(String name, String imagePath, int width, int height, @Block App42ResponseBlock completionBlock);",
"private BufferedImage getOptimalScalingImage(BufferedImage inputImage,\r\n int startSize, int endSize) {\r\n int currentSize = startSize;\r\n BufferedImage currentImage = inputImage;\r\n int delta = currentSize - endSize;\r\n int nextPow2 = currentSize >> 1;\r\n while (currentSize > 1) {\r\n if (delta <= nextPow2) {\r\n if (currentSize != endSize) {\r\n BufferedImage tmpImage = new BufferedImage(endSize,\r\n endSize, BufferedImage.TYPE_INT_RGB);\r\n Graphics g = tmpImage.getGraphics();\r\n ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_INTERPOLATION, \r\n RenderingHints.VALUE_INTERPOLATION_BILINEAR);\r\n g.drawImage(currentImage, 0, 0, tmpImage.getWidth(), \r\n tmpImage.getHeight(), null);\r\n currentImage = tmpImage;\r\n }\r\n return currentImage;\r\n } else {\r\n BufferedImage tmpImage = new BufferedImage(currentSize >> 1,\r\n currentSize >> 1, BufferedImage.TYPE_INT_RGB);\r\n Graphics g = tmpImage.getGraphics();\r\n ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_INTERPOLATION, \r\n RenderingHints.VALUE_INTERPOLATION_BILINEAR);\r\n g.drawImage(currentImage, 0, 0, tmpImage.getWidth(), \r\n tmpImage.getHeight(), null);\r\n currentImage = tmpImage;\r\n currentSize = currentImage.getWidth();\r\n delta = currentSize - endSize;\r\n nextPow2 = currentSize >> 1;\r\n }\r\n }\r\n return currentImage;\r\n }",
"@Override\n\tpublic void run() {\n\t\tspacing = checkDimensions(spacingString, input.numDimensions(), \"Spacings\");\n\t\tscales = Arrays.stream(scaleString.split(regex)).mapToInt(Integer::parseInt)\n\t\t\t.toArray();\n\t\tDimensions resultDims = Views.addDimension(input, 0, scales.length - 1);\n\t\t// create output image, potentially-filtered input\n\t\tresult = opService.create().img(resultDims, new FloatType());\n\n\t\tfor (int s = 0; s < scales.length; s++) {\n\t\t\t// Determine whether or not the user would like to apply the gaussian\n\t\t\t// beforehand and do it.\n\t\t\tRandomAccessibleInterval<T> vesselnessInput = doGauss ? opService.filter()\n\t\t\t\t.gauss(input, scales[s]) : input;\n\t\t\tIntervalView<FloatType> scaleResult = Views.hyperSlice(result, result\n\t\t\t\t.numDimensions() - 1, s);\n\t\t\topService.filter().frangiVesselness(scaleResult, vesselnessInput, spacing,\n\t\t\t\tscales[s]);\n\t\t}\n\t}",
"public static BufferedImage resizeImage(BufferedImage original, int width, int height, Object hint){\n\t\tBufferedImage scaled = new BufferedImage(width, height, original.getType());\n\t\tGraphics2D g = scaled.createGraphics();\n\t\tg.setRenderingHint(RenderingHints.KEY_INTERPOLATION, hint); \n\t\tg.drawImage(original, 0, 0, width, height, null);\n\t\tg.dispose();\n\t\treturn scaled;\n\t}",
"public void scale(Point P, int scaleFactor) {\n\n\n }",
"private static Image resize(final Image image, final int width,\r\n final int height) {\r\n final Image scaled = new Image(Display.getDefault(), width, height);\r\n final GC gc = new GC(scaled);\r\n gc.setAntialias(SWT.ON);\r\n gc.setInterpolation(SWT.HIGH);\r\n gc.drawImage(image, 0, 0, image.getBounds().width,\r\n image.getBounds().height, 0, 0, width, height);\r\n gc.dispose();\r\n image.dispose();\r\n return scaled;\r\n }",
"public static Bitmap scaleBitmap(Bitmap bitmap, int newWidth, int newHeight) {\n\t\tBitmap scaledBitmap = Bitmap.createBitmap(newWidth, newHeight,\n\t\t\t\tConfig.ARGB_8888);\n\n\t\tfloat scaleX = newWidth / (float) bitmap.getWidth();\n\t\tfloat scaleY = newHeight / (float) bitmap.getHeight();\n\t\tfloat pivotX = 0;\n\t\tfloat pivotY = 0;\n\n\t\tMatrix scaleMatrix = new Matrix();\n\t\tscaleMatrix.setScale(scaleX, scaleY, pivotX, pivotY);\n\n\t\tCanvas canvas = new Canvas(scaledBitmap);\n\t\tcanvas.setMatrix(scaleMatrix);\n\t\tcanvas.drawBitmap(bitmap, 0, 0, new Paint(Paint.FILTER_BITMAP_FLAG));\n\n\t\treturn scaledBitmap;\n\t}",
"protected static BufferedImage getScaledInstance(BufferedImage img, int targetWidth,\n int targetHeight) {\n BufferedImage ret = (BufferedImage) img;\n\n // Use multi-step technique: start with original size, then\n // scale down in multiple passes with drawImage()\n // until the target size is reached\n int w = img.getWidth();\n int h = img.getHeight();\n\n while (w > targetWidth || h > targetHeight) {\n // Bit shifting by one is faster than dividing by 2.\n w >>= 1;\n if (w < targetWidth) {\n w = targetWidth;\n }\n\n // Bit shifting by one is faster than dividing by 2.\n h >>= 1;\n if (h < targetHeight) {\n h = targetHeight;\n }\n\n BufferedImage tmp = new BufferedImage(w, h, img.getType());\n Graphics2D g2 = tmp.createGraphics();\n g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,\n RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n g2.setRenderingHint(RenderingHints.KEY_RENDERING,\n RenderingHints.VALUE_RENDER_QUALITY);\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n g2.drawImage(ret, 0, 0, w, h, null);\n g2.dispose();\n\n ret = tmp;\n }\n\n return ret;\n }",
"public static Bitmap ScaleBitmap(Bitmap bm, float width, float height) {\n\t\tBitmap result = null;\n\t\tif (bm == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tMatrix matrix = new Matrix();\n\t\tint w = bm.getWidth();\n\t\tint h = bm.getHeight();\n\t\tfloat resizeScaleWidth = width / w;\n\t\tfloat resizeScaleHeight = height / h;\n\t\t\n\t\tif(resizeScaleWidth == 1 && resizeScaleHeight == 1)\n\t\t\treturn bm;\n\t\t\n\t\tmatrix.postScale(resizeScaleWidth, resizeScaleHeight);\n\n\t\tresult = Bitmap.createBitmap(bm, 0, 0, w, h, matrix, true);\n\t\treturn result;\n\t}",
"public CreateScaledImagesService() {\n super(\"CreateScaledImagesService\");\n }",
"private Image getScaledImage(Image srcImg, int w, int h){\n BufferedImage resizedImg = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);\n Graphics2D g2 = resizedImg.createGraphics();\n\n g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n g2.drawImage(srcImg, 0, 0, w, h, null);\n g2.dispose();\n\n return resizedImg;\n }",
"private float getNewScale() {\n int width = getWidth() - (padding[0] + padding[2]);\n float scaleWidth = (float) width / (cropRect.right - cropRect.left);\n\n int height = getHeight() - (padding[1] + padding[3]);\n float scaleHeight = (float) height / (cropRect.bottom - cropRect.top);\n if (getHeight() > getWidth()) {\n return scaleWidth < scaleHeight ? scaleWidth : scaleHeight;\n }\n return scaleWidth < scaleHeight ? scaleWidth : scaleHeight;\n }",
"public Vector scale(double scalar) {\n\t\treturn new Vector(x * scalar, y * scalar);\n\t}",
"public static BufferedImage scale(BufferedImage src, int width, int height) {\n width = width == 0 ? 1 : width;\n height = height == 0 ? 1 : height;\n BufferedImage result = Scalr.resize(src, Scalr.Method.ULTRA_QUALITY, \n width, height,\n Scalr.OP_ANTIALIAS);\n return result;\n }",
"public void scaleBitmap(int newWidth, int newHeight) {\n\t\t// Technically since we always keep aspect ratio intact\n\t\t// we should only need to check one dimension.\n\t\t// Need to investigate and fix\n\t\tif ((newWidth > mMaxWidth) || (newHeight > mMaxHeight)) {\n\t\t\tnewWidth = mMaxWidth;\n\t\t\tnewHeight = mMaxHeight;\n\t\t}\n\t\tif ((newWidth < mMinWidth) || (newHeight < mMinHeight)) {\n\t\t\tnewWidth = mMinWidth;\n\t\t\tnewHeight = mMinHeight;\t\t\t\n\t\t}\n\n\t\tif ((newWidth != mExpandWidth) || (newHeight!=mExpandHeight)) {\t\n\t\t\t// NOTE: depending on the image being used, it may be \n\t\t\t// better to keep the original image available and\n\t\t\t// use those bits for resize. Repeated grow/shrink\n\t\t\t// can render some images visually non-appealing\n\t\t\t// see comments at top of file for mScaleFromOriginal\n\t\t\t// try to create a new bitmap\n\t\t\t// If you get a recycled bitmap exception here, check to make sure\n\t\t\t// you are not setting the bitmap both from XML and in code\n\t\t\tBitmap newbits = Bitmap.createScaledBitmap(mScaleFromOriginal ? mOriginal:mImage, newWidth,\n\t\t\t\t\tnewHeight, true);\n\t\t\t// if successful, fix up all the tracking variables\n\t\t\tif (newbits != null) {\n\t\t\t\tif (mImage!=mOriginal) {\n\t\t\t\t\tmImage.recycle();\n\t\t\t\t}\n\t\t\t\tmImage = newbits;\n\t\t\t\tmExpandWidth=newWidth;\n\t\t\t\tmExpandHeight=newHeight;\n\t\t\t\tmResizeFactorX = ((float) newWidth / mImageWidth);\n\t\t\t\tmResizeFactorY = ((float) newHeight / mImageHeight);\n\t\t\t\t\n\t\t\t\tmRightBound = mExpandWidth>mViewWidth ? 0 - (mExpandWidth - mViewWidth) : 0;\n\t\t\t\tmBottomBound = mExpandHeight>mViewHeight ? 0 - (mExpandHeight - mViewHeight) : 0;\n\t\t\t}\t\t\t\t\t\t\t\n\t\t}\n\t}",
"void scaleArea(float scaleFactor) {\n\t\t// for more advanced (more than 4 points), use this algorithm:\n\t\t// http://stackoverflow.com/questions/1109536/an-algorithm-for-inflating-deflating-offsetting-buffering-polygons\n\t\tfor (int i = 0; i < amount; i++) {\n\t\t\tPVector tmp = PVector.sub(point[i].position, anchor);\n\t\t\ttmp.mult(scaleFactor);\n\t\t\tpoint[i].position.set(PVector.add(anchor, tmp));\n\t\t}\n\t}",
"private Image getScaledImage(Image image, float x, float y) {\n AffineTransform transform = new AffineTransform();\n transform.scale(x, y);\n transform.translate(\n (x-1) * image.getWidth(null) / 2,\n (y-1) * image.getHeight(null) / 2);\n\n // create a transparent (not translucent) image\n Image newImage = gc.createCompatibleImage(\n image.getWidth(null),\n image.getHeight(null),\n Transparency.BITMASK);\n\n // draw the transformed image\n Graphics2D g = (Graphics2D)newImage.getGraphics();\n g.drawImage(image, transform, null);\n g.dispose();\n\n return newImage;\n }",
"public void createScaledImage(String location, int type, int orientation, int session, int database_id) {\n\n // find portrait or landscape image\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(location, options);\n final int imageHeight = options.outHeight; //find the width and height of the original image.\n final int imageWidth = options.outWidth;\n\n int outputHeight = 0;\n int outputWidth = 0;\n\n\n //set the output size depending on type of image\n switch (type) {\n case EdittingGridFragment.SIZE4R :\n if (orientation == EdittingGridFragment.LANDSCAPE) {\n outputWidth = 1800;\n outputHeight = 1200;\n } else if (orientation == EdittingGridFragment.PORTRAIT) {\n outputWidth = 1200;\n outputHeight = 1800;\n }\n break;\n case EdittingGridFragment.SIZEWALLET:\n if (orientation == EdittingGridFragment.LANDSCAPE) {\n outputWidth = 953;\n outputHeight = 578;\n } else if (orientation ==EdittingGridFragment.PORTRAIT ) {\n outputWidth = 578;\n outputHeight = 953;\n }\n\n break;\n case EdittingGridFragment.SIZESQUARE:\n outputWidth = 840;\n outputHeight = 840;\n break;\n }\n\n assert outputHeight != 0 && outputWidth != 0;\n\n\n //fit images\n //FitRectangles rectangles = new FitRectangles((int) outputWidth, (int) outputHeight, imageWidth, imageHeight);\n\n //scaled images\n ScaledRectangles rectangles = new ScaledRectangles((int) outputWidth, (int) outputHeight, imageWidth, imageHeight);\n\n Rect canvasSize = rectangles.getCanvasSize();\n Rect canvasImageCoords = rectangles.getCanvasImageCoords();\n Rect imageCoords = rectangles.getImageCoords();\n\n\n\n /*\n //set the canvas size based on the type of image\n Rect canvasSize = new Rect(0, 0, (int) outputWidth, (int) outputHeight);\n Rect canvasImageCoords = new Rect();\n //Rect canvasImageCoords = new Rect (0, 0, outputWidth, outputHeight); //set to use the entire canvas\n Rect imageCoords = new Rect(0, 0, imageWidth, imageHeight);\n //Rect imageCoords = new Rect();\n\n\n // 3 cases, exactfit, canvas width larger, canvas height larger\n if ((float) outputHeight/outputWidth == (float) imageHeight/imageWidth) {\n canvasImageCoords.set(canvasSize);\n //imageCoords.set(0, 0, imageWidth, imageHeight); //map the entire image to the entire canvas\n Log.d(\"Async\", \"Proportionas Equal\");\n\n }\n\n\n\n else if ( (float) outputHeight/outputWidth > (float) imageHeight/imageWidth) {\n //blank space above and below image\n //find vdiff\n\n\n //code that fits the image without whitespace\n Log.d(\"Async\", \"blank space above and below\");\n\n float scaleFactor = (float)imageHeight / (float) outputHeight; //amount to scale the canvas by to match the height of the image.\n int scaledCanvasWidth = (int) (outputWidth * scaleFactor);\n int hDiff = (imageWidth - scaledCanvasWidth)/2;\n imageCoords.set (hDiff, 0 , imageWidth - hDiff, imageHeight);\n\n\n\n //code fits image with whitespace\n float scaleFactor = (float) outputWidth / (float) imageWidth;\n int scaledImageHeight = (int) (imageHeight * scaleFactor);\n assert scaledImageHeight < outputHeight;\n\n int vDiff = (outputHeight - scaledImageHeight)/2;\n canvasImageCoords.set(0, vDiff, outputWidth, outputHeight - vDiff);\n\n\n\n } else if ((float) outputHeight/outputWidth < (float) imageHeight/imageWidth) {\n //blank space to left and right of image\n\n\n //fits the image without whitespace\n float scaleFactor = (float) imageWidth / (float) outputWidth;\n int scaledCanvasHeight = (int) (outputHeight * scaleFactor);\n int vDiff = (imageHeight - scaledCanvasHeight)/2;\n imageCoords.set(0, vDiff, imageWidth, imageHeight - vDiff);\n\n //fits image with whitespace\n\n Log.d(\"Async\", \"blank space left and right\");\n float scaleFactor = (float) outputHeight / (float) imageHeight;\n int scaledImageWidth = (int) (imageWidth * scaleFactor);\n assert scaledImageWidth < outputWidth;\n\n int hDiff = (outputWidth - scaledImageWidth)/2;\n\n canvasImageCoords.set(hDiff, 0, outputWidth - hDiff, outputHeight);\n }\n\n */\n\n Log.d(\"Async\", \"Canvas Image Coords:\" + canvasImageCoords.toShortString());\n\n SaveImage imageSaver = new SaveImage(getApplicationContext(), database);\n ImageObject imageObject = new ImageObject(location);\n Bitmap imageBitmap = imageObject.getImageBitmap();\n int sampleSize = imageObject.getSampleSize();\n\n Rect sampledImageCoords = imageSaver.getSampledCoordinates(imageCoords, sampleSize);\n\n System.gc();\n BackgroundObject backgroundObject = new BackgroundObject(outputWidth, outputHeight);\n Bitmap background = backgroundObject.getBackground();\n\n\n background = imageSaver.drawOnBackground(background, imageBitmap,\n sampledImageCoords, canvasImageCoords);\n\n imageSaver.storeImage(background, database_id, session);\n background.recycle();\n\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testRectangleScaleWidthToNegative() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), 1, 100, 50.0, 100.0));\n model1.addShape(Oval.createOval(\"C\", new Point.Double(500, 100),\n new Color(0, 0, 1), 6, 100, 60.0, 30.0));\n model1.addAction(ScaleRectangleAction.createScaleRectangleAction(\"R\", 10, 50,\n 50, 100, -51, 100));\n }",
"private static AppImage scale(AppImage image) {\n\t\treturn scale(image, GraphicsConfig.getScaleWidth(), GraphicsConfig.getScaleHeight());\n\t}",
"public Image createScaledImage (double scale, int interpolType)\r\n {\r\n\tImageScaler scaler = new ImageScaler(scale, interpolType);\r\n\treturn (HSIImage)scaler.filter(this);\r\n }",
"public ScaleAnimation(int startTime, int endTime, String shapeID, double fromSx, double fromSy,\n double toSx, double toSy)\n throws IllegalArgumentException {\n //throws exception if startTime >= endTime\n super(startTime, endTime, shapeID, AnimType.SCALE);\n if (fromSx < 0 || fromSy < 0 || toSx < 0 || toSy < 0) {\n throw new IllegalArgumentException(\"scale parameter cannot be negative!\");\n }\n\n this.fromSx = fromSx;\n this.fromSy = fromSy;\n this.toSx = toSx;\n this.toSy = toSy;\n }",
"public static Bitmap scale(final Bitmap src, final float scaleWidth, final float scaleHeight) {\n return scale(src, scaleWidth, scaleHeight, false);\n }",
"public static Transform newScale(float sx, float sy, float sz){\n return new Transform(new float[][]{\n {sx, 0.0f, 0.0f, 0.0f},\n {0.0f, sy, 0.0f, 0.0f},\n {0.0f, 0.0f, sz, 0.0f},\n {0.0f, 0.0f, 0.0f, 1.0f}\n\n });\n }",
"public void setBounds(Rectangle b);",
"public static BufferedImage scale(BufferedImage src, int w, int h)\n\t{\n\t BufferedImage img = \n\t new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);\n\t int x, y;\n\t int ww = src.getWidth();\n\t int hh = src.getHeight();\n\t int[] ys = new int[h];\n\t for (y = 0; y < h; y++)\n\t ys[y] = y * hh / h;\n\t for (x = 0; x < w; x++) {\n\t int newX = x * ww / w;\n\t for (y = 0; y < h; y++) {\n\t int col = src.getRGB(newX, ys[y]);\n\t img.setRGB(x, y, col);\n\t }\n\t }\n\t return img;\n\t}",
"@Test\n public void testScale() {\n System.out.println(\"scale\");\n Float s = null;\n ImageFilter instance = null;\n BufferedImage expResult = null;\n BufferedImage result = instance.scale(s);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"void scale(double factor);",
"@Test\n public void testScaling() {\n System.out.println(\"scaling\");\n double s = 0.0;\n ImageFilter instance = null;\n BufferedImage expResult = null;\n BufferedImage result = instance.scaling(s);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"public BufferedImage getScaledImage ( float scale ) {\n\n int oldW = param.Parameters.IMAGEW;\n int oldH = param.Parameters.IMAGEH;\n\n param.Parameters.SCALE = scale;\n param.Parameters.IMAGEW = (int)((float)param.Parameters.IMAGEW * param.Parameters.SCALE);\n param.Parameters.IMAGEH = (int)((float)param.Parameters.IMAGEH * param.Parameters.SCALE);\n\n BufferedImage img =\n param.Parameters.PROBLEM.getData(param.Parameters.STATE, program, 0, 0);\n\n param.Parameters.SCALE = 1.0f;\n param.Parameters.IMAGEW = oldW;\n param.Parameters.IMAGEH = oldH;\n\n System.gc();\n\n return img;\n\n }",
"public native MagickImage scaleImage(int cols, int rows)\n\t\t\tthrows MagickException;",
"@Test\n public void scale() {\n assertEquals(\"Wrong vector scale\", new Vector(1,1,1).scale(2), new Vector(2,2,2));\n }",
"private Image getScaledImage(BufferedImage srcImg, int w, int h) {\n\t\tint srcWidth = srcImg.getWidth();\n\t\tint srcHeight = srcImg.getHeight();\n\t\tint diffWidth = w - srcWidth;\n\t\tint diffHeight = h - srcHeight;\n\t\tif (diffWidth < diffHeight) {\n\t\t\tdouble ratio = (double) w / (double) srcWidth;\n\t\t\th = (int) Math.round(srcHeight * ratio);\n\t\t} else {\n\t\t\tdouble ratio = (double) h / (double) srcHeight;\n\t\t\tw = (int) Math.round(srcWidth * ratio);\n\t\t}\n\t\tBufferedImage resizedImg = new BufferedImage(w, h,\n\t\t\t\tBufferedImage.TYPE_INT_RGB);\n\t\tGraphics2D g2 = resizedImg.createGraphics();\n\t\tg2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,\n\t\t\t\tRenderingHints.VALUE_INTERPOLATION_BILINEAR);\n\t\tg2.drawImage(srcImg, 0, 0, w, h, null);\n\t\tg2.dispose();\n\t\treturn resizedImg;\n\t}",
"public void scale(float scalarX, float scalarY) {\n\t\ttile.scale(scalarX, scalarY);\n\t\tarrow.scale(scalarX, scalarY);\n\t}",
"public void Scale(SurfaceData param1SurfaceData1, SurfaceData param1SurfaceData2, Composite param1Composite, Region param1Region, int param1Int1, int param1Int2, int param1Int3, int param1Int4, double param1Double1, double param1Double2, double param1Double3, double param1Double4) {\n/* 150 */ tracePrimitive(this.target);\n/* 151 */ this.target.Scale(param1SurfaceData1, param1SurfaceData2, param1Composite, param1Region, param1Int1, param1Int2, param1Int3, param1Int4, param1Double1, param1Double2, param1Double3, param1Double4);\n/* */ }",
"private Bitmap scaleBitmap(PageViewHolder holder, Bitmap bitmap) {\n if (bitmap == null) {\n return null;\n }\n\n // Get bitmap dimensions\n int bitmapWidth = bitmap.getWidth();\n int bitmapHeight = bitmap.getHeight();\n\n ViewGroup.LayoutParams parentParams = holder.imageLayout.getLayoutParams();\n // Determine how much to scale: the dimension requiring less scaling is\n // closer to the its side. This way the image always stays inside the\n // bounding box AND either x/y axis touches it.\n float xScale = ((float) parentParams.width) / bitmapWidth;\n float yScale = ((float) parentParams.height) / bitmapHeight;\n float scale = (xScale <= yScale) ? xScale : yScale;\n\n // Create a matrix for the scaling (same scale amount in both directions)\n Matrix matrix = new Matrix();\n matrix.postScale(scale, scale);\n\n // Create a new bitmap that is scaled to the bounding box\n Bitmap scaledBitmap = null;\n try {\n scaledBitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmapWidth, bitmapHeight, matrix, true);\n } catch (OutOfMemoryError oom) {\n Utils.manageOOM(mPdfViewCtrl);\n }\n\n if (sDebug) Log.d(TAG, \"scaleBitmap recycle\");\n ImageMemoryCache.getInstance().addBitmapToReusableSet(bitmap);\n return scaledBitmap;\n }",
"public Coordinates scaleVector(Coordinates vector, double factor);",
"public int scale(int original);",
"private javaxt.io.Image _transform(javaxt.io.Image src_img, double[] src_bbox, int[] dst_size, double[] dst_bbox){\n\n //Use GeoTools to reproject src_img to the output projection.\n try{\n\n //Compute geodetic w/h in degrees (used to specify the Envelope2D)\n double x1 = x(src_bbox[0]);\n double x2 = x(src_bbox[2]);\n double w = 0;\n if (x1>x2) w = x1-x2;\n else w = x2-x1;\n //System.out.println(x1 + \" to \" + x2 + \" = \" + (w));\n\n double y1 = y(src_bbox[1]);\n double y2 = y(src_bbox[3]);\n double h = 0;\n if (y1>y2) h = y1-y2;\n else h = y2-y1;\n //System.out.println(y1 + \" to \" + y2 + \" = \" + (h));\n\n\n System.out.println(src_bbox[0] + \", \" + src_bbox[1] + \", \" + src_bbox[2] + \", \" + src_bbox[3]);\n System.out.println(dst_bbox[0] + \", \" + dst_bbox[1] + \", \" + dst_bbox[2] + \", \" + dst_bbox[3]);\n \n Envelope2D envelope =\n new Envelope2D(this.src_srs.crs, src_bbox[0], src_bbox[1], w, h);\n\n GridCoverage2D gc2d =\n new GridCoverageFactory().create(\"BMImage\", src_img.getBufferedImage(), envelope);\n\n GridCoverage2D gc2dProj =\n (GridCoverage2D)Operations.DEFAULT.resample(gc2d, this.dst_srs.crs);\n\n //TODO: Crop Output?\n /* \n final AbstractProcessor processor = new DefaultProcessor(null);\n final ParameterValueGroup param = processor.getOperation(\"CoverageCrop\").getParameters();\n \n final GeneralEnvelope crop = new GeneralEnvelope( ... ); //<--Define new extents\n param.parameter(\"Source\").setValue( gc2dProj );\n param.parameter(\"Envelope\").setValue( crop );\n\n gc2dProj = (GridCoverage2D) processor.doOperation(param); \n */\n\n src_img = new javaxt.io.Image(gc2dProj.getRenderedImage());\n src_img.resize(dst_size[0], dst_size[1], false);\n\n }\n catch (Exception e){\n e.printStackTrace();\n }\n\n\n /*\n //Start port of original python code...\n src_bbox = this.src_srs.align_bbox(src_bbox);\n dst_bbox = this.dst_srs.align_bbox(dst_bbox);\n int[] src_size = new int[]{src_img.getWidth(), src_img.getHeight()}; //src_img.size\n double[] src_quad = new double[]{0, 0, src_size[0], src_size[1]};\n double[] dst_quad = new double[]{0, 0, dst_size[0], dst_size[1]};\n \n SRS.transf to_src_px = SRS.make_lin_transf(src_bbox, src_quad);\n SRS.transf to_dst_w = SRS.make_lin_transf(dst_quad, dst_bbox);\n\n //This segment still needs to be ported to java\n meshes = []; \n def dst_quad_to_src(quad):\n src_quad = []\n for dst_px in [(quad[0], quad[1]), (quad[0], quad[3]),\n (quad[2], quad[3]), (quad[2], quad[1])]:\n dst_w = to_dst_w(dst_px)\n src_w = self.dst_srs.transform_to(self.src_srs, dst_w)\n src_px = to_src_px(src_w)\n src_quad.extend(src_px)\n return quad, src_quad\n */\n\n /*\n int mesh_div = this.mesh_div;\n while (mesh_div > 1 && ((dst_size[0] / mesh_div) < 10 || (dst_size[1] / mesh_div) < 10))\n mesh_div -= 1;\n for (int[] quad : griddify(dst_quad, mesh_div))\n meshes.append(dst_quad_to_src(quad));\n result = src_img.as_image().transform(dst_size, Image.MESH, meshes,\n image_filter[self.resampling])\n */\n return src_img;\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testRectangleScaleHeightToNegative() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), 1, 100, 50.0, 100.0));\n model1.addShape(Oval.createOval(\"C\", new Point.Double(500, 100),\n new Color(0, 0, 1), 6, 100, 60.0, 30.0));\n model1.addAction(ScaleRectangleAction.createScaleRectangleAction(\"R\", 10, 50,\n 50, 100, 0, -101));\n }",
"public Image getScaledCopy(float w, float h) {\r\n\t\treturn new Image(renderer, texture, textureX, textureY, textureWidth, textureHeight, w, h);\r\n\t}",
"private Bitmap scaleBitmapToHeightWithMinWidth(Bitmap bitmap, int newHeight, int minWidth) {\n bitmap = cropBitmapToSquare(bitmap);\n int imgHeight = bitmap.getHeight();\n int imgWidth = bitmap.getWidth();\n float scaleFactor = ((float) newHeight) / imgHeight;\n int newWidth = (int) (imgWidth * scaleFactor);\n bitmap = Bitmap.createScaledBitmap(bitmap, newWidth, newHeight, true);\n bitmap = scaleBitmapToMinWidth(bitmap, minWidth);\n return bitmap;\n }",
"Rectangle(int width, int height){\n area = width * height;\n }",
"private Command createScaleCommand(String command) {\n\t\tString[] tokens = command.split(\" \");\n\t\treturn new ScaleCommand(Double.parseDouble(tokens[1]));\n\t}",
"public void scaleImage(int newWidth, int newHeight) {\n\t\t// create a new empty buffered image with the newW and H\n\t\tBufferedImage newIm = new BufferedImage(newWidth, newHeight,\n\t\t\t\tBufferedImage.TYPE_INT_RGB);\n\n\t\t// scale factor between the old and new image sizes\n\t\tdouble scaleX = im.getWidth() / newIm.getWidth();\n\t\tdouble scaleY = im.getHeight() / newIm.getHeight();\n\t\tint rgb = 0;\n\n\t\t// double loop to run through the new image to move pixel colours\n\t\tfor (int i = 0; i < newIm.getWidth(); i++) {\n\t\t\tfor (int j = 0; j < newIm.getHeight(); j++) {\n\t\t\t\t// sets rgb to the colour at the scaled location on the original\n\t\t\t\t// picture\n\t\t\t\trgb = im.getRGB((int) (i * scaleX), (int) (j * scaleY));\n\t\t\t\t// puts the colour into the new image\n\t\t\t\tnewIm.setRGB(i, j, rgb);\n\t\t\t}\n\t\t}\n\t\tim = newIm;\n\t}",
"public Coordinates scaleVector(Coordinates vector, double factor, Coordinates origin);",
"public void scale( float x, float y )\n\t{\n\t\tMatrix4f opMat = new Matrix4f();\n\t\topMat.setScale( x );\n\t\tmat.mul( opMat );\n\t}",
"public void scale(Vector center, float degree);",
"private Drawable resize(Drawable image, int width, int height) {\n Bitmap b = ((BitmapDrawable)image).getBitmap();\n Bitmap bitmapResized = Bitmap.createScaledBitmap(b, width, height, false);\n return new BitmapDrawable(getResources(), bitmapResized);\n }",
"private Bitmap scaleDownBitmapImage(Bitmap bitmap, int newWidth, int newHeight){\n Bitmap resizedBitmap = Bitmap.createScaledBitmap(bitmap, newWidth, newHeight, true);\n return resizedBitmap;\n }",
"public BoundingBox()\n\t{\n\t\tcenter = new Vector2(0.0, 0.0);\n\t\twidth = 1.0;\n\t\theight = 1.0;\n\t}",
"@Override\n\tpublic Object visitImageOpChain(ImageOpChain imageOpChain, Object arg) throws Exception {\n\t\timageOpChain.getArg().visit(this, arg);\n\t\tswitch (imageOpChain.getFirstToken().kind) {\n\t\t\tcase KW_SCALE:\n\t\t\t\tmv.visitMethodInsn(INVOKESTATIC, PLPRuntimeImageOps.JVMName, \"scale\", PLPRuntimeImageOps.scaleSig, false);\n\t\t\t\tbreak;\n\t\t\tcase OP_WIDTH:\n\t\t\t\tmv.visitMethodInsn(INVOKEVIRTUAL, \"java/awt/image/BufferedImage\", \"getWidth\", \"()I\", false);\n\t\t\t\tbreak;\n\t\t\tcase OP_HEIGHT:\n\t\t\t\tmv.visitMethodInsn(INVOKEVIRTUAL, \"java/awt/image/BufferedImage\", \"getHeight\", \"()I\", false);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\treturn null;\n\t}",
"Rectangle(double newWidth, double newHeight){\n height = newHeight;\n width = newWidth;\n }",
"void setBounds(Rectangle rectangle);",
"public BufferedImage modifyDimensions(int width, int height){\n\t\t return new BufferedImage((2* width)-1 , (2*height)-1, BufferedImage.TYPE_INT_RGB); \n\t }",
"public static BufferedImage imageScale(ImageIcon src, int w, int h) {\r\n int type = BufferedImage.TYPE_INT_RGB;\r\n BufferedImage dst = new BufferedImage(w, h, type);\r\n Graphics2D g2 = dst.createGraphics();\r\n // Fill background for scale to fit.\r\n g2.setBackground(UIManager.getColor(\"Panel.background\"));\r\n g2.clearRect(0, 0, w, h);\r\n double xScale = (double) w / src.getIconWidth();\r\n double yScale = (double) h / src.getIconHeight();\r\n // Scaling options:\r\n // Scale to fit - image just fits in label.\r\n double scale = Math.max(xScale, yScale);\r\n // Scale to fill - image just fills label.\r\n //double scale = Math.max(xScale, yScale);\r\n int width = (int) (scale * src.getIconWidth());\r\n int height = (int) (scale * src.getIconHeight());\r\n int x = (w - width) / 2;\r\n int y = (h - height) / 2;\r\n g2.drawImage(src.getImage(), x, y, width, height, null);\r\n g2.dispose();\r\n return dst;\r\n }",
"public void scaleAnimetion(SpriteBatch batch){\n }",
"public abstract Transformation updateTransform(Rectangle selectionBox);",
"@Test(expected = IllegalArgumentException.class)\n public void testScaleRectangleDuringSamePeriod() {\n model1.addShape(Rectangle.createRectangle(\"C\", new Point.Double(500, 100),\n new Color(0, 0, 1), 6, 100, 60.0, 30.0));\n model1.addAction(ScaleRectangleAction.createScaleRectangleAction(\"R\", 10, 50,\n 100, 100, 100, 100));\n model1.addAction(ScaleRectangleAction.createScaleRectangleAction(\"R\", 40, 60,\n 100, 100, 10, 10));\n }",
"public BufferedImage getFasterScaledInstance(BufferedImage img,\r\n int targetWidth, int targetHeight, Object hint,\r\n boolean progressiveBilinear)\r\n {\r\n int type = (img.getTransparency() == Transparency.OPAQUE) ?\r\n BufferedImage.TYPE_INT_RGB : BufferedImage.TYPE_INT_ARGB;\r\n BufferedImage ret = img;\r\n BufferedImage scratchImage = null;\r\n Graphics2D g2 = null;\r\n int w, h;\r\n int prevW = ret.getWidth();\r\n int prevH = ret.getHeight();\r\n boolean isTranslucent = img.getTransparency() != Transparency.OPAQUE; \r\n\r\n if (progressiveBilinear) {\r\n // Use multi-step technique: start with original size, then\r\n // scale down in multiple passes with drawImage()\r\n // until the target size is reached\r\n w = img.getWidth();\r\n h = img.getHeight();\r\n } else {\r\n // Use one-step technique: scale directly from original\r\n // size to target size with a single drawImage() call\r\n w = targetWidth;\r\n h = targetHeight;\r\n }\r\n \r\n do {\r\n if (progressiveBilinear && w > targetWidth) {\r\n w /= 2;\r\n if (w < targetWidth) {\r\n w = targetWidth;\r\n }\r\n }\r\n\r\n if (progressiveBilinear && h > targetHeight) {\r\n h /= 2;\r\n if (h < targetHeight) {\r\n h = targetHeight;\r\n }\r\n }\r\n\r\n if (scratchImage == null || isTranslucent) {\r\n // Use a single scratch buffer for all iterations\r\n // and then copy to the final, correctly-sized image\r\n // before returning\r\n scratchImage = new BufferedImage(w, h, type);\r\n g2 = scratchImage.createGraphics();\r\n }\r\n g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, hint);\r\n g2.drawImage(ret, 0, 0, w, h, 0, 0, prevW, prevH, null);\r\n prevW = w;\r\n prevH = h;\r\n\r\n ret = scratchImage;\r\n } while (w != targetWidth || h != targetHeight);\r\n \r\n if (g2 != null) {\r\n g2.dispose();\r\n }\r\n\r\n // If we used a scratch buffer that is larger than our target size,\r\n // create an image of the right size and copy the results into it\r\n if (targetWidth != ret.getWidth() || targetHeight != ret.getHeight()) {\r\n scratchImage = new BufferedImage(targetWidth, targetHeight, type);\r\n g2 = scratchImage.createGraphics();\r\n g2.drawImage(ret, 0, 0, null);\r\n g2.dispose();\r\n ret = scratchImage;\r\n }\r\n \r\n return ret;\r\n }",
"public void beginScaling() {\n xScale = 1.0f;\n yScale = 1.0f;\n }",
"public Image getScaledCopy(float scale) {\r\n\t\treturn getScaledCopy(width * scale, height * scale);\r\n\t}",
"@Override\n public Sprite createScaledSprite(Texture texture)\n {\n Sprite sprite = new Sprite(texture);\n sprite.getTexture().setFilter(TextureFilter.Linear, TextureFilter.Linear);\n sprite.setSize(sprite.getWidth() / PlayScreen.PPM/SCALE,\n sprite.getHeight() / PlayScreen.PPM/SCALE);\n return sprite;\n }",
"public Shape getBgetBoundingBox() {\r\n\t\t\r\n\t\tEllipse2D elilipse = new Ellipse2D.Double(0, 0, imageWidth, imageHeight);\r\n\t\tAffineTransform at = new AffineTransform(); \r\n\t\tat.translate(locationX, locationY);\r\n\t\tat.rotate(Math.toRadians(angle*sizeAngles));\r\n\t\t at.scale(0.5, 0.5);\r\n\t\tat.translate(-imageWidth/2, -imageHeight/2);\r\n\t\t\r\n\t\tShape rotatedRect = at.createTransformedShape(elilipse);\r\n\t\treturn rotatedRect;\r\n\t}",
"public static BufferedImage scaleImage(BufferedImage image, double scale){\n\t\tWritableRaster inRaster = image.getRaster();\n\t\t\n\t\tint w = (int)Math.round(image.getWidth() * scale);\n\t\tint h = (int)Math.round(image.getHeight() * scale);\n\t\tWritableRaster outRaster = inRaster.createCompatibleWritableRaster(w, h);\n\t\t\n\t\tObject outData = null;\n\t\tfor(int j=0; j<h; j++){\n\t\t\tfor(int i=0; i<w; i++){\n\t\t\t\toutData = inRaster.getDataElements((int)(i/scale), (int)(j/scale), outData);\n\t\t\t\toutRaster.setDataElements(i, j, outData);\n\t\t\t}\n\t\t}\n\t\t\n\t\tBufferedImage outImage = new BufferedImage(image.getColorModel(), outRaster, image.isAlphaPremultiplied(), null);\n\t\treturn outImage;\n\t}",
"void createRectangles();",
"private static <T extends Shape> void scaleShape(T shape, double scale){\r\n\t\tshapeContainer = new ShapeContainer<Shape>(shape);\r\n\t\ttry {\r\n\t\t\tshapeContainer.changeShapeScale(scale);\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t}",
"public void setBounds(Rectangle2D aRect)\n{\n setBounds(aRect.getX(), aRect.getY(), aRect.getWidth(), aRect.getHeight());\n}",
"public interface Scalable {\n public void scale(TimeTick base, double ratio);\n}",
"interface WithCreate extends\n SqlElasticPoolOperations.DefinitionStages.WithDatabaseDtuMin,\n SqlElasticPoolOperations.DefinitionStages.WithDatabaseDtuMax,\n SqlElasticPoolOperations.DefinitionStages.WithDtu,\n SqlElasticPoolOperations.DefinitionStages.WithStorageCapacity,\n SqlElasticPoolOperations.DefinitionStages.WithDatabase,\n Resource.DefinitionWithTags<SqlElasticPoolOperations.DefinitionStages.WithCreate>,\n Creatable<SqlElasticPool> {\n }",
"void setBounds(double x, double y, double scale) {\n double drawAspect = (double)width / (double)height;\n\n double halfPlotWidth = scale / 2.0;\n double halfPlotHeight = scale / 2.0;\n if (drawAspect > 1.0) {\n halfPlotWidth *= drawAspect;\n } else {\n halfPlotHeight /= drawAspect;\n }\n\n setBounds(x - halfPlotWidth, y - halfPlotHeight, x + halfPlotWidth, y + halfPlotHeight);\n }",
"@Test(expected = IllegalArgumentException.class)\n public void testRectangleScaleWidthToZero() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), 1, 100, 50.0, 100.0));\n model1.addShape(Oval.createOval(\"C\", new Point.Double(500, 100),\n new Color(0, 0, 1), 6, 100, 60.0, 30.0));\n model1.addAction(ScaleRectangleAction.createScaleRectangleAction(\"R\", 10, 50,\n 50, 100, 0, 100));\n model1.addAction(new MoveAction(\"C\", 20, 70, new Point.Double(500, 100),\n new Point.Double(0, 300)));\n }",
"public void setRectangleClip(int x, int y, float width, float height);",
"public double getScale(int target_w, int target_h){\n\t\tint w = this.w + this.padding_left + this.padding_right;\n\t\tint h = this.h + this.padding_top + this.padding_bottom;\n\t\treturn Math.min((double)target_w/w, (double)target_h/h);\n\t}",
"public void scale(float x, float y) {\n multiply(\n x, 0F, 0F, 0F,\n 0F, y, 0F, 0F,\n 0F, 0F, 1F, 0F,\n 0F, 0F, 0F, 1F\n );\n }",
"public static BufferedImage resize(BufferedImage img, Rectangle bounds)\n\t{\n\t\tBufferedImage resize = Scalr.resize(img, bounds.width, bounds.height, Scalr.OP_ANTIALIAS);\n\t\tBufferedImage dimg = new BufferedImage(bounds.width + bounds.x * 2, bounds.height + bounds.y * 2, img.getType());\n\t\tGraphics2D g = dimg.createGraphics();\n\t\tg.setComposite(AlphaComposite.Src);\n\t\tg.setRenderingHint(RenderingHints.KEY_INTERPOLATION,\n\t\t\t\tRenderingHints.VALUE_INTERPOLATION_BICUBIC);\n\t\tg.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION,\n\t\t\t\tRenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);\n\t\tg.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n\t\t\t\tRenderingHints.VALUE_ANTIALIAS_ON);\n\t\tg.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING,\n\t\t\t\tRenderingHints.VALUE_COLOR_RENDER_QUALITY);\n\t\tg.setRenderingHint(RenderingHints.KEY_RENDERING,\n\t\t\t\tRenderingHints.VALUE_RENDER_QUALITY);\n\t\tg.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL,\n\t\t\t\tRenderingHints.VALUE_STROKE_PURE);\n\t\tg.drawImage(resize, bounds.x, bounds.y, bounds.width + bounds.x, bounds.height + bounds.y, 0, 0, resize.getWidth(), resize.getHeight(), null);\n\t\tg.setComposite(AlphaComposite.SrcAtop);\n\t\tg.dispose();\n\t\treturn dimg; \n\t}",
"public Point2F scale(float s)\r\n {return new Point2F(x*s, y*s);}",
"int getScale();"
]
| [
"0.6184193",
"0.60309994",
"0.5941005",
"0.58738583",
"0.583216",
"0.57451165",
"0.5654572",
"0.5571762",
"0.5494232",
"0.54936564",
"0.5487749",
"0.54665726",
"0.541773",
"0.5366812",
"0.5344029",
"0.53270495",
"0.53257895",
"0.53188",
"0.53117436",
"0.53105575",
"0.53030604",
"0.5297472",
"0.527793",
"0.5251925",
"0.525061",
"0.52324975",
"0.52318716",
"0.5221026",
"0.5197879",
"0.5187266",
"0.51742834",
"0.5140661",
"0.5129285",
"0.51273966",
"0.5108053",
"0.50947016",
"0.50828034",
"0.50704",
"0.5062675",
"0.5053099",
"0.5019939",
"0.5018758",
"0.49911696",
"0.4989188",
"0.49870482",
"0.49836046",
"0.4981",
"0.4977863",
"0.49777466",
"0.4973164",
"0.4948537",
"0.49463645",
"0.49430558",
"0.49357885",
"0.49265528",
"0.49075687",
"0.48952454",
"0.48938462",
"0.48918092",
"0.4882711",
"0.48419124",
"0.48412853",
"0.48391777",
"0.48345",
"0.48318824",
"0.48305124",
"0.4827931",
"0.4823117",
"0.48216316",
"0.4815209",
"0.48087004",
"0.479716",
"0.47924605",
"0.47894263",
"0.4785288",
"0.47829536",
"0.47801763",
"0.4769587",
"0.47659087",
"0.47485685",
"0.4742103",
"0.4735577",
"0.47348955",
"0.47260633",
"0.47224018",
"0.4718966",
"0.47152498",
"0.47119156",
"0.4709574",
"0.4703135",
"0.47016597",
"0.47001037",
"0.4697815",
"0.46737567",
"0.46731594",
"0.4671719",
"0.46715772",
"0.4660496",
"0.46513912",
"0.464942"
]
| 0.61146575 | 1 |
Creates a image scaling operation, defined by the bounding box of a certain width and height. | public ScaleImageOperation(int width, int height, boolean upscaling, ImageUtils.ScalingStrategy strategy, float compressionQuality) {
this.width = width;
this.height = height;
this.upscaling = upscaling;
this.strategy = strategy;
this.compressionQuality = compressionQuality;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract BufferedImage scale(Dimension destinationSize);",
"public ScaleImageOperation(int width, int height, boolean upscaling, ImageUtils.ScalingStrategy strategy) {\n this(width, height, upscaling, strategy, 1f);\n }",
"private BufferedImage scale(final BufferedImage input,\n \t\tfinal int newWidth, final int newHeight)\n \t{\n \t\tfinal int oldWidth = input.getWidth(), oldHeight = input.getHeight();\n \t\tif (oldWidth == newWidth && oldHeight == newHeight) return input;\n \n \t\tfinal BufferedImage output =\n \t\t\tnew BufferedImage(newWidth, newHeight, input.getType());\n \t\tfinal AffineTransform at = new AffineTransform();\n \t\tat.scale((double) newWidth / oldWidth, (double) newHeight / oldHeight);\n \t\tfinal AffineTransformOp scaleOp =\n \t\t\tnew AffineTransformOp(at, AffineTransformOp.TYPE_BILINEAR);\n \t\treturn scaleOp.filter(input, output);\n \t}",
"public final Shape scale(Vector fromPoint, Vector toPoint, Vector anchorPoint) {\n\t\treturn transform(new Scalation(fromPoint, toPoint, anchorPoint));\n\t}",
"@Override\n\tfinal public void scale(double x, double y)\n\t{\n\t\twidth *= x;\n\t\theight *= y;\n\t}",
"private BufferedImage scale(BufferedImage sourceImage) {\n GraphicsEnvironment graphicsEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment();\n GraphicsDevice graphicsDevice = graphicsEnvironment.getDefaultScreenDevice();\n GraphicsConfiguration graphicsConfiguration = graphicsDevice.getDefaultConfiguration();\n BufferedImage scaledImage = graphicsConfiguration.createCompatibleImage(IMAGE_DIMENSION, IMAGE_DIMENSION);\n\n Graphics2D newGraphicsImage = scaledImage.createGraphics();\n newGraphicsImage.setColor(Color.white);\n newGraphicsImage.fillRect(0, 0, IMAGE_DIMENSION, IMAGE_DIMENSION);\n\n double xScale = (double) IMAGE_DIMENSION / sourceImage.getWidth();\n double yScale = (double) IMAGE_DIMENSION / sourceImage.getHeight();\n AffineTransform affineTransform = AffineTransform.getScaleInstance(xScale,yScale);\n newGraphicsImage.drawRenderedImage(sourceImage, affineTransform);\n newGraphicsImage.dispose();\n\n return scaledImage;\n }",
"private static Bitmap createScaledBitmap(Bitmap source, int width, int height)\n\t{\n\t\tint sourceWidth = source.getWidth();\n\t\tint sourceHeight = source.getHeight();\n\t\tfloat scale = Math.min((float)width / sourceWidth, (float)height / sourceHeight);\n\t\tsourceWidth *= scale;\n\t\tsourceHeight *= scale;\n\t\treturn Bitmap.createScaledBitmap(source, sourceWidth, sourceHeight, false);\n\t}",
"BufferedImage scaledImage(BufferedImage image, int width, int height) {\r\n\t\tBufferedImage result = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);\r\n\t\tGraphics2D g2 = result.createGraphics();\r\n\t\tg2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);\r\n\t\t\r\n\t\tdouble sx = (double)width / image.getWidth();\r\n\t\tdouble sy = (double)height / image.getHeight();\r\n\t\tdouble scale = Math.min(sx, sy);\r\n\t\tint x = (int)((width - image.getWidth() * scale) / 2);\r\n\t\tint y = (int)((height - image.getHeight() * scale) / 2);\r\n\t\t// center the image\r\n\t\tg2.drawImage(image, x, y, (int)(image.getWidth() * scale), (int)(image.getHeight() * scale), null);\r\n\t\t\r\n\t\tg2.dispose();\r\n\t\treturn result;\r\n\t}",
"private Image getScaledImage(Image sourceImage)\n {\n //create storage for the new image\n BufferedImage resizedImage = new BufferedImage(50, 50,\n BufferedImage.TYPE_INT_ARGB);\n\n //create a graphic from the image\n Graphics2D g2 = resizedImage.createGraphics();\n\n //sets the rendering options\n g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,\n RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n\n //copies the source image into the new image\n g2.drawImage(sourceImage, 0, 0, 50, 50, null);\n\n //clean up\n g2.dispose();\n\n //return 50 x 50 image\n return resizedImage;\n }",
"public final Shape getScaled(Vector fromPoint, Vector toPoint, Vector anchorPoint) {\n\t\treturn getCopy().scale(fromPoint, toPoint, anchorPoint);\n\t}",
"public void scale(float x, float y);",
"private void ScaleImage(){\n\t\tBufferedImage resizedImage = new BufferedImage(this.getWidth(), this.getHeight(), BufferedImage.TYPE_INT_RGB);\n\t\tGraphics2D g2 = resizedImage.createGraphics();\n\t\tg2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n\t\tg2.drawImage(image, 0, 0, this.getWidth(), this.getHeight(), null);\n\t\tg2.dispose();\n\t\tthis.image = resizedImage;\n\t}",
"void addBounds(int x, int y, int width, int height);",
"@Override\n public void setBounds(int x, int y, int w, int h, int op) {\n setBounds(x, y, w, h, op, true, false);\n }",
"public void doScaling() {\n try {\n int orientation = getExifOrientation(file);\n System.out.println(file.getName());\n //Dimension d = Imaging.getImageSize(file);\n ImageInputStream imageInputStream = ImageIO.createImageInputStream(file);\n // Use a subsampled image from the original, avoids read images too large to fit in memory\n BufferedImage bufferedImage = subsampleImage(imageInputStream, TARGET_WIDTH * 2, TARGET_HEIGHT * 2);\n ImageInformation ii=new ImageInformation(orientation, bufferedImage.getWidth(), bufferedImage.getHeight());\n AffineTransform transform=getExifTransformation(ii);\n bufferedImage=transformImage(bufferedImage, transform); \n Scalr.Mode mode;\n // calculate which side will be largest/smaller\n // this works with any image size\n double scaleX=(TARGET_WIDTH*1.0)/(bufferedImage.getWidth()*1.0);\n double scaleY=(TARGET_HEIGHT*1.0)/(bufferedImage.getHeight()*1.0);\n if (scaleX<scaleY) {\n mode = Scalr.Mode.FIT_TO_WIDTH;\n } else {\n mode = Scalr.Mode.FIT_TO_HEIGHT;\n } \n \n BufferedImage thumbnail = Scalr.resize(bufferedImage,\n Scalr.Method.QUALITY,\n mode, TARGET_WIDTH, TARGET_HEIGHT,\n Scalr.OP_ANTIALIAS);\n BufferedImage combined = new BufferedImage(TARGET_WIDTH, TARGET_HEIGHT, BufferedImage.TYPE_INT_ARGB);\n int x = 0, y = 0;\n if (mode == Scalr.Mode.FIT_TO_HEIGHT) {\n x = (TARGET_WIDTH - thumbnail.getWidth()) / 2;\n }\n if (mode == Scalr.Mode.FIT_TO_WIDTH) {\n y = (TARGET_HEIGHT - thumbnail.getHeight()) / 2;\n }\n Graphics g = combined.getGraphics();\n g.setColor(new java.awt.Color(0.0f, 0.0f, 0.0f, 0.0f));\n g.fillRect(0, 0, combined.getWidth(), combined.getHeight());\n g.drawImage(thumbnail, x, y, null);\n g.dispose();\n //Writes test subsampled image taken from original\n if (saveSubSampled) {\n ImageIO.write(bufferedImage, OUTPUT_EXTENSION, new File(output));\n }\n //Writes thumbnail, created from the subsampled image.\n ImageIO.write(combined, OUTPUT_EXTENSION, new File(output_thumb));\n\n } catch (IOException ex) {\n Logger.getLogger(Scaler.class.getName()).log(Level.SEVERE, null, ex);\n } catch (Exception ex) {\n Logger.getLogger(Scaler.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"private javaxt.io.Image _transform_simple(javaxt.io.Image src_img, \n double[] src_bbox, int[] dst_size, double[] dst_bbox){\n\n double[] src_quad = new double[]{0, 0, src_img.getWidth(), src_img.getHeight()};\n SRS.transf to_src_px =SRS.make_lin_transf(src_bbox, src_quad);\n\n //minx, miny = to_src_px((dst_bbox[0], dst_bbox[3]));\n double[] min = to_src_px.transf(dst_bbox[0], dst_bbox[3]);\n double minx = min[0];\n double miny = min[1];\n\n //maxx, maxy = to_src_px((dst_bbox[2], dst_bbox[1]));\n double[] max = to_src_px.transf(dst_bbox[2], dst_bbox[1]);\n double maxx = max[0];\n double maxy = max[1];\n\n double src_res = (src_bbox[0]-src_bbox[2])/src_img.getWidth();\n double dst_res = (dst_bbox[0]-dst_bbox[2])/dst_size[0];\n\n double tenth_px_res = Math.abs(dst_res/(dst_size[0]*10));\n javaxt.io.Image img = new javaxt.io.Image(src_img.getBufferedImage());\n if (Math.abs(src_res-dst_res) < tenth_px_res){\n img.crop(cint(minx), cint(miny), dst_size[0], dst_size[1]);\n //src_img.crop(cint(minx), cint(miny), cint(minx)+dst_size[0], cint(miny)+dst_size[1]);\n return img; //src_img;\n }\n else{\n img.crop(cint(minx), cint(miny), cint(maxx)-cint(minx), cint(maxy)-cint(miny));\n img.resize(dst_size[0], dst_size[1]);\n //src_img.crop(cint(minx), cint(miny), cint(maxx), cint(maxy));\n //src_img.resize(dst_size[0], dst_size[1]);\n return img; //src_img;\n }\n //ImageSource(result, size=dst_size, transparent=src_img.transparent)\n }",
"@Test\n void testScaleUp() throws OperationFailedException {\n\n ScaledObjectAreaChecker checker = new ScaledObjectAreaChecker(SCALE_FACTOR);\n\n // Create an object that is a small circle\n ObjectMask unscaled = CircleObjectFixture.circleAt(new Point2d(8, 8), 7);\n checker.assertConnected(\"unscaled\", unscaled);\n\n ObjectMask scaled = unscaled.scale(checker.factor());\n\n checker.assertConnected(\"scaled\", scaled);\n checker.assertExpectedArea(unscaled, scaled);\n }",
"public PictureScaler() {\r\n try {\r\n URL url = getClass().getResource(\"images/BB.jpg\");\r\n picture = ImageIO.read(url);\r\n scaleW = (int)(SCALE_FACTOR * picture.getWidth());\r\n scaleH = (int)(SCALE_FACTOR * picture.getHeight());\r\n System.out.println(\"w, h = \" + picture.getWidth() + \", \" + picture.getHeight());\r\n setPreferredSize(new Dimension(PADDING + (5 * (scaleW + PADDING)), \r\n scaleH + (4 * PADDING)));\r\n } catch (Exception e) {\r\n System.out.println(\"Problem reading image file: \" + e);\r\n System.exit(0);\r\n }\r\n }",
"@Method(selector = \"scale:imageData:width:height:completionBlock:\")\n\tpublic native void scale(String name, NSData imageData, int width, int height, @Block App42ResponseBlock completionBlock);",
"public BufferedImage scaleImage(BufferedImage before, double scaleRateW, double scaleRateH) {\n\t\tint w = before.getWidth();\n\t\tint h = before.getHeight();\n\t\tBufferedImage after = new BufferedImage((int)(w*scaleRateW), (int)(h*scaleRateH), BufferedImage.TYPE_INT_ARGB);\n\t\tAffineTransform at = new AffineTransform();\n\t\tat.scale(scaleRateW,scaleRateH);\n\t\tAffineTransformOp scaleOp = new AffineTransformOp(at, AffineTransformOp.TYPE_BILINEAR);\n\t\tafter = scaleOp.filter(before, after);\n\t\treturn after;\n\t}",
"BasicScalingType createBasicScalingType();",
"RenderedImage createScaledRendering(Long id, \n\t\t\t\t\tint w, \n\t\t\t\t\tint h, \n\t\t\t\t\tSerializableState hintsState) \n\tthrows RemoteException;",
"@Method(selector = \"scale:imagePath:width:height:completionBlock:\")\n\tpublic native void scale(String name, String imagePath, int width, int height, @Block App42ResponseBlock completionBlock);",
"private BufferedImage getOptimalScalingImage(BufferedImage inputImage,\r\n int startSize, int endSize) {\r\n int currentSize = startSize;\r\n BufferedImage currentImage = inputImage;\r\n int delta = currentSize - endSize;\r\n int nextPow2 = currentSize >> 1;\r\n while (currentSize > 1) {\r\n if (delta <= nextPow2) {\r\n if (currentSize != endSize) {\r\n BufferedImage tmpImage = new BufferedImage(endSize,\r\n endSize, BufferedImage.TYPE_INT_RGB);\r\n Graphics g = tmpImage.getGraphics();\r\n ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_INTERPOLATION, \r\n RenderingHints.VALUE_INTERPOLATION_BILINEAR);\r\n g.drawImage(currentImage, 0, 0, tmpImage.getWidth(), \r\n tmpImage.getHeight(), null);\r\n currentImage = tmpImage;\r\n }\r\n return currentImage;\r\n } else {\r\n BufferedImage tmpImage = new BufferedImage(currentSize >> 1,\r\n currentSize >> 1, BufferedImage.TYPE_INT_RGB);\r\n Graphics g = tmpImage.getGraphics();\r\n ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_INTERPOLATION, \r\n RenderingHints.VALUE_INTERPOLATION_BILINEAR);\r\n g.drawImage(currentImage, 0, 0, tmpImage.getWidth(), \r\n tmpImage.getHeight(), null);\r\n currentImage = tmpImage;\r\n currentSize = currentImage.getWidth();\r\n delta = currentSize - endSize;\r\n nextPow2 = currentSize >> 1;\r\n }\r\n }\r\n return currentImage;\r\n }",
"@Override\n\tpublic void run() {\n\t\tspacing = checkDimensions(spacingString, input.numDimensions(), \"Spacings\");\n\t\tscales = Arrays.stream(scaleString.split(regex)).mapToInt(Integer::parseInt)\n\t\t\t.toArray();\n\t\tDimensions resultDims = Views.addDimension(input, 0, scales.length - 1);\n\t\t// create output image, potentially-filtered input\n\t\tresult = opService.create().img(resultDims, new FloatType());\n\n\t\tfor (int s = 0; s < scales.length; s++) {\n\t\t\t// Determine whether or not the user would like to apply the gaussian\n\t\t\t// beforehand and do it.\n\t\t\tRandomAccessibleInterval<T> vesselnessInput = doGauss ? opService.filter()\n\t\t\t\t.gauss(input, scales[s]) : input;\n\t\t\tIntervalView<FloatType> scaleResult = Views.hyperSlice(result, result\n\t\t\t\t.numDimensions() - 1, s);\n\t\t\topService.filter().frangiVesselness(scaleResult, vesselnessInput, spacing,\n\t\t\t\tscales[s]);\n\t\t}\n\t}",
"public void scale(Point P, int scaleFactor) {\n\n\n }",
"public static BufferedImage resizeImage(BufferedImage original, int width, int height, Object hint){\n\t\tBufferedImage scaled = new BufferedImage(width, height, original.getType());\n\t\tGraphics2D g = scaled.createGraphics();\n\t\tg.setRenderingHint(RenderingHints.KEY_INTERPOLATION, hint); \n\t\tg.drawImage(original, 0, 0, width, height, null);\n\t\tg.dispose();\n\t\treturn scaled;\n\t}",
"private static Image resize(final Image image, final int width,\r\n final int height) {\r\n final Image scaled = new Image(Display.getDefault(), width, height);\r\n final GC gc = new GC(scaled);\r\n gc.setAntialias(SWT.ON);\r\n gc.setInterpolation(SWT.HIGH);\r\n gc.drawImage(image, 0, 0, image.getBounds().width,\r\n image.getBounds().height, 0, 0, width, height);\r\n gc.dispose();\r\n image.dispose();\r\n return scaled;\r\n }",
"public static Bitmap scaleBitmap(Bitmap bitmap, int newWidth, int newHeight) {\n\t\tBitmap scaledBitmap = Bitmap.createBitmap(newWidth, newHeight,\n\t\t\t\tConfig.ARGB_8888);\n\n\t\tfloat scaleX = newWidth / (float) bitmap.getWidth();\n\t\tfloat scaleY = newHeight / (float) bitmap.getHeight();\n\t\tfloat pivotX = 0;\n\t\tfloat pivotY = 0;\n\n\t\tMatrix scaleMatrix = new Matrix();\n\t\tscaleMatrix.setScale(scaleX, scaleY, pivotX, pivotY);\n\n\t\tCanvas canvas = new Canvas(scaledBitmap);\n\t\tcanvas.setMatrix(scaleMatrix);\n\t\tcanvas.drawBitmap(bitmap, 0, 0, new Paint(Paint.FILTER_BITMAP_FLAG));\n\n\t\treturn scaledBitmap;\n\t}",
"protected static BufferedImage getScaledInstance(BufferedImage img, int targetWidth,\n int targetHeight) {\n BufferedImage ret = (BufferedImage) img;\n\n // Use multi-step technique: start with original size, then\n // scale down in multiple passes with drawImage()\n // until the target size is reached\n int w = img.getWidth();\n int h = img.getHeight();\n\n while (w > targetWidth || h > targetHeight) {\n // Bit shifting by one is faster than dividing by 2.\n w >>= 1;\n if (w < targetWidth) {\n w = targetWidth;\n }\n\n // Bit shifting by one is faster than dividing by 2.\n h >>= 1;\n if (h < targetHeight) {\n h = targetHeight;\n }\n\n BufferedImage tmp = new BufferedImage(w, h, img.getType());\n Graphics2D g2 = tmp.createGraphics();\n g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,\n RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n g2.setRenderingHint(RenderingHints.KEY_RENDERING,\n RenderingHints.VALUE_RENDER_QUALITY);\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n g2.drawImage(ret, 0, 0, w, h, null);\n g2.dispose();\n\n ret = tmp;\n }\n\n return ret;\n }",
"public static Bitmap ScaleBitmap(Bitmap bm, float width, float height) {\n\t\tBitmap result = null;\n\t\tif (bm == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tMatrix matrix = new Matrix();\n\t\tint w = bm.getWidth();\n\t\tint h = bm.getHeight();\n\t\tfloat resizeScaleWidth = width / w;\n\t\tfloat resizeScaleHeight = height / h;\n\t\t\n\t\tif(resizeScaleWidth == 1 && resizeScaleHeight == 1)\n\t\t\treturn bm;\n\t\t\n\t\tmatrix.postScale(resizeScaleWidth, resizeScaleHeight);\n\n\t\tresult = Bitmap.createBitmap(bm, 0, 0, w, h, matrix, true);\n\t\treturn result;\n\t}",
"public CreateScaledImagesService() {\n super(\"CreateScaledImagesService\");\n }",
"private Image getScaledImage(Image srcImg, int w, int h){\n BufferedImage resizedImg = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);\n Graphics2D g2 = resizedImg.createGraphics();\n\n g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n g2.drawImage(srcImg, 0, 0, w, h, null);\n g2.dispose();\n\n return resizedImg;\n }",
"private float getNewScale() {\n int width = getWidth() - (padding[0] + padding[2]);\n float scaleWidth = (float) width / (cropRect.right - cropRect.left);\n\n int height = getHeight() - (padding[1] + padding[3]);\n float scaleHeight = (float) height / (cropRect.bottom - cropRect.top);\n if (getHeight() > getWidth()) {\n return scaleWidth < scaleHeight ? scaleWidth : scaleHeight;\n }\n return scaleWidth < scaleHeight ? scaleWidth : scaleHeight;\n }",
"public Vector scale(double scalar) {\n\t\treturn new Vector(x * scalar, y * scalar);\n\t}",
"public static BufferedImage scale(BufferedImage src, int width, int height) {\n width = width == 0 ? 1 : width;\n height = height == 0 ? 1 : height;\n BufferedImage result = Scalr.resize(src, Scalr.Method.ULTRA_QUALITY, \n width, height,\n Scalr.OP_ANTIALIAS);\n return result;\n }",
"public void scaleBitmap(int newWidth, int newHeight) {\n\t\t// Technically since we always keep aspect ratio intact\n\t\t// we should only need to check one dimension.\n\t\t// Need to investigate and fix\n\t\tif ((newWidth > mMaxWidth) || (newHeight > mMaxHeight)) {\n\t\t\tnewWidth = mMaxWidth;\n\t\t\tnewHeight = mMaxHeight;\n\t\t}\n\t\tif ((newWidth < mMinWidth) || (newHeight < mMinHeight)) {\n\t\t\tnewWidth = mMinWidth;\n\t\t\tnewHeight = mMinHeight;\t\t\t\n\t\t}\n\n\t\tif ((newWidth != mExpandWidth) || (newHeight!=mExpandHeight)) {\t\n\t\t\t// NOTE: depending on the image being used, it may be \n\t\t\t// better to keep the original image available and\n\t\t\t// use those bits for resize. Repeated grow/shrink\n\t\t\t// can render some images visually non-appealing\n\t\t\t// see comments at top of file for mScaleFromOriginal\n\t\t\t// try to create a new bitmap\n\t\t\t// If you get a recycled bitmap exception here, check to make sure\n\t\t\t// you are not setting the bitmap both from XML and in code\n\t\t\tBitmap newbits = Bitmap.createScaledBitmap(mScaleFromOriginal ? mOriginal:mImage, newWidth,\n\t\t\t\t\tnewHeight, true);\n\t\t\t// if successful, fix up all the tracking variables\n\t\t\tif (newbits != null) {\n\t\t\t\tif (mImage!=mOriginal) {\n\t\t\t\t\tmImage.recycle();\n\t\t\t\t}\n\t\t\t\tmImage = newbits;\n\t\t\t\tmExpandWidth=newWidth;\n\t\t\t\tmExpandHeight=newHeight;\n\t\t\t\tmResizeFactorX = ((float) newWidth / mImageWidth);\n\t\t\t\tmResizeFactorY = ((float) newHeight / mImageHeight);\n\t\t\t\t\n\t\t\t\tmRightBound = mExpandWidth>mViewWidth ? 0 - (mExpandWidth - mViewWidth) : 0;\n\t\t\t\tmBottomBound = mExpandHeight>mViewHeight ? 0 - (mExpandHeight - mViewHeight) : 0;\n\t\t\t}\t\t\t\t\t\t\t\n\t\t}\n\t}",
"void scaleArea(float scaleFactor) {\n\t\t// for more advanced (more than 4 points), use this algorithm:\n\t\t// http://stackoverflow.com/questions/1109536/an-algorithm-for-inflating-deflating-offsetting-buffering-polygons\n\t\tfor (int i = 0; i < amount; i++) {\n\t\t\tPVector tmp = PVector.sub(point[i].position, anchor);\n\t\t\ttmp.mult(scaleFactor);\n\t\t\tpoint[i].position.set(PVector.add(anchor, tmp));\n\t\t}\n\t}",
"private Image getScaledImage(Image image, float x, float y) {\n AffineTransform transform = new AffineTransform();\n transform.scale(x, y);\n transform.translate(\n (x-1) * image.getWidth(null) / 2,\n (y-1) * image.getHeight(null) / 2);\n\n // create a transparent (not translucent) image\n Image newImage = gc.createCompatibleImage(\n image.getWidth(null),\n image.getHeight(null),\n Transparency.BITMASK);\n\n // draw the transformed image\n Graphics2D g = (Graphics2D)newImage.getGraphics();\n g.drawImage(image, transform, null);\n g.dispose();\n\n return newImage;\n }",
"public void createScaledImage(String location, int type, int orientation, int session, int database_id) {\n\n // find portrait or landscape image\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(location, options);\n final int imageHeight = options.outHeight; //find the width and height of the original image.\n final int imageWidth = options.outWidth;\n\n int outputHeight = 0;\n int outputWidth = 0;\n\n\n //set the output size depending on type of image\n switch (type) {\n case EdittingGridFragment.SIZE4R :\n if (orientation == EdittingGridFragment.LANDSCAPE) {\n outputWidth = 1800;\n outputHeight = 1200;\n } else if (orientation == EdittingGridFragment.PORTRAIT) {\n outputWidth = 1200;\n outputHeight = 1800;\n }\n break;\n case EdittingGridFragment.SIZEWALLET:\n if (orientation == EdittingGridFragment.LANDSCAPE) {\n outputWidth = 953;\n outputHeight = 578;\n } else if (orientation ==EdittingGridFragment.PORTRAIT ) {\n outputWidth = 578;\n outputHeight = 953;\n }\n\n break;\n case EdittingGridFragment.SIZESQUARE:\n outputWidth = 840;\n outputHeight = 840;\n break;\n }\n\n assert outputHeight != 0 && outputWidth != 0;\n\n\n //fit images\n //FitRectangles rectangles = new FitRectangles((int) outputWidth, (int) outputHeight, imageWidth, imageHeight);\n\n //scaled images\n ScaledRectangles rectangles = new ScaledRectangles((int) outputWidth, (int) outputHeight, imageWidth, imageHeight);\n\n Rect canvasSize = rectangles.getCanvasSize();\n Rect canvasImageCoords = rectangles.getCanvasImageCoords();\n Rect imageCoords = rectangles.getImageCoords();\n\n\n\n /*\n //set the canvas size based on the type of image\n Rect canvasSize = new Rect(0, 0, (int) outputWidth, (int) outputHeight);\n Rect canvasImageCoords = new Rect();\n //Rect canvasImageCoords = new Rect (0, 0, outputWidth, outputHeight); //set to use the entire canvas\n Rect imageCoords = new Rect(0, 0, imageWidth, imageHeight);\n //Rect imageCoords = new Rect();\n\n\n // 3 cases, exactfit, canvas width larger, canvas height larger\n if ((float) outputHeight/outputWidth == (float) imageHeight/imageWidth) {\n canvasImageCoords.set(canvasSize);\n //imageCoords.set(0, 0, imageWidth, imageHeight); //map the entire image to the entire canvas\n Log.d(\"Async\", \"Proportionas Equal\");\n\n }\n\n\n\n else if ( (float) outputHeight/outputWidth > (float) imageHeight/imageWidth) {\n //blank space above and below image\n //find vdiff\n\n\n //code that fits the image without whitespace\n Log.d(\"Async\", \"blank space above and below\");\n\n float scaleFactor = (float)imageHeight / (float) outputHeight; //amount to scale the canvas by to match the height of the image.\n int scaledCanvasWidth = (int) (outputWidth * scaleFactor);\n int hDiff = (imageWidth - scaledCanvasWidth)/2;\n imageCoords.set (hDiff, 0 , imageWidth - hDiff, imageHeight);\n\n\n\n //code fits image with whitespace\n float scaleFactor = (float) outputWidth / (float) imageWidth;\n int scaledImageHeight = (int) (imageHeight * scaleFactor);\n assert scaledImageHeight < outputHeight;\n\n int vDiff = (outputHeight - scaledImageHeight)/2;\n canvasImageCoords.set(0, vDiff, outputWidth, outputHeight - vDiff);\n\n\n\n } else if ((float) outputHeight/outputWidth < (float) imageHeight/imageWidth) {\n //blank space to left and right of image\n\n\n //fits the image without whitespace\n float scaleFactor = (float) imageWidth / (float) outputWidth;\n int scaledCanvasHeight = (int) (outputHeight * scaleFactor);\n int vDiff = (imageHeight - scaledCanvasHeight)/2;\n imageCoords.set(0, vDiff, imageWidth, imageHeight - vDiff);\n\n //fits image with whitespace\n\n Log.d(\"Async\", \"blank space left and right\");\n float scaleFactor = (float) outputHeight / (float) imageHeight;\n int scaledImageWidth = (int) (imageWidth * scaleFactor);\n assert scaledImageWidth < outputWidth;\n\n int hDiff = (outputWidth - scaledImageWidth)/2;\n\n canvasImageCoords.set(hDiff, 0, outputWidth - hDiff, outputHeight);\n }\n\n */\n\n Log.d(\"Async\", \"Canvas Image Coords:\" + canvasImageCoords.toShortString());\n\n SaveImage imageSaver = new SaveImage(getApplicationContext(), database);\n ImageObject imageObject = new ImageObject(location);\n Bitmap imageBitmap = imageObject.getImageBitmap();\n int sampleSize = imageObject.getSampleSize();\n\n Rect sampledImageCoords = imageSaver.getSampledCoordinates(imageCoords, sampleSize);\n\n System.gc();\n BackgroundObject backgroundObject = new BackgroundObject(outputWidth, outputHeight);\n Bitmap background = backgroundObject.getBackground();\n\n\n background = imageSaver.drawOnBackground(background, imageBitmap,\n sampledImageCoords, canvasImageCoords);\n\n imageSaver.storeImage(background, database_id, session);\n background.recycle();\n\n }",
"private static AppImage scale(AppImage image) {\n\t\treturn scale(image, GraphicsConfig.getScaleWidth(), GraphicsConfig.getScaleHeight());\n\t}",
"@Test(expected = IllegalArgumentException.class)\n public void testRectangleScaleWidthToNegative() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), 1, 100, 50.0, 100.0));\n model1.addShape(Oval.createOval(\"C\", new Point.Double(500, 100),\n new Color(0, 0, 1), 6, 100, 60.0, 30.0));\n model1.addAction(ScaleRectangleAction.createScaleRectangleAction(\"R\", 10, 50,\n 50, 100, -51, 100));\n }",
"public ScaleAnimation(int startTime, int endTime, String shapeID, double fromSx, double fromSy,\n double toSx, double toSy)\n throws IllegalArgumentException {\n //throws exception if startTime >= endTime\n super(startTime, endTime, shapeID, AnimType.SCALE);\n if (fromSx < 0 || fromSy < 0 || toSx < 0 || toSy < 0) {\n throw new IllegalArgumentException(\"scale parameter cannot be negative!\");\n }\n\n this.fromSx = fromSx;\n this.fromSy = fromSy;\n this.toSx = toSx;\n this.toSy = toSy;\n }",
"public Image createScaledImage (double scale, int interpolType)\r\n {\r\n\tImageScaler scaler = new ImageScaler(scale, interpolType);\r\n\treturn (HSIImage)scaler.filter(this);\r\n }",
"public static Bitmap scale(final Bitmap src, final float scaleWidth, final float scaleHeight) {\n return scale(src, scaleWidth, scaleHeight, false);\n }",
"public static Transform newScale(float sx, float sy, float sz){\n return new Transform(new float[][]{\n {sx, 0.0f, 0.0f, 0.0f},\n {0.0f, sy, 0.0f, 0.0f},\n {0.0f, 0.0f, sz, 0.0f},\n {0.0f, 0.0f, 0.0f, 1.0f}\n\n });\n }",
"public void setBounds(Rectangle b);",
"public static BufferedImage scale(BufferedImage src, int w, int h)\n\t{\n\t BufferedImage img = \n\t new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);\n\t int x, y;\n\t int ww = src.getWidth();\n\t int hh = src.getHeight();\n\t int[] ys = new int[h];\n\t for (y = 0; y < h; y++)\n\t ys[y] = y * hh / h;\n\t for (x = 0; x < w; x++) {\n\t int newX = x * ww / w;\n\t for (y = 0; y < h; y++) {\n\t int col = src.getRGB(newX, ys[y]);\n\t img.setRGB(x, y, col);\n\t }\n\t }\n\t return img;\n\t}",
"@Test\n public void testScale() {\n System.out.println(\"scale\");\n Float s = null;\n ImageFilter instance = null;\n BufferedImage expResult = null;\n BufferedImage result = instance.scale(s);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"void scale(double factor);",
"@Test\n public void testScaling() {\n System.out.println(\"scaling\");\n double s = 0.0;\n ImageFilter instance = null;\n BufferedImage expResult = null;\n BufferedImage result = instance.scaling(s);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"public BufferedImage getScaledImage ( float scale ) {\n\n int oldW = param.Parameters.IMAGEW;\n int oldH = param.Parameters.IMAGEH;\n\n param.Parameters.SCALE = scale;\n param.Parameters.IMAGEW = (int)((float)param.Parameters.IMAGEW * param.Parameters.SCALE);\n param.Parameters.IMAGEH = (int)((float)param.Parameters.IMAGEH * param.Parameters.SCALE);\n\n BufferedImage img =\n param.Parameters.PROBLEM.getData(param.Parameters.STATE, program, 0, 0);\n\n param.Parameters.SCALE = 1.0f;\n param.Parameters.IMAGEW = oldW;\n param.Parameters.IMAGEH = oldH;\n\n System.gc();\n\n return img;\n\n }",
"public native MagickImage scaleImage(int cols, int rows)\n\t\t\tthrows MagickException;",
"@Test\n public void scale() {\n assertEquals(\"Wrong vector scale\", new Vector(1,1,1).scale(2), new Vector(2,2,2));\n }",
"private Image getScaledImage(BufferedImage srcImg, int w, int h) {\n\t\tint srcWidth = srcImg.getWidth();\n\t\tint srcHeight = srcImg.getHeight();\n\t\tint diffWidth = w - srcWidth;\n\t\tint diffHeight = h - srcHeight;\n\t\tif (diffWidth < diffHeight) {\n\t\t\tdouble ratio = (double) w / (double) srcWidth;\n\t\t\th = (int) Math.round(srcHeight * ratio);\n\t\t} else {\n\t\t\tdouble ratio = (double) h / (double) srcHeight;\n\t\t\tw = (int) Math.round(srcWidth * ratio);\n\t\t}\n\t\tBufferedImage resizedImg = new BufferedImage(w, h,\n\t\t\t\tBufferedImage.TYPE_INT_RGB);\n\t\tGraphics2D g2 = resizedImg.createGraphics();\n\t\tg2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,\n\t\t\t\tRenderingHints.VALUE_INTERPOLATION_BILINEAR);\n\t\tg2.drawImage(srcImg, 0, 0, w, h, null);\n\t\tg2.dispose();\n\t\treturn resizedImg;\n\t}",
"public void scale(float scalarX, float scalarY) {\n\t\ttile.scale(scalarX, scalarY);\n\t\tarrow.scale(scalarX, scalarY);\n\t}",
"public void Scale(SurfaceData param1SurfaceData1, SurfaceData param1SurfaceData2, Composite param1Composite, Region param1Region, int param1Int1, int param1Int2, int param1Int3, int param1Int4, double param1Double1, double param1Double2, double param1Double3, double param1Double4) {\n/* 150 */ tracePrimitive(this.target);\n/* 151 */ this.target.Scale(param1SurfaceData1, param1SurfaceData2, param1Composite, param1Region, param1Int1, param1Int2, param1Int3, param1Int4, param1Double1, param1Double2, param1Double3, param1Double4);\n/* */ }",
"private Bitmap scaleBitmap(PageViewHolder holder, Bitmap bitmap) {\n if (bitmap == null) {\n return null;\n }\n\n // Get bitmap dimensions\n int bitmapWidth = bitmap.getWidth();\n int bitmapHeight = bitmap.getHeight();\n\n ViewGroup.LayoutParams parentParams = holder.imageLayout.getLayoutParams();\n // Determine how much to scale: the dimension requiring less scaling is\n // closer to the its side. This way the image always stays inside the\n // bounding box AND either x/y axis touches it.\n float xScale = ((float) parentParams.width) / bitmapWidth;\n float yScale = ((float) parentParams.height) / bitmapHeight;\n float scale = (xScale <= yScale) ? xScale : yScale;\n\n // Create a matrix for the scaling (same scale amount in both directions)\n Matrix matrix = new Matrix();\n matrix.postScale(scale, scale);\n\n // Create a new bitmap that is scaled to the bounding box\n Bitmap scaledBitmap = null;\n try {\n scaledBitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmapWidth, bitmapHeight, matrix, true);\n } catch (OutOfMemoryError oom) {\n Utils.manageOOM(mPdfViewCtrl);\n }\n\n if (sDebug) Log.d(TAG, \"scaleBitmap recycle\");\n ImageMemoryCache.getInstance().addBitmapToReusableSet(bitmap);\n return scaledBitmap;\n }",
"public Coordinates scaleVector(Coordinates vector, double factor);",
"public int scale(int original);",
"@Test(expected = IllegalArgumentException.class)\n public void testRectangleScaleHeightToNegative() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), 1, 100, 50.0, 100.0));\n model1.addShape(Oval.createOval(\"C\", new Point.Double(500, 100),\n new Color(0, 0, 1), 6, 100, 60.0, 30.0));\n model1.addAction(ScaleRectangleAction.createScaleRectangleAction(\"R\", 10, 50,\n 50, 100, 0, -101));\n }",
"private javaxt.io.Image _transform(javaxt.io.Image src_img, double[] src_bbox, int[] dst_size, double[] dst_bbox){\n\n //Use GeoTools to reproject src_img to the output projection.\n try{\n\n //Compute geodetic w/h in degrees (used to specify the Envelope2D)\n double x1 = x(src_bbox[0]);\n double x2 = x(src_bbox[2]);\n double w = 0;\n if (x1>x2) w = x1-x2;\n else w = x2-x1;\n //System.out.println(x1 + \" to \" + x2 + \" = \" + (w));\n\n double y1 = y(src_bbox[1]);\n double y2 = y(src_bbox[3]);\n double h = 0;\n if (y1>y2) h = y1-y2;\n else h = y2-y1;\n //System.out.println(y1 + \" to \" + y2 + \" = \" + (h));\n\n\n System.out.println(src_bbox[0] + \", \" + src_bbox[1] + \", \" + src_bbox[2] + \", \" + src_bbox[3]);\n System.out.println(dst_bbox[0] + \", \" + dst_bbox[1] + \", \" + dst_bbox[2] + \", \" + dst_bbox[3]);\n \n Envelope2D envelope =\n new Envelope2D(this.src_srs.crs, src_bbox[0], src_bbox[1], w, h);\n\n GridCoverage2D gc2d =\n new GridCoverageFactory().create(\"BMImage\", src_img.getBufferedImage(), envelope);\n\n GridCoverage2D gc2dProj =\n (GridCoverage2D)Operations.DEFAULT.resample(gc2d, this.dst_srs.crs);\n\n //TODO: Crop Output?\n /* \n final AbstractProcessor processor = new DefaultProcessor(null);\n final ParameterValueGroup param = processor.getOperation(\"CoverageCrop\").getParameters();\n \n final GeneralEnvelope crop = new GeneralEnvelope( ... ); //<--Define new extents\n param.parameter(\"Source\").setValue( gc2dProj );\n param.parameter(\"Envelope\").setValue( crop );\n\n gc2dProj = (GridCoverage2D) processor.doOperation(param); \n */\n\n src_img = new javaxt.io.Image(gc2dProj.getRenderedImage());\n src_img.resize(dst_size[0], dst_size[1], false);\n\n }\n catch (Exception e){\n e.printStackTrace();\n }\n\n\n /*\n //Start port of original python code...\n src_bbox = this.src_srs.align_bbox(src_bbox);\n dst_bbox = this.dst_srs.align_bbox(dst_bbox);\n int[] src_size = new int[]{src_img.getWidth(), src_img.getHeight()}; //src_img.size\n double[] src_quad = new double[]{0, 0, src_size[0], src_size[1]};\n double[] dst_quad = new double[]{0, 0, dst_size[0], dst_size[1]};\n \n SRS.transf to_src_px = SRS.make_lin_transf(src_bbox, src_quad);\n SRS.transf to_dst_w = SRS.make_lin_transf(dst_quad, dst_bbox);\n\n //This segment still needs to be ported to java\n meshes = []; \n def dst_quad_to_src(quad):\n src_quad = []\n for dst_px in [(quad[0], quad[1]), (quad[0], quad[3]),\n (quad[2], quad[3]), (quad[2], quad[1])]:\n dst_w = to_dst_w(dst_px)\n src_w = self.dst_srs.transform_to(self.src_srs, dst_w)\n src_px = to_src_px(src_w)\n src_quad.extend(src_px)\n return quad, src_quad\n */\n\n /*\n int mesh_div = this.mesh_div;\n while (mesh_div > 1 && ((dst_size[0] / mesh_div) < 10 || (dst_size[1] / mesh_div) < 10))\n mesh_div -= 1;\n for (int[] quad : griddify(dst_quad, mesh_div))\n meshes.append(dst_quad_to_src(quad));\n result = src_img.as_image().transform(dst_size, Image.MESH, meshes,\n image_filter[self.resampling])\n */\n return src_img;\n }",
"public Image getScaledCopy(float w, float h) {\r\n\t\treturn new Image(renderer, texture, textureX, textureY, textureWidth, textureHeight, w, h);\r\n\t}",
"private Bitmap scaleBitmapToHeightWithMinWidth(Bitmap bitmap, int newHeight, int minWidth) {\n bitmap = cropBitmapToSquare(bitmap);\n int imgHeight = bitmap.getHeight();\n int imgWidth = bitmap.getWidth();\n float scaleFactor = ((float) newHeight) / imgHeight;\n int newWidth = (int) (imgWidth * scaleFactor);\n bitmap = Bitmap.createScaledBitmap(bitmap, newWidth, newHeight, true);\n bitmap = scaleBitmapToMinWidth(bitmap, minWidth);\n return bitmap;\n }",
"Rectangle(int width, int height){\n area = width * height;\n }",
"private Command createScaleCommand(String command) {\n\t\tString[] tokens = command.split(\" \");\n\t\treturn new ScaleCommand(Double.parseDouble(tokens[1]));\n\t}",
"public void scaleImage(int newWidth, int newHeight) {\n\t\t// create a new empty buffered image with the newW and H\n\t\tBufferedImage newIm = new BufferedImage(newWidth, newHeight,\n\t\t\t\tBufferedImage.TYPE_INT_RGB);\n\n\t\t// scale factor between the old and new image sizes\n\t\tdouble scaleX = im.getWidth() / newIm.getWidth();\n\t\tdouble scaleY = im.getHeight() / newIm.getHeight();\n\t\tint rgb = 0;\n\n\t\t// double loop to run through the new image to move pixel colours\n\t\tfor (int i = 0; i < newIm.getWidth(); i++) {\n\t\t\tfor (int j = 0; j < newIm.getHeight(); j++) {\n\t\t\t\t// sets rgb to the colour at the scaled location on the original\n\t\t\t\t// picture\n\t\t\t\trgb = im.getRGB((int) (i * scaleX), (int) (j * scaleY));\n\t\t\t\t// puts the colour into the new image\n\t\t\t\tnewIm.setRGB(i, j, rgb);\n\t\t\t}\n\t\t}\n\t\tim = newIm;\n\t}",
"public Coordinates scaleVector(Coordinates vector, double factor, Coordinates origin);",
"public void scale( float x, float y )\n\t{\n\t\tMatrix4f opMat = new Matrix4f();\n\t\topMat.setScale( x );\n\t\tmat.mul( opMat );\n\t}",
"public void scale(Vector center, float degree);",
"private Drawable resize(Drawable image, int width, int height) {\n Bitmap b = ((BitmapDrawable)image).getBitmap();\n Bitmap bitmapResized = Bitmap.createScaledBitmap(b, width, height, false);\n return new BitmapDrawable(getResources(), bitmapResized);\n }",
"private Bitmap scaleDownBitmapImage(Bitmap bitmap, int newWidth, int newHeight){\n Bitmap resizedBitmap = Bitmap.createScaledBitmap(bitmap, newWidth, newHeight, true);\n return resizedBitmap;\n }",
"public BoundingBox()\n\t{\n\t\tcenter = new Vector2(0.0, 0.0);\n\t\twidth = 1.0;\n\t\theight = 1.0;\n\t}",
"@Override\n\tpublic Object visitImageOpChain(ImageOpChain imageOpChain, Object arg) throws Exception {\n\t\timageOpChain.getArg().visit(this, arg);\n\t\tswitch (imageOpChain.getFirstToken().kind) {\n\t\t\tcase KW_SCALE:\n\t\t\t\tmv.visitMethodInsn(INVOKESTATIC, PLPRuntimeImageOps.JVMName, \"scale\", PLPRuntimeImageOps.scaleSig, false);\n\t\t\t\tbreak;\n\t\t\tcase OP_WIDTH:\n\t\t\t\tmv.visitMethodInsn(INVOKEVIRTUAL, \"java/awt/image/BufferedImage\", \"getWidth\", \"()I\", false);\n\t\t\t\tbreak;\n\t\t\tcase OP_HEIGHT:\n\t\t\t\tmv.visitMethodInsn(INVOKEVIRTUAL, \"java/awt/image/BufferedImage\", \"getHeight\", \"()I\", false);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\treturn null;\n\t}",
"Rectangle(double newWidth, double newHeight){\n height = newHeight;\n width = newWidth;\n }",
"void setBounds(Rectangle rectangle);",
"public BufferedImage modifyDimensions(int width, int height){\n\t\t return new BufferedImage((2* width)-1 , (2*height)-1, BufferedImage.TYPE_INT_RGB); \n\t }",
"public static BufferedImage imageScale(ImageIcon src, int w, int h) {\r\n int type = BufferedImage.TYPE_INT_RGB;\r\n BufferedImage dst = new BufferedImage(w, h, type);\r\n Graphics2D g2 = dst.createGraphics();\r\n // Fill background for scale to fit.\r\n g2.setBackground(UIManager.getColor(\"Panel.background\"));\r\n g2.clearRect(0, 0, w, h);\r\n double xScale = (double) w / src.getIconWidth();\r\n double yScale = (double) h / src.getIconHeight();\r\n // Scaling options:\r\n // Scale to fit - image just fits in label.\r\n double scale = Math.max(xScale, yScale);\r\n // Scale to fill - image just fills label.\r\n //double scale = Math.max(xScale, yScale);\r\n int width = (int) (scale * src.getIconWidth());\r\n int height = (int) (scale * src.getIconHeight());\r\n int x = (w - width) / 2;\r\n int y = (h - height) / 2;\r\n g2.drawImage(src.getImage(), x, y, width, height, null);\r\n g2.dispose();\r\n return dst;\r\n }",
"public void scaleAnimetion(SpriteBatch batch){\n }",
"public abstract Transformation updateTransform(Rectangle selectionBox);",
"@Test(expected = IllegalArgumentException.class)\n public void testScaleRectangleDuringSamePeriod() {\n model1.addShape(Rectangle.createRectangle(\"C\", new Point.Double(500, 100),\n new Color(0, 0, 1), 6, 100, 60.0, 30.0));\n model1.addAction(ScaleRectangleAction.createScaleRectangleAction(\"R\", 10, 50,\n 100, 100, 100, 100));\n model1.addAction(ScaleRectangleAction.createScaleRectangleAction(\"R\", 40, 60,\n 100, 100, 10, 10));\n }",
"public void beginScaling() {\n xScale = 1.0f;\n yScale = 1.0f;\n }",
"public BufferedImage getFasterScaledInstance(BufferedImage img,\r\n int targetWidth, int targetHeight, Object hint,\r\n boolean progressiveBilinear)\r\n {\r\n int type = (img.getTransparency() == Transparency.OPAQUE) ?\r\n BufferedImage.TYPE_INT_RGB : BufferedImage.TYPE_INT_ARGB;\r\n BufferedImage ret = img;\r\n BufferedImage scratchImage = null;\r\n Graphics2D g2 = null;\r\n int w, h;\r\n int prevW = ret.getWidth();\r\n int prevH = ret.getHeight();\r\n boolean isTranslucent = img.getTransparency() != Transparency.OPAQUE; \r\n\r\n if (progressiveBilinear) {\r\n // Use multi-step technique: start with original size, then\r\n // scale down in multiple passes with drawImage()\r\n // until the target size is reached\r\n w = img.getWidth();\r\n h = img.getHeight();\r\n } else {\r\n // Use one-step technique: scale directly from original\r\n // size to target size with a single drawImage() call\r\n w = targetWidth;\r\n h = targetHeight;\r\n }\r\n \r\n do {\r\n if (progressiveBilinear && w > targetWidth) {\r\n w /= 2;\r\n if (w < targetWidth) {\r\n w = targetWidth;\r\n }\r\n }\r\n\r\n if (progressiveBilinear && h > targetHeight) {\r\n h /= 2;\r\n if (h < targetHeight) {\r\n h = targetHeight;\r\n }\r\n }\r\n\r\n if (scratchImage == null || isTranslucent) {\r\n // Use a single scratch buffer for all iterations\r\n // and then copy to the final, correctly-sized image\r\n // before returning\r\n scratchImage = new BufferedImage(w, h, type);\r\n g2 = scratchImage.createGraphics();\r\n }\r\n g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, hint);\r\n g2.drawImage(ret, 0, 0, w, h, 0, 0, prevW, prevH, null);\r\n prevW = w;\r\n prevH = h;\r\n\r\n ret = scratchImage;\r\n } while (w != targetWidth || h != targetHeight);\r\n \r\n if (g2 != null) {\r\n g2.dispose();\r\n }\r\n\r\n // If we used a scratch buffer that is larger than our target size,\r\n // create an image of the right size and copy the results into it\r\n if (targetWidth != ret.getWidth() || targetHeight != ret.getHeight()) {\r\n scratchImage = new BufferedImage(targetWidth, targetHeight, type);\r\n g2 = scratchImage.createGraphics();\r\n g2.drawImage(ret, 0, 0, null);\r\n g2.dispose();\r\n ret = scratchImage;\r\n }\r\n \r\n return ret;\r\n }",
"public Image getScaledCopy(float scale) {\r\n\t\treturn getScaledCopy(width * scale, height * scale);\r\n\t}",
"@Override\n public Sprite createScaledSprite(Texture texture)\n {\n Sprite sprite = new Sprite(texture);\n sprite.getTexture().setFilter(TextureFilter.Linear, TextureFilter.Linear);\n sprite.setSize(sprite.getWidth() / PlayScreen.PPM/SCALE,\n sprite.getHeight() / PlayScreen.PPM/SCALE);\n return sprite;\n }",
"public Shape getBgetBoundingBox() {\r\n\t\t\r\n\t\tEllipse2D elilipse = new Ellipse2D.Double(0, 0, imageWidth, imageHeight);\r\n\t\tAffineTransform at = new AffineTransform(); \r\n\t\tat.translate(locationX, locationY);\r\n\t\tat.rotate(Math.toRadians(angle*sizeAngles));\r\n\t\t at.scale(0.5, 0.5);\r\n\t\tat.translate(-imageWidth/2, -imageHeight/2);\r\n\t\t\r\n\t\tShape rotatedRect = at.createTransformedShape(elilipse);\r\n\t\treturn rotatedRect;\r\n\t}",
"public static BufferedImage scaleImage(BufferedImage image, double scale){\n\t\tWritableRaster inRaster = image.getRaster();\n\t\t\n\t\tint w = (int)Math.round(image.getWidth() * scale);\n\t\tint h = (int)Math.round(image.getHeight() * scale);\n\t\tWritableRaster outRaster = inRaster.createCompatibleWritableRaster(w, h);\n\t\t\n\t\tObject outData = null;\n\t\tfor(int j=0; j<h; j++){\n\t\t\tfor(int i=0; i<w; i++){\n\t\t\t\toutData = inRaster.getDataElements((int)(i/scale), (int)(j/scale), outData);\n\t\t\t\toutRaster.setDataElements(i, j, outData);\n\t\t\t}\n\t\t}\n\t\t\n\t\tBufferedImage outImage = new BufferedImage(image.getColorModel(), outRaster, image.isAlphaPremultiplied(), null);\n\t\treturn outImage;\n\t}",
"void createRectangles();",
"private static <T extends Shape> void scaleShape(T shape, double scale){\r\n\t\tshapeContainer = new ShapeContainer<Shape>(shape);\r\n\t\ttry {\r\n\t\t\tshapeContainer.changeShapeScale(scale);\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t}",
"public void setBounds(Rectangle2D aRect)\n{\n setBounds(aRect.getX(), aRect.getY(), aRect.getWidth(), aRect.getHeight());\n}",
"public interface Scalable {\n public void scale(TimeTick base, double ratio);\n}",
"void setBounds(double x, double y, double scale) {\n double drawAspect = (double)width / (double)height;\n\n double halfPlotWidth = scale / 2.0;\n double halfPlotHeight = scale / 2.0;\n if (drawAspect > 1.0) {\n halfPlotWidth *= drawAspect;\n } else {\n halfPlotHeight /= drawAspect;\n }\n\n setBounds(x - halfPlotWidth, y - halfPlotHeight, x + halfPlotWidth, y + halfPlotHeight);\n }",
"interface WithCreate extends\n SqlElasticPoolOperations.DefinitionStages.WithDatabaseDtuMin,\n SqlElasticPoolOperations.DefinitionStages.WithDatabaseDtuMax,\n SqlElasticPoolOperations.DefinitionStages.WithDtu,\n SqlElasticPoolOperations.DefinitionStages.WithStorageCapacity,\n SqlElasticPoolOperations.DefinitionStages.WithDatabase,\n Resource.DefinitionWithTags<SqlElasticPoolOperations.DefinitionStages.WithCreate>,\n Creatable<SqlElasticPool> {\n }",
"public void setRectangleClip(int x, int y, float width, float height);",
"public double getScale(int target_w, int target_h){\n\t\tint w = this.w + this.padding_left + this.padding_right;\n\t\tint h = this.h + this.padding_top + this.padding_bottom;\n\t\treturn Math.min((double)target_w/w, (double)target_h/h);\n\t}",
"@Test(expected = IllegalArgumentException.class)\n public void testRectangleScaleWidthToZero() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(200, 200),\n new Color(1, 0, 0), 1, 100, 50.0, 100.0));\n model1.addShape(Oval.createOval(\"C\", new Point.Double(500, 100),\n new Color(0, 0, 1), 6, 100, 60.0, 30.0));\n model1.addAction(ScaleRectangleAction.createScaleRectangleAction(\"R\", 10, 50,\n 50, 100, 0, 100));\n model1.addAction(new MoveAction(\"C\", 20, 70, new Point.Double(500, 100),\n new Point.Double(0, 300)));\n }",
"public void scale(float x, float y) {\n multiply(\n x, 0F, 0F, 0F,\n 0F, y, 0F, 0F,\n 0F, 0F, 1F, 0F,\n 0F, 0F, 0F, 1F\n );\n }",
"public static BufferedImage resize(BufferedImage img, Rectangle bounds)\n\t{\n\t\tBufferedImage resize = Scalr.resize(img, bounds.width, bounds.height, Scalr.OP_ANTIALIAS);\n\t\tBufferedImage dimg = new BufferedImage(bounds.width + bounds.x * 2, bounds.height + bounds.y * 2, img.getType());\n\t\tGraphics2D g = dimg.createGraphics();\n\t\tg.setComposite(AlphaComposite.Src);\n\t\tg.setRenderingHint(RenderingHints.KEY_INTERPOLATION,\n\t\t\t\tRenderingHints.VALUE_INTERPOLATION_BICUBIC);\n\t\tg.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION,\n\t\t\t\tRenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);\n\t\tg.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n\t\t\t\tRenderingHints.VALUE_ANTIALIAS_ON);\n\t\tg.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING,\n\t\t\t\tRenderingHints.VALUE_COLOR_RENDER_QUALITY);\n\t\tg.setRenderingHint(RenderingHints.KEY_RENDERING,\n\t\t\t\tRenderingHints.VALUE_RENDER_QUALITY);\n\t\tg.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL,\n\t\t\t\tRenderingHints.VALUE_STROKE_PURE);\n\t\tg.drawImage(resize, bounds.x, bounds.y, bounds.width + bounds.x, bounds.height + bounds.y, 0, 0, resize.getWidth(), resize.getHeight(), null);\n\t\tg.setComposite(AlphaComposite.SrcAtop);\n\t\tg.dispose();\n\t\treturn dimg; \n\t}",
"public Point2F scale(float s)\r\n {return new Point2F(x*s, y*s);}",
"int getScale();"
]
| [
"0.61864007",
"0.6116039",
"0.60320705",
"0.58751917",
"0.58340466",
"0.5747162",
"0.56564486",
"0.55732375",
"0.54954743",
"0.54947925",
"0.5489027",
"0.546816",
"0.5418372",
"0.5366685",
"0.53464353",
"0.5328153",
"0.5326304",
"0.5322206",
"0.5313385",
"0.5311945",
"0.53035766",
"0.5298337",
"0.52793497",
"0.52536076",
"0.52517134",
"0.52331215",
"0.52324903",
"0.5222613",
"0.51995695",
"0.5189024",
"0.51763886",
"0.5142078",
"0.5131473",
"0.5128415",
"0.510877",
"0.509739",
"0.5084098",
"0.5071837",
"0.50632006",
"0.5053558",
"0.50216496",
"0.5020735",
"0.49912143",
"0.4991139",
"0.49889642",
"0.49844915",
"0.49818268",
"0.49800047",
"0.49791256",
"0.49750134",
"0.49500564",
"0.49476758",
"0.49452007",
"0.49359667",
"0.49287698",
"0.49089622",
"0.48963946",
"0.48951304",
"0.48916128",
"0.48834738",
"0.48432818",
"0.48425147",
"0.48407933",
"0.48374012",
"0.4833546",
"0.4830567",
"0.48290595",
"0.48228556",
"0.4822096",
"0.48153722",
"0.480946",
"0.47985587",
"0.47936514",
"0.47902817",
"0.47863063",
"0.47839457",
"0.47807315",
"0.47716045",
"0.47663474",
"0.47479776",
"0.47420964",
"0.47371662",
"0.47370222",
"0.47269812",
"0.4722684",
"0.4719116",
"0.47164154",
"0.47121546",
"0.47097743",
"0.4703883",
"0.47023922",
"0.47002304",
"0.47001165",
"0.4674452",
"0.46741357",
"0.467395",
"0.46727383",
"0.46602544",
"0.4651497",
"0.465139"
]
| 0.59429675 | 3 |
Save the image data in a temporary file so we can reuse the original data asis without putting it all into memory | private void processSvg(final InputStream data) throws IOException {
final File tmpFile = writeToTmpFile(data);
log.debug("Stored uploaded image in temporary file {}", tmpFile);
// by default, store SVG data as-is for all variants: the browser will do the real scaling
scaledData = new AutoDeletingTmpFileInputStream(tmpFile);
// by default, use the bounding box as scaled width and height
scaledWidth = width;
scaledHeight = height;
if (!isOriginalVariant()) {
try {
scaleSvg(tmpFile);
} catch (ParserConfigurationException | SAXException e) {
log.info("Could not read dimensions of SVG image, using the bounding box dimensions instead", e);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void saveTempFile(DigitalObject object) {\n String tempFileName = tempDir.getAbsolutePath() + \"/\" + System.nanoTime();\n OutputStream fileStream;\n try {\n fileStream = new BufferedOutputStream(new FileOutputStream(tempFileName));\n if (object != null) {\n byte[] data = object.getData().getData();\n if (data != null) {\n\n fileStream.write(data);\n }\n }\n fileStream.close();\n tempFiles.put(object, tempFileName);\n } catch (FileNotFoundException e) {\n log.error(\"Failed to store tempfile\", e);\n } catch (IOException e) {\n log.error(\"Failed to store tempfile\", e);\n }\n }",
"private File createImageFile() throws IOException\r\n {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\r\n String imageFileName = \"MYAPPTEMP_\" + timeStamp + \"_\";\r\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\r\n File image = File.createTempFile(imageFileName, /* prefix */\r\n \".jpg\", /* suffix */\r\n storageDir /* directory */\r\n );\r\n\r\n return image;\r\n }",
"private File createImageFile() throws IOException{\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\"+timeStamp;\n File image = File.createTempFile(imageFileName, \".jpg\", this.savePath);\n \n return image;\n }",
"public void tempSaveToFile() {\n try {\n ObjectOutputStream outputStream = new ObjectOutputStream(\n this.openFileOutput(MenuActivity2048.TEMP_SAVE_FILENAME, MODE_PRIVATE));\n outputStream.writeObject(boardManager);\n outputStream.close();\n } catch (IOException e) {\n Log.e(\"Exception\", \"File write failed: \" + e.toString());\n }\n }",
"private File getImageFile() throws IOException {\n\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n\n String imageName = \".jpg_\" + timeStamp + \"_\";\n\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n\n\n File imageFile = File.createTempFile(imageName, \".jpg\", storageDir);\n\n\n return imageFile;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n savePhotoPathToSharedPrefs();\n return image;\n }",
"static File createTempImageFile(Context context)\n throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\",\n Locale.getDefault()).format(new Date());\n String imageFileName = \"AZTEK\" + timeStamp + \"_\";\n\n globalImageFileName = imageFileName;\n\n File storageDir = context.getExternalCacheDir();\n\n return File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n }",
"protected File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n strAbsolutePath = image.getAbsolutePath();\n Log.e(\"XpathX\", image.getAbsolutePath());\n return image;\n }",
"private File getCameraTempFile() {\n\t\tFile dir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM);\n\t\tFile output = new File(dir, SmartConstants.CAMERA_CAPTURED_TEMP_FILE);\n\n\t\treturn output;\n\t}",
"private static File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = JPEG_FILE_PREFIX + timeStamp + \"_\";\n File albumF = getAlbumDir();\n File imageF = File.createTempFile(imageFileName, JPEG_FILE_SUFFIX, albumF);\n return imageF;\n }",
"private static File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = JPEG_FILE_PREFIX + timeStamp + \"_\";\n File albumF = getAlbumDir();\n File imageF = File.createTempFile(imageFileName, JPEG_FILE_SUFFIX, albumF);\n return imageF;\n }",
"private File createImageFile() throws IOException{\n @SuppressLint(\"SimpleDateFormat\")\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"img_\"+timeStamp+\"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n return File.createTempFile(imageFileName,\".jpg\",storageDir);\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = JPEG_FILE_PREFIX + timeStamp + \"_\";\n File albumF = getAlbumDir();\n File imageF = File.createTempFile(imageFileName, JPEG_FILE_SUFFIX, albumF);\n return imageF;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n Log.d(\"mCurrentPhotoPath\", mCurrentPhotoPath);\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getActivity().getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".png\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\")\n .format(new Date());\n String imageFileName = JPEG_FILE_PREFIX + timeStamp + \"_\";\n File albumF = getAlbumDir();\n File imageF = File.createTempFile(imageFileName, JPEG_FILE_SUFFIX,\n albumF);\n return imageF;\n }",
"private File createImageFile() throws IOException {\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n currentUser.username, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n String z = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n File imageFile = File.createTempFile(imageFileName, \".jpg\", storageDir);\n return imageFile;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\n String mFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File mFile = File.createTempFile(mFileName, \".jpg\", storageDir);\n pictureFilePath = mFile.getAbsolutePath();\n return mFile;\n }",
"private File createImageFile() throws IOException {\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(imageFileName, \".jpg\", storageDir);\n\n // Save a file: path for use with ACTION_VIEW intents\n this.currentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException\n {\n String timeStamp = new SimpleDateFormat(\"yyyymmddHHmmss\").format(new Date());\n String imageFileName = timeStamp;\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n userCacheDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\r\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\r\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\r\n File image = File.createTempFile(\r\n imageFileName, // prefix //\r\n \".jpg\", // suffix //\r\n storageDir // directory //\r\n );\r\n\r\n // Save a file: path for use with ACTION_VIEW intents\r\n mPath = image.getAbsolutePath();\r\n return image;\r\n }",
"private File createImageFile() throws IOException {\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\n String mFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File mFile = File.createTempFile(mFileName, \".jpg\", storageDir);\n return mFile;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp;\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, // prefix\n \".jpg\", // suffix\n storageDir // directory\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = \"file:\" + image.getAbsolutePath();\n return image;\n }",
"public static File writeObjectToTempFile(Serializable o, String filename)\n/* */ throws IOException\n/* */ {\n/* 76 */ File file = File.createTempFile(filename, \".tmp\");\n/* 77 */ file.deleteOnExit();\n/* 78 */ ObjectOutputStream oos = new ObjectOutputStream(new BufferedOutputStream(new GZIPOutputStream(new FileOutputStream(file))));\n/* 79 */ oos.writeObject(o);\n/* 80 */ oos.close();\n/* 81 */ return file;\n/* */ }",
"public File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\", Locale.US).format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = new File(getPhotoLocation());\n File image = File.createTempFile(\n imageFileName,\n \".jpg\",\n storageDir\n );\n\n setCurrentPhotoFile(image.getAbsolutePath());\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n// File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n// File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\", Locale.US).format(new Date());\n String imageFileName = \"perfil_\" + timeStamp + \"_\";\n String outputPath = PATH;\n File storageDir = new File(outputPath);\n if(!storageDir.exists())storageDir.mkdirs();\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = \"file:\" + image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n @SuppressLint({\"NewApi\", \"LocalSuppress\"}) String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\", Locale.getDefault()).format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES);\n return File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n return image;\n }",
"private File createImageFile() throws IOException\n {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n return image;\n }",
"private static File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = MyApplication.getContext().getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DCIM), \"Camera\");\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = \"file:\" + image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\r\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\r\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\r\n File image = File.createTempFile(\r\n imageFileName, /* prefix */\r\n \".jpg\", /* suffix */\r\n storageDir /* directory */\r\n );\r\n\r\n // Save a file: path for use with ACTION_VIEW intents\r\n mCurrentPhotoPath = image.getAbsolutePath();\r\n return image;\r\n\r\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = \"file:\" + image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n Uri.fromFile(image);\n mCurrentPhotoPath = Uri.fromFile(image).getPath();\n\n // Save a file: path for use with ACTION_VIEW intents\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = activity.getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES);\n File imageFile = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n return imageFile;\n }",
"private File createImageFile() throws IOException {\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new java.util.Date());\n String imageFileName = \"WILDLIFE_JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n return File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName,\n \".jpg\",\n storageDir\n );\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"public File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getActivity().getFilesDir();\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\", Locale.ENGLISH).format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DCIM), \"Camera\");\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = \"file:\" + image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n //File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File storageDir = new File(utils.getSentImagesDirectory());\n\n File image = null;\n try {\n image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n // Save a file: path for use with ACTION_VIEW intents\n //LOG.info(\"test place3\");\n try {\n imageFilePath = image.getAbsolutePath();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n //LOG.info(\"test place4\");\n if (image == null) {\n LOG.info(\"image file is null\");\n } else {\n LOG.info(\"image file is not null path is:\" + imageFilePath);\n }\n return image;\n }",
"private String tempFileImage(Context context, Bitmap bitmap, String name)\n {\n File outputDir = context.getCacheDir();\n File imageFile = new File(outputDir, name + \".jpg\");\n\n OutputStream os;\n try {\n os = new FileOutputStream(imageFile);\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, os);\n os.flush();\n os.close();\n } catch (Exception e) {\n Log.e(context.getClass().getSimpleName(), \"Error writing file\", e);\n }\n return imageFile.toURI().toString()+\",\"+imageFile.getAbsolutePath();\n }",
"private static File generateTemp(Path path) {\n File tempFile = null;\n try {\n InputStream in = Files.newInputStream(path);\n String tDir = System.getProperty(\"user.dir\") + File.separator + ASSETS_FOLDER_TEMP_NAME;\n tempFile = new File(tDir + File.separator + path.getFileName());\n try (FileOutputStream out = new FileOutputStream(tempFile)) {\n IOUtils.copy(in, out);\n }\n album.addToImageList(tempFile.getAbsolutePath());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return tempFile;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n photosPaths.add(mCurrentPhotoPath);\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format( new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\" ;\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment. DIRECTORY_PICTURES);\n File image = File. createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"@RequiresApi(api = Build.VERSION_CODES.N)\n private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n System.out.println(\"StorageDir \" + storageDir);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DCIM), \"GIS\");\n File image = null;\n\n if(!storageDir.exists()){\n\n storageDir.mkdirs();\n\n }\n try {\n image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n }catch (Exception e){\n\n e.printStackTrace();\n\n }\n // Save a file: path for use with ACTION_VIEW intents\n\n return image;\n }",
"public static Bitmap convertToMutable(Bitmap imgIn) {\n try {\n //this is the file going to use temporally to save the bytes.\n // This file will not be a imageView, it will store the raw imageView data.\n File file = new File(Environment.getExternalStorageDirectory() + File.separator + \"temp.tmp\");\n\n //Open an RandomAccessFile\n //Make sure you have added uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"\n //into AndroidManifest.xml file\n RandomAccessFile randomAccessFile = new RandomAccessFile(file, \"rw\");\n\n // get the width and height of the source bitmap.\n int width = imgIn.getWidth();\n int height = imgIn.getHeight();\n Bitmap.Config type = imgIn.getConfig();\n\n //Copy the byte to the file\n //Assume source bitmap loaded using options.inPreferredConfig = Config.ARGB_8888;\n FileChannel channel = randomAccessFile.getChannel();\n MappedByteBuffer map = channel.map(FileChannel.MapMode.READ_WRITE, 0, imgIn.getRowBytes()*height);\n imgIn.copyPixelsToBuffer(map);\n //recycle the source bitmap, this will be no longer used.\n imgIn.recycle();\n System.gc();// try to force the bytes from the imgIn to be released\n\n //Create a new bitmap to load the bitmap again. Probably the memory will be available.\n imgIn = Bitmap.createBitmap(width, height, type);\n map.position(0);\n //load it back from temporary\n imgIn.copyPixelsFromBuffer(map);\n //close the temporary file and channel , then delete that also\n channel.close();\n randomAccessFile.close();\n\n // delete the temp file\n file.delete();\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return imgIn;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n pictureImagePath = image.getAbsolutePath();\n return image;\n\n }",
"private File createImageFile() throws IOException {\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getContext().getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n return image;\n }",
"@RequiresApi(api = Build.VERSION_CODES.FROYO)\n private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n imageFileName = timeStamp + \"_\" + \".jpg\";\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n Log.e(\"Getpath\", \"Cool\" + mCurrentPhotoPath);\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(getString(R.string.day_format)).format(new Date());\n String imageFileName = getString(R.string.image_file_prefix) + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(imageFileName, getString(R.string.image_file_format),\n storageDir\n );\n\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n //galleryAddPic();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n\n\n return image;\n\n\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = imageFileName + \"camera.jpg\";\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n pictureImagePath = image.getAbsolutePath();\n return image;\n }",
"private File createTempFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File albumF = getAlbumDir();\n File mediaF = null;\n\n profile = IMG_FILE_PREFIX + timeStamp+\"_\";\n mediaF = File.createTempFile(profile, IMG_FILE_SUFFIX, albumF);\n\n return mediaF;\n }",
"private static File createTempFile(final byte[] data) throws IOException {\r\n \t// Genera el archivo zip temporal a partir del InputStream de entrada\r\n final File zipFile = File.createTempFile(\"sign\", \".zip\"); //$NON-NLS-1$ //$NON-NLS-2$\r\n final FileOutputStream fos = new FileOutputStream(zipFile);\r\n\r\n fos.write(data);\r\n fos.flush();\r\n fos.close();\r\n\r\n return zipFile;\r\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = SettingsHelper.getPrivateImageFolder(this);\n if (!storageDir.exists()) {\n storageDir.mkdirs();\n }\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n imageUri = Uri.fromFile(image);\n return image;\n }",
"protected File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"MAZE_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n// File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n// File storageDir = getParentFragment().getActivity().getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n currentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"public static File bitmapToFile(Bitmap imageBitmap) {\n\n ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n\n // save to JPEG, & compress it,\n // TODO: modified this, mungkin bisa nurunin akurasi deteksi kalo kompresi nya terlalu kecil\n imageBitmap.compress(Bitmap.CompressFormat.JPEG, 200, bytes);\n\n File file = new File(Environment.getExternalStorageDirectory() + File.separator + \"image_kopi_temp.jpg\");\n try {\n // delete previous file\n if (file.exists()) file.delete();\n\n file.createNewFile();\n\n FileOutputStream fo = new FileOutputStream(file);\n fo.write(bytes.toByteArray());\n fo.close();\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return file;\n\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n //This is the directory in which the file will be created. This is the default location of Camera photos\n File storageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DCIM), \"Camera\");\n image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n // Save a file: path for using again\n cameraFilePath = \"file://\" + image.getAbsolutePath();\n return image;\n }",
"File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n //Todo:Este sera el nombre que tendra el archivo\n String imageFileName = \"IMAGE_\" + timeStamp + \"_\";\n //Todo:Ruta donde se almacenara la imagen\n File storageDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n\n //Todo:El tipo de archivo que se almacenara en el directorio\n File image = File.createTempFile(imageFileName,\".jpg\",storageDirectory);\n //Todo: mImageFileLocation sera el valor que se\n mImageFileLocation = image.getAbsolutePath();\n\n return image;\n }",
"public File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = mContext.getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n return File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n }",
"private File createImageFile() throws IOException\n {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"Picko_JPEG\" + timeStamp + \"_\";\n File storageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DOCUMENTS),\"Whatsapp\");\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n String mCurrentPhotoPath = \"file:\" + image.getAbsolutePath();\n return image;\n\n\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\", Locale.CANADA).format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = mActivity.getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName,\n \".jpg\",\n storageDir\n );\n\n cameraFilePath = image.getAbsolutePath();\n return image;\n }",
"public File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES);\n File imageFile = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n return imageFile;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n mCurrentPhotoPath = image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n //This is the directory in which the file will be created. This is the default location of Camera photos\n File storageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DCIM), \"Camera\");\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n // Save a file: path for using again\n cameraFilePath = \"file://\" + image.getAbsolutePath();\n return image;\n }",
"private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n //This is the directory in which the file will be created. This is the default location of Camera photos\n File storageDir = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DCIM), \"Camera\");\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n // Save a file: path for using again\n cameraFilePath = \"file://\" + image.getAbsolutePath();\n return image;\n }",
"public void SaveState() {\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n temp_pictures[i][j] = pictures[i][j];\n\n }\n }\n }",
"private static Path saveTempFile(InputStream input) throws IOException {\n\t\tPath tempFile = Files.createTempFile(null, \".csv\");\n\t\tFiles.copy(input, tempFile, StandardCopyOption.REPLACE_EXISTING);\n\n\t\tinput.close();\n\n\t\t// TODO delete tempFile\n\t\treturn tempFile;\n\t}"
]
| [
"0.65610355",
"0.6231521",
"0.6198432",
"0.61595863",
"0.6117641",
"0.60541224",
"0.6040836",
"0.60274297",
"0.60135144",
"0.59913063",
"0.59913063",
"0.5980249",
"0.59721917",
"0.5971365",
"0.59696656",
"0.5940289",
"0.5919363",
"0.59172857",
"0.59169763",
"0.5915948",
"0.59069824",
"0.59012955",
"0.5899345",
"0.5887472",
"0.58692294",
"0.58692294",
"0.58692294",
"0.58692294",
"0.58692294",
"0.5868812",
"0.58686686",
"0.5863428",
"0.5853498",
"0.5850322",
"0.5846483",
"0.5843337",
"0.5843337",
"0.5836753",
"0.5823787",
"0.58234984",
"0.5822202",
"0.58197176",
"0.58196545",
"0.58113134",
"0.58103985",
"0.58073974",
"0.5802462",
"0.57921886",
"0.5789204",
"0.57792735",
"0.57787865",
"0.5777631",
"0.57751423",
"0.5772052",
"0.5772052",
"0.5772052",
"0.5772052",
"0.5772052",
"0.5772052",
"0.5772052",
"0.5772052",
"0.5772052",
"0.5765446",
"0.5764109",
"0.57600963",
"0.5757467",
"0.5755774",
"0.5755566",
"0.5755544",
"0.5754084",
"0.5752283",
"0.5751086",
"0.5742958",
"0.5736619",
"0.57362884",
"0.57358086",
"0.5734262",
"0.5731242",
"0.57266957",
"0.57189304",
"0.5718178",
"0.5714358",
"0.5707953",
"0.57075787",
"0.5707296",
"0.5705937",
"0.57042414",
"0.56948495",
"0.5691007",
"0.56883585",
"0.5669947",
"0.5667202",
"0.56634384",
"0.56608665",
"0.5648607",
"0.5643268",
"0.5641033",
"0.56340635",
"0.56340635",
"0.56179315",
"0.56062025"
]
| 0.0 | -1 |
Creates a scaled version of an image. The given scaling parameters define a bounding box with a certain width and height. Images that do not fit in this box (i.e. are too large) are always scaled down such that they do fit. If the aspect ratio of the original image differs from that of the bounding box, either the width or the height of scaled image will be less than that of the box. Smaller images are scaled up in the same way as large images are scaled down, but only if upscaling is true. When upscaling is false and the image is smaller than the bounding box, the scaled image will be equal to the original. If the width or height of the scaling parameters is 0 or less, that side of the bounding box does not exist (i.e. is unbounded). If both sides of the bounding box are unbounded, the scaled image will be equal to the original. | public void execute(InputStream data, ImageReader reader, ImageWriter writer) throws IOException {
// save the image data in a temporary file so we can reuse the original data as-is if needed without
// putting all the data into memory
final File tmpFile = writeToTmpFile(data);
boolean deleteTmpFile = true;
log.debug("Stored uploaded image in temporary file {}", tmpFile);
InputStream dataInputStream = null;
ImageInputStream imageInputStream = null;
try {
dataInputStream = new FileInputStream(tmpFile);
imageInputStream = new MemoryCacheImageInputStream(dataInputStream);
reader.setInput(imageInputStream);
final int originalWidth = reader.getWidth(0);
final int originalHeight = reader.getHeight(0);
if (isOriginalVariant()) {
scaledWidth = originalWidth;
scaledHeight = originalHeight;
scaledData = new AutoDeletingTmpFileInputStream(tmpFile);
deleteTmpFile = false;
} else {
BufferedImage scaledImage = getScaledImage(reader, originalWidth, originalHeight);
ByteArrayOutputStream scaledOutputStream = ImageUtils.writeImage(writer, scaledImage, compressionQuality);
scaledWidth = scaledImage.getWidth();
scaledHeight = scaledImage.getHeight();
scaledData = new ByteArrayInputStream(scaledOutputStream.toByteArray());
}
} finally {
if (imageInputStream != null) {
imageInputStream.close();
}
IOUtils.closeQuietly(dataInputStream);
if (deleteTmpFile) {
log.debug("Deleting temporary file {}", tmpFile);
tmpFile.delete();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private BufferedImage scale(final BufferedImage input,\n \t\tfinal int newWidth, final int newHeight)\n \t{\n \t\tfinal int oldWidth = input.getWidth(), oldHeight = input.getHeight();\n \t\tif (oldWidth == newWidth && oldHeight == newHeight) return input;\n \n \t\tfinal BufferedImage output =\n \t\t\tnew BufferedImage(newWidth, newHeight, input.getType());\n \t\tfinal AffineTransform at = new AffineTransform();\n \t\tat.scale((double) newWidth / oldWidth, (double) newHeight / oldHeight);\n \t\tfinal AffineTransformOp scaleOp =\n \t\t\tnew AffineTransformOp(at, AffineTransformOp.TYPE_BILINEAR);\n \t\treturn scaleOp.filter(input, output);\n \t}",
"public BufferedImage getScaledImage ( float scale ) {\n\n int oldW = param.Parameters.IMAGEW;\n int oldH = param.Parameters.IMAGEH;\n\n param.Parameters.SCALE = scale;\n param.Parameters.IMAGEW = (int)((float)param.Parameters.IMAGEW * param.Parameters.SCALE);\n param.Parameters.IMAGEH = (int)((float)param.Parameters.IMAGEH * param.Parameters.SCALE);\n\n BufferedImage img =\n param.Parameters.PROBLEM.getData(param.Parameters.STATE, program, 0, 0);\n\n param.Parameters.SCALE = 1.0f;\n param.Parameters.IMAGEW = oldW;\n param.Parameters.IMAGEH = oldH;\n\n System.gc();\n\n return img;\n\n }",
"private BufferedImage scale(BufferedImage sourceImage) {\n GraphicsEnvironment graphicsEnvironment = GraphicsEnvironment.getLocalGraphicsEnvironment();\n GraphicsDevice graphicsDevice = graphicsEnvironment.getDefaultScreenDevice();\n GraphicsConfiguration graphicsConfiguration = graphicsDevice.getDefaultConfiguration();\n BufferedImage scaledImage = graphicsConfiguration.createCompatibleImage(IMAGE_DIMENSION, IMAGE_DIMENSION);\n\n Graphics2D newGraphicsImage = scaledImage.createGraphics();\n newGraphicsImage.setColor(Color.white);\n newGraphicsImage.fillRect(0, 0, IMAGE_DIMENSION, IMAGE_DIMENSION);\n\n double xScale = (double) IMAGE_DIMENSION / sourceImage.getWidth();\n double yScale = (double) IMAGE_DIMENSION / sourceImage.getHeight();\n AffineTransform affineTransform = AffineTransform.getScaleInstance(xScale,yScale);\n newGraphicsImage.drawRenderedImage(sourceImage, affineTransform);\n newGraphicsImage.dispose();\n\n return scaledImage;\n }",
"public ScaleImageOperation(int width, int height, boolean upscaling, ImageUtils.ScalingStrategy strategy) {\n this(width, height, upscaling, strategy, 1f);\n }",
"public ScaleImageOperation(int width, int height, boolean upscaling, ImageUtils.ScalingStrategy strategy, float compressionQuality) {\n this.width = width;\n this.height = height;\n this.upscaling = upscaling;\n this.strategy = strategy;\n this.compressionQuality = compressionQuality;\n }",
"public static Bitmap scaleBitmap(Bitmap bitmap, int newWidth, int newHeight) {\n\t\tBitmap scaledBitmap = Bitmap.createBitmap(newWidth, newHeight,\n\t\t\t\tConfig.ARGB_8888);\n\n\t\tfloat scaleX = newWidth / (float) bitmap.getWidth();\n\t\tfloat scaleY = newHeight / (float) bitmap.getHeight();\n\t\tfloat pivotX = 0;\n\t\tfloat pivotY = 0;\n\n\t\tMatrix scaleMatrix = new Matrix();\n\t\tscaleMatrix.setScale(scaleX, scaleY, pivotX, pivotY);\n\n\t\tCanvas canvas = new Canvas(scaledBitmap);\n\t\tcanvas.setMatrix(scaleMatrix);\n\t\tcanvas.drawBitmap(bitmap, 0, 0, new Paint(Paint.FILTER_BITMAP_FLAG));\n\n\t\treturn scaledBitmap;\n\t}",
"private void ScaleImage(){\n\t\tBufferedImage resizedImage = new BufferedImage(this.getWidth(), this.getHeight(), BufferedImage.TYPE_INT_RGB);\n\t\tGraphics2D g2 = resizedImage.createGraphics();\n\t\tg2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n\t\tg2.drawImage(image, 0, 0, this.getWidth(), this.getHeight(), null);\n\t\tg2.dispose();\n\t\tthis.image = resizedImage;\n\t}",
"public abstract BufferedImage scale(Dimension destinationSize);",
"public void doScaling() {\n try {\n int orientation = getExifOrientation(file);\n System.out.println(file.getName());\n //Dimension d = Imaging.getImageSize(file);\n ImageInputStream imageInputStream = ImageIO.createImageInputStream(file);\n // Use a subsampled image from the original, avoids read images too large to fit in memory\n BufferedImage bufferedImage = subsampleImage(imageInputStream, TARGET_WIDTH * 2, TARGET_HEIGHT * 2);\n ImageInformation ii=new ImageInformation(orientation, bufferedImage.getWidth(), bufferedImage.getHeight());\n AffineTransform transform=getExifTransformation(ii);\n bufferedImage=transformImage(bufferedImage, transform); \n Scalr.Mode mode;\n // calculate which side will be largest/smaller\n // this works with any image size\n double scaleX=(TARGET_WIDTH*1.0)/(bufferedImage.getWidth()*1.0);\n double scaleY=(TARGET_HEIGHT*1.0)/(bufferedImage.getHeight()*1.0);\n if (scaleX<scaleY) {\n mode = Scalr.Mode.FIT_TO_WIDTH;\n } else {\n mode = Scalr.Mode.FIT_TO_HEIGHT;\n } \n \n BufferedImage thumbnail = Scalr.resize(bufferedImage,\n Scalr.Method.QUALITY,\n mode, TARGET_WIDTH, TARGET_HEIGHT,\n Scalr.OP_ANTIALIAS);\n BufferedImage combined = new BufferedImage(TARGET_WIDTH, TARGET_HEIGHT, BufferedImage.TYPE_INT_ARGB);\n int x = 0, y = 0;\n if (mode == Scalr.Mode.FIT_TO_HEIGHT) {\n x = (TARGET_WIDTH - thumbnail.getWidth()) / 2;\n }\n if (mode == Scalr.Mode.FIT_TO_WIDTH) {\n y = (TARGET_HEIGHT - thumbnail.getHeight()) / 2;\n }\n Graphics g = combined.getGraphics();\n g.setColor(new java.awt.Color(0.0f, 0.0f, 0.0f, 0.0f));\n g.fillRect(0, 0, combined.getWidth(), combined.getHeight());\n g.drawImage(thumbnail, x, y, null);\n g.dispose();\n //Writes test subsampled image taken from original\n if (saveSubSampled) {\n ImageIO.write(bufferedImage, OUTPUT_EXTENSION, new File(output));\n }\n //Writes thumbnail, created from the subsampled image.\n ImageIO.write(combined, OUTPUT_EXTENSION, new File(output_thumb));\n\n } catch (IOException ex) {\n Logger.getLogger(Scaler.class.getName()).log(Level.SEVERE, null, ex);\n } catch (Exception ex) {\n Logger.getLogger(Scaler.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public void scaleBitmap(int newWidth, int newHeight) {\n\t\t// Technically since we always keep aspect ratio intact\n\t\t// we should only need to check one dimension.\n\t\t// Need to investigate and fix\n\t\tif ((newWidth > mMaxWidth) || (newHeight > mMaxHeight)) {\n\t\t\tnewWidth = mMaxWidth;\n\t\t\tnewHeight = mMaxHeight;\n\t\t}\n\t\tif ((newWidth < mMinWidth) || (newHeight < mMinHeight)) {\n\t\t\tnewWidth = mMinWidth;\n\t\t\tnewHeight = mMinHeight;\t\t\t\n\t\t}\n\n\t\tif ((newWidth != mExpandWidth) || (newHeight!=mExpandHeight)) {\t\n\t\t\t// NOTE: depending on the image being used, it may be \n\t\t\t// better to keep the original image available and\n\t\t\t// use those bits for resize. Repeated grow/shrink\n\t\t\t// can render some images visually non-appealing\n\t\t\t// see comments at top of file for mScaleFromOriginal\n\t\t\t// try to create a new bitmap\n\t\t\t// If you get a recycled bitmap exception here, check to make sure\n\t\t\t// you are not setting the bitmap both from XML and in code\n\t\t\tBitmap newbits = Bitmap.createScaledBitmap(mScaleFromOriginal ? mOriginal:mImage, newWidth,\n\t\t\t\t\tnewHeight, true);\n\t\t\t// if successful, fix up all the tracking variables\n\t\t\tif (newbits != null) {\n\t\t\t\tif (mImage!=mOriginal) {\n\t\t\t\t\tmImage.recycle();\n\t\t\t\t}\n\t\t\t\tmImage = newbits;\n\t\t\t\tmExpandWidth=newWidth;\n\t\t\t\tmExpandHeight=newHeight;\n\t\t\t\tmResizeFactorX = ((float) newWidth / mImageWidth);\n\t\t\t\tmResizeFactorY = ((float) newHeight / mImageHeight);\n\t\t\t\t\n\t\t\t\tmRightBound = mExpandWidth>mViewWidth ? 0 - (mExpandWidth - mViewWidth) : 0;\n\t\t\t\tmBottomBound = mExpandHeight>mViewHeight ? 0 - (mExpandHeight - mViewHeight) : 0;\n\t\t\t}\t\t\t\t\t\t\t\n\t\t}\n\t}",
"public static Bitmap scale(final Bitmap src, final float scaleWidth, final float scaleHeight) {\n return scale(src, scaleWidth, scaleHeight, false);\n }",
"BufferedImage scaledImage(BufferedImage image, int width, int height) {\r\n\t\tBufferedImage result = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);\r\n\t\tGraphics2D g2 = result.createGraphics();\r\n\t\tg2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);\r\n\t\t\r\n\t\tdouble sx = (double)width / image.getWidth();\r\n\t\tdouble sy = (double)height / image.getHeight();\r\n\t\tdouble scale = Math.min(sx, sy);\r\n\t\tint x = (int)((width - image.getWidth() * scale) / 2);\r\n\t\tint y = (int)((height - image.getHeight() * scale) / 2);\r\n\t\t// center the image\r\n\t\tg2.drawImage(image, x, y, (int)(image.getWidth() * scale), (int)(image.getHeight() * scale), null);\r\n\t\t\r\n\t\tg2.dispose();\r\n\t\treturn result;\r\n\t}",
"private Image getScaledImage(Image sourceImage)\n {\n //create storage for the new image\n BufferedImage resizedImage = new BufferedImage(50, 50,\n BufferedImage.TYPE_INT_ARGB);\n\n //create a graphic from the image\n Graphics2D g2 = resizedImage.createGraphics();\n\n //sets the rendering options\n g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,\n RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n\n //copies the source image into the new image\n g2.drawImage(sourceImage, 0, 0, 50, 50, null);\n\n //clean up\n g2.dispose();\n\n //return 50 x 50 image\n return resizedImage;\n }",
"private static AppImage scale(AppImage image) {\n\t\treturn scale(image, GraphicsConfig.getScaleWidth(), GraphicsConfig.getScaleHeight());\n\t}",
"public static BufferedImage scaleImage(BufferedImage image, double scale){\n\t\tWritableRaster inRaster = image.getRaster();\n\t\t\n\t\tint w = (int)Math.round(image.getWidth() * scale);\n\t\tint h = (int)Math.round(image.getHeight() * scale);\n\t\tWritableRaster outRaster = inRaster.createCompatibleWritableRaster(w, h);\n\t\t\n\t\tObject outData = null;\n\t\tfor(int j=0; j<h; j++){\n\t\t\tfor(int i=0; i<w; i++){\n\t\t\t\toutData = inRaster.getDataElements((int)(i/scale), (int)(j/scale), outData);\n\t\t\t\toutRaster.setDataElements(i, j, outData);\n\t\t\t}\n\t\t}\n\t\t\n\t\tBufferedImage outImage = new BufferedImage(image.getColorModel(), outRaster, image.isAlphaPremultiplied(), null);\n\t\treturn outImage;\n\t}",
"public static BufferedImage scale(BufferedImage src, int width, int height) {\n width = width == 0 ? 1 : width;\n height = height == 0 ? 1 : height;\n BufferedImage result = Scalr.resize(src, Scalr.Method.ULTRA_QUALITY, \n width, height,\n Scalr.OP_ANTIALIAS);\n return result;\n }",
"public Image getScaledCopy(float scale) {\r\n\t\treturn getScaledCopy(width * scale, height * scale);\r\n\t}",
"private BufferedImage getOptimalScalingImage(BufferedImage inputImage,\r\n int startSize, int endSize) {\r\n int currentSize = startSize;\r\n BufferedImage currentImage = inputImage;\r\n int delta = currentSize - endSize;\r\n int nextPow2 = currentSize >> 1;\r\n while (currentSize > 1) {\r\n if (delta <= nextPow2) {\r\n if (currentSize != endSize) {\r\n BufferedImage tmpImage = new BufferedImage(endSize,\r\n endSize, BufferedImage.TYPE_INT_RGB);\r\n Graphics g = tmpImage.getGraphics();\r\n ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_INTERPOLATION, \r\n RenderingHints.VALUE_INTERPOLATION_BILINEAR);\r\n g.drawImage(currentImage, 0, 0, tmpImage.getWidth(), \r\n tmpImage.getHeight(), null);\r\n currentImage = tmpImage;\r\n }\r\n return currentImage;\r\n } else {\r\n BufferedImage tmpImage = new BufferedImage(currentSize >> 1,\r\n currentSize >> 1, BufferedImage.TYPE_INT_RGB);\r\n Graphics g = tmpImage.getGraphics();\r\n ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_INTERPOLATION, \r\n RenderingHints.VALUE_INTERPOLATION_BILINEAR);\r\n g.drawImage(currentImage, 0, 0, tmpImage.getWidth(), \r\n tmpImage.getHeight(), null);\r\n currentImage = tmpImage;\r\n currentSize = currentImage.getWidth();\r\n delta = currentSize - endSize;\r\n nextPow2 = currentSize >> 1;\r\n }\r\n }\r\n return currentImage;\r\n }",
"public PictureScaler() {\r\n try {\r\n URL url = getClass().getResource(\"images/BB.jpg\");\r\n picture = ImageIO.read(url);\r\n scaleW = (int)(SCALE_FACTOR * picture.getWidth());\r\n scaleH = (int)(SCALE_FACTOR * picture.getHeight());\r\n System.out.println(\"w, h = \" + picture.getWidth() + \", \" + picture.getHeight());\r\n setPreferredSize(new Dimension(PADDING + (5 * (scaleW + PADDING)), \r\n scaleH + (4 * PADDING)));\r\n } catch (Exception e) {\r\n System.out.println(\"Problem reading image file: \" + e);\r\n System.exit(0);\r\n }\r\n }",
"private static Image resize(final Image image, final int width,\r\n final int height) {\r\n final Image scaled = new Image(Display.getDefault(), width, height);\r\n final GC gc = new GC(scaled);\r\n gc.setAntialias(SWT.ON);\r\n gc.setInterpolation(SWT.HIGH);\r\n gc.drawImage(image, 0, 0, image.getBounds().width,\r\n image.getBounds().height, 0, 0, width, height);\r\n gc.dispose();\r\n image.dispose();\r\n return scaled;\r\n }",
"public static Bitmap scale(final Bitmap src,\n final float scaleWidth,\n final float scaleHeight,\n final boolean recycle) {\n\n Matrix matrix = new Matrix();\n matrix.setScale(scaleWidth, scaleHeight);\n Bitmap ret = Bitmap.createBitmap(src, 0, 0, src.getWidth(), src.getHeight(), matrix, true);\n if (recycle && !src.isRecycled()) src.recycle();\n return ret;\n }",
"protected static BufferedImage getScaledInstance(BufferedImage img, int targetWidth,\n int targetHeight) {\n BufferedImage ret = (BufferedImage) img;\n\n // Use multi-step technique: start with original size, then\n // scale down in multiple passes with drawImage()\n // until the target size is reached\n int w = img.getWidth();\n int h = img.getHeight();\n\n while (w > targetWidth || h > targetHeight) {\n // Bit shifting by one is faster than dividing by 2.\n w >>= 1;\n if (w < targetWidth) {\n w = targetWidth;\n }\n\n // Bit shifting by one is faster than dividing by 2.\n h >>= 1;\n if (h < targetHeight) {\n h = targetHeight;\n }\n\n BufferedImage tmp = new BufferedImage(w, h, img.getType());\n Graphics2D g2 = tmp.createGraphics();\n g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,\n RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n g2.setRenderingHint(RenderingHints.KEY_RENDERING,\n RenderingHints.VALUE_RENDER_QUALITY);\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n g2.drawImage(ret, 0, 0, w, h, null);\n g2.dispose();\n\n ret = tmp;\n }\n\n return ret;\n }",
"public static Bitmap scaleBitmap(Bitmap bitmap, float scaleWidth,\n float scaleHeight) {\n if (scaleWidth == 0) {\n scaleWidth = 1;\n }\n if (scaleHeight == 0) {\n scaleHeight = 1;\n }\n float gameTopBgWidth = scaleWidth;\n float gameTopBgHeight = scaleHeight;\n // 取得想要缩放的matrix参数\n gameMatrix = new Matrix();\n gameMatrix.postScale(gameTopBgWidth, gameTopBgHeight);\n // 得到新的图片\n // Bitmap newBitMap = Bitmap.createBitmap(bitmap, 0, 0,\n // bitmap.getWidth(),\n // bitmap.getHeight(), gameMatrix, true);\n // if (!bitmap.isRecycled())\n // bitmap.recycle();\n Bitmap temp = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(),\n bitmap.getHeight(), gameMatrix, true);\n if (bitmap != null && !bitmap.isRecycled()) {\n bitmap.isRecycled();\n bitmap = null;\n }\n long freeStart = Runtime.getRuntime().freeMemory();\n return temp;\n }",
"private Bitmap scaleBitmap(PageViewHolder holder, Bitmap bitmap) {\n if (bitmap == null) {\n return null;\n }\n\n // Get bitmap dimensions\n int bitmapWidth = bitmap.getWidth();\n int bitmapHeight = bitmap.getHeight();\n\n ViewGroup.LayoutParams parentParams = holder.imageLayout.getLayoutParams();\n // Determine how much to scale: the dimension requiring less scaling is\n // closer to the its side. This way the image always stays inside the\n // bounding box AND either x/y axis touches it.\n float xScale = ((float) parentParams.width) / bitmapWidth;\n float yScale = ((float) parentParams.height) / bitmapHeight;\n float scale = (xScale <= yScale) ? xScale : yScale;\n\n // Create a matrix for the scaling (same scale amount in both directions)\n Matrix matrix = new Matrix();\n matrix.postScale(scale, scale);\n\n // Create a new bitmap that is scaled to the bounding box\n Bitmap scaledBitmap = null;\n try {\n scaledBitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmapWidth, bitmapHeight, matrix, true);\n } catch (OutOfMemoryError oom) {\n Utils.manageOOM(mPdfViewCtrl);\n }\n\n if (sDebug) Log.d(TAG, \"scaleBitmap recycle\");\n ImageMemoryCache.getInstance().addBitmapToReusableSet(bitmap);\n return scaledBitmap;\n }",
"public static BufferedImage resizeImage(BufferedImage original, int width, int height, Object hint){\n\t\tBufferedImage scaled = new BufferedImage(width, height, original.getType());\n\t\tGraphics2D g = scaled.createGraphics();\n\t\tg.setRenderingHint(RenderingHints.KEY_INTERPOLATION, hint); \n\t\tg.drawImage(original, 0, 0, width, height, null);\n\t\tg.dispose();\n\t\treturn scaled;\n\t}",
"private Image getScaledImage(BufferedImage srcImg, int w, int h) {\n\t\tint srcWidth = srcImg.getWidth();\n\t\tint srcHeight = srcImg.getHeight();\n\t\tint diffWidth = w - srcWidth;\n\t\tint diffHeight = h - srcHeight;\n\t\tif (diffWidth < diffHeight) {\n\t\t\tdouble ratio = (double) w / (double) srcWidth;\n\t\t\th = (int) Math.round(srcHeight * ratio);\n\t\t} else {\n\t\t\tdouble ratio = (double) h / (double) srcHeight;\n\t\t\tw = (int) Math.round(srcWidth * ratio);\n\t\t}\n\t\tBufferedImage resizedImg = new BufferedImage(w, h,\n\t\t\t\tBufferedImage.TYPE_INT_RGB);\n\t\tGraphics2D g2 = resizedImg.createGraphics();\n\t\tg2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,\n\t\t\t\tRenderingHints.VALUE_INTERPOLATION_BILINEAR);\n\t\tg2.drawImage(srcImg, 0, 0, w, h, null);\n\t\tg2.dispose();\n\t\treturn resizedImg;\n\t}",
"public static BufferedImage scale(BufferedImage original) {\n return scale(original, false);\n }",
"private Image getScaledImage(Image srcImg, int w, int h){\n BufferedImage resizedImg = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);\n Graphics2D g2 = resizedImg.createGraphics();\n\n g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n g2.drawImage(srcImg, 0, 0, w, h, null);\n g2.dispose();\n\n return resizedImg;\n }",
"private float getNewScale() {\n int width = getWidth() - (padding[0] + padding[2]);\n float scaleWidth = (float) width / (cropRect.right - cropRect.left);\n\n int height = getHeight() - (padding[1] + padding[3]);\n float scaleHeight = (float) height / (cropRect.bottom - cropRect.top);\n if (getHeight() > getWidth()) {\n return scaleWidth < scaleHeight ? scaleWidth : scaleHeight;\n }\n return scaleWidth < scaleHeight ? scaleWidth : scaleHeight;\n }",
"private Image getScaledImage(Image image, float x, float y) {\n AffineTransform transform = new AffineTransform();\n transform.scale(x, y);\n transform.translate(\n (x-1) * image.getWidth(null) / 2,\n (y-1) * image.getHeight(null) / 2);\n\n // create a transparent (not translucent) image\n Image newImage = gc.createCompatibleImage(\n image.getWidth(null),\n image.getHeight(null),\n Transparency.BITMASK);\n\n // draw the transformed image\n Graphics2D g = (Graphics2D)newImage.getGraphics();\n g.drawImage(image, transform, null);\n g.dispose();\n\n return newImage;\n }",
"public native MagickImage scaleImage(int cols, int rows)\n\t\t\tthrows MagickException;",
"public static Bitmap scaleImage(Bitmap image, int width, int height) {\n if((image.getHeight() < image.getWidth() && height < width)\n || (image.getHeight() > image.getWidth() && height > width)) {\n return Bitmap.createScaledBitmap(image, width, height, true);\n }\n else {\n android.graphics.Matrix matrix = new android.graphics.Matrix();\n matrix.postRotate(90);\n Bitmap temp = Bitmap.createScaledBitmap(image, height, width, true);\n return Bitmap.createBitmap(temp, 0, 0, temp.getWidth(), temp.getHeight(), matrix, true);\n }\n }",
"private Image scaleImage(Image image) { \n\t\treturn image.getScaledInstance(700, 500, Image.SCALE_SMOOTH); //Going to Scale the Image to the Size and Width Specified with the Highest Smoothness Possible \n\t}",
"@Test\n public void testScaling() {\n System.out.println(\"scaling\");\n double s = 0.0;\n ImageFilter instance = null;\n BufferedImage expResult = null;\n BufferedImage result = instance.scaling(s);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"public ImageProperties setScale(ImageScale scale) {\n this.scale = scale;\n return this;\n }",
"public void scaleImage(int newWidth, int newHeight) {\n\t\t// create a new empty buffered image with the newW and H\n\t\tBufferedImage newIm = new BufferedImage(newWidth, newHeight,\n\t\t\t\tBufferedImage.TYPE_INT_RGB);\n\n\t\t// scale factor between the old and new image sizes\n\t\tdouble scaleX = im.getWidth() / newIm.getWidth();\n\t\tdouble scaleY = im.getHeight() / newIm.getHeight();\n\t\tint rgb = 0;\n\n\t\t// double loop to run through the new image to move pixel colours\n\t\tfor (int i = 0; i < newIm.getWidth(); i++) {\n\t\t\tfor (int j = 0; j < newIm.getHeight(); j++) {\n\t\t\t\t// sets rgb to the colour at the scaled location on the original\n\t\t\t\t// picture\n\t\t\t\trgb = im.getRGB((int) (i * scaleX), (int) (j * scaleY));\n\t\t\t\t// puts the colour into the new image\n\t\t\t\tnewIm.setRGB(i, j, rgb);\n\t\t\t}\n\t\t}\n\t\tim = newIm;\n\t}",
"private static Bitmap createScaledBitmap(Bitmap source, int width, int height)\n\t{\n\t\tint sourceWidth = source.getWidth();\n\t\tint sourceHeight = source.getHeight();\n\t\tfloat scale = Math.min((float)width / sourceWidth, (float)height / sourceHeight);\n\t\tsourceWidth *= scale;\n\t\tsourceHeight *= scale;\n\t\treturn Bitmap.createScaledBitmap(source, sourceWidth, sourceHeight, false);\n\t}",
"public ImageIcon scalePicture(ImageIcon image) {\n\t\tImage transImage = image.getImage();\n\t\tImage scaledImage = transImage.getScaledInstance(140, 190, Image.SCALE_SMOOTH);\t\t\n\t\timage = new ImageIcon(scaledImage);\n\t\treturn image;\n\t}",
"public static Bitmap scaleBitmapToFit(Bitmap bitmap, IPoint size, boolean preserveAspectRatio, boolean avoidScalingUp) {\n if (!preserveAspectRatio) {\n return Bitmap.createScaledBitmap(bitmap, size.x, size.y, true);\n } else {\n Rect targetRect = new Rect(0, 0, size.x, size.y);\n Rect originalRect = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight());\n if (avoidScalingUp && targetRect.contains(originalRect))\n return bitmap;\n Matrix matrix = MyMath.calcRectFitRectTransform(originalRect, targetRect);\n return Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);\n }\n }",
"@Test\n public void testScale() {\n System.out.println(\"scale\");\n Float s = null;\n ImageFilter instance = null;\n BufferedImage expResult = null;\n BufferedImage result = instance.scale(s);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"private Bitmap scaleDownBitmapImage(Bitmap bitmap, int newWidth, int newHeight){\n Bitmap resizedBitmap = Bitmap.createScaledBitmap(bitmap, newWidth, newHeight, true);\n return resizedBitmap;\n }",
"public BufferedImage createResizedCopy(java.awt.Image originalImage, int scaledWidth, int scaledHeight,\n\t\t\tboolean preserveAlpha) {\n\t\tint imageType = preserveAlpha ? BufferedImage.TYPE_INT_RGB : BufferedImage.TYPE_INT_ARGB;\n\t\tBufferedImage scaledBI = new BufferedImage(scaledWidth, scaledHeight, imageType);\n\t\tGraphics2D g = scaledBI.createGraphics();\n\t\tif (preserveAlpha) {\n\t\t\tg.setComposite(AlphaComposite.Src);\n\t\t}\n\t\tg.drawImage(originalImage, 0, 0, scaledWidth, scaledHeight, null);\n\t\tg.dispose();\n\t\treturn scaledBI;\n\t}",
"public BufferedImage scaleImage(BufferedImage before, double scaleRateW, double scaleRateH) {\n\t\tint w = before.getWidth();\n\t\tint h = before.getHeight();\n\t\tBufferedImage after = new BufferedImage((int)(w*scaleRateW), (int)(h*scaleRateH), BufferedImage.TYPE_INT_ARGB);\n\t\tAffineTransform at = new AffineTransform();\n\t\tat.scale(scaleRateW,scaleRateH);\n\t\tAffineTransformOp scaleOp = new AffineTransformOp(at, AffineTransformOp.TYPE_BILINEAR);\n\t\tafter = scaleOp.filter(before, after);\n\t\treturn after;\n\t}",
"public static Bitmap ScaleBitmap(Bitmap bm, float width, float height) {\n\t\tBitmap result = null;\n\t\tif (bm == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tMatrix matrix = new Matrix();\n\t\tint w = bm.getWidth();\n\t\tint h = bm.getHeight();\n\t\tfloat resizeScaleWidth = width / w;\n\t\tfloat resizeScaleHeight = height / h;\n\t\t\n\t\tif(resizeScaleWidth == 1 && resizeScaleHeight == 1)\n\t\t\treturn bm;\n\t\t\n\t\tmatrix.postScale(resizeScaleWidth, resizeScaleHeight);\n\n\t\tresult = Bitmap.createBitmap(bm, 0, 0, w, h, matrix, true);\n\t\treturn result;\n\t}",
"private Bitmap scaleBitmapToHeightWithMinWidth(Bitmap bitmap, int newHeight, int minWidth) {\n bitmap = cropBitmapToSquare(bitmap);\n int imgHeight = bitmap.getHeight();\n int imgWidth = bitmap.getWidth();\n float scaleFactor = ((float) newHeight) / imgHeight;\n int newWidth = (int) (imgWidth * scaleFactor);\n bitmap = Bitmap.createScaledBitmap(bitmap, newWidth, newHeight, true);\n bitmap = scaleBitmapToMinWidth(bitmap, minWidth);\n return bitmap;\n }",
"@Method(selector = \"scale:imageData:width:height:completionBlock:\")\n\tpublic native void scale(String name, NSData imageData, int width, int height, @Block App42ResponseBlock completionBlock);",
"@Override\n\tfinal public void scale(double x, double y)\n\t{\n\t\twidth *= x;\n\t\theight *= y;\n\t}",
"RenderedImage createScaledRendering(Long id, \n\t\t\t\t\tint w, \n\t\t\t\t\tint h, \n\t\t\t\t\tSerializableState hintsState) \n\tthrows RemoteException;",
"public Image createScaledImage (double scale, int interpolType)\r\n {\r\n\tImageScaler scaler = new ImageScaler(scale, interpolType);\r\n\treturn (HSIImage)scaler.filter(this);\r\n }",
"public static Bitmap scale(final Bitmap src,\n final int newWidth,\n final int newHeight,\n final boolean recycle) {\n\n Bitmap ret = Bitmap.createScaledBitmap(src, newWidth, newHeight, true);\n if (recycle && !src.isRecycled()) src.recycle();\n return ret;\n }",
"public static BufferedImage scale(BufferedImage src, int w, int h)\n\t{\n\t BufferedImage img = \n\t new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);\n\t int x, y;\n\t int ww = src.getWidth();\n\t int hh = src.getHeight();\n\t int[] ys = new int[h];\n\t for (y = 0; y < h; y++)\n\t ys[y] = y * hh / h;\n\t for (x = 0; x < w; x++) {\n\t int newX = x * ww / w;\n\t for (y = 0; y < h; y++) {\n\t int col = src.getRGB(newX, ys[y]);\n\t img.setRGB(x, y, col);\n\t }\n\t }\n\t return img;\n\t}",
"@Method(selector = \"scale:imagePath:width:height:completionBlock:\")\n\tpublic native void scale(String name, String imagePath, int width, int height, @Block App42ResponseBlock completionBlock);",
"public final Shape scale(Vector fromPoint, Vector toPoint, Vector anchorPoint) {\n\t\treturn transform(new Scalation(fromPoint, toPoint, anchorPoint));\n\t}",
"public static BufferedImage imageScale(ImageIcon src, int w, int h) {\r\n int type = BufferedImage.TYPE_INT_RGB;\r\n BufferedImage dst = new BufferedImage(w, h, type);\r\n Graphics2D g2 = dst.createGraphics();\r\n // Fill background for scale to fit.\r\n g2.setBackground(UIManager.getColor(\"Panel.background\"));\r\n g2.clearRect(0, 0, w, h);\r\n double xScale = (double) w / src.getIconWidth();\r\n double yScale = (double) h / src.getIconHeight();\r\n // Scaling options:\r\n // Scale to fit - image just fits in label.\r\n double scale = Math.max(xScale, yScale);\r\n // Scale to fill - image just fills label.\r\n //double scale = Math.max(xScale, yScale);\r\n int width = (int) (scale * src.getIconWidth());\r\n int height = (int) (scale * src.getIconHeight());\r\n int x = (w - width) / 2;\r\n int y = (h - height) / 2;\r\n g2.drawImage(src.getImage(), x, y, width, height, null);\r\n g2.dispose();\r\n return dst;\r\n }",
"public static BufferedImage resizeImage(BufferedImage image, int newWidth, int newHeight, boolean nearestNeighbor) {\n if (newWidth == image.getWidth() && newHeight == image.getHeight())\n return image; // There would be no change.\n\n BufferedImage scaleImage = new BufferedImage(newWidth, newHeight, image.getType());\n Graphics2D graphics = scaleImage.createGraphics();\n graphics.setRenderingHint(RenderingHints.KEY_INTERPOLATION, nearestNeighbor ? RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR : RenderingHints.VALUE_INTERPOLATION_BICUBIC);\n graphics.drawImage(image, 0, 0, newWidth, newHeight, null);\n graphics.dispose();\n return scaleImage;\n }",
"public static Rectangle reScale(Rectangle rect, int oldScale, int newScale){\n\t\tRectangle res = new Rectangle();\n\t\tres.x = reScale(rect.x, oldScale, newScale);\n\t\tres.y = reScale(rect.y, oldScale, newScale);\n\t\tres.width = reScale(rect.width, oldScale, newScale);\n\t\tres.height = reScale(rect.height, oldScale, newScale);\n\t\treturn res;\n\t}",
"private void updateImageSize(float scale) {\n int w = (int) (mImageWidth * scale);\n int h = (int) (mImageHeight * scale);\n mCanvas.setCoordinateSpaceWidth(w);\n mCanvas.setCoordinateSpaceHeight(h);\n mCanvas.getContext2d().drawImage(ImageElement.as(image.getElement()), 0, 0, w, h);\n }",
"private QPixmap postProcessImage(QPixmap qImage, int scaleToWidth, int scaleToHeight, String scaleRatio) {\n if (scaleToWidth > 0 || scaleToHeight > 0) {\n final Qt.AspectRatioMode ratio;\n // Scale this image\n if (\"keep\".equals(scaleRatio)) {\n ratio = Qt.AspectRatioMode.KeepAspectRatio;\n } else if (\"expand\".equals(scaleRatio) || \"crop\".equals(\"crop\")) {\n ratio = Qt.AspectRatioMode.KeepAspectRatioByExpanding;\n } else { // 'ignore'\n ratio = Qt.AspectRatioMode.IgnoreAspectRatio;\n }\n qImage = qImage.scaled(scaleToWidth, scaleToHeight, ratio);\n if (\"crop\".equals(scaleRatio)) {\n qImage = qImage.copy(0, 0, scaleToWidth, scaleToHeight);\n }\n }\n return qImage;\n }",
"private void scaleImagePanel(float scale){\n float oldZoom = imagePanel.getScale();\n float newZoom = oldZoom+scale;\n Rectangle oldView = scrollPane.getViewport().getViewRect();\n // resize the panel for the new zoom\n imagePanel.setScale(newZoom);\n // calculate the new view position\n Point newViewPos = new Point();\n newViewPos.x = (int)(Math.max(0, (oldView.x + oldView.width / 2) * newZoom / oldZoom - oldView.width / 2));\n newViewPos.y = (int)(Math.max(0, (oldView.y + oldView.height / 2) * newZoom / oldZoom - oldView.height / 2));\n scrollPane.getViewport().setViewPosition(newViewPos);\n }",
"public void createScaledImage(String location, int type, int orientation, int session, int database_id) {\n\n // find portrait or landscape image\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(location, options);\n final int imageHeight = options.outHeight; //find the width and height of the original image.\n final int imageWidth = options.outWidth;\n\n int outputHeight = 0;\n int outputWidth = 0;\n\n\n //set the output size depending on type of image\n switch (type) {\n case EdittingGridFragment.SIZE4R :\n if (orientation == EdittingGridFragment.LANDSCAPE) {\n outputWidth = 1800;\n outputHeight = 1200;\n } else if (orientation == EdittingGridFragment.PORTRAIT) {\n outputWidth = 1200;\n outputHeight = 1800;\n }\n break;\n case EdittingGridFragment.SIZEWALLET:\n if (orientation == EdittingGridFragment.LANDSCAPE) {\n outputWidth = 953;\n outputHeight = 578;\n } else if (orientation ==EdittingGridFragment.PORTRAIT ) {\n outputWidth = 578;\n outputHeight = 953;\n }\n\n break;\n case EdittingGridFragment.SIZESQUARE:\n outputWidth = 840;\n outputHeight = 840;\n break;\n }\n\n assert outputHeight != 0 && outputWidth != 0;\n\n\n //fit images\n //FitRectangles rectangles = new FitRectangles((int) outputWidth, (int) outputHeight, imageWidth, imageHeight);\n\n //scaled images\n ScaledRectangles rectangles = new ScaledRectangles((int) outputWidth, (int) outputHeight, imageWidth, imageHeight);\n\n Rect canvasSize = rectangles.getCanvasSize();\n Rect canvasImageCoords = rectangles.getCanvasImageCoords();\n Rect imageCoords = rectangles.getImageCoords();\n\n\n\n /*\n //set the canvas size based on the type of image\n Rect canvasSize = new Rect(0, 0, (int) outputWidth, (int) outputHeight);\n Rect canvasImageCoords = new Rect();\n //Rect canvasImageCoords = new Rect (0, 0, outputWidth, outputHeight); //set to use the entire canvas\n Rect imageCoords = new Rect(0, 0, imageWidth, imageHeight);\n //Rect imageCoords = new Rect();\n\n\n // 3 cases, exactfit, canvas width larger, canvas height larger\n if ((float) outputHeight/outputWidth == (float) imageHeight/imageWidth) {\n canvasImageCoords.set(canvasSize);\n //imageCoords.set(0, 0, imageWidth, imageHeight); //map the entire image to the entire canvas\n Log.d(\"Async\", \"Proportionas Equal\");\n\n }\n\n\n\n else if ( (float) outputHeight/outputWidth > (float) imageHeight/imageWidth) {\n //blank space above and below image\n //find vdiff\n\n\n //code that fits the image without whitespace\n Log.d(\"Async\", \"blank space above and below\");\n\n float scaleFactor = (float)imageHeight / (float) outputHeight; //amount to scale the canvas by to match the height of the image.\n int scaledCanvasWidth = (int) (outputWidth * scaleFactor);\n int hDiff = (imageWidth - scaledCanvasWidth)/2;\n imageCoords.set (hDiff, 0 , imageWidth - hDiff, imageHeight);\n\n\n\n //code fits image with whitespace\n float scaleFactor = (float) outputWidth / (float) imageWidth;\n int scaledImageHeight = (int) (imageHeight * scaleFactor);\n assert scaledImageHeight < outputHeight;\n\n int vDiff = (outputHeight - scaledImageHeight)/2;\n canvasImageCoords.set(0, vDiff, outputWidth, outputHeight - vDiff);\n\n\n\n } else if ((float) outputHeight/outputWidth < (float) imageHeight/imageWidth) {\n //blank space to left and right of image\n\n\n //fits the image without whitespace\n float scaleFactor = (float) imageWidth / (float) outputWidth;\n int scaledCanvasHeight = (int) (outputHeight * scaleFactor);\n int vDiff = (imageHeight - scaledCanvasHeight)/2;\n imageCoords.set(0, vDiff, imageWidth, imageHeight - vDiff);\n\n //fits image with whitespace\n\n Log.d(\"Async\", \"blank space left and right\");\n float scaleFactor = (float) outputHeight / (float) imageHeight;\n int scaledImageWidth = (int) (imageWidth * scaleFactor);\n assert scaledImageWidth < outputWidth;\n\n int hDiff = (outputWidth - scaledImageWidth)/2;\n\n canvasImageCoords.set(hDiff, 0, outputWidth - hDiff, outputHeight);\n }\n\n */\n\n Log.d(\"Async\", \"Canvas Image Coords:\" + canvasImageCoords.toShortString());\n\n SaveImage imageSaver = new SaveImage(getApplicationContext(), database);\n ImageObject imageObject = new ImageObject(location);\n Bitmap imageBitmap = imageObject.getImageBitmap();\n int sampleSize = imageObject.getSampleSize();\n\n Rect sampledImageCoords = imageSaver.getSampledCoordinates(imageCoords, sampleSize);\n\n System.gc();\n BackgroundObject backgroundObject = new BackgroundObject(outputWidth, outputHeight);\n Bitmap background = backgroundObject.getBackground();\n\n\n background = imageSaver.drawOnBackground(background, imageBitmap,\n sampledImageCoords, canvasImageCoords);\n\n imageSaver.storeImage(background, database_id, session);\n background.recycle();\n\n }",
"@Test\n void testScaleUp() throws OperationFailedException {\n\n ScaledObjectAreaChecker checker = new ScaledObjectAreaChecker(SCALE_FACTOR);\n\n // Create an object that is a small circle\n ObjectMask unscaled = CircleObjectFixture.circleAt(new Point2d(8, 8), 7);\n checker.assertConnected(\"unscaled\", unscaled);\n\n ObjectMask scaled = unscaled.scale(checker.factor());\n\n checker.assertConnected(\"scaled\", scaled);\n checker.assertExpectedArea(unscaled, scaled);\n }",
"private Bitmap scaleBitmapDown(Bitmap bitmap) {\n double scaleRatio = -1;\n\n if (mResizeArea > 0) {\n int bitmapArea = bitmap.getWidth() * bitmap.getHeight();\n if (bitmapArea > mResizeArea) {\n scaleRatio = Math.sqrt(mResizeArea / (double) bitmapArea);\n }\n } else if (mResizeMaxDimension > 0) {\n int maxDimension = Math.max(bitmap.getWidth(), bitmap.getHeight());\n if (maxDimension > mResizeMaxDimension) {\n scaleRatio = mResizeMaxDimension / (double) maxDimension;\n }\n }\n\n if (scaleRatio <= 0) {\n // Scaling has been disabled or not needed so just return the Bitmap\n return bitmap;\n }\n\n return Bitmap.createScaledBitmap(\n bitmap,\n (int) Math.ceil(bitmap.getWidth() * scaleRatio),\n (int) Math.ceil(bitmap.getHeight() * scaleRatio),\n false);\n }",
"public static Bitmap getResizedBitmap(Bitmap bitmap, int newHeight, int newWidth) {\n int width = bitmap.getWidth();\n int height = bitmap.getHeight();\n float scaleWidth = ((float) newWidth) / width;\n float scaleHeight = ((float) newHeight) / height;\n\n Matrix matrix = new Matrix();\n\n matrix.postScale(scaleWidth, scaleHeight);\n\n return Bitmap.createBitmap(bitmap, 0, 0, width, height, matrix, false);\n }",
"public void scale(float scale) {\n if (scale != 1.0f) {\n left = (int) (left * scale + 0.5f);\n top = (int) (top * scale + 0.5f);\n right = (int) (right * scale + 0.5f);\n bottom = (int) (bottom * scale + 0.5f);\n }\n }",
"public static BufferedImage scaleImage(BufferedImage img, double scaleFactor) {\r\n\t\tdouble oldHeight = img.getHeight();\r\n\t\tdouble oldWidth = img.getWidth();\r\n\t\tlog.debug(\"Scale factor: \" + scaleFactor);\r\n\t\tlog.debug(\"Scaling image: original size:\" + img.getWidth() + \"x\"\r\n\t\t\t\t+ img.getHeight() + \". New size: \"\r\n\t\t\t\t+ (int) (oldWidth * scaleFactor) + \"x\"\r\n\t\t\t\t+ (int) (oldHeight * scaleFactor));\r\n\t\tImage scaledImage = img.getScaledInstance(\r\n\t\t\t\t(int) (oldWidth * scaleFactor),\r\n\t\t\t\t(int) (oldHeight * scaleFactor), Image.SCALE_FAST);\r\n\t\tBufferedImage imageBuff = new BufferedImage(\r\n\t\t\t\t(int) (oldWidth * scaleFactor),\r\n\t\t\t\t(int) (oldHeight * scaleFactor), img.getType());\r\n\t\tGraphics g = imageBuff.createGraphics();\r\n\t\tg.drawImage(scaledImage, 0, 0, new Color(0, 0, 0, 0), null);\r\n\t\tg.dispose();\r\n\t\treturn imageBuff;\r\n\t}",
"public BufferedImage rescaleImage(BufferedImage image, float scale) {\r\n int[][][] arr = convertToArray(image);\r\n return convertToBimage(rescaleImage(arr, scale));//return array\r\n }",
"public void scale(float x, float y);",
"private void updateScale() {\n target.setScaleX(scaleValue);\n target.setScaleY(scaleValue);\n }",
"public static Transform newScale(float sx, float sy, float sz){\n return new Transform(new float[][]{\n {sx, 0.0f, 0.0f, 0.0f},\n {0.0f, sy, 0.0f, 0.0f},\n {0.0f, 0.0f, sz, 0.0f},\n {0.0f, 0.0f, 0.0f, 1.0f}\n\n });\n }",
"public ImageScale getScale() {\n return this.scale;\n }",
"@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkImageScale() {\n\t\tboolean flag = oTest.checkImageScale();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}",
"public void setScale(double scale, double xscale, double yscale) {\n\t\tif (this.scale != scale || this.xscale != xscale || this.yscale != yscale) {\n\t\t\tthis.scale = scale;\n\t\t\tthis.xscale = xscale;\n\t\t\tthis.yscale = yscale;\n\n\t\t\t// calculate the absolute coordinates and dimensions on the base\n\t\t\t// of the given scale parameters\n\t\t\tint x = (int) (xRel * xscale);\n\t\t\tint y = (int) (yRel * yscale);\n\t\t\tint width = (int) (widthRel * scale);\n\t\t\tint height = (int) (heightRel * scale);\n\n\t\t\t// the border rope holders must always be at the border\n\t\t\t// small rounding failures are eliminated here\n\t\t\tif (this instanceof Seilaufhaenger) {\n\t\t\t\tSeilaufhaenger aufhaenger = (Seilaufhaenger) this;\n\t\t\t\tif (!aufhaenger.isUnderTreibscheibe()) {\n\t\t\t\t\tif (aufhaenger.getHimmel() == Seilaufhaenger.NORD) {\n\t\t\t\t\t\tif (x > aufzugschacht.getWidth() - width - 1)\n\t\t\t\t\t\t\tx = aufzugschacht.getWidth() - width - 1;\n\t\t\t\t\t\tif (x < 1)\n\t\t\t\t\t\t\tx = 1;\n\t\t\t\t\t\ty = 1;\n\t\t\t\t\t} else if (aufhaenger.getHimmel() == Seilaufhaenger.SUED) {\n\t\t\t\t\t\tif (x > aufzugschacht.getWidth() - width - 1)\n\t\t\t\t\t\t\tx = aufzugschacht.getWidth() - width - 1;\n\t\t\t\t\t\tif (x < 1)\n\t\t\t\t\t\t\tx = 1;\n\t\t\t\t\t\ty = aufzugschacht.getHeight() - height - 1;\n\t\t\t\t\t} else if (aufhaenger.getHimmel() == Seilaufhaenger.WEST) {\n\t\t\t\t\t\tif (y > aufzugschacht.getHeight() - width - 1)\n\t\t\t\t\t\t\ty = aufzugschacht.getHeight() - height - 1;\n\t\t\t\t\t\tif (y < 1)\n\t\t\t\t\t\t\ty = 1;\n\t\t\t\t\t\tx = 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (y > aufzugschacht.getHeight() - width - 1)\n\t\t\t\t\t\t\ty = aufzugschacht.getHeight() - height - 1;\n\t\t\t\t\t\tif (y < 1)\n\t\t\t\t\t\t\ty = 1;\n\t\t\t\t\t\tx = aufzugschacht.getWidth() - width - 1;\n\t\t\t\t\t}\n\t\t\t\t\t// moves and resizes the element\n\t\t\t\t\tsetSize(width, height);\n\t\t\t\t\tsetLocation(x, y);\n\t\t\t\t} else {\n\t\t\t\t\tif (x > aufzugschacht.getWidth() - width - 1)\n\t\t\t\t\t\tx = aufzugschacht.getWidth() - width - 1;\n\t\t\t\t\tif (x < 1)\n\t\t\t\t\t\tx = 1;\n\t\t\t\t\t// moves and resizes the element\n\t\t\t\t\tsetSize(width, height);\n\t\t\t\t\t// setLocation(x, y);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (x > aufzugschacht.getWidth() - width - 1)\n\t\t\t\t\tx = aufzugschacht.getWidth() - width - 1;\n\t\t\t\tif (y > aufzugschacht.getHeight() - width - 1)\n\t\t\t\t\ty = aufzugschacht.getHeight() - height - 1;\n\t\t\t\tif (x < 1)\n\t\t\t\t\tx = 1;\n\t\t\t\tif (y < 1)\n\t\t\t\t\ty = 1;\n\t\t\t\t// moves and resizes the element\n\t\t\t\tsetSize(width, height);\n\t\t\t\tsetLocation(x, y);\n\t\t\t}\n\t\t}\n\t}",
"public int scale(int original);",
"public void scaleBy(float scale) {\n internalGroup.scaleBy(scale);\n dataTrait.scaleX = internalGroup.getScaleX();\n dataTrait.scaleY = internalGroup.getScaleY();\n resetSprite();\n\n }",
"private Bitmap scaleBitmapDown(Bitmap bitmap, int maxDimension) {\n\n int originalWidth = bitmap.getWidth();\n int originalHeight = bitmap.getHeight();\n int resizedWidth = maxDimension;\n int resizedHeight = maxDimension;\n\n if (originalHeight > originalWidth) {\n resizedHeight = maxDimension;\n resizedWidth = (int) (resizedHeight * (float) originalWidth / (float) originalHeight);\n } else if (originalWidth > originalHeight) {\n resizedWidth = maxDimension;\n resizedHeight = (int) (resizedWidth * (float) originalHeight / (float) originalWidth);\n } else if (originalHeight == originalWidth) {\n resizedHeight = maxDimension;\n resizedWidth = maxDimension;\n }\n return Bitmap.createScaledBitmap(bitmap, resizedWidth, resizedHeight, false);\n }",
"public void beginScaling() {\n xScale = 1.0f;\n yScale = 1.0f;\n }",
"private Drawable resize(Drawable image, int width, int height) {\n Bitmap b = ((BitmapDrawable)image).getBitmap();\n Bitmap bitmapResized = Bitmap.createScaledBitmap(b, width, height, false);\n return new BitmapDrawable(getResources(), bitmapResized);\n }",
"public final native Mat4 scale(double sx, double sy, double sz) /*-{\n return $wnd.mat4.scale(this, [sx, sy, sz]);\n }-*/;",
"public BufferedImage getFasterScaledInstance(BufferedImage img,\r\n int targetWidth, int targetHeight, Object hint,\r\n boolean progressiveBilinear)\r\n {\r\n int type = (img.getTransparency() == Transparency.OPAQUE) ?\r\n BufferedImage.TYPE_INT_RGB : BufferedImage.TYPE_INT_ARGB;\r\n BufferedImage ret = img;\r\n BufferedImage scratchImage = null;\r\n Graphics2D g2 = null;\r\n int w, h;\r\n int prevW = ret.getWidth();\r\n int prevH = ret.getHeight();\r\n boolean isTranslucent = img.getTransparency() != Transparency.OPAQUE; \r\n\r\n if (progressiveBilinear) {\r\n // Use multi-step technique: start with original size, then\r\n // scale down in multiple passes with drawImage()\r\n // until the target size is reached\r\n w = img.getWidth();\r\n h = img.getHeight();\r\n } else {\r\n // Use one-step technique: scale directly from original\r\n // size to target size with a single drawImage() call\r\n w = targetWidth;\r\n h = targetHeight;\r\n }\r\n \r\n do {\r\n if (progressiveBilinear && w > targetWidth) {\r\n w /= 2;\r\n if (w < targetWidth) {\r\n w = targetWidth;\r\n }\r\n }\r\n\r\n if (progressiveBilinear && h > targetHeight) {\r\n h /= 2;\r\n if (h < targetHeight) {\r\n h = targetHeight;\r\n }\r\n }\r\n\r\n if (scratchImage == null || isTranslucent) {\r\n // Use a single scratch buffer for all iterations\r\n // and then copy to the final, correctly-sized image\r\n // before returning\r\n scratchImage = new BufferedImage(w, h, type);\r\n g2 = scratchImage.createGraphics();\r\n }\r\n g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, hint);\r\n g2.drawImage(ret, 0, 0, w, h, 0, 0, prevW, prevH, null);\r\n prevW = w;\r\n prevH = h;\r\n\r\n ret = scratchImage;\r\n } while (w != targetWidth || h != targetHeight);\r\n \r\n if (g2 != null) {\r\n g2.dispose();\r\n }\r\n\r\n // If we used a scratch buffer that is larger than our target size,\r\n // create an image of the right size and copy the results into it\r\n if (targetWidth != ret.getWidth() || targetHeight != ret.getHeight()) {\r\n scratchImage = new BufferedImage(targetWidth, targetHeight, type);\r\n g2 = scratchImage.createGraphics();\r\n g2.drawImage(ret, 0, 0, null);\r\n g2.dispose();\r\n ret = scratchImage;\r\n }\r\n \r\n return ret;\r\n }",
"private javaxt.io.Image _transform_simple(javaxt.io.Image src_img, \n double[] src_bbox, int[] dst_size, double[] dst_bbox){\n\n double[] src_quad = new double[]{0, 0, src_img.getWidth(), src_img.getHeight()};\n SRS.transf to_src_px =SRS.make_lin_transf(src_bbox, src_quad);\n\n //minx, miny = to_src_px((dst_bbox[0], dst_bbox[3]));\n double[] min = to_src_px.transf(dst_bbox[0], dst_bbox[3]);\n double minx = min[0];\n double miny = min[1];\n\n //maxx, maxy = to_src_px((dst_bbox[2], dst_bbox[1]));\n double[] max = to_src_px.transf(dst_bbox[2], dst_bbox[1]);\n double maxx = max[0];\n double maxy = max[1];\n\n double src_res = (src_bbox[0]-src_bbox[2])/src_img.getWidth();\n double dst_res = (dst_bbox[0]-dst_bbox[2])/dst_size[0];\n\n double tenth_px_res = Math.abs(dst_res/(dst_size[0]*10));\n javaxt.io.Image img = new javaxt.io.Image(src_img.getBufferedImage());\n if (Math.abs(src_res-dst_res) < tenth_px_res){\n img.crop(cint(minx), cint(miny), dst_size[0], dst_size[1]);\n //src_img.crop(cint(minx), cint(miny), cint(minx)+dst_size[0], cint(miny)+dst_size[1]);\n return img; //src_img;\n }\n else{\n img.crop(cint(minx), cint(miny), cint(maxx)-cint(minx), cint(maxy)-cint(miny));\n img.resize(dst_size[0], dst_size[1]);\n //src_img.crop(cint(minx), cint(miny), cint(maxx), cint(maxy));\n //src_img.resize(dst_size[0], dst_size[1]);\n return img; //src_img;\n }\n //ImageSource(result, size=dst_size, transparent=src_img.transparent)\n }",
"public PImage resizeToFit(PImage original)\n {\n PImage resized = original.copy();\n if (original.width > xCanvasSize && original.height > yCanvasSize)\n {\n if ((float)(original.width)/(float)(original.height) > (float)(xCanvasSize)/(float)yCanvasSize)\n resized.resize(xCanvasSize, 0);\n else\n resized.resize(0, yCanvasSize);\n } else if (original.width > xCanvasSize)\n resized.resize(xCanvasSize, 0);\n else if (original.height > yCanvasSize)\n resized.resize(0, yCanvasSize);\n return resized;\n }",
"public void scale(float scale, float x, float y) {\n\t\tcompose(new TransformMatrix(scale,scale, x - scale * x,y - scale * y));\n\t}",
"private Bitmap getScaledBitmap(ImageView imageView) {\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = true;\n\n int scaleFactor = Math.min(\n options.outWidth / imageView.getWidth(),\n options.outHeight / imageView.getHeight()\n );\n options.inJustDecodeBounds = false;\n options.inSampleSize = scaleFactor;\n options.inPurgeable = true;\n return BitmapFactory.decodeFile(currentImagePath, options);\n }",
"public void scaleBy(float scaleX, float scaleY) {\n internalGroup.scaleBy(scaleX, scaleY);\n dataTrait.scaleX = internalGroup.getScaleX();\n dataTrait.scaleY = internalGroup.getScaleY();\n resetSprite();\n }",
"public void setScale(Scale scale) {\n this.scale = scale;\n }",
"private void updateImageScale() {\r\n\t\t//Check which dimension is larger and store it in this variable.\r\n\t\tint numHexLargestDimension = this.numHexRow;\r\n\t\tif (this.totalHexWidth > this.totalHexHeight) {\r\n\t\t\tnumHexLargestDimension = this.numHexCol;\r\n\t\t}\r\n\t\t\r\n\t\tif (numHexLargestDimension < 35) {\r\n\t\t\tif (this.zoomer.getZoomScale() * (this.numHexCol / 2) > 16.5) {\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.LARGE;\r\n\t\t\t} else if (this.zoomer.getZoomScale() * (this.numHexCol / 2) > 7){\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.MEDIUM;\r\n\t\t\t} else {\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.SMALL;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (numHexLargestDimension < 70) {\r\n\t\t\tif (this.zoomer.getZoomScale() * (this.numHexCol / 2) > 22.2) {\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.LARGE;\r\n\t\t\t} else if (this.zoomer.getZoomScale() \r\n\t\t\t\t\t* (this.numHexCol / 2) > 14.5){\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.MEDIUM;\r\n\t\t\t} else {\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.SMALL;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (numHexLargestDimension < 105) {\r\n\t\t\tif (this.zoomer.getZoomScale() * (this.numHexCol / 2) > 32.6) {\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.LARGE;\r\n\t\t\t} else if (this.zoomer.getZoomScale() * (this.numHexCol / 2) > 21){\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.MEDIUM;\r\n\t\t\t} else {\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.SMALL;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (this.zoomer.getZoomScale() * (this.numHexCol / 2) > 44.4) {\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.LARGE;\r\n\t\t\t} else if (this.zoomer.getZoomScale() * (this.numHexCol / 2) > 28){\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.MEDIUM;\r\n\t\t\t} else {\r\n\t\t\t\tthis.currentImageScale = ImageDrawScales.SMALL;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public Image rescaleTo(int scale) {\n return new LetterAvatar(character, background, scale);\n }",
"public static boolean rescale(InputStream input, OutputStream output,int maxX,int maxY) throws IOException\n {\n try(ImageInputStream iis = ImageIO.createImageInputStream(input))\n {\n if(iis == null) return false;\n \n Iterator<ImageReader> it = ImageIO.getImageReaders(iis);\n if(!it.hasNext()) return false;\n ImageReader reader = it.next();\n reader.setInput(iis);\n \n String format = reader.getFormatName();\n BufferedImage img = reader.read(0);\n if(img == null) return false;\n \n int scaleX = img.getWidth();\n int scaleY = img.getHeight();\n if(scaleX>maxX)\n {\n scaleY = (int)(((float)scaleY/scaleX)*maxX);\n scaleX = maxX;\n }\n if(scaleY>maxY)\n {\n scaleX = (int)(((float)scaleX/scaleY)*maxY);\n scaleY = maxY;\n }\n Image newImg = img.getScaledInstance(scaleX, scaleY, Image.SCALE_SMOOTH);\n \n return ImageIO.write(imageToBufferedImage(newImg), format, output);\n }\n finally\n {\n input.close();\n }\n }",
"public static BufferedImage resizeImage(File f, int maxWidth_X, int maxHeight_Y) throws IOException\r\n {\n ImageInputStream iis = ImageIO.createImageInputStream(f);\r\n Iterator readers = ImageIO.getImageReaders(iis);\r\n ImageReader reader = (ImageReader) readers.next();\r\n reader.setInput(iis, true);\r\n ImageReadParam param = reader.getDefaultReadParam();\r\n BufferedImage originalImage = reader.read(0, param);\r\n int oHeight_Y = originalImage.getHeight();\r\n int oWidth_X = originalImage.getWidth();\r\n // float fHeight_Y = maxHeight_Y;\r\n // float fWidth_X = maxWidth_X;\r\n final int shrinkFactor;\r\n if (oHeight_Y > oWidth_X && oHeight_Y > maxHeight_Y)\r\n {\r\n // height is greater so scale height and factor out width using the original\r\n // aspect ratio\r\n shrinkFactor = (int) (((float) oHeight_Y / maxHeight_Y) + 1f);\r\n }\r\n else if (oWidth_X > oHeight_Y && oWidth_X > maxWidth_X)\r\n {\r\n // width is greater so scale width and factor out height using the original\r\n // aspect ratio.\r\n shrinkFactor = (int) (((float) oWidth_X / maxWidth_X) + 1f);\r\n }\r\n else\r\n {\r\n // return the original image\r\n return originalImage;\r\n }\r\n if(shrinkFactor==1)\r\n {\r\n //no shrinking required\r\n return originalImage;\r\n }\r\n // we do not need to re-size\r\n param.setSourceSubsampling(shrinkFactor, shrinkFactor, 0, 0);\r\n return reader.read(0, param);\r\n }",
"private SbVec3f SCALE( SbVec3f vec, SbVec3f tmp, SbVec3f scale) {\n\tfloat[] pt = vec.getValueRead();\n\ttmp.setValue(0, (pt)[0]*scale.getValueRead()[0]);\n\t\t\ttmp.setValue(1, (pt)[1]*scale.getValueRead()[1]); \n\t\t tmp.setValue(2, (pt)[2]*scale.getValueRead()[2]);\n\n\treturn tmp;\n\n}",
"public static BufferedImage resizeImage(final Image image, int width, int height) {\n final BufferedImage bufferedImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n final Graphics2D graphics2D = bufferedImage.createGraphics();\n graphics2D.setComposite(AlphaComposite.Src);\n //below three lines are for RenderingHints for better image quality at cost of higher processing time\n graphics2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION,RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n graphics2D.setRenderingHint(RenderingHints.KEY_RENDERING,RenderingHints.VALUE_RENDER_QUALITY);\n graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);\n graphics2D.drawImage(image, 0, 0, width, height, null);\n graphics2D.dispose();\n return bufferedImage;\n }",
"public final Shape getScaled(Vector fromPoint, Vector toPoint, Vector anchorPoint) {\n\t\treturn getCopy().scale(fromPoint, toPoint, anchorPoint);\n\t}",
"public BufferedImage imageResize(BufferedImage img, int newW, int newH) {\r\n\t\t/*\r\n\t\t * code to resize Buffered image\r\n\t\t */\r\n\t\t// transforms BufferedImage into image in order to scale\r\n\t\tImage tmp = img.getScaledInstance(newW, newH, Image.SCALE_SMOOTH);\r\n\t\t// sets new height and width using the parameters\r\n\t\tBufferedImage dimg = new BufferedImage(newW, newH, BufferedImage.TYPE_INT_ARGB);\r\n\t\t// calls graphics2D object to draw the image\r\n\t\tGraphics2D g2d = dimg.createGraphics();\r\n\t\tg2d.drawImage(tmp, 0, 0, null);\r\n\t\tg2d.dispose();\r\n\t\t// returns BufferedImage\r\n\t\treturn dimg;\r\n\t}",
"public void setScale(float scale);",
"@Test\n public void scale() {\n assertEquals(\"Wrong vector scale\", new Vector(1,1,1).scale(2), new Vector(2,2,2));\n }",
"public BoundingBox3d scale(Coord3d scale) {\n BoundingBox3d b = new BoundingBox3d();\n b.xmax = xmax * scale.x;\n b.xmin = xmin * scale.x;\n b.ymax = ymax * scale.y;\n b.ymin = ymin * scale.y;\n b.zmax = zmax * scale.z;\n b.zmin = zmin * scale.z;\n return b;\n }",
"public void setScale(float scale) {\n this.scale = scale;\n }",
"public Image getScaledCopy(float w, float h) {\r\n\t\treturn new Image(renderer, texture, textureX, textureY, textureWidth, textureHeight, w, h);\r\n\t}",
"public static BufferedImage scaleWidth(BufferedImage image, double scaleFactor) {\n int newWidth = (int) (image.getWidth() * scaleFactor);\n if (newWidth == image.getWidth())\n return image; // There would be no change.\n\n BufferedImage scaleImage = new BufferedImage(newWidth, image.getHeight(), image.getType());\n Graphics2D graphics = scaleImage.createGraphics();\n graphics.drawImage(image, 0, 0, newWidth, image.getHeight(), null);\n graphics.dispose();\n return scaleImage;\n }",
"private Bitmap getScaledImage(Bitmap imageBitmap) {\n\t\tBitmap scaledBitmap = null;\n\t\ttry {\n\n\t\t\tMatrix matrix = new Matrix();\n\t\t\tmatrix.postRotate(90);\n\n\t\t\tBitmap rotatedBitmap = Bitmap.createScaledBitmap(imageBitmap, PHOTO_W, PHOTO_H, false);\n\t\t\tscaledBitmap = Bitmap.createBitmap(rotatedBitmap , 0, 0, rotatedBitmap.getWidth(), rotatedBitmap.getHeight(), matrix, true);\n\n\t\t} catch (Throwable e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn scaledBitmap;\n\t}",
"public PImage resizeToFit(PImage original, int xMax, int yMax)\n {\n PImage resized = original.copy();\n if (original.width > xMax && original.height > yMax)\n {\n if ((float)(original.width)/(float)(original.height) > (float)(xMax)/(float)yMax)\n resized.resize(xMax, 0);\n else\n resized.resize(0, yMax);\n } else if (original.width > xMax)\n resized.resize(xMax, 0);\n else if (original.height > yMax)\n resized.resize(0, yMax);\n return resized;\n }"
]
| [
"0.660032",
"0.64333963",
"0.63689095",
"0.6328201",
"0.6230724",
"0.6230108",
"0.6205487",
"0.6181715",
"0.6132876",
"0.6120951",
"0.6076393",
"0.5987282",
"0.5985211",
"0.59651124",
"0.59590185",
"0.59195316",
"0.5802628",
"0.5757312",
"0.5754702",
"0.57303995",
"0.5700276",
"0.5694371",
"0.56939876",
"0.5686287",
"0.56745636",
"0.5672263",
"0.56649625",
"0.5642598",
"0.5639172",
"0.56353974",
"0.56309384",
"0.56006485",
"0.55931216",
"0.55747455",
"0.55725646",
"0.55704737",
"0.55598956",
"0.5552706",
"0.5541087",
"0.5537365",
"0.55199665",
"0.5508581",
"0.55030406",
"0.5498503",
"0.5493023",
"0.5430702",
"0.5430003",
"0.5405116",
"0.5356734",
"0.533476",
"0.5277359",
"0.52487046",
"0.5248328",
"0.52414095",
"0.5222373",
"0.52209675",
"0.5215126",
"0.5177303",
"0.51593256",
"0.5153621",
"0.51488584",
"0.51370096",
"0.5133615",
"0.51296955",
"0.5126472",
"0.51212704",
"0.5116808",
"0.5097224",
"0.5054119",
"0.5036288",
"0.503543",
"0.50344217",
"0.5017703",
"0.5003636",
"0.49876124",
"0.49774152",
"0.49575832",
"0.49461964",
"0.49451122",
"0.49402618",
"0.49375707",
"0.4925813",
"0.49240097",
"0.49116728",
"0.49028146",
"0.4901174",
"0.48926276",
"0.48812142",
"0.4879771",
"0.48782828",
"0.4871206",
"0.4861843",
"0.48583177",
"0.48576856",
"0.4851595",
"0.48289987",
"0.4828989",
"0.48151892",
"0.479166",
"0.47871137",
"0.4781528"
]
| 0.0 | -1 |
This happens when the 'done' button is pressed on a GuiConfig screen | @SubscribeEvent(priority=EventPriority.NORMAL, receiveCanceled=true)
public void onConfigChange(OnConfigChangedEvent event)
{
if(event.getModID().equals(Reference.MOD_ID))
{
Config.config.save();
Config.configSync();
//Only run the following code if a world is running and if running on a client; this should make it so the sync only runs when accessing the "mod options..." button from the pause menu
if(event.isWorldRunning() && LizzyAnvil.proxy.isClient())
{
Config.sendConfigSyncRequest(); //send an empty packet to the server that initiates the config sync (only initiates if it is a dedicated server)
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void done() {\n Toolkit.getDefaultToolkit().beep();\n //close_plan_btn.setEnabled(true);\n setCursor(null); //turn off the wait cursor\n JOptionPane.showMessageDialog(null, \"Plan released !\\n\");\n\n }",
"@Override\n\t\tpublic void done() {\n\t\t\tToolkit.getDefaultToolkit().beep();\n\t\t\t//JOptionPane.showMessageDialog(panel,\n\t\t\t//\t\t\"Rotina concluída com sucesso\",\n\t\t\t//\t\t\"Atualização de Grupos de Documentos\", JOptionPane.OK_OPTION);\n\t\t\tjButtonConsulta.setEnabled(true);\n\t\t\tjButtonFechar.setEnabled(true);\n\t\t\tsetCursor(null); //turn off the wait cursor\n\n\t\t}",
"@Override\n public void done() {\n Toolkit.getDefaultToolkit().beep();\n //release_plan_btn.setEnabled(true);\n setCursor(null); //turn off the wait cursor\n JOptionPane.showMessageDialog(null, \"Plan released !\\n\");\n\n }",
"public void setDoneButton(){\n\t\tbtnConfirmOrNext.setText(\"Done\");\n\t\tbtnStop.setVisible(false); // no more stop quiz since quiz is done\n\t}",
"private void setupFinishedGUI() {\n getSupportActionBar().setSubtitle(\"finished\");\n findViewById(R.id.countdownpickerlayout).setVisibility(View.GONE);\n findViewById(R.id.start_button).setVisibility(View.GONE);\n findViewById(R.id.ping_button).setVisibility(View.GONE);\n findViewById(R.id.location_card).setVisibility(View.GONE);\n findViewById(R.id.exp_finished_layout).setVisibility(View.VISIBLE);\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 goalsConfigButton(){\n if(!goalsOpened){\n goalsUI = new GoalsUI(this, false);\n goalsOpened = true;\n }\n }",
"private void resultsConfigButton(){\n if(!resultsOpened){\n resultsUI = new ResultsUI(this, false);\n resultsOpened = true;\n } \n }",
"public void setAsDoneDialog() {\n okButton.setText(\"Done\");\n cancelButton.setVisible(false);\n }",
"public void result() {\n JLabel header = new JLabel(\"Finish!!\");\n header.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 28));\n gui.getConstraints().gridx = 0;\n gui.getConstraints().gridy = 0;\n gui.getConstraints().insets = new Insets(10,10,50,10);\n gui.getPanel().add(header, gui.getConstraints());\n\n String outcomeText = String.format(\"You answer correctly %d / %d.\",\n totalCorrect, VocabularyQuizList.MAX_NUMBER_QUIZ);\n JTextArea outcome = new JTextArea(outcomeText);\n outcome.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 20));\n outcome.setEditable(false);\n gui.getConstraints().gridy = 1;\n gui.getConstraints().insets = new Insets(10,10,30,10);\n gui.getPanel().add(outcome, gui.getConstraints());\n\n JButton b = new JButton(\"home\");\n gui.getGuiAssist().homeListener(b);\n gui.getConstraints().gridy = 2;\n gui.getConstraints().insets = new Insets(10,200,10,200);\n gui.getPanel().add(b, gui.getConstraints());\n\n b = new JButton(\"start again\");\n startQuestionListener(b);\n gui.getConstraints().gridy = 3;\n gui.getPanel().add(b, gui.getConstraints());\n }",
"public void refreshGUIConfiguration() {\n\t\tcbxFEP.setSelectedItem(Initializer.getFEPname());\n\t\ttxtPort.setText(String.valueOf(Initializer.getPortNumber()));\n\t\t\n\t\tfor(Map.Entry<String, String> value : Initializer.getConfigurationTracker().getFepPropertiesMap().entrySet()) {\n\t\t\tif(value.getKey().equals(\"valueOfBitfield76\")) {\n\t\t\t\tSystem.out.println(value.getValue());\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (Initializer.getConfigurationTracker().getFepPropertiesMap()\n\t\t\t\t.get(Initializer.getBaseConstants().sendResponseVariableName).equalsIgnoreCase(\"No\")) {\n\t\t\trdbtnDontSendResponse.setSelected(true);\n\t\t} else {\n\t\t\trdbtnSendResponse.setSelected(true);\n\t\t}\n\n\t\tif (Initializer.getConfigurationTracker().getFepPropertiesMap()\n\t\t\t\t.get(Initializer.getBaseConstants().authorizationResultVariableName)\n\t\t\t\t.equalsIgnoreCase(Initializer.getBaseConstants().approvalValue)) {\n\t\t\trdbtnAuthorizationApprove.setSelected(true);\n\t\t} else if (Initializer.getConfigurationTracker().getFepPropertiesMap()\n\t\t\t\t.get(Initializer.getBaseConstants().authorizationResultVariableName)\n\t\t\t\t.equalsIgnoreCase(Initializer.getBaseConstants().declineValue)) {\n\t\t\trdbtnAuthorizationDecline.setSelected(true);\n\t\t} else if (Initializer.getConfigurationTracker().getFepPropertiesMap()\n\t\t\t\t.get(Initializer.getBaseConstants().authorizationResultVariableName)\n\t\t\t\t.equalsIgnoreCase(Initializer.getBaseConstants().partialApprovalValue)) {\n\t\t\trdbtnAuthorizationPartiallyapprove.setSelected(true);\n\t\t}\n\n\t\tif (Initializer.getConfigurationTracker().getFepPropertiesMap()\n\t\t\t\t.get(Initializer.getBaseConstants().financialSalesResultVariableName)\n\t\t\t\t.equalsIgnoreCase(Initializer.getBaseConstants().approvalValue)) {\n\t\t\trdbtnFinancialSalesApprove.setSelected(true);\n\t\t} else if (Initializer.getConfigurationTracker().getFepPropertiesMap()\n\t\t\t\t.get(Initializer.getBaseConstants().financialSalesResultVariableName)\n\t\t\t\t.equalsIgnoreCase(Initializer.getBaseConstants().declineValue)) {\n\t\t\trdbtnFinancialSalesDecline.setSelected(true);\n\t\t} else if (Initializer.getConfigurationTracker().getFepPropertiesMap()\n\t\t\t\t.get(Initializer.getBaseConstants().financialSalesResultVariableName)\n\t\t\t\t.equalsIgnoreCase(Initializer.getBaseConstants().partialApprovalValue)) {\n\t\t\trdbtnFinancialSalesPartiallyapprove.setSelected(true);\n\t\t}\n\n\t\tif (Initializer.getConfigurationTracker().getFepPropertiesMap()\n\t\t\t\t.get(Initializer.getBaseConstants().financialForceDraftResultVariableName)\n\t\t\t\t.equalsIgnoreCase(Initializer.getBaseConstants().approvalValue)) {\n\t\t\trdbtnFinancialForceDraftApprove.setSelected(true);\n\t\t} else if (Initializer.getConfigurationTracker().getFepPropertiesMap()\n\t\t\t\t.get(Initializer.getBaseConstants().financialForceDraftResultVariableName)\n\t\t\t\t.equalsIgnoreCase(Initializer.getBaseConstants().declineValue)) {\n\t\t\trdbtnFinancialForceDraftDecline.setSelected(true);\n\t\t}\n\n\t\tif (Initializer.getConfigurationTracker().getFepPropertiesMap()\n\t\t\t\t.get(Initializer.getBaseConstants().reconciliationResultVariableName)\n\t\t\t\t.equalsIgnoreCase(Initializer.getBaseConstants().approvalValue)) {\n\t\t\trdbtnReconciliationApprove.setSelected(true);\n\t\t} else if (Initializer.getConfigurationTracker().getFepPropertiesMap()\n\t\t\t\t.get(Initializer.getBaseConstants().reconciliationResultVariableName)\n\t\t\t\t.equalsIgnoreCase(Initializer.getBaseConstants().declineValue)) {\n\t\t\trdbtnReconciliationDecline.setSelected(true);\n\t\t}\n\n\t\tif (Initializer.getConfigurationTracker().getFepPropertiesMap()\n\t\t\t\t.get(Initializer.getBaseConstants().reversalResultVariableName)\n\t\t\t\t.equalsIgnoreCase(Initializer.getBaseConstants().approvalValue)) {\n\t\t\trdbtnReversalApprove.setSelected(true);\n\t\t} else if (Initializer.getConfigurationTracker().getFepPropertiesMap()\n\t\t\t\t.get(Initializer.getBaseConstants().reversalResultVariableName)\n\t\t\t\t.equalsIgnoreCase(Initializer.getBaseConstants().declineValue)) {\n\t\t\trdbtnReversalDecline.setSelected(true);\n\t\t}\n\n\t\ttxtDeclineCode\n\t\t\t\t.setText(Initializer.getConfigurationTracker().getFepPropertiesMap().get(\"ValueOfBitfield39Decline\"));\n\t\ttxtApprovalAmount.setText(Initializer.getConfigurationTracker().getFepPropertiesMap().get(\"valueOfBitfield4\"));\n\t\tif (Initializer.getConfigurationTracker().getFepPropertiesMap().get(\"isHalfApprovalRequired\")\n\t\t\t\t.equalsIgnoreCase(\"true\")) {\n\t\t\tchckbxApproveForHalf.setSelected(true);\n\t\t\ttxtApprovalAmount.setEnabled(false);\n\t\t} else {\n\t\t\tchckbxApproveForHalf.setSelected(false);\n\t\t\ttxtApprovalAmount.setEnabled(true);\n\t\t}\n\t\t\n\t\tlogger.debug(\"GUI configuration updated based on the FEP properties configured\");\n\t}",
"@Override\n public void done() {\n Toolkit.getDefaultToolkit().beep();\n enableMenusItens();\n \n if ( !erro ) {\n \tprogressBar.setValue(100);\n \ttaskOutput.append(\"Feito!\\n\");\n \ttaskOutput.append(\"Arquivo gerado com sucesso em \" + excelFileName);\n }\n }",
"public void setDone() {\n isDone = true;\n }",
"private void configActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_configActionPerformed\n java.awt.EventQueue.invokeLater(() -> {\n if (dialog == null) {\n dialog = new ConfigurationDlg(this, true);\n }\n dialog.addWindowListener(new java.awt.event.WindowAdapter() {\n @Override\n public void windowClosing(java.awt.event.WindowEvent e) {\n dialog.dispose();\n }\n });\n dialog.setVisible(true);\n });\n }",
"@Override\n\tpublic void msgDonePlacingKit(GuiKit kit) {\n\t\t\n\t}",
"private void completedButtonListener() {\n JButton completedButton = gui.getButton_Completed();\n\n ActionListener actionListener = (ActionEvent actionEvent) -> {\n gui.getCompleted_Text().setText(\"\");\n gui.getFrame_Completed().setVisible(true);\n gui.getFrame_Completed().setSize(415, 250);\n gui.getCompleted_TextArea().setEditable(false);\n for (int key : requestsAnswered.keySet()) {\n gui.getCompleted_TextArea().append(requestsAnswered.get(key).getFormattedRequest());\n }\n };\n\n completedButton.addActionListener(actionListener);\n\n }",
"@Override\n\tprotected void done()\n\t{\n\t\tgetController().done();\n\t}",
"public void toolDone() {\n setTool(fDefaultToolButton.tool(), fDefaultToolButton.name());\n setSelected(fDefaultToolButton);\n }",
"public void setDoneFlg_True() {\n setDoneFlgAsFlg(HangarCDef.Flg.True);\n }",
"@Override\n protected void done() {\n files = new ArrayList<String>();\n flist = new ArrayList<File>();\n setCursor(Cursor.getDefaultCursor());\n textArea.setText(textArea.getText() + \"\\nDone!\\n\");\n progressBar.setIndeterminate(false);\n startButton.setEnabled(true);\n }",
"@Override\n\tpublic void goToFinishedPanel ()\n\t{\n\t\tAppContext.sizeErrorLegend.setVisible(true);\n\t\t\n\t\tmRunningPanel.setVisible(false);\n\t\tmFinishedPanel.setVisible(true);\n\t\tmWizardStepIconPanel.setStepIcon(7);\n\t}",
"public void formProcessingComplete(){}",
"private void showFinishMsg() {}",
"public void Click_Done()\r\n\t{\r\n\t\tExplicitWait(Specialdone);\r\n\t\tif (Specialdone.isDisplayed()) \r\n\t\t{\r\n\t\t\tJavascriptexecutor(Specialdone);\r\n\t\t\tExplicitWait(Checkavailability);\r\n\t\t\t//System.out.println(\"Clicked on Special Rate plan done button \");\r\n\t\t\tlogger.info(\"Clicked on Special Rate plan done button\");\r\n\t\t\ttest.log(Status.INFO, \"Clicked on Special Rate plan done button\");\r\n\r\n\t\t} else {\r\n\t\t\t//System.out.println(\"Special Rate plan done button not found\");\r\n\t\t\tlogger.error(\"Special Rate plan done button not found\");\r\n\t\t\ttest.log(Status.FAIL, \"Special Rate plan done button not found\");\r\n\r\n\t\t}\r\n\t}",
"public void cbNext2_actionListener(ActionEvent actionEvent) throws IdeamException{\n boolean continuar = true;\n if(continuar){ \n this.save(); \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}",
"private void completeListener() {\n buttonPanel.getCompleteTask().addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n for (int i = 0;i<toDoList.toDoListLength();i++) {\n JRadioButton task = toDoButtonList.get(i);\n if (task.isSelected()&& !task.getText().equals(\"\")){\n toDoList.getTask(i).setComplete();\n }\n }\n refresh();\n }\n });\n }",
"@Override\r\n public void done() {\r\n \t\r\n \tjdp.setVisible(false);\r\n }",
"public void done() {\r\n\t Toolkit.getDefaultToolkit().beep();\r\n\t jtaResultado.append(\"Fet!\\n\");\r\n\t }",
"public StartupOptions() {\n initComponents();\n done.addActionListener(Seasonality.bi);\n\n }",
"@Override\n\tprotected void done() {\n\t\tif (isCancelled()) {\n\t\t\tSystem.out.printf(\"%s: Has been canceled\\n\", name);\n\t\t} else {\n\t\t\tSystem.out.printf(\"%s: Has finished\\n\", name);\n\t\t}\n\t}",
"private void onOK() {\n this.applySettings();\n dispose();\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 }",
"@Override\n\tpublic void QuestionDone() {\n\t\t\n\t}",
"private void confirmOptionsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_confirmOptionsActionPerformed\n outputDir = outputDirText.getText();\n outputType = outputTypeGroup.getSelection().getActionCommand();\n outputMerge = outputMergeCheck.isSelected();\n options.setVisible(false);\n }",
"public void done() \r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\t\tif (ok) {\r\n\t\t\t\t\t//resultsTabbedPanel.setEntryPointsData(entryPointsTable);\r\n\t\t\t\t\t// Actualizo la tabla de estadisticas globales\r\n\t\t\t\t\tcreateGlobalStatsTable(0); // XXX TODO\r\n\r\n\t\t\t\t\tregenStatsTree();\r\n\r\n\t\t\t\t\tvalidateTree();\r\n\r\n\r\n\t\t\t\t\ttimeRange.enable();\r\n\r\n\t\t\t\t\tif (!isCached) {\r\n\t\t\t\t\t\ttimeRange.setLimits(minTs, maxTs);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} catch (Throwable e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tCommonForms.showError(parent, \"Error showing data\", e);\r\n\t\t\t} finally {\r\n\t\t\t\tdialog.dispose();\r\n\t\t\t\tparent.setEnabled(true);\r\n\t\t\t\tmainPanel.remove(1); \r\n\t\t\t\tJScrollPane treePanelScroll = new JScrollPane();\r\n\t\t\t\tmainPanel.add(treePanelScroll);\r\n\t\t\t\tMainFrame.this.toFront();\r\n\t\t\t}\r\n\t\t}",
"public void done() {\n isDone = true;\n }",
"@Override\n\tpublic void actionPerformed(ActionEvent event) {\n\t\ttry {\n\t\t\t// System.out.println(\"Let's check the configuration\");\n\t\t\tMap<String, String> remarks = getDiscussionDAO()\n\t\t\t\t\t.checkConfiguration();\n\t\t\t// System.out.println(\"We have \" + remarks.size() +\n\t\t\t// \" configuration errors\");\n\t\t\t// for (String key : remarks.keySet())\n\t\t\t// System.out.println(\" - \" + key + \": \" + remarks.get(key));\n\n\t\t\tif (remarks.size() > 0) {\n\t\t\t\tEditPropertiesFrame epf = new EditPropertiesFrame();\n\t\t\t\tepf.setProperties(getDiscussionDAO().getConfiguration());\n\t\t\t\tepf.setRemarks(remarks);\n\t\t\t\tepf.pack();\n\t\t\t\tepf.setVisible(true);\n\t\t\t} else {\n\t\t\t\ttask = new BackGroundDAOTask(new Subtask(\n\t\t\t\t\t\tgetDiscussionTableModel(), getDiscussionDAO()) {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void perform(IDAOProgressMonitor progressMonitor)\n\t\t\t\t\t\t\tthrows DAOException {\n\t\t\t\t\t\tgetDiscussionTableModel().addDiscussions(\n\t\t\t\t\t\t\t\tgetDiscussionDAO().getMoreDiscussions(\n\t\t\t\t\t\t\t\t\t\tprogressMonitor));\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic String getName() {\n\t\t\t\t\t\treturn NAME;\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\t\t\t// task.addPropertyChangeListener(this);\n\t\t\t\ttask.execute();\n\t\t\t}\n\t\t} catch (DAOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"private void showExecutionEnd() {\n log.info(\"##############################################################\");\n log.info(\"Application created: Press Cancel to end dialog\");\n log.info(\"##############################################################\");\n }",
"protected void finishUp() {\r\n // pushOutput(table, 0);\r\n viewDone(\"Done\");\r\n }",
"void okButton_actionPerformed(ActionEvent e)\n\t{\n\t\tpropertiesEditPanel.saveChanges();\n\t\tcloseDlg();\n\t\tokPressed = true;\n }",
"@Override\n public void done() {\n \tbar.finished();\n \tbar.setCursor(null);\n }",
"@Override\n protected void complete()\n {\n // Log the result of the script execution(s)\n logScriptCompletionStatus(associations, isBad);\n\n // Enable the calling dialog's controls\n dialog.setControlsEnabled(true);\n }",
"public void finish(){\n \t\tString congrats=\"Congratulations, you won in \" + model.getNumberOfSteps()+\" steps! \";\n \t\tJFrame frame = new JFrame();\n\t\tString[] options = new String[2];\n\t\toptions[0] = new String(\"Play again\");\n\t\toptions[1] = new String(\"Quit\");\n\t\tint result= JOptionPane.showOptionDialog(frame.getContentPane(),congrats,\"Won! \", 0,JOptionPane.INFORMATION_MESSAGE,null,options,null);\n\t\tif (result == JOptionPane.NO_OPTION) {\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t\tif (result == JOptionPane.YES_OPTION) {\n\t\t\t\t\tcontroller.reset(); }\n \t}",
"public void setDone(){\n this.status = \"Done\";\n }",
"private void finishAutoSetup() {\n\t\tLog.i(TAG, \"Saving preference data.\");\n\n\t\tString xmppID = mEdtAddress.getText().toString().trim();\n\t\tString password = mEdtPassword.getText().toString().trim();\n\n\t\tmPreferences = getSharedPreferences(\n\t\t\t\t\"de.tudresden.inf.rn.mobilis.mxa_preferences\",\n\t\t\t\tContext.MODE_PRIVATE);\n\n\t\tSharedPreferences.Editor editor = mPreferences.edit();\n\n\t\teditor.putString(\"pref_host\", mServer.host);\n\t\teditor.putString(\"pref_service\", mServer.serviceName);\n\t\teditor.putString(\"pref_resource\", \"MXA\");\n\t\teditor.putString(\"pref_port\", mServer.port);\n\n\t\teditor.putString(\"pref_xmpp_user\", xmppID);\n\t\teditor.putString(\"pref_xmpp_password\", password);\n\n\t\teditor.commit();\n\n\t\t// show main activity\n\t\tIntent i = new Intent(this, SetupComplete.class);\n\t\tstartActivity(i);\n\t}",
"public void markAsDone(){\n isDone = true;\n }",
"@FXML\n private void handleExit() {\n GuiSettings guiSettings = new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(),\n (int) primaryStage.getX(), (int) primaryStage.getY());\n logic.setGuiSettings(guiSettings);\n logic.displayAllTasks();\n resultDisplay.setFeedbackToUser(\"\");\n primaryStage.hide();\n }",
"@Override\n protected void done() {\n model.displayErrorMsg(view);\n\n var tableauItems = new ArrayList<TableData>();\n\n try {\n programs = get();\n\n LocalDateTime ldt = LocalDateTime.now();\n String status = \"\";\n\n for (Program p : programs) {\n\n var id = p.getId();\n var title = p.getTitle();\n var startTime = p.getStartTime();\n var formatTime1 = timeFormatter(startTime);\n var endTime = p.getEndTime();\n var formatTime2 = timeFormatter(endTime);\n\n if (startTime.isBefore(ldt) && endTime.isAfter(ldt)) {\n\n status = \"Running\";\n }\n if (endTime.isBefore(ldt)) {\n\n status = \"Finished\";\n }\n if (startTime.isAfter(ldt)) {\n\n status = \"Upcoming\";\n }\n\n tableauItems.add(new TableData(id, title, formatTime1,\n formatTime2, status));\n\n }\n view.updateTable(tableauItems);\n view.setChannelImage(model.getChannelImg());\n\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n }\n\n lastUpdate(LocalDateTime.now());\n view.setLastUpdated(lastUpdated);\n isUpdating.set(false);\n\n }",
"void successUiUpdater();",
"protected void done() {\n logoPanel.stop();\n qtf.setCursor(normalCursor);\n searchButton.setEnabled(true);\n\n boolean isStatusOK = false;\n try {\n isStatusOK = get();\n } catch (Exception e) {\n }\n\n if (isStatusOK) {\n Thread tableFill = new Thread(msb_qtm);\n tableFill.start();\n\n try {\n tableFill.join();\n } catch (InterruptedException iex) {\n logger.warn(\"Problem joining tablefill thread\");\n }\n\n synchronized (this) {\n Thread projectFill = new Thread(\n qtf.getProjectModel());\n projectFill.start();\n try {\n projectFill.join();\n } catch (InterruptedException iex) {\n logger.warn(\"Problem joining projectfill thread\");\n }\n\n qtf.initProjectTable();\n }\n\n msb_qtm.setProjectId(\"All\");\n qtf.setColumnSizes();\n qtf.resetScrollBars();\n logoPanel.stop();\n qtf.setCursor(normalCursor);\n\n if (queryTask != null) {\n queryTask.cancel();\n }\n\n qtf.setQueryExpired(false);\n String queryTimeout = System.getProperty(\n \"queryTimeout\");\n System.out.println(\"Query expiration: \"\n + queryTimeout);\n Integer timeout = new Integer(queryTimeout);\n if (timeout != 0) {\n // Conversion from minutes of milliseconds\n int delay = timeout * 60 * 1000;\n queryTask = OMPTimer.getOMPTimer().setTimer(\n delay, infoPanel, false);\n }\n }\n }",
"private void onConfirm() {\n if (canConfirm) {\n onMoveConfirm(gridView.selectedX, gridView.selectedY);\n this.setConsoleState();\n }\n }",
"protected void markAsDone() {\n isDone = true;\n }",
"@Override\n\tpublic boolean performFinish() {\n\t\tIWizardPage[] pages = this.getPages();\n\t\tBindFlowWizardPage bindpage = (BindFlowWizardPage) pages[0];\n\t\tString flowName = bindpage.getFlowName();\n\t\tcompositeService.setFlowname(flowName);\n\t\tIWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();\n\t\tString compositeFilePath = (new StringBuilder(\"/\")).append(projectName)\n\t\t\t\t.append(BipConstantUtil.CompositePath).append(compositeService.getBaseinfo().getServiceId()).append(\".composite\").toString();\n\t\tIFile compositeFile = root.getFile(new Path(compositeFilePath));\n\t\tcompositeService.setProject(compositeFile.getProject());\n\t\tHelpUtil.writeObject(compositeService, compositeFile);\n//\t\tShell shell = PlatformUI.getWorkbench().getModalDialogShellProvider().getShell();\n\t\t//给table赋值\n\t\ttable_flow.removeAll();\n\t\tTableItem tableItem = new TableItem(table_flow, SWT.NONE);\n\t\t// 判断是否绑定流程 20160531\n\t\tString flownamePath = \"\";\n\t\t// 判断是否绑定流程\n\t\tif (flowName != null) {\n\t\t\tflownamePath = flowName.substring(0, flowName.indexOf(\".\"));\n\t\t}\n\t\ttableItem.setText(0, flownamePath);\n\t\ttableItem.setText(1, flowName);\n\t\t\n//\t\tMessageDialog.openInformation(shell, \"绑定流程\", \"绑定成功\");\n\t\t//保存流程不用再刷新菜单 20160531\n//\t\tTreeView view = (TreeView) page.findView(\"wizard.view1\");\n//\t\tif (null != view) {\n//\t\t\tview.reload();\n//\t\t}\n\t\treturn true;\n\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 public void onDonePressed() {\n loadMainActivity();\n }",
"public void actionPerformed( ActionEvent event )\n {\n if ( !getEnvironmentWindow().getEnvironment().getLock().equals(\n KalumetConsoleApplication.getApplication().getUserid() ) )\n {\n KalumetConsoleApplication.getApplication().getLogPane().addWarning(\n Messages.getString( \"environment.locked\" ), getEnvironmentWindow().getEnvironmentName() );\n return;\n }\n // check if the user can do it\n if ( !getEnvironmentWindow().adminPermission && !getEnvironmentWindow().softwareUpdatePermission )\n {\n KalumetConsoleApplication.getApplication().getLogPane().addWarning(\n Messages.getString( \"action.restricted\" ), getEnvironmentWindow().getEnvironmentName() );\n return;\n }\n // check if some change has not yet been saved\n if ( parent.getEnvironmentWindow().isUpdated() )\n {\n KalumetConsoleApplication.getApplication().getLogPane().addWarning(\n Messages.getString( \"environment.notsaved\" ), getEnvironmentWindow().getEnvironmentName() );\n return;\n }\n final String configurationFileName = event.getActionCommand();\n // display confirm window\n KalumetConsoleApplication.getApplication().getDefaultWindow().getContent().add(\n new ConfirmWindow( new ActionListener()\n {\n public void actionPerformed( ActionEvent event )\n {\n // add a message into the log pane and the journal\n KalumetConsoleApplication.getApplication().getLogPane().addInfo(\n \"Software \" + name + \" configuration file \" + configurationFileName\n + \" update in progress ...\", parent.getEnvironmentWindow().getEnvironmentName() );\n parent.getEnvironmentWindow().getChangeEvents().add(\n \"Software \" + name + \" configuration file \" + configurationFileName\n + \" update requested.\" );\n // start the update thread\n final UpdateConfigurationFileThread updateThread = new UpdateConfigurationFileThread();\n updateThread.configurationFileName = configurationFileName;\n updateThread.start();\n // sync with the client\n KalumetConsoleApplication.getApplication().enqueueTask(\n KalumetConsoleApplication.getApplication().getTaskQueue(), new Runnable()\n {\n public void run()\n {\n if ( updateThread.ended )\n {\n if ( updateThread.failure )\n {\n KalumetConsoleApplication.getApplication().getLogPane().addError(\n updateThread.message, parent.getEnvironmentWindow().getEnvironmentName() );\n parent.getEnvironmentWindow().getChangeEvents().add( updateThread.message );\n }\n else\n {\n KalumetConsoleApplication.getApplication().getLogPane().addConfirm(\n \"Software \" + name + \" configuration file \" + configurationFileName\n + \" updated.\", parent.getEnvironmentWindow().getEnvironmentName() );\n parent.getEnvironmentWindow().getChangeEvents().add(\n \"Software \" + name + \" configuration file \" + configurationFileName\n + \" updated.\" );\n }\n }\n else\n {\n KalumetConsoleApplication.getApplication().enqueueTask(\n KalumetConsoleApplication.getApplication().getTaskQueue(), this );\n }\n }\n } );\n }\n } ) );\n }",
"@Override\n public void afterShow() {\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n getCancelButton().requestFocusInWindow();\n // Enable the Send button after showing since there is nothing to stop confirmation\n // It should start disabled to avoid double click skipping the confirmation\n ViewEvents.fireWizardButtonEnabledEvent(getPanelName(), WizardButton.NEXT, true);\n\n }\n });\n\n }",
"public void onGuiClosed() {\n \tthis.options.saveAll();\n }",
"public void markAsDone() {\n isDone = true;\n }",
"public void markAsDone() {\n isDone = true;\n }",
"public void markAsDone() {\n isDone = true;\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n btnSetupCompleted = new javax.swing.JToggleButton();\n txtDummyGenerator = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n\n org.openide.awt.Mnemonics.setLocalizedText(btnSetupCompleted, org.openide.util.NbBundle.getMessage(DebugConfigurationDialog.class, \"DebugConfigurationDialog.btnSetupCompleted.text\")); // NOI18N\n btnSetupCompleted.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSetupCompletedActionPerformed(evt);\n }\n });\n\n txtDummyGenerator.setEditable(false);\n txtDummyGenerator.setText(org.openide.util.NbBundle.getMessage(DebugConfigurationDialog.class, \"DebugConfigurationDialog.txtDummyGenerator.text\")); // NOI18N\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 .addComponent(txtDummyGenerator)\n .addComponent(btnSetupCompleted, javax.swing.GroupLayout.DEFAULT_SIZE, 370, Short.MAX_VALUE))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(txtDummyGenerator, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnSetupCompleted)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }",
"private void okButtonActionPerformed() {\n\n saveConsoleText(consoleTextArea);\n\n setVisible(false);\n\n if (mainFrame == null && !isBasicUI) {\n System.exit(0);\n }\n }",
"@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t/* If the user clicks the Begin button */\n\t\tif (arg0.getActionCommand().equals(\"Begin\")){\n\n\t\t\t/* And both source/initial and target configurations are loaded */\n\t\t\tif(loaded==1){\n\n\t\t\t\t/* Enable/disable GUI components appropriately */\n\t\t\t\tstartcheck.setEnabled(false);\n\t\t\t\tstopcheck.setEnabled(true);\n\t\t\t\tclose.setEnabled(false);\n\t\t\t\tpath1.setEnabled(false);\n\t\t\t\tpath2.setEnabled(false);\n\t\t\t\tresult.setText(\"N/A\");\n\t\t\t\tautomata.setEnabled(false);\n\t\t\t\tload.setEnabled(false);\n\t\t\t\trepeat.setEnabled(false);\n\n\t\t\t\t/* Wake up the execution updater thread */\n\t\t\t\tunPause();\n\n\t\t\t\t/* Block the GUI until the updater thread has paused */\n\t\t\t\twhile(updater.getState()==Thread.State.WAITING){\n\t\t\t\t\tThread.yield();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/* If the user clicks the End button */\n\t\telse if (arg0.getActionCommand().equals(\"End\")){\n\n\t\t\t/* Set the global run variable to false, forcing\n\t\t\t * the execution thread to stop */\n\t\t\tpause();\n\n\t\t\t/* Block the GUI until the updater thread has paused */\n\t\t\twhile(updater.getState()!=Thread.State.WAITING){\n\t\t\t\tThread.yield();\n\t\t\t}\n\n\t\t\t/* Enable/disable GUI components appropriately */\n\t\t\tstopcheck.setEnabled(false);\n\t\t\tstartcheck.setEnabled(true);\n\t\t\tclose.setEnabled(true);\t\t\n\t\t\tpath1.setEnabled(true);\n\t\t\tpath2.setEnabled(true);\n\t\t\tautomata.setEnabled(true);\n\t\t\tload.setEnabled(true);\n\t\t\trepeat.setEnabled(true);\n\t\t}\n\n\t\t/* If the user clicks the Close button */\n\t\telse if (arg0.getActionCommand().equals(\"Close\")){\n\n\t\t\t/* Re-enable the main window and destroy this one */\n\t\t\tMainFrame.instance.setEnabled(true);\n\t\t\tthis.dispose();\n\t\t}\n\n\t\t/* If the user clicks the Load button */\n\t\telse if (arg0.getActionCommand().equals(\"Load\")){\n\n\t\t\t/* And if valid source and target configurations are both selected */\n\t\t\tif(path1.getSelectedIndex()!=-1 && path2.getSelectedIndex()!=-1){\n\n\t\t\t\t/* Load the two configurations into program memory */\n\t\t\t\tloadEnds(path1.getSelectedItem().toString()+\".con\",\n\t\t\t\t\t\tpath2.getSelectedItem().toString()+\".con\");\n\t\t\t\tloaded=1;\n\t\t\t\tresult.setText(\"N/A\");\n\t\t\t}\n\t\t}\n\t}",
"public void actionPerformed( ActionEvent event )\n {\n KalumetConsoleApplication.getApplication().getLogPane().addInfo(\n \"Software \" + name + \" configuration file \" + configurationFileName\n + \" update in progress ...\", parent.getEnvironmentWindow().getEnvironmentName() );\n parent.getEnvironmentWindow().getChangeEvents().add(\n \"Software \" + name + \" configuration file \" + configurationFileName\n + \" update requested.\" );\n // start the update thread\n final UpdateConfigurationFileThread updateThread = new UpdateConfigurationFileThread();\n updateThread.configurationFileName = configurationFileName;\n updateThread.start();\n // sync with the client\n KalumetConsoleApplication.getApplication().enqueueTask(\n KalumetConsoleApplication.getApplication().getTaskQueue(), new Runnable()\n {\n public void run()\n {\n if ( updateThread.ended )\n {\n if ( updateThread.failure )\n {\n KalumetConsoleApplication.getApplication().getLogPane().addError(\n updateThread.message, parent.getEnvironmentWindow().getEnvironmentName() );\n parent.getEnvironmentWindow().getChangeEvents().add( updateThread.message );\n }\n else\n {\n KalumetConsoleApplication.getApplication().getLogPane().addConfirm(\n \"Software \" + name + \" configuration file \" + configurationFileName\n + \" updated.\", parent.getEnvironmentWindow().getEnvironmentName() );\n parent.getEnvironmentWindow().getChangeEvents().add(\n \"Software \" + name + \" configuration file \" + configurationFileName\n + \" updated.\" );\n }\n }\n else\n {\n KalumetConsoleApplication.getApplication().enqueueTask(\n KalumetConsoleApplication.getApplication().getTaskQueue(), this );\n }\n }\n } );\n }",
"public void setDisplayDoneItems(ActionEvent actionEvent) {\n // we will simply loop through all of our items and\n // store the ones that are not yet done in a temporary tdlist\n // and then displayTODOs(tdlist) the result\n }",
"public void buttonShowComplete(ActionEvent actionEvent) {\n }",
"void finishSwitching();",
"@Override\n public void onSequenceFinish() {\n // Yay\n mShowingTour = false;\n mPresenter.showCaseFinished();\n }",
"@Override\n\tpublic void pause() {\n\t\tConfiguraciones.saved(juego.getFileIO());\n\t}",
"public void showComplete() {\r\n showCompleted = !showCompleted;\r\n todoListGui();\r\n }",
"private void exitQuestionDialog() {\n\t\tquestion = false;\n\t\tdialog.loadResponse();\n\t\tchangeDirBehaviour(Values.DETECT_ALL);\n\t}",
"public void done() {\n done = true;\n }",
"@Override\r\n\tpublic void done() {\n\t\tSystem.out.println(\"done\");\r\n\t}",
"public void actionPerformed( ActionEvent event )\n {\n if ( !getEnvironmentWindow().getEnvironment().getLock().equals(\n KalumetConsoleApplication.getApplication().getUserid() ) )\n {\n KalumetConsoleApplication.getApplication().getLogPane().addWarning(\n Messages.getString( \"environment.locked\" ), getEnvironmentWindow().getEnvironmentName() );\n return;\n }\n // check if the user can do it\n if ( !getEnvironmentWindow().adminPermission && !getEnvironmentWindow().softwareChangePermission )\n {\n KalumetConsoleApplication.getApplication().getLogPane().addWarning(\n Messages.getString( \"action.restricted\" ), getEnvironmentWindow().getEnvironmentName() );\n return;\n }\n // looking for the configuration file object\n final ConfigurationFile configurationFile = software.getConfigurationFile( event.getActionCommand() );\n if ( configurationFile == null )\n {\n KalumetConsoleApplication.getApplication().getLogPane().addWarning(\n Messages.getString( \"configurationfile.notfound\" ), getEnvironmentWindow().getEnvironmentName() );\n return;\n }\n // display confirm window\n KalumetConsoleApplication.getApplication().getDefaultWindow().getContent().add(\n new ConfirmWindow( new ActionListener()\n {\n public void actionPerformed( ActionEvent event )\n {\n // delete the configuration file\n software.getUpdatePlan().remove( configurationFile );\n // add an event\n parent.getEnvironmentWindow().getChangeEvents().add(\n \"Delete software \" + name + \" configuration file \" + configurationFile.getName() );\n // update the journal pane\n parent.getEnvironmentWindow().updateJournalPane();\n // update the pane\n update();\n }\n } ) );\n }",
"private void updateGUIStatus() {\r\n\r\n }",
"public void showConfigN3(ActionEvent event) {\r\n\t\tlog.info(\"-----------------------Debugging EstrucOrgController.showConfigN3-----------------------------\");\r\n\t\tlog.info(\"renderConfigN3: \"+getRenderConfigN3());\r\n\t\tif(getRenderConfigN3()==false){\r\n\t\t\tsetRenderConfigN3(true);\r\n\t\t\tsetStrBtnAgregarN3(\"Ocultar Configuración\");\r\n\t\t}else{\r\n\t\t\tsetRenderConfigN3(false);\r\n\t\t\tsetStrBtnAgregarN3(\"Agregar Configuración\");\r\n\t\t}\r\n\t}",
"public void notifyFinish() {\n setBackground(getResources().getDrawable(R.drawable.fs_gesture_finish_bg, (Resources.Theme) null));\n this.mTitleView.setVisibility(4);\n this.mSummaryView.setTranslationY(this.mSummaryView.getTranslationX() - 15.0f);\n this.mSummaryView.setText(R.string.fs_gesture_finish);\n this.mSkipView.setVisibility(8);\n }",
"public void done() {\n\t\t}",
"public void setDone(boolean value) {\n this.done = value;\n }",
"public void checkboxClickedSetDone(ActionEvent actionEvent) {\n // we will simply find the item within the group and use its setDone() method\n }",
"public void setDoneFlg_False() {\n setDoneFlgAsFlg(HangarCDef.Flg.False);\n }",
"public void onYesButtonClicked() {\n changeAfterClientPick();\n }",
"public void onButtonTouched(int index, View anchor ){\n WorkflowStepDescriptor descr = descriptors.get(index);\n descr.status_completed = true;\n FutureVisitActivity.this.showMessageDialog(index, anchor);\n }",
"void jmiOptions_actionPerformed(ActionEvent e) {\n logWriter.writeLog(\"Setting options.\");\n }",
"private void onDoneClicked() {\n Mood mood = getSelectedMood(emotionRadioGroup.getCheckedRadioButtonId());\n if (mood == null) {\n // Replace handleError with the error popup\n errorPopUp();\n return;\n }\n\n User user = requireActivity().getIntent().getParcelableExtra(\"USER_PROFILE\");\n\n if (user == null) {\n Bundle receiveBundle = this.getArguments();\n assert receiveBundle != null;\n user = receiveBundle.getParcelable(\"USER_PROFILE\");\n }\n String description = descET.getText().toString();\n SimpleDateFormat format = new SimpleDateFormat(\"MM/dd/yyyy hh:mm aa\", Locale.CANADA);\n Date date;\n\n try {\n date = format.parse(dateET.getText().toString() + \" \" +\n timeET.getText().toString());\n } catch (Exception e) {\n // Replace handleError with the error popup\n errorPopUp();\n return;\n }\n\n Integer socialCondition = getSelectedSocialCondition(socialSpinner.getSelectedItem().toString());\n\n MoodEvent moodEvent = new MoodEvent(mood.getMoodType(), user.getUid(), description, date,\n socialCondition, originalPhotoURL, location);\n if (isEdit) {\n moodEvent.setMoodId(editMoodId);\n }\n\n doneButton.setEnabled(false);\n firebaseHelper.addMoodEvent(moodEvent, moodEventImage,\n new FirebaseHelper.FirebaseCallback<Void>() {\n @Override\n public void onSuccess(Void v) {\n Toast.makeText(getContext(), \"Successfully saved event\",\n Toast.LENGTH_SHORT).show();\n closeFragment();\n }\n\n @Override\n public void onFailure(@NonNull Exception e) {\n doneButton.setEnabled(true);\n handleError(\"Failed to save event\");\n }\n });\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tuploadButton.setLabel(\"Uploading...\");\n\t\t\t\tsubmitConfiguration();\n\t\t\t\tuploadButton.setLabel(\"Upload\");\n\t\t\t}",
"public CreateProjectPanel() {\n isFinished = true;\n }",
"public void run()\r\n {\n invokeLater(new Runnable() \r\n {\r\n public void run()\r\n {\r\n _lblUser.setText(_userEdit.getText());\r\n }\r\n }); \r\n \r\n // Save at persistent store\r\n saveOptions(_userEdit.getText(), _passEdit.getText(), _freqEdit.getText());\r\n popScreen(SetupScreen.this);\r\n }",
"public void markAsDone() {\n this.done = true;\n }",
"public void completeTask() {\r\n int selected = list.getSelectedIndex();\r\n if (selected >= 0) {\r\n Task task = myTodo.getTaskByIndex(selected + 1);\r\n myTodo.getTodo().get(task.getHashKey()).setComplete(true);\r\n showCompleted = true;\r\n playSound(\"c1.wav\");\r\n }\r\n todoListGui();\r\n }",
"@Override\r\n\t\tpublic void handle(ActionEvent e) {\r\n\t\t\tTask<Void> task = new Task<Void>() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic Void call() {\r\n\t\t\t\t\t// http://stackoverflow.com/questions/10839042/what-is-the-difference-between-java-lang-void-and-void\r\n\t\t\t\t\tDL.methodBegin();\r\n\r\n\t\t\t\t\t// ||||||||||||||||||||||||||||||\r\n\t\t\t\t\t// Disable buttons and check boxes\r\n\t\t\t\t\t// ||||||||||||||||||||||||||||||\r\n\r\n\t\t\t\t\tfor (ButtonBase button : buttons) {\r\n\t\t\t\t\t\tbutton.setDisable(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttoggleChangeSettings.fireEvent(new ActionEvent());\r\n\r\n\t\t\t\t\t// TODO: Determine why TextArea (TextDAR) is not updating if\r\n\t\t\t\t\t// prefs file failure occurs too early in program launch\r\n\r\n\t\t\t\t\t// The firstRun if statement reduces likelihood of problem\r\n\t\t\t\t\t// with invisible but selectable text (a thread problem?)\r\n\t\t\t\t\tif (AttendanceReport.firstRun) {\r\n\t\t\t\t\t\tfirstRun = false;\r\n\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tThread.sleep(2003);\r\n\t\t\t\t\t\t} catch (InterruptedException ex) {\r\n\t\t\t\t\t\t\tThread.currentThread().interrupt();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Stack Trace for invisible but selectable text\r\n\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * java.lang.NullPointerException at\r\n\t\t\t\t\t\t * java.io.File.<init>(Unknown Source) at\r\n\t\t\t\t\t\t * ca.tdsb.dunbar.dailyattendancereport.SejdaSupport.\r\n\t\t\t\t\t\t * runMe(SejdaSupport.java:362) at\r\n\t\t\t\t\t\t * ca.tdsb.dunbar.dailyattendancereport.\r\n\t\t\t\t\t\t * DAR$SplitDARFcButtonListener$1.call(DAR.java:339) at\r\n\t\t\t\t\t\t * ca.tdsb.dunbar.dailyattendancereport.\r\n\t\t\t\t\t\t * DAR$SplitDARFcButtonListener$1.call(DAR.java:1) at\r\n\t\t\t\t\t\t * javafx.concurrent.Task$TaskCallable.call(Task.java:\r\n\t\t\t\t\t\t * 1423) at java.util.concurrent.FutureTask.run(Unknown\r\n\t\t\t\t\t\t * Source) at java.lang.Thread.run(Unknown Source)\r\n\t\t\t\t\t\t * java.lang.Exception: Program failure. Have all\r\n\t\t\t\t\t\t * preferences been set? at\r\n\t\t\t\t\t\t * ca.tdsb.dunbar.dailyattendancereport.SejdaSupport.\r\n\t\t\t\t\t\t * runMe(SejdaSupport.java:367) at\r\n\t\t\t\t\t\t * ca.tdsb.dunbar.dailyattendancereport.\r\n\t\t\t\t\t\t * DAR$SplitDARFcButtonListener$1.call(DAR.java:339) at\r\n\t\t\t\t\t\t * ca.tdsb.dunbar.dailyattendancereport.\r\n\t\t\t\t\t\t * DAR$SplitDARFcButtonListener$1.call(DAR.java:1) at\r\n\t\t\t\t\t\t * javafx.concurrent.Task$TaskCallable.call(Task.java:\r\n\t\t\t\t\t\t * 1423) at java.util.concurrent.FutureTask.run(Unknown\r\n\t\t\t\t\t\t * Source) at java.lang.Thread.run(Unknown Source) DAR\r\n\t\t\t\t\t\t * Splitter launched: 2016/12/29 05:44:08\r\n\t\t\t\t\t\t * C:\\Users\\ED\\AppData\\Roaming\\DAR.config iiii\r\n\t\t\t\t\t\t * round,round,round,round,round,\r\n\t\t\t\t\t\t */\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tSejdaSupport r = null;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tr = new SejdaSupport(preferences, programUpdatesFX);\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\tbtnChooseSedjaConsole.setDisable(false);\r\n\t\t\t\t\t\tif (e.getMessage() == null) {\r\n\t\t\t\t\t\t\tString msg = \"Possible problem with preferences. Please set them.\";\r\n\t\t\t\t\t\t\tprogramUpdatesFX.prependTextWithDate(msg);\r\n\t\t\t\t\t\t\tmsgBoxError(\"Preferences Problem Detected\", \"Possible problem with preferences.\", msg);\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tString msg = \"A minor problem was encountered. \" + e.getMessage();\r\n\t\t\t\t\t\t\tprogramUpdatesFX.prependTextWithDate(msg);\r\n\t\t\t\t\t\t\tmsgBoxError(\"Error\", \"A minor problem was encountered.\", msg);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttoggleChangeSettings.setSelected(true);\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (r != null)\r\n\t\t\t\t\t\tr.runMe(programUpdatesFX);\r\n\r\n\t\t\t\t\t// ||||||||||||||||||||||||||||||\r\n\t\t\t\t\t// Enable buttons and check boxes\r\n\t\t\t\t\t// ||||||||||||||||||||||||||||||\r\n\r\n\t\t\t\t\tfor (ButtonBase button : buttons) {\r\n\t\t\t\t\t\tbutton.setDisable(false);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\ttoggleChangeSettings.fireEvent(new ActionEvent());\r\n\r\n\t\t\t\t\tDL.methodEnd();\r\n\t\t\t\t\t// could 'return null' be the cause of status update/thread\r\n\t\t\t\t\t// headaches?\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\t// TODO How often does a new listener get added? How many listeners\r\n\t\t\t// are there after a while? Move elsewhere to prevent being called\r\n\t\t\t// multiple times? Is it even a problem?\r\n\t\t\ttask.messageProperty()\r\n\t\t\t\t\t.addListener((obs, oldMessage, newMessage) -> programUpdatesFX.prependTextWithDate(newMessage));\r\n\t\t\tnew Thread(task).start();\r\n\t\t}",
"public void done() {\n \t\t\t\t\t\t}",
"public void markAsDone() {\n this.isDone = true;\n this.completed = \"1\";\n }",
"@Override\n public void actionPerformed(ActionEvent e)\n {\n String cmd = e.getActionCommand();\n if (cmd.equals(\"ok\"))\n {\n // communicate this info back to getdown\n if (_checkBox.isSelected())\n {\n _getdown.configureProxy(_host.getText(), _port.getText(), _username.getText(),\n _password.getPassword());\n }\n else\n {\n _getdown.configureProxy(_host.getText(), _port.getText());\n }\n }\n else\n {\n // they canceled, we're outta here\n System.exit(0);\n }\n }",
"public void done(Integer percentDone) {\n if (percentDone == 100) {\n mApp.updateDialogProgress(percentDone, \"Finishing..\");\n } else {\n mApp.updateDialogProgress(percentDone, \"Uploading: \" + percentDone + \"%\");\n }\n }",
"public void clickCalendarDone() {\n\t\tcalendarDoneButton.click();\n\t}",
"public void actionPerformed(ActionEvent e) {\n\t\toptionPane.setValue(okString);\n\t}",
"@FXML public void handleOk() {\n\t\tSystem.out.println(\"OK clicked!\");\n\t\t\n\t\tif (checkParameters().equals(ErrorCode.BatchSize)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Batch Size]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.ConfidenceFactor)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Confidence Factor]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.MinNumObj)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Min Num Obj]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.NumDecimalPlaces)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Num Decimal Places]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.NumFolds)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Num Folds]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.Seed)) {\n\t\t\tAlertBox.display(\"Error\", \"Please make sure to set valid values for the parameters [Seed]\", \"OK\");\n\t\t} else if (checkParameters().equals(ErrorCode.Fine)) {\n\t\t\tsaveParameters();\n\t\t\tClassifiersWindowsManager.stage.close();\n\t\t}\n\t}",
"public void formProcessingComplete()\r\n {\r\n return;\r\n }"
]
| [
"0.6676375",
"0.66543686",
"0.6614858",
"0.65229744",
"0.644175",
"0.6435673",
"0.63028514",
"0.62150407",
"0.62103325",
"0.6190413",
"0.6147778",
"0.6120455",
"0.6109483",
"0.60875416",
"0.6074183",
"0.60672015",
"0.6066161",
"0.6045936",
"0.603133",
"0.6027839",
"0.6015295",
"0.5946486",
"0.5903091",
"0.58988047",
"0.58864677",
"0.58777297",
"0.5877103",
"0.5869406",
"0.5847709",
"0.58403957",
"0.5837586",
"0.58362925",
"0.58312005",
"0.58241135",
"0.58222914",
"0.5819099",
"0.57998645",
"0.5789105",
"0.578831",
"0.5783256",
"0.577956",
"0.5779197",
"0.577918",
"0.577337",
"0.57716703",
"0.57688713",
"0.5768559",
"0.57598835",
"0.5759823",
"0.5753253",
"0.5750609",
"0.5732351",
"0.57223344",
"0.5721643",
"0.57172173",
"0.5716932",
"0.57141757",
"0.57087857",
"0.57080024",
"0.57068187",
"0.57068187",
"0.57068187",
"0.5700865",
"0.5700109",
"0.56882805",
"0.5667304",
"0.56625843",
"0.56614226",
"0.56612873",
"0.5660527",
"0.56575435",
"0.56539917",
"0.5650246",
"0.5649909",
"0.56461257",
"0.5629584",
"0.5622274",
"0.5620215",
"0.56201583",
"0.5619211",
"0.56186914",
"0.56170213",
"0.5614837",
"0.5610858",
"0.5609803",
"0.56087804",
"0.56079984",
"0.5607581",
"0.5605128",
"0.56050414",
"0.5600545",
"0.55954784",
"0.5595278",
"0.55942017",
"0.5592557",
"0.55921364",
"0.5578743",
"0.5576169",
"0.55739516",
"0.55679667",
"0.5561427"
]
| 0.0 | -1 |
put you absolute path to the images here | public static void main(String[] args){
String alexisPath = "/Users/alexis/ImageORC/ImageORC/images";
String raphaelPath = "/Users/raphael/Documents/DUT-Info/S4/S4_Image/projet/ImageORC/images";
String pathDefault = alexisPath;
if (args.length > 0 && args[0].equals("1")){
pathDefault = raphaelPath;
}
OCREngine ocrEngine = new OCREngine(pathDefault);
try {
ocrEngine.makeDecisionOnImageList();
ocrEngine.logOCR("out/test.txt");
} catch (IOException e) {
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void loadImages(){\n try{\n System.out.println(System.getProperty(\"user.dir\"));\n\n t1img = read(new File(\"resources/tank1.png\"));\n t2img = read(new File(\"resources/tank1.png\"));\n backgroundImg = read(new File(\"resources/background.jpg\"));\n wall1 = read(new File(\"resources/Wall1.gif\"));\n wall2 = read(new File(\"resources/Wall2.gif\"));\n heart = resize(read(new File(\"resources/Hearts/basic/heart.png\")), 35,35);\n heart2 = resize(read( new File(\"resources/Hearts/basic/heart.png\")), 25,25);\n bullet1 = read(new File(\"resources/bullet1.png\"));\n bullet2 = read(new File(\"resources/bullet2.png\"));\n\n }\n catch(IOException e){\n System.out.println(e.getMessage());\n }\n }",
"private static void displayImagesDir(){\n System.out.println(IMAGES_DIR);\n }",
"public void loadImages() {\n\t\tpigsty = new ImageIcon(\"images/property/pigsty.png\");\n\t}",
"public static void loadImages() {\n PonySprite.loadImages(imgKey, \"graphics/ponies/GrannySmith.png\");\n }",
"public static String getImageResoucesPath() {\n\t\t//return \"d:\\\\PBC\\\\GitHub\\\\Theia\\\\portal\\\\WebContent\\\\images\";\n\t\treturn \"/Users/anaswhb/Documents/Eclipse/Workspace/portal/WebContent/images\";\n\t\t\n\t}",
"public void loadImages() {\n\t\tcowLeft1 = new ImageIcon(\"images/animal/cow1left.png\");\n\t\tcowLeft2 = new ImageIcon(\"images/animal/cow2left.png\");\n\t\tcowLeft3 = new ImageIcon(\"images/animal/cow1left.png\");\n\t\tcowRight1 = new ImageIcon(\"images/animal/cow1right.png\");\n\t\tcowRight2 = new ImageIcon(\"images/animal/cow2right.png\");\n\t\tcowRight3 = new ImageIcon(\"images/animal/cow1right.png\");\n\t}",
"String getImagePath();",
"String getImagePath();",
"abstract public void setImageResourcesDir(String path);",
"public void getImagePath(String imagePath);",
"java.lang.String getImagePath();",
"@Override\n\tpublic void loadImages() {\n\t\tsuper.setImage((new ImageIcon(\"pacpix/QuestionCandy.png\")).getImage());\t\n\t}",
"private void importImages() {\n\n\t\t// Create array of the images. Each image pixel map contains\n\t\t// multiple images of the animate at different time steps\n\n\t\t// Eclipse will look for <path/to/project>/bin/<relative path specified>\n\t\tString img_file_base = \"Game_Sprites/\";\n\t\tString ext = \".png\";\n\n\t\t// Load background\n\t\tbackground = createImage(img_file_base + \"Underwater\" + ext);\n\t}",
"public void getPictures(){\n\t\t\ttry{\n\t\t\t\timg = ImageIO.read(new File(\"background.jpg\"));\n\t\t\t\ttank = ImageIO.read(new File(\"Tank.png\"));\n\t\t\t\tbackground2 = ImageIO.read(new File(\"background2.png\"));\n\t\t\t\t\n\t\t\t\trtank = ImageIO.read(new File(\"RTank.png\"));\n\t\t\t\tboom = ImageIO.read(new File(\"Boom.png\"));\n\t\t\t\tboom2 = ImageIO.read(new File(\"Boom2.png\"));\n\t\t\t\tinstructions = ImageIO.read(new File(\"Instructions.png\"));\n\t\t\t\tshotman = ImageIO.read(new File(\"ShotMan.png\"));\n\t\t\t\tlshotman = ImageIO.read(newFile(\"LShotMan.png\"));\n\t\t\t\tboomshotman = ImageIO.read(new File(\"AfterShotMan\"));\n\t\t\t\tlboomshotman = ImageIO.read(new File(\"LAfterShotMan\"));\n\t\t\t\t\n\t\t\t}catch(IOException e){\n\t\t\t\tSystem.err.println(\"d\");\n\t\t\t}\n\t\t}",
"public void createImages(){\r\n\t\ttry {\r\n\t\t\timg_bg = Image.createImage(GAME_BG);\r\n\t\t\timg_backBtn = Image.createImage(BACK_BTN);\r\n\t\t\timg_muteBtn = Image.createImage(MUTE_BTN);\r\n\t\t\timg_resetBtn = Image.createImage(RESET_BTN);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"private void addImgList() {\n\t\tdogImg.add(\"./data/img/labrador.jpg\");\t\t\t\t\n\t\tdogImg.add(\"./data/img/germanshepherd.jpg\");\t\n\t\tdogImg.add(\"./data/img/bulldog.jpg\");\t\t\t\t\t\t\t\t\n\t\tdogImg.add(\"./data/img/rottweiler.jpg\");\n\t\tdogImg.add(\"./data/img/husky.jpg\");\n\n\t}",
"private void loadImages() {\n\t\ttry {\n\t\t\timage = ImageIO.read(Pillar.class.getResource(\"/Items/Pillar.png\"));\n\t\t\tscaledImage = image;\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Failed to read Pillar image file: \" + e.getMessage());\n\t\t}\n\t}",
"abstract public String getImageResourcesDir();",
"private Images() {\n \n imgView = new ImageIcon(this,\"images/View\");\n\n imgUndo = new ImageIcon(this,\"images/Undo\");\n imgRedo = new ImageIcon(this,\"images/Redo\");\n \n imgCut = new ImageIcon(this,\"images/Cut\");\n imgCopy = new ImageIcon(this,\"images/Copy\");\n imgPaste = new ImageIcon(this,\"images/Paste\");\n \n imgAdd = new ImageIcon(this,\"images/Add\");\n \n imgNew = new ImageIcon(this,\"images/New\");\n imgDel = new ImageIcon(this,\"images/Delete\");\n \n imgShare = new ImageIcon(this,\"images/Share\");\n }",
"private void initImages() throws SlickException {\n\t\t// laser images\n\t\tlaserbeamimageN = new Image(\"resources/images_Gameplay/laserBeam_Norm.png\");\n\t\tlaserbeamimageA = new Image(\"resources/images_Gameplay/laserBeam_Add.png\");\n\t\tlasertipimageN = new Image(\"resources/images_Gameplay/laserTip_Norm.png\");\n\t\tlasertipimageA = new Image(\"resources/images_Gameplay/laserTip_Add.png\");\n\t}",
"private void drawImages() {\n\t\t\r\n\t}",
"public void initializeImages() {\n\n File dir = new File(\"Images\");\n if (!dir.exists()) {\n boolean success = dir.mkdir();\n System.out.println(\"Images directory created!\");\n }\n }",
"public void setStaticPicture(String path);",
"@Override\n public String getImagePath() {\n return IMAGE_PATH;\n }",
"public void setStartingImages() {\n\t\t\n\t}",
"public String getDefaultImgSrc(){return \"/students/footballstudentdefault.png\";}",
"void setImagePath(String path);",
"private RoundImage img(String imgAddress) {\n return new RoundImage(\"frontend/src/images/books.png\",\"64px\",\"64px\");\n }",
"private void createImageFiles() {\n\t\tswitchIconClosed = Icon.createImageIcon(\"/images/events/switchImageClosed.png\");\n\t\tswitchIconOpen = Icon.createImageIcon(\"/images/events/switchImageOpen.png\");\n\t\tswitchIconEmpty = Icon.createImageIcon(\"/images/events/switchImageEmpty.png\");\n\t\tswitchIconOff = Icon.createImageIcon(\"/images/events/switchImageOff.png\");\n\t\tswitchIconOn = Icon.createImageIcon(\"/images/events/switchImageOn.png\");\n\t\tleverIconClean = Icon.createImageIcon(\"/images/events/leverImageClean.png\");\n\t\tleverIconRusty = Icon.createImageIcon(\"/images/events/leverImageRusty.png\");\n\t\tleverIconOn = Icon.createImageIcon(\"/images/events/leverImageOn.png\");\n\t}",
"public String[] getImagePaths() {\n return new String[]{\"/RpgIcons/fire.png\",\n \"/RpgIcons/water.png\",\n \"/RpgIcons/wind.png\",\n \"/RpgIcons/earth.png\",\n \"/RpgIcons/light.png\",\n \"/RpgIcons/dark.png\",\n \"/RpgIcons/lightning.png\"};\n }",
"java.lang.String getImage();",
"public void setImages(String images) {\n\t\tthis.images = images;\n\t}",
"public static void loadFruitPic() {\n //images are from the public domain website: https://www.clipartmax.com/\n Toolkit toolkit = Toolkit.getDefaultToolkit();\n Banana.fruitPic = toolkit.getImage(\"Images/banana.png\");\n Banana.fruitSlice = toolkit.getImage(\"Images/bananaSlice.png\");\n }",
"private Images() {}",
"String getImage();",
"public void createImageSet() {\n\t\t\n\t\t\n\t\tString image_folder = getLevelImagePatternFolder();\n \n String resource = \"0.png\";\n ImageIcon ii = new ImageIcon(this.getClass().getResource(image_folder + resource));\n images.put(\"navigable\", ii.getImage());\n\n\t}",
"public interface Images extends ClientBundle {\n\n\t\t@Source(\"gr/grnet/pithos/resources/mimetypes/document.png\")\n\t\tImageResource fileContextMenu();\n\n\t\t@Source(\"gr/grnet/pithos/resources/doc_versions.png\")\n\t\tImageResource versions();\n\n\t\t@Source(\"gr/grnet/pithos/resources/groups22.png\")\n\t\tImageResource sharing();\n\n\t\t@Source(\"gr/grnet/pithos/resources/border_remove.png\")\n\t\tImageResource unselectAll();\n\n\t\t@Source(\"gr/grnet/pithos/resources/demo.png\")\n\t\tImageResource viewImage();\n\n @Source(\"gr/grnet/pithos/resources/folder_new.png\")\n ImageResource folderNew();\n\n @Source(\"gr/grnet/pithos/resources/folder_outbox.png\")\n ImageResource fileUpdate();\n\n @Source(\"gr/grnet/pithos/resources/view_text.png\")\n ImageResource viewText();\n\n @Source(\"gr/grnet/pithos/resources/folder_inbox.png\")\n ImageResource download();\n\n @Source(\"gr/grnet/pithos/resources/trash.png\")\n ImageResource emptyTrash();\n\n @Source(\"gr/grnet/pithos/resources/refresh.png\")\n ImageResource refresh();\n\n /**\n * Will bundle the file 'editcut.png' residing in the package\n * 'gr.grnet.pithos.web.resources'.\n *\n * @return the image prototype\n */\n @Source(\"gr/grnet/pithos/resources/editcut.png\")\n ImageResource cut();\n\n /**\n * Will bundle the file 'editcopy.png' residing in the package\n * 'gr.grnet.pithos.web.resources'.\n *\n * @return the image prototype\n */\n @Source(\"gr/grnet/pithos/resources/editcopy.png\")\n ImageResource copy();\n\n /**\n * Will bundle the file 'editpaste.png' residing in the package\n * 'gr.grnet.pithos.web.resources'.\n *\n * @return the image prototype\n */\n @Source(\"gr/grnet/pithos/resources/editpaste.png\")\n ImageResource paste();\n\n /**\n * Will bundle the file 'editdelete.png' residing in the package\n * 'gr.grnet.pithos.web.resources'.\n *\n * @return the image prototype\n */\n @Source(\"gr/grnet/pithos/resources/editdelete.png\")\n ImageResource delete();\n\n /**\n * Will bundle the file 'translate.png' residing in the package\n * 'gr.grnet.pithos.web.resources'.\n *\n * @return the image prototype\n */\n @Source(\"gr/grnet/pithos/resources/translate.png\")\n ImageResource selectAll();\n \n @Source(\"gr/grnet/pithos/resources/internet.png\")\n ImageResource internet();\n }",
"private void loadImages(BufferedImage[] images, String direction) {\n for (int i = 0; i < images.length; i++) {\n String fileName = direction + (i + 1);\n images[i] = GameManager.getResources().getMonsterImages().get(\n fileName);\n }\n\n }",
"protected abstract void setupImages(Context context);",
"static String getImage() {\n int rand = (int) (Math.random() * 13);\n return \"file:src/images/spaceships/\" + rand + \".png\";\n }",
"private void loadImages() {\n Glide\n .with(Activity_Game.this)\n .load(R.drawable.game_alien_img)\n .into(game_IMAGE_p1);\n\n Glide\n .with(Activity_Game.this)\n .load(R.drawable.game_predator_img)\n .into(game_IMAGE_p2);\n }",
"abstract public String imageUrl ();",
"private void setImage() {\r\n\t\ttry{\r\n\r\n\t\t\twinMessage = ImageIO.read(new File(\"obstacles/win.gif\"));\r\n\t\t\tcoin = ImageIO.read(new File(\"obstacles/Coin.gif\"));\r\n\t\t\toverMessage = ImageIO.read(new File(\"obstacles/over.gif\"));\r\n\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tSystem.err.println(\"Image file not found\");\r\n\t\t}\r\n\r\n\t}",
"public String getImage() {\n\t\tString ans=\"Data/NF.png\";\n\t\tif(image!=null)\n\t\t\tans=\"Data/Users/Pics/\"+image;\n\t\treturn ans;\n\t}",
"private void setIcon(){\r\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"images.png\")));\r\n }",
"@Override\n\tpublic void readImages() {\n\t\t\n\t}",
"public static String getOrderImagesPath() {\n\t\treturn \"/home/ftpshared/OrderImages\";\n\t}",
"public void findImages() {\n \t\tthis.mNoteItemModel.findImages(this.mNoteItemModel.getContent());\n \t}",
"protected void setPic() {\n }",
"public void findImages() {\n URL imgURL = ImageLoader.class.getResource(\"/BackgroundMenu.jpg\");\n this.backgroundImages.put(MenuP.TITLE, loadImage(imgURL));\n\n imgURL = ImageLoader.class.getResource(\"/backgroundGame.png\");\n this.backgroundImages.put(ArenaView.TITLE, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/gameOver.jpg\");\n this.backgroundImages.put(GameOverView.TITLE, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/Player.png\");\n this.entityImages.put(ID.PLAYER, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/Enemy1.png\");\n this.entityImages.put(ID.BASIC_ENEMY, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/boss.png\");\n this.entityImages.put(ID.BOSS_ENEMY, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/meteorBrown_big1.png\");\n this.entityImages.put(ID.METEOR, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/BlueBullet.png\");\n this.bulletImages.put(new Pair<>(ID.PLAYER_BULLET, ID.PLAYER), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/redBullet.png\");\n this.entityImages.put(ID.ENEMY_BULLET, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/powerup_FireBoost.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.FIRE_BOOST), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/powerup_Freeze.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.FREEZE), loadImage(imgURL)); \n \n imgURL = ImageLoader.class.getResource(\"/powerup_Health.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.HEALTH), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/powerup_Shield.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.SHIELD), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/bulletSpeedUp.png\");\n this.AnimationsPowerUp.put(new Pair<>(ID.POWER_UP, PowerUpT.FIRE_BOOST), loadEffect(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/Explosion.png\");\n this.AnimationsEffect.put(new Pair<>(ID.EFFECT, SpecialEffectT.EXPLOSION), loadEffect(imgURL));\n\n imgURL = ImageLoader.class.getResource(\"/freeze.png\");\n this.AnimationsPowerUp.put(new Pair<>(ID.POWER_UP, PowerUpT.FREEZE), loadImage(imgURL));\n }",
"private static String getImagePath(int size) {\n return \"images/umbrella\" + size + \".png\";\n }",
"public String getImgpath() {\r\n return imgpath;\r\n }",
"@Override\n\tpublic String getImagesUrl() {\n\t\treturn SERVER;\n\t}",
"public void setImageView() {\n \timage = new Image(\"/Model/boss3.png\", true);\n \tboss = new ImageView(image); \n }",
"public String getImageUrl();",
"private void imageInitiation() {\n ImageIcon doggyImage = new ImageIcon(\"./data/dog1.jpg\");\n JLabel dogImage = new JLabel(doggyImage);\n dogImage.setSize(700,500);\n this.add(dogImage);\n }",
"public void setImage(String ref){\n\t ImageIcon ii = new ImageIcon(this.getClass().getResource(ref));\n\t image = ii.getImage();\n\t}",
"private void iconImage() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"icon.jpg\")));\n }",
"public String getImgPath() {\n return imgPath;\n }",
"public void setImagePath(String n) {\n\t\tmPath = n;\n\t}",
"public void setImage( String s )\r\n {\r\n java.net.URL url = getClass().getResource( s );\r\n if ( url == null )\r\n {\r\n url = getClass().getResource( \"/\" + s );\r\n if ( url == null )\r\n {\r\n try\r\n { // for applications\r\n content = ImageIO.read( new File( s ) );\r\n }\r\n catch ( IOException ioe )\r\n {\r\n ioe.printStackTrace();\r\n }\r\n }\r\n else\r\n {\r\n content = getToolkit().getImage( url );\r\n }\r\n }\r\n else\r\n {\r\n content = getToolkit().getImage( url );\r\n }\r\n flush();\r\n\r\n }",
"private void loadImages() {\n\t\ttry {\n\t\t\tall_images = new Bitmap[img_files.length];\n\t\t\tfor (int i = 0; i < all_images.length; i++) {\n\t\t\t\tall_images[i] = loadImage(img_files[i] + \".jpg\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tToast.makeText(this, \"Unable to load images\", Toast.LENGTH_LONG)\n\t\t\t\t\t.show();\n\t\t\tfinish();\n\t\t}\n\t}",
"public void populateImages() {\n\t\t// Check if the recipe has any images saved on the sd card and get\n\t\t// the bitmap for the imagebutton\n\n\t\tArrayList<Image> images = ImageController.getAllRecipeImages(\n\t\t\t\tcurrentRecipe.getRecipeId(), currentRecipe.location);\n\n\t\tLog.w(\"*****\", \"outside\");\n\t\tLog.w(\"*****\", String.valueOf(currentRecipe.getRecipeId()));\n\t\tLog.w(\"*****\", String.valueOf(currentRecipe.location));\n\t\tImageButton pictureButton = (ImageButton) findViewById(R.id.ibRecipe);\n\n\t\t// Set the image of the imagebutton to the first image in the folder\n\t\tif (images.size() > 0) {\n\t\t\tpictureButton.setImageBitmap(images.get(0).getBitmap());\n\t\t}\n\n\t}",
"public void setImg() {\n\t\tif (custom) {\n\t\t\tImage img1;\n\t\t\ttry {\n\t\t\t\timg1 = new Image(new FileInputStream(\"tmpImg.png\"));\n\t\t\t\tmainAvatar.setImage(img1); // Sets main user avatar as the custom image\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public void setImage(String path) {\n\t\timageIcon = new ImageIcon(Helper.getFileURL(path));\n\t}",
"void setImageLocation(URL imageLocation) throws IOException;",
"public static List<InputStream> getAllImages(){\n\t\treturn IOHandler.getResourcesIn(IMAGES_DIR);\n\t}",
"private ArrayList<String> getImagesPathList() {\n String MEDIA_IMAGES_PATH = \"CuraContents/images\";\n File fileImages = new File(Environment.getExternalStorageDirectory(), MEDIA_IMAGES_PATH);\n if (fileImages.isDirectory()) {\n File[] listImagesFile = fileImages.listFiles();\n ArrayList<String> imageFilesPathList = new ArrayList<>();\n for (File file1 : listImagesFile) {\n imageFilesPathList.add(file1.getAbsolutePath());\n }\n return imageFilesPathList;\n }\n return null;\n }",
"@PostConstruct\n public void onStart() {\n final String path = \"/images/\";\n try {\n final Path path_of_resource = getPathOfResource(path);\n saveImagesFolder(path_of_resource);\n } catch (final IOException e1) {\n e1.printStackTrace();\n }\n }",
"private void initImages() {\n mImageView1WA = findViewById(R.id.comment_OWA);\n mImageView6DA = findViewById(R.id.comment_btn_6DA);\n mImageView5DA = findViewById(R.id.comment_btn_5DA);\n mImageView4DA = findViewById(R.id.comment_btn_4DA);\n mImageView3DA = findViewById(R.id.comment_btn_3DA);\n mImageView2DA = findViewById(R.id.comment_btn_2DA);\n mImageViewY = findViewById(R.id.comment_btn_1DA);\n\n imageList.add(mImageViewY);\n imageList.add(mImageView2DA);\n imageList.add(mImageView3DA);\n imageList.add(mImageView4DA);\n imageList.add(mImageView5DA);\n imageList.add(mImageView6DA);\n imageList.add(mImageView1WA);\n\n }",
"public static void loadImages(){\n\t\tsetPath(main.getShop().inventory.getEquipID());\n\t\ttry {\n\t\t\tbackground = ImageIO.read(new File(\"res/world/bg.png\"));\n\t\t\tterrain = ImageIO.read(new File(\"res/world/solids.png\"));\n\t\t\t// Character and Armour\n\t\t\tcharacters = ImageIO.read(new File(\"res/world/char3.png\"));\n\t\t\tcharactersHead =ImageIO.read(new File(\"res/world/charhead\"+path[0]+\".png\"));\n\t\t\tcharactersTop = ImageIO.read(new File(\"res/world/chartop\"+path[2]+\".png\"));\n\t\t\tcharactersShoulder = ImageIO.read(new File(\"res/world/charshoulders\"+path[3]+\".png\"));\n\t\t\tcharactersHand = ImageIO.read(new File(\"res/world/charhands\"+path[5]+\".png\"));\n\t\t\tcharactersBottom = ImageIO.read(new File(\"res/world/charbottom\"+path[8]+\".png\"));\n\t\t\tcharactersShoes = ImageIO.read(new File(\"res/world/charshoes\"+path[9]+\".png\"));\n\t\t\tcharactersBelt = ImageIO.read(new File(\"res/world/charBelt\"+path[4]+\".png\"));\n\n\t\t\tweaponBow = ImageIO.read(new File(\"res/world/bow.png\"));\n\t\t\tweaponArrow = ImageIO.read(new File(\"res/world/arrow.png\"));\n\t\t\tweaponSword = ImageIO.read(new File(\"res/world/sword.png\"));\n\t\t\titems = ImageIO.read(new File(\"res/world/items.png\"));\n\t\t\tnpc = ImageIO.read(new File(\"res/world/npc.png\"));\n\t\t\thealth = ImageIO.read(new File(\"res/world/health.png\"));\n\t\t\tenemies = ImageIO.read(new File(\"res/world/enemies.png\"));\n\t\t\tcoin = ImageIO.read(new File(\"res/world/coin.png\"));\n\t\t\tmana = ImageIO.read(new File(\"res/world/mana.gif\"));\n\t\t\tarrowP = ImageIO.read(new File(\"res/world/arrowP.png\"));\n\t\t\tbutton = ImageIO.read(new File(\"res/world/button.png\"));\n\t\t\tblood = ImageIO.read(new File(\"res/world/blood.png\"));\n\t\t\tarrowDisp = ImageIO.read(new File(\"res/world/arrowDisp.png\"));\n\t\t\tboss1 = ImageIO.read(new File(\"res/world/boss1.png\"));\n\t\t\tmagic = ImageIO.read(new File(\"res/world/magic.png\"));\n\t\t\tmainMenu = ImageIO.read(new File(\"res/world/MainMenu.png\"));\n\t\t\tinstructions = ImageIO.read(new File(\"res/world/instructions.png\"));\n\t\t\trespawn = ImageIO.read(new File(\"res/world/respawn.png\"));\n\t\t\tinventory = ImageIO.read(new File(\"res/world/inventory.png\"));\n shop = ImageIO.read(new File(\"res/world/shop.png\"));\n dizzy = ImageIO.read(new File(\"res/world/dizzy.png\"));\n pet = ImageIO.read(new File(\"res/world/pet.png\"));\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error Loading Images\");\n\t\t}\n\t}",
"public String getImg(){\n switch(image){\n case 0: // Case 0: Ant looks up/north\n return \"imgs/ant_n.png\";\n case 1: // Case 1: Ant looks right/east\n return \"imgs/ant_e.png\";\n case 2: // Case 2: Ant looks down/south\n return \"imgs/ant_s.png\";\n case 3: // Case 3: Ant looks left/west\n return \"imgs/ant_w.png\";\n default: // Default: This shouldn't happen on a normal run. It returns an empty string and prints an error.\n System.err.println(\"Something went wrong while the ant was trying change direction\");\n return \"\";\n }\n }",
"public void openImage() {\n InputStream f = Controller.class.getResourceAsStream(\"route.png\");\n img = new Image(f, mapImage.getFitWidth(), mapImage.getFitHeight(), false, true);\n h = (int) img.getHeight();\n w = (int) img.getWidth();\n pathNodes = new GraphNodeAL[h * w];\n mapImage.setImage(img);\n //makeGrayscale();\n }",
"public void defaultImageDisplay(){\n ClassLoader cl = this.getClass().getClassLoader();\n ImageIcon icon = new ImageIcon(cl.getResource(\"pictures/NewInventory/defaultPic.png\"));\n // this.finalImage = icon.getImage();\n Image img = icon.getImage().getScaledInstance(entryImage.getWidth(), entryImage.getHeight(), Image.SCALE_SMOOTH);\n entryImage.setIcon(new ImageIcon(img));\n }",
"@Override\r\n\tpublic void setImagePath(String path) {\r\n\t\tsuper.setImagePath(path);\t\r\n\t\tparams.put(\"tnznetgraph\", path+nng.getImgName());\t\r\n\t}",
"public static void createImages()\n {\n //Do if not done before\n if(!createdImages)\n {\n createdImages = true;\n for(int i=0; i<rightMvt.length; i++)\n {\n rightMvt[i] = new GreenfootImage(\"sniperEnemyRight\"+i+\".png\");\n leftMvt[i] = new GreenfootImage(\"sniperEnemyRight\"+i+\".png\");\n rightMvt[i].scale(rightMvt[i].getWidth()*170/100, rightMvt[i].getHeight()*170/100);\n leftMvt[i].scale(leftMvt[i].getWidth()*170/100, leftMvt[i].getHeight()*170/100);\n }\n for(int i=0; i<leftMvt.length; i++)\n {\n leftMvt[i].mirrorHorizontally();\n }\n for(int i=0; i<upMvt.length; i++)\n {\n upMvt[i] = new GreenfootImage(\"sniperEnemyUp\"+i+\".png\");\n downMvt[i] = new GreenfootImage(\"sniperEnemyDown\"+i+\".png\");\n upMvt[i].scale(upMvt[i].getWidth()*170/100, upMvt[i].getHeight()*170/100);\n downMvt[i].scale(downMvt[i].getWidth()*170/100, downMvt[i].getHeight()*170/100);\n }\n }\n }",
"private void setImageDynamic(){\n questionsClass.setQuestions(currentQuestionIndex);\n String movieName = questionsClass.getPhotoName();\n ImageView ReferenceToMovieImage = findViewById(R.id.Movie);\n int imageResource = getResources().getIdentifier(movieName, null, getPackageName());\n Drawable img = getResources().getDrawable(imageResource);\n ReferenceToMovieImage.setImageDrawable(img);\n }",
"private void galleryAddPic() {\n\t}",
"private static void loadImagesInDirectory(String dir){\n\t\tFile file = new File(Files.localize(\"images\\\\\"+dir));\n\t\tassert file.isDirectory();\n\t\n\t\tFile[] files = file.listFiles();\n\t\tfor(File f : files){\n\t\t\tif(isImageFile(f)){\n\t\t\t\tString name = dir+\"\\\\\"+f.getName();\n\t\t\t\tint i = name.lastIndexOf('.');\n\t\t\t\tassert i != -1;\n\t\t\t\tname = name.substring(0, i).replaceAll(\"\\\\\\\\\", \"/\");\n\t\t\t\t//Image image = load(f,true);\n\t\t\t\tImageIcon image;\n\t\t\t\tFile f2 = new File(f.getAbsolutePath()+\".anim\");\n\t\t\t\tif(f2.exists()){\n\t\t\t\t\timage = evaluateAnimFile(dir,f2,load(f,true));\n\t\t\t\t}else{\n\t\t\t\t\timage = new ImageIcon(f.getAbsolutePath());\n\t\t\t\t}\n\t\t\t\tdebug(\"Loaded image \"+name+\" as \"+f.getAbsolutePath());\n\t\t\t\timages.put(name, image);\n\t\t\t}else if(f.isDirectory()){\n\t\t\t\tloadImagesInDirectory(dir+\"\\\\\"+f.getName());\n\t\t\t}\n\t\t}\n\t}",
"private Uri getPicOutputUri(){\n String filePath = getExternalFilesDir(Environment.DIRECTORY_PICTURES) + File.separator + String.valueOf(System.currentTimeMillis())+\".jpg\";\n return Uri.fromFile(new File(filePath));\n }",
"public void setMediumImg(String path){\n Picasso.with(context).load(MEIDUM+path).into(imageView);\n }",
"public String getImgPath() {\n\t\treturn this.imgPath;\n\t}",
"public String getImageResource() {\n \t\t// if (isWindows)\n \t\t// return \"/\" + new File(imageResource).getPath();\n \t\t// else\n \t\treturn imageResource;\n \t}",
"public String getImagePath() {\n return thumbnail.path + \".\" + thumbnail.extension;\n }",
"@Override\n\tpublic String getResource() {\n\t\ttry {\n\t\t\treturn (new File(\"./resources/images/mageTowerCard.png\")).getCanonicalPath();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\treturn \"\";\n\t\t}\n\t}",
"public static void loadImages()\n \t{\n \t\tSystem.out.print(\"Loading images... \");\n \t\t\n \t\tallImages = new TreeMap<ImageEnum, ImageIcon>();\n \t\t\n \t\ttry {\n \t\taddImage(ImageEnum.RAISIN, \"images/parts/raisin.png\");\n \t\taddImage(ImageEnum.NUT, \"images/parts/nut.png\");\n \t\taddImage(ImageEnum.PUFF_CHOCOLATE, \"images/parts/puff_chocolate.png\");\n \t\taddImage(ImageEnum.PUFF_CORN, \"images/parts/puff_corn.png\");\n \t\taddImage(ImageEnum.BANANA, \"images/parts/banana.png\");\n \t\taddImage(ImageEnum.CHEERIO, \"images/parts/cheerio.png\");\n \t\taddImage(ImageEnum.CINNATOAST, \"images/parts/cinnatoast.png\");\n\t\taddImage(ImageEnum.CORNFLAKE, \"images/parts/flake_corn.png\");\n \t\taddImage(ImageEnum.FLAKE_BRAN, \"images/parts/flake_bran.png\");\n \t\taddImage(ImageEnum.GOLDGRAHAM, \"images/parts/goldgraham.png\");\n \t\taddImage(ImageEnum.STRAWBERRY, \"images/parts/strawberry.png\");\n \t\t\n \t\taddImage(ImageEnum.PART_ROBOT_HAND, \"images/robots/part_robot_hand.png\");\n \t\taddImage(ImageEnum.KIT_ROBOT_HAND, \"images/robots/kit_robot_hand.png\");\n \t\taddImage(ImageEnum.ROBOT_ARM_1, \"images/robots/robot_arm_1.png\");\n \t\taddImage(ImageEnum.ROBOT_BASE, \"images/robots/robot_base.png\");\n \t\taddImage(ImageEnum.ROBOT_RAIL, \"images/robots/robot_rail.png\");\n \t\t\n \t\taddImage(ImageEnum.KIT, \"images/kit/empty_kit.png\");\n \t\taddImage(ImageEnum.KIT_TABLE, \"images/kit/kit_table.png\");\n \t\taddImage(ImageEnum.KITPORT, \"images/kit/kitport.png\");\n \t\taddImage(ImageEnum.KITPORT_HOOD_IN, \"images/kit/kitport_hood_in.png\");\n \t\taddImage(ImageEnum.KITPORT_HOOD_OUT, \"images/kit/kitport_hood_out.png\");\n \t\taddImage(ImageEnum.PALLET, \"images/kit/pallet.png\");\n \t\t\n \t\taddImage(ImageEnum.FEEDER, \"images/lane/feeder.png\");\n \t\taddImage(ImageEnum.LANE, \"images/lane/lane.png\");\n \t\taddImage(ImageEnum.NEST, \"images/lane/nest.png\");\n \t\taddImage(ImageEnum.DIVERTER, \"images/lane/diverter.png\");\n \t\taddImage(ImageEnum.DIVERTER_ARM, \"images/lane/diverter_arm.png\");\n \t\taddImage(ImageEnum.PARTS_BOX, \"images/lane/partsbox.png\");\n \t\t\n \t\taddImage(ImageEnum.CAMERA_FLASH, \"images/misc/camera_flash.png\");\n \t\taddImage(ImageEnum.SHADOW1, \"images/misc/shadow1.png\");\n \t\taddImage(ImageEnum.SHADOW2, \"images/misc/shadow2.png\");\n \t\t\n \t\taddImage(ImageEnum.GANTRY_BASE, \"images/gantry/gantry_base.png\");\n \t\taddImage(ImageEnum.GANTRY_CRANE, \"images/gantry/gantry_crane.png\");\n \t\taddImage(ImageEnum.GANTRY_TRUSS_H, \"images/gantry/gantry_truss_h.png\");\n \t\taddImage(ImageEnum.GANTRY_TRUSS_V, \"images/gantry/gantry_truss_v.png\");\n \t\taddImage(ImageEnum.GANTRY_WHEEL, \"images/gantry/gantry_wheel.png\");\n \t\t} catch (Exception e) {\n \t\t\te.printStackTrace();\n \t\t\tSystem.exit(1);\n \t\t}\n \t\tSystem.out.println(\"Done\");\n \t}",
"private String image_path(String path, String name, String ext) {\n return path + \"/\" + name + \".\" + ext;\n }",
"void setImage(String image);",
"public void initialize()\r\n {\r\n ceresImage = new Image(\"Ceres.png\");\r\n erisImage = new Image(\"Eris.png\");\r\n haumeaImage = new Image(\"Haumea.png\");\r\n makemakeImage = new Image(\"MakeMake.png\");\r\n plutoImage = new Image(\"Pluto.png\");\r\n }",
"void setImageResource(String imageResource) throws IOException;",
"public String getImagePath() {\n\t\treturn imagePath;\n\t}",
"public void AddImgToRecyclerView()\n {\n imgsource = new Vector();\n Resources res = getResources();\n imgsource.add(res.getIdentifier(\"@drawable/add_overtime_schedule\", null, getPackageName()));\n imgsource.add(res.getIdentifier(\"@drawable/add_overtime\", null, getPackageName()));\n imgsource.add(res.getIdentifier(\"@drawable/clock_in\", null, getPackageName()));\n imgsource.add(res.getIdentifier(\"@drawable/vacation\", null, getPackageName()));\n imgsource.add(res.getIdentifier(\"@drawable/document\", null, getPackageName()));\n imgsource.add(res.getIdentifier(\"@drawable/order\", null, getPackageName()));\n }",
"public String getStaticPicture();",
"public void normalizeImages(){\n\n biegeAlien.setImageResource(R.drawable.alienbeige);\n greenAlien.setImageResource(R.drawable.aliengreen);\n pinkAlien.setImageResource(R.drawable.alienpink);\n blueAlien.setImageResource(R.drawable.alienblue);\n yellowAlien.setImageResource(R.drawable.alienyellow);\n yellowAlien.setBackgroundColor(view.getSolidColor());\n blueAlien.setBackgroundColor(view.getSolidColor());\n greenAlien.setBackgroundColor(view.getSolidColor());\n pinkAlien.setBackgroundColor(view.getSolidColor());\n biegeAlien.setBackgroundColor(view.getSolidColor());\n }",
"public AlternateImageRenderer() {\r\n super(\"\");\r\n images = new Image[2];\r\n try {\r\n Resources imageRes = UIDemoMain.getResource(\"images\");\r\n images[0] = imageRes.getImage(\"sady.png\");\r\n images[1] = imageRes.getImage(\"smily.png\");\r\n } catch (IOException ex) {\r\n ex.printStackTrace();\r\n }\r\n setUIID(\"ListRenderer\");\r\n }",
"public Mario(){\n setImage(\"06.png\");\n \n }",
"public void setImages() {\n\n imgBlock.removeAll();\n imgBlock.revalidate();\n imgBlock.repaint();\n labels = new JLabel[imgs.length];\n for (int i = 0; i < imgs.length; i++) {\n\n labels[i] = new JLabel(new ImageIcon(Toolkit.getDefaultToolkit().createImage(imgs[i].getSource())));\n imgBlock.add(labels[i]);\n\n }\n\n SwingUtilities.updateComponentTreeUI(jf); // refresh\n initialized = true;\n\n }",
"@Override\n\tpublic String getPath() {\n\t\treturn \"./gfx/weapon.png\";\n\t}",
"public String getImagesUrl() {\n\t\treturn this.imagesUrl;\n\t}",
"public String getImages() {\n\t\treturn this.images;\n\t}",
"void selectImage(String path);"
]
| [
"0.71248585",
"0.7065809",
"0.70423114",
"0.7022848",
"0.69598156",
"0.694049",
"0.68446267",
"0.68446267",
"0.6817561",
"0.6811488",
"0.677919",
"0.67529994",
"0.6726051",
"0.67025876",
"0.6682762",
"0.6665233",
"0.66187495",
"0.66056144",
"0.66048914",
"0.6536876",
"0.65237045",
"0.65223205",
"0.6515612",
"0.64991444",
"0.6473707",
"0.64692825",
"0.6466385",
"0.64634836",
"0.6452177",
"0.6396996",
"0.6387221",
"0.63812673",
"0.6375529",
"0.6362674",
"0.63348055",
"0.63342786",
"0.63264406",
"0.6316818",
"0.63156563",
"0.6302424",
"0.6294705",
"0.6278286",
"0.6245174",
"0.6213539",
"0.62118506",
"0.61768556",
"0.61354727",
"0.61231935",
"0.61223143",
"0.6114606",
"0.6108457",
"0.6104158",
"0.60920954",
"0.608233",
"0.6081191",
"0.6075895",
"0.6067899",
"0.6063355",
"0.604942",
"0.6045546",
"0.6012461",
"0.5994396",
"0.599083",
"0.597967",
"0.59787613",
"0.59697455",
"0.5967032",
"0.5956911",
"0.5955815",
"0.59513205",
"0.5949142",
"0.5947857",
"0.59361655",
"0.5928835",
"0.59282845",
"0.5921123",
"0.5913941",
"0.58805907",
"0.5871455",
"0.5866033",
"0.5854435",
"0.5843137",
"0.58406776",
"0.5837769",
"0.5836814",
"0.5836425",
"0.5836237",
"0.5805351",
"0.57974803",
"0.5792343",
"0.5791705",
"0.57911515",
"0.57883394",
"0.5785523",
"0.57849735",
"0.5780497",
"0.57770216",
"0.57499987",
"0.5743432",
"0.5740037",
"0.5737268"
]
| 0.0 | -1 |
System.out.println(new BrokenCalculator().brokenCalc(2, 3)); System.out.println(new BrokenCalculator().brokenCalc(5, 8)); | public static void main(String[] args) {
System.out.println(new BrokenCalculator().brokenCalc(3, 10));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main( String[] args )\n {\n Calculator calculator = new Calculator(2.2f);\n// Calculator calculator2 = new Calculator(3f);\n// calculator.name = \"calc\";\n// //System.out.println(Calculator.name);\n// calculator.add(5f);\n// System.out.println(calculator2.name);\n// System.out.println(calculator.getTotal());\n// calculator2.subtract(2f);\n// System.out.println(calculator2.getTotal());\n//\n// calculator.add(5f).subtract(1f).add(2.5f);\n// System.out.println(calculator.getTotal());\n\n for (int i = 0; i < 10; i++) {\n calculator.add(i);\n System.out.println(calculator.getTotal());\n }\n }",
"public static void main(String[] args) {\n Calculator calc=new Calculator();\r\n double operand1,operand2,result=0;\r\n operand1=calc.getOperand1();\r\n operand2=calc.getOperand2();\r\n String op;\r\n op=calc.getOperator();\r\n try\r\n {\r\n \r\n switch(op)\r\n {\r\n case \"+\": Add add=new Add();\r\n result=add.doOperation(operand1, operand2);\r\n break;\r\n case \"-\": Subract sub=new Subract();\r\n result=sub.doOperation(operand1, operand2);\r\n break;\r\n case \"*\": Multiply mul=new Multiply();\r\n result=mul.doOperation(operand1, operand2);\r\n break;\r\n case \"/\": Division div =new Division();\r\n if(operand2==0)\r\n {\r\n \tthrow new ArithmeticException();\r\n }\r\n result=div.doOperation(operand1, operand2);\r\n break;\r\n default: throw new Exception(\"Invalid operation\");\r\n }\r\n \r\n\t }\r\n catch(ArithmeticException e)\r\n {\r\n \t System.out.println(e);\r\n \t \r\n }\r\n \r\n catch(Exception e)\r\n {\r\n \t System.out.println(e);\r\n \t \r\n } \r\n finally\r\n {\r\n \t System.exit(0);\r\n }\r\n System.out.print(result);\r\n \r\n}",
"public static void main(String[] args) {\n\t\tCalculator calculator = new Calculator();\n\t\tint result = calculator.add(4).add(5).subtract(3).out();\n\t\tif(calculator.isError)\n\t\t\tSystem.out.println(\"0으로 나눌 수 없습니다.\");\n\t\telse\n\t\t\tSystem.out.print(result);\n\t}",
"@Test\n void testCalculations() {\n double addition = calculator.add(10, 2);\n double subtraction = calculator.sub(10, 2);\n double multiplication = calculator.mul(10, 2);\n double division = calculator.div(10, 2);\n\n //Then\n assertEquals(12, addition);\n assertEquals(8, subtraction);\n assertEquals(20, multiplication);\n assertEquals(5, division);\n }",
"public static void main(String[] args){\n\t\tSimpleCalculator calc = new SimpleCalculator();\n\t\tboolean a=true;\n\t\tdouble number = 0.0;\n\t\tString checker = \"\";\n\t\twhile(a){\n\t\t\tSystem.out.println(\"Result: \" + number);\n\t\t\tSystem.out.println(\"Enter an operation or 'q' to end the program.\");\n\t\t\tScanner scan = new Scanner(System.in);\n\t\t\ttry{\n\t\t\t\tchecker= scan.next();\n\t\t\t\tif (checker.equals(\"q\")){\n\t\t\t\t\ta=false;\n\t\t\t\t}\n\t\t\t\telse if (!checker.equals(\"+\")&& !checker.equals(\"-\")&& !checker.equals(\"*\") && !checker.equals(\"/\")&&\n\t\t\t\t\t\t!checker.equals(\"%\")){\n\t\t\t\t\tthrow new UnknownOperatorException();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(UnknownOperatorException e){\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t\tif(a&&(checker.equals(\"+\")|| checker.equals(\"-\")|| checker.equals(\"*\") || checker.equals(\"/\")||\n\t\t\t\t\tchecker.equals(\"%\"))){\n\t\t\t\ttry{\n\t\t\t\t\tSystem.out.println(\"Please enter a number: \");\n\t\t\t\t\tnumber= scan.nextDouble();\n\t\t\t\t\tif (checker.equals(\"/\")&&(number==0)){\n\t\t\t\t\t\tthrow new ArithmeticException();\n\t\t\t\t\t}\n\t\t\t\t\tcalc.calcSetter(number, checker);\n\t\t\t\t\tnumber =calc.CalcLogic();\n\t\t\t\t}\n\t\t\t\tcatch(InputMismatchException exceptionObj){\n\t\t\t\t\tSystem.out.println(\"That is not a number! Please try again!\");\n\t\t\t\t\tScanner scan2 = new Scanner(System.in);\n\t\t\t\t\tnumber = scan2.nextDouble();\n\t\t\t\t}\n\t\t\t\tcatch(ArithmeticException e){\n\t\t\t\t\tSystem.out.println(\"Cannot divide by zero!\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"public static void main(String[] args) {\n System.out.println(\"Start of code\");\r\n\t\t\r\n\t\tmyAdd();\r\n\t\tmyAdd();\r\n\t\tmyAdd();\r\n\t\tmyMultiple(15,23);\r\n\t\tmyMultiple(15,22);\r\n\t\t\r\n\t\tint a= myDivision(100,5);\r\n\t\tSystem.out.println(\"Value of s is \"+a);\r\n\t\t\r\n\t\tint b= myDivision(100,15);\r\n\t\tSystem.out.println(\"Value of s is \"+b);\r\n \r\n\t\tSystem.out.println(\"End of code\");\r\n\t}",
"public static void main(String[] args) {\n Calculator.add(5,3); //directly prints like this output is 8\n\n //Calculator.multiply(5,3) ---does not work bc it is not static\n //need to create a object for Calculator:\n Calculator cl1= new Calculator();\n cl1.multiply(5,3);//now it prints like this no need to sout.\n\n\n }",
"public static void main(String[] args) {\n int num1 = 5;\r\n int num2 = 10;\r\n NumOperation opr1 = new NumOperation();\r\n NumOperation opr2 = new NumOperation2();\r\n System.out.println(\"Addition of 5 and 10 is : \" + opr1.numCalc(num1, num2));\r\n System.out.println(\"Multiplication of 5 and 10 is : \" + opr2.numCalc(num1, num2));\t\r\n\t\t\r\n\t}",
"void doStuff() {\n System.out.println(7/0);\r\n }",
"public abstract int calculate(int a, int b);",
"public static void main(String[] args) {\n\t\t\t\t\t\t\r\n\t\tint num1 = 100;\r\n\t\tint num2 = 50;\r\n\t\t\r\n\t\tCalcOperation calc = new CalcOperation();\r\n\t\t\r\n\t\tSystem.out.println(\"Addition of \"+num1+\" and \"+num2+\" is: \"+calc.addition(num1, num2));\r\n\t\tSystem.out.println(\"Subraction of \"+num1+\" and \"+num2+\" is: \"+calc.subraction(num1, num2));\r\n\t\tSystem.out.println(\"Multiplication of \"+num1+\" and \"+num2+\" is: \"+calc.multipliation(num1, num2));\r\n\t\tSystem.out.println(\"Division of \"+num1+\" and \"+num2+\" is: \"+calc.division(num1, num2));\r\n\t}",
"public static void main(String[] args) {\n\t\tcalculator c=new calculator();\n\t\tc.calculate(2, 3);\n\t\tscientific_calculator sc=new scientific_calculator();\n\t\tsc.calculate(2, 3);\n\t\thybrid_calculator hc=new hybrid_calculator();\n\t\thc.calculate(2, 3);\n\n\t}",
"public static void main(String[] args) {\n\t\n\t\t Calculator myCalculator = new Calculator();\n\t\t\n\t\t System.out.println(myCalculator.add(5, 7));\n\t\t \n\t\t System.out.println(myCalculator.subtract(45, 11));\n\t\t \n\t\t \n\t}",
"void doStuff1() throws RuntimeException{\n System.out.println(7/0);\r\n }",
"void doStuff2() throws Exception{\n System.out.println(7/0);\r\n }",
"public static void main(String[] args) {\n Calculator result = new Calculator();\n\n // Perform operations on the object and print the calculations with the result\n System.out.println(\"1 + 1 = \" + result.add(1, 1));\n System.out.println(\"23 - 52 = \" + result.subtract(23, 52));\n System.out.println(\"34 * 2 = \" + result.multiply(34, 2));\n System.out.println(\"12 / 3 = \" + result.divide(12, 3));\n System.out.println(\"12 / 7 = \" + result.divide(12, 7));\n System.out.println(\"3.4 + 2.3 = \" + result.add(3.4, 2.3));\n System.out.println(\"6.7 * 4.4 = \" + result.add(6.7, 4.4));\n System.out.println(\"5.5 - 0.5 = \" + result.subtract(5.5,0.5));\n System.out.println(\"10.8 / 2.2 = \" + result.divide(10.8, 2.2));\n }",
"@Test\n\tvoid testBasicCalculatorII() {\n\t\tassertEquals(7, new BasicCalculatorII().calculate(\"3+2*2\"));\n\t\tassertEquals(1, new BasicCalculatorII().calculate(\" 3/2 \"));\n\t\tassertEquals(5, new BasicCalculatorII().calculate(\" 3+5 / 2 \"));\n\t}",
"public static void main(String[] args) {\n\n printResult(2 + 3);\n int a = 2 + 4;\n printResult(a);\n int result = add(2, 5);\n printResult(result);\n printResult(add(2, 6));\n schreibHallo();\n int ten = returnTen();\n System.out.println(ten);\n }",
"@Test\n public void testCrazyCalculator() {\n CrazyCalculator calculator = new CrazyCalculator();\n List<String> lines = new ArrayList<>();\n lines.add(\"1\");\n lines.add(\"\");\n lines.add(\"+@1L\");\n lines.add(\"-+3R\");\n lines.add(\"*-2R\");\n lines.add(\"//2R\");\n lines.add(\"1@1\");\n lines.add(\"5@5+4\");\n lines.add(\"2@3-12/6/5+3\");\n lines.add(\"-1+3\");\n lines.add(\"-1--3\");\n calculator.setLines(lines);\n calculator.processLines();\n List<String> results = calculator.getResults();\n assertEquals(\"should be 5\", 5, results.size());\n assertEquals(\"should be 2\", 2, Integer.parseInt(results.get(0)));\n assertEquals(\"should be 6\", 6, Integer.parseInt(results.get(1)));\n assertEquals(\"should be 14\", 14, Integer.parseInt(results.get(2)));\n assertEquals(\"should be -4\", -4, Integer.parseInt(results.get(3)));\n assertEquals(\"should be 3\", 3, Integer.parseInt(results.get(4)));\n }",
"public static void main(String[] args) {\n//\t\tSystem.out.println(calc.sub(3, 5));\n//\t\tSystem.out.println(calc.add(3, 5));\n\n\t\tSystem.out.println(Calculator.add(3, 5));\n\t\tSystem.out.println(add(3, 5));\n\n\t}",
"public static void main(String[] args) {\n\r\n\t\tnew ThisSuperDemo3().calculate();\r\n\t}",
"public static void main(String[] args) {\n while (true) {\n System.out.println(\"1. Normal Calculator\");\n System.out.println(\"2. BMI Calculator\");\n System.out.println(\"3. Exit\");\n System.out.print(\"Enter your choice: \");\n int choice = CheckInput.checkInputIntLimit(1, 3);\n\n switch (choice) {\n case 1:\n NomalCal nc = new NomalCal();\n double memory = 0,\n number;\n System.out.print(\"Enter number: \");\n number = CheckInputNumber.checkInputDouble();\n memory = nc.addCal(number);\n while (true) {\n\n System.out.print(\"Enter operator: \");\n String operator = CheckInputOperator.checkInputOperator();\n\n if (operator.equalsIgnoreCase(\"+\")) {\n System.out.print(\"Enter number: \");\n number = CheckInputNumber.checkInputDouble();\n memory = nc.addCal(number);\n System.out.println(\"Memory: \" + memory);\n }\n if (operator.equalsIgnoreCase(\"-\")) {\n System.out.print(\"Enter number: \");\n number = CheckInputNumber.checkInputDouble();\n memory = nc.subCal(number);\n System.out.println(\"Memory: \" + memory);\n }\n if (operator.equalsIgnoreCase(\"*\")) {\n System.out.print(\"Enter number: \");\n number = CheckInputNumber.checkInputDouble();\n memory = nc.mulCal(number);\n System.out.println(\"Memory: \" + memory);\n }\n if (operator.equalsIgnoreCase(\"/\")) {\n System.out.print(\"Enter number: \");\n number = CheckInputNumber.checkInputDouble();\n memory = nc.divCal(number);\n System.out.println(\"Memory: \" + memory);\n }\n if (operator.equalsIgnoreCase(\"^\")) {\n System.out.print(\"Enter number: \");\n number = CheckInputNumber.checkInputDouble();\n memory = nc.powCal(number);\n System.out.println(\"Memory: \" + memory);\n }\n if (operator.equalsIgnoreCase(\"=\")) {\n System.out.println(\"Result: \" + memory);\n return;\n }\n }\n case 2:\n IBMCal.BMICalculator();\n break;\n case 3:\n return;\n }\n }\n\n }",
"@Test\n\tpublic void test3() {\n\t\tFormula formula = new FormulaImpl(); \n\t\tdouble result = formula.calculate(100);\n\t\tSystem.out.println(result);\n\t\t\n\t\t// accessed from formula instance including anonymous objects.\n\t\tresult = new Formula() {\n\t\t\t@Override\n\t\t\tpublic double calculate(int n) {\n\t\t\t\treturn n * 2;\n\t\t\t}\n\t\t}.sqrt(100);\n\t\t\n\t\tSystem.out.println(result);\n\t\t\n\t}",
"@Test\n public void testDivideWithRemainder() {\n System.out.println(\"divideWithRemainder\");\n int a = 0;\n Calculator instance = new Calculator();\n int expResult = 0;\n int result = instance.divideWithRemainder(a);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"public static void main(String[] args) {\n MathOp add=new MathOp() {\n \t \n public int operation(int x, int y)\n {\n \t return x+y;\n }\n\t };\n\t System.out.println(add.operation(1, 2));\n \n\t MathOp sub=new MathOp() {\n \t \n\t public int operation(int x, int y)\n\t {\n\t \t return x-y;\n\t }\n\t\t };\n\t\t System.out.println(sub.operation(1, 2));\n\t \n\t\t MathOp mul=new MathOp() {\n\t \t \n\t\t public int operation(int x, int y)\n\t\t {\n\t\t \t return x*y;\n\t\t }\n\t\t\t };\n\t\t\t System.out.println(mul.operation(1, 2));\n\t\t \n\t\t\t MathOp div=new MathOp() {\n\t\t \t \n\t\t\t public int operation(int x, int y)\n\t\t\t { \n\t\t\t \t return x/y;\n\t\t\t }\n\t\t\t\t };\n\t\t\t\t System.out.println(div.operation(1, 2));\n\t\t\t \n}",
"public interface Calculator {\n public int exec(int a, int b);\n}",
"public static void main(String[] args) {\r\n\r\n BasicMath one = new BasicMath();\r\n \r\n System.out.println();\r\n System.out.println(\"Integer calculations:\");\r\n\r\n one.integerAddition();\r\n one.integerSubtraction();\r\n one.integerMultiplication();\r\n one.integerDivisionWrong();\r\n one.integerDivisionRight();\r\n \r\n System.out.println();\r\n System.out.println(\"Floating Point calculations:\");\r\n\r\n one.doubleAddition();\r\n one.doubleSubtraction();\r\n one.doubleMultiplication();\r\n one.doubleDivision();\r\n \r\n System.out.println();\r\n \r\n }",
"public static void main(String[] args) {\n\r\n\t\tSystem.out.println(oldEnough(21));\r\n\t\tSystem.out.println(oldEnough(30));\r\n\t\tSystem.out.println(oldEnough(2));\r\n\t\tSystem.out.println(oldEnough(-3));\t\t\r\n\t}",
"public static void main(String[] args) {\nMethods2 methods=new Methods2();\nSystem.out.println(methods.getMax(12,155));\n//double res=getMaxWithoutReturn(2,13);VOID METHOD DOES not return cant store in variable\nScanner scan=new Scanner(System.in);//return methods \n//scanner class returns and allow us to print by storing in another variable \n\t}",
"public void doMath();",
"private static void equationsTest() {\n }",
"public void calculate() {\n\n InputHelper inputHelper = new InputHelper();\n String firstNumber = inputHelper.getInput(\"Write first number: \");\n String secondNumber = inputHelper.getInput(\"Write second number: \");\n String action = inputHelper.getInput(\"What action you want to do ( + - * /): \");\n\n while (!firstNumber.equals(\"0\") || !secondNumber.equals(\"0\") || !action.equals(\"0\")) {\n try {\n switch (action) {\n case \"+\":\n System.out.println(\"The result is: \" + (Double.valueOf(firstNumber) + Double.valueOf(secondNumber)));\n break;\n case \"-\":\n System.out.println(\"The result is: \" + (Double.valueOf(firstNumber) - Double.valueOf(secondNumber)));\n break;\n case \"*\":\n System.out.println(\"The result is: \" + (Double.valueOf(firstNumber) * Double.valueOf(secondNumber)));\n break;\n case \"/\":\n System.out.println(\"The result is: \" + (Double.valueOf(firstNumber) / Double.valueOf(secondNumber)));\n break;\n default:\n System.out.println(\"You've entered a wrong action!\");\n }\n } catch (NumberFormatException e) {\n System.out.println(\"You've entered not a number!\");\n }\n\n firstNumber = inputHelper.getInput(\"Write first number: \");\n secondNumber = inputHelper.getInput(\"Write second number: \");\n action = inputHelper.getInput(\"What action you want to do ( + - * /): \");\n\n }\n }",
"public static void main(String[] args) {\n new Calculator();\n }",
"public static void main(String[] args) {\n// new Problem_10().print();\n Problem_10.print();\n }",
"public void ex() {\n Integer num1;\n\tInteger num2;\n Scanner sc = new Scanner(System.in);\n //Solicitud de los datos\n System.out.println(\"Ingrese el valor de num1: \");\n num1 = sc.nextInt();\n System.out.println(\"Ingrese el valor de num2: \");\n num2 = sc.nextInt();\n //LLamado a los métodos\n\tdisplayNumberPlus10(num1, num2);\n displayNumberPlus100(num1, num2);\n\tdisplayNumberPlus1000(num1, num2);\n }",
"public static void main(String[] args) {\n Math2 y = new Math2();\n y.Add(7,2);\n y.Sub(7,2);\n }",
"public static void main(String[] args) {\n\n\t\t\n\t\tCalculatorC calc=new CalculatorC();\n\t\t\n\t\tcalc.add(20, 30);\n\t\tInhertCalculatorP\tcalcp=new InhertCalculatorP();\n\t\tint result=calc.add(10,30);\n\tSystem.out.println(result);\n\t\n\t}",
"public static void main(String[] args) {\n\t\tCalculator c = new Calculator(100000000);\n\t\tdouble pi = c.Result();\n\t\tSystem.out.println(pi);\n\t}",
"public void calculate();",
"public static void exercise10() {\n }",
"CalculationResult goInfinite();",
"@Override\r\n\tpublic void myMethod() throws ArithmeticException{\n\t}",
"public static void main(String[] args) {\n\t\tCalcul cc = new Calcul();\r\n\t\t\r\n\t\tSystem.out.println(\"첫번째 인자를 입력 : \");\r\n\t\tint a = cc.scan();\r\n\t\tcc.setA(a);\r\n\t\tSystem.out.println(\"가감승제를 입력 : \");\r\n\t\tint tmp = cc.scan();\r\n\t\tcc.setTmp(tmp);\r\n\t\tSystem.out.println(\"두번째 인자를 입력 : \");\r\n\t\tint b = cc.scan();\r\n\t\tcc.setB(b);\r\n\t\t\r\n\t\tcc.prn();\r\n\t\t\r\n\t\t\r\n\r\n\t}",
"@Test\n\t@Category (WrongPlace.class)\n\t// long running test in the unit test section\n\tpublic void orderOfOperations() {\n\t\tCalculator c = new Calculator();\n\t\tc.press(\"1\");\n\t\tc.press(\"+\");\n\t\tc.press(\"2\");\n\t\tc.press(\"*\");\n\t\tc.press(\"4\");\n\t\tc.press(\"=\");\n\t\tString result = c.getDisplay();\n\t\tassertEquals(result, \"9\");\n\t}",
"public interface Calculator {\n double calculate(double start, double end, double step);\n}",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"Adding: 10+20 = \" + Calculator.add(10, 20));\n\t\tSystem.out.println(\"Subtracting: 20-10 = \" + Calculator.subtract(20, 10));\n\t\tSystem.out.println(\"Multiplying: 2*10 = \"+ Calculator.multiply(2, 10));\n\t\tSystem.out.println(\"Dividing: 10 / 2 = \" + Calculator.divide(10, 2));\n\t\tSystem.out.println(\"Square root of 64 = \" + MagicCalculator.squareRoot(64));\n\t\tSystem.out.println(\"Sine of 0 = \" + MagicCalculator.sin(0));\n\t\tSystem.out.println(\"Cosine of 0 = \" + MagicCalculator.cos(0));\n\t\tSystem.out.println(\"Tangent of 0 = \" + MagicCalculator.tan(0));\n\t\tSystem.out.println(\"5! = \" + MagicCalculator.factorial(5));\n\t}",
"static void calc(int x, int y) {\n System.out.println(x + y);\n System.out.println(x - y);\n System.out.println(x / y);\n System.out.println(x * y);\n System.out.println(\"Fim!\");\n }",
"@Override\n public void addNumbers() {\n calculator.add(2, 2);\n }",
"static void AddThemUP() { //defining a method to add 2 numbers\n int a = 4;\n int b = 5;\n\n System.out.println(\"The numbers add up to \" + (a + b));\n }",
"public static void main(String[] args) {\n Calculator calculator=new Calculator();\r\n// try{\r\n// calculator=null;\r\n calculator.divide(10,0);\r\n// }\r\n// catch (ArithmeticException e){\r\n// System.out.println(\"Caught an arithmetic exception\");\r\n// }\r\n//// catch (NullPointerException e){\r\n//// System.out.println(\"Caught an null pointer exception\");\r\n//// }\r\n//// catch (RuntimeException e){\r\n//// System.out.println(\"Caught an runtime exception\");\r\n//// }\r\n// catch (Exception e){\r\n// System.out.println(\"Caught an exception\");\r\n// }\r\n }",
"protected abstract Object doCalculations();",
"public static void main(String[] args) {\n ArithmeticFunctions functions = new ArithmeticFunctions();\n // IMPLEMENTING THE METHODS FROM THE CHILD CLASS\n System.out.println(\"10 + 5 = \"+functions.addition(10,5));\n System.out.println(\"10 - 5 = \"+functions.subtraction(10,5));\n System.out.println(\"10 * 5 = \"+functions.multiplication(10,5));\n System.out.println(\"10 / 5 = \"+functions.division(10,5)+\"\\n\");\n }",
"public static void main(String[] args) {\n\t\tint num1 = 7;\r\n\t\tint num2 = 6;\r\n\t\t\r\n\t\tmathOps ops1 = new mathOps();\r\n\t\tSystem.out.println(\"sum = \" +ops1.addition(num1, num2));\r\n\t\tSystem.out.println(\"sub = \" +ops1.substraction(num1, num2));\r\n\t\tSystem.out.println(\"mul = \" +ops1.multiply(num1, num2));\r\n\t\tSystem.out.println(\"div = \" +ops1.divide(num1, num2));\r\n\t}",
"public static void main(String[] args) {\n\t\tMethodTestWithoutReturnWithPara v=new MethodTestWithoutReturnWithPara();\r\n\t\t\r\n\t\tv.add(30, 40);\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\nAddNumbers a=new AddNumbers();\r\na.getInput();\r\na.addNumbers();\r\nint output=a.addNumbers();\r\nSystem.out.println(\"OUTPUT:\");\r\nSystem.out.println(\"The addition of n numbers is: \"+output);\r\n\t}",
"@Test\r\n public void testCalcItemToPounds() {\r\n System.out.println(\"calcItemToPounds\");\r\n \r\n /**********************\r\n * Test case #1\r\n *********************/\r\n System.out.println(\"\\tTest case #1\");\r\n \r\n //input values for test case 1\r\n int numOfItems = 2;\r\n String items = \"egg\";\r\n \r\n //create instance of InventoryControl class\r\n calcItemToPounds instance = new calcItemToPounds();\r\n \r\n double expResult = 0.44; //expected output returned value\r\n \r\n //call function to run test\r\n double result = instance.calcItemToPounds(numOfItems, items);\r\n \r\n // compare expected return value with actual value returned\r\n assertEquals(expResult, result, 0.001);\r\n System.out.println(result);\r\n \r\n /**********************\r\n * Test case #2\r\n *********************/\r\n System.out.println(\"\\tTest case #2\");\r\n \r\n //input values for test case 2\r\n numOfItems = -1;\r\n items = \"egg\";\r\n \r\n expResult = -1; //expected output returned value\r\n \r\n //call function to run test\r\n result = instance.calcItemToPounds(numOfItems, items);\r\n \r\n // compare expected return value with actual value returned\r\n assertEquals(expResult, result, 0.001);\r\n System.out.println(result);\r\n \r\n /**********************\r\n * Test case #3\r\n *********************/\r\n System.out.println(\"\\tTest case #3\");\r\n \r\n //input values for test case 3\r\n numOfItems = 4;\r\n items = \"EGG\";\r\n \r\n expResult = -1; //expected output returned value\r\n \r\n //call function to run test\r\n result = instance.calcItemToPounds(numOfItems, items);\r\n \r\n // compare expected return value with actual value returned\r\n assertEquals(expResult, result, 0.001);\r\n System.out.println(result);\r\n \r\n /**********************\r\n * Test case #4\r\n *********************/\r\n System.out.println(\"\\tTest case #4\");\r\n \r\n //input values for test case 4\r\n numOfItems = 5;\r\n items = \"egg\";\r\n \r\n expResult = -1; //expected output returned value\r\n \r\n //call function to run test\r\n result = instance.calcItemToPounds(numOfItems, items);\r\n \r\n // compare expected return value with actual value returned\r\n assertEquals(expResult, result, 0.001);\r\n System.out.println(result);\r\n \r\n /**********************\r\n * Test case #5\r\n *********************/\r\n System.out.println(\"\\tTest case #5\");\r\n \r\n //input values for test case 5\r\n numOfItems = 0;\r\n items = \"egg\";\r\n \r\n expResult = 0; //expected output returned value\r\n \r\n //call function to run test\r\n result = instance.calcItemToPounds(numOfItems, items);\r\n \r\n // compare expected return value with actual value returned\r\n assertEquals(expResult, result, 0.001);\r\n System.out.println(result);\r\n \r\n /**********************\r\n * Test case #6\r\n *********************/\r\n System.out.println(\"\\tTest case #6\");\r\n \r\n //input values for test case 6\r\n numOfItems = 0; // only accept integer values won't accept .25\r\n items = \"egg\";\r\n \r\n expResult = 0; //expected output returned value\r\n \r\n //call function to run test\r\n result = instance.calcItemToPounds(numOfItems, items);\r\n \r\n // compare expected return value with actual value returned\r\n assertEquals(expResult, result, 0.001);\r\n System.out.println(result);\r\n \r\n /**********************\r\n * Test case #7\r\n *********************/\r\n System.out.println(\"\\tTest case #7\");\r\n \r\n //input values for test case 7\r\n numOfItems = 4;\r\n items = \"egg\";\r\n \r\n expResult = 0.88; //expected output returned value\r\n \r\n //call function to run test\r\n result = instance.calcItemToPounds(numOfItems, items);\r\n \r\n // compare expected return value with actual value returned\r\n assertEquals(expResult, result, 0.001);\r\n System.out.println(result);\r\n }",
"public static void main(String[] args) {\n\t\tnew Calc();\n\t}",
"public static void main(String[] args) {\n\t\tCalculatrice calc = new Calculatrice();\r\n\t\t//MonBouton bout = new MonBouton(\"Magic!\");\r\n\t\t\r\n\t}",
"@Test\r\n public void testCalcNewBalance() {\r\n System.out.println(\"calcNewBalance\");\r\n \r\n /*\r\n ******************\r\n TEST CASE #1\r\n ******************\r\n */\r\n System.out.println(\"\\tTest 1\");\r\n //input values for test case 1\r\n double price = 15.75;\r\n double curBalance = 50;\r\n\r\n \r\n //create instance of MapControl class\r\n BackpackControl instance = new BackpackControl();\r\n \r\n //expected output return value\r\n double expResult = 34.25;\r\n \r\n //call function to run test\r\n double result = instance.calcNewBalance(price);\r\n \r\n //compare expected return value to actual return value\r\n assertEquals(expResult, result, 0.0);\r\n \r\n \r\n \r\n \r\n /*\r\n ******************\r\n TEST CASE #2\r\n ******************\r\n */\r\n System.out.println(\"\\tTest 2\");\r\n //input values for test case 2\r\n price = -19;\r\n curBalance = 50;\r\n\r\n //expected output return value\r\n expResult = -1;\r\n \r\n //call function to run test\r\n result = instance.calcNewBalance(price);\r\n \r\n //compare expected return value to actual return value\r\n assertEquals(expResult, result, 0.0);\r\n \r\n \r\n \r\n \r\n /*\r\n ******************\r\n TEST CASE #3\r\n ******************\r\n */\r\n System.out.println(\"\\tTest 3\");\r\n //input values for test case 3\r\n price = 100;\r\n curBalance = 50;\r\n\r\n //expected output return value\r\n expResult = -1;\r\n \r\n //call function to run test\r\n result = instance.calcNewBalance(price);\r\n \r\n //compare expected return value to actual return value\r\n assertEquals(expResult, result, 0.0);\r\n \r\n \r\n \r\n \r\n /*\r\n ******************\r\n TEST CASE #4\r\n ******************\r\n */\r\n System.out.println(\"\\tTest 4\");\r\n //input values for test case 4\r\n price = 0;\r\n curBalance = 50;\r\n\r\n //expected output return value\r\n expResult = 50;\r\n \r\n //call function to run test\r\n result = instance.calcNewBalance(price);\r\n \r\n //compare expected return value to actual return value\r\n assertEquals(expResult, result, 0.0);\r\n \r\n \r\n \r\n \r\n /*\r\n ******************\r\n TEST CASE #5\r\n ******************\r\n */\r\n System.out.println(\"\\tTest 5\");\r\n //input values for test case 5\r\n price = 1;\r\n curBalance = 50;\r\n\r\n //expected output return value\r\n expResult = 49;\r\n \r\n //call function to run test\r\n result = instance.calcNewBalance(price);\r\n \r\n //compare expected return value to actual return value\r\n assertEquals(expResult, result, 0.0);\r\n \r\n \r\n \r\n \r\n /*\r\n ******************\r\n TEST CASE #6\r\n ******************\r\n */\r\n System.out.println(\"\\tTest 6\");\r\n //input values for test case 6\r\n price = 50;\r\n curBalance = 50;\r\n\r\n //expected output return value\r\n expResult = 0;\r\n \r\n //call function to run test\r\n result = instance.calcNewBalance(price);\r\n \r\n //compare expected return value to actual return value\r\n assertEquals(expResult, result, 0.0);\r\n \r\n\r\n }",
"public static int brokenCalculator(int x, int y) {\n if(x >= y) return x - y;\n\n int count = 0;\n while(x < y) {\n y = y % 2 == 0 ? y / 2 : y + 1;\n count++;\n }\n\n return x - y + count;\n }",
"@Test\n public void multiplyBy9_checkTotal_shouldBe0() {\n Calculator calculator = new Calculator();\n\n // Act - multiply by 9\n calculator.multiplyBy(9);\n\n // Assert - check that the new total is 0\n Assert.assertEquals(0, calculator.getTotal());\n }",
"@Override\r\n\tpublic int call(int a, int b) {\n\t\treturn a*b;\r\n\t}",
"public interface Calculator {\n //add method\n double add(double x, double y);\n\n //subtract method\n double subtract(double x, double y);\n\n //mulpiply method\n double multiply(double x, double y);\n\n //Divide method\n double divide(double x, double y) throws IllegalArgumentException;\n}",
"public static double operation(int num1,int num2,int operation){\r\n \r\n int result =0 ;\r\n switch(operation){\r\n case 1:\r\n result=num1+num2;\r\n break;\r\n case 2:\r\n result=num1-num2;\r\n break;\r\n case 3:\r\n result=num1*num2;\r\n break;\r\n case 4:\r\n result=num1/num2;\r\n break;\r\n }\r\n return result ;\r\n \r\n}",
"public void calcOutput()\n\t{\n\t}",
"public static void main(String[] args) {\n\t\tMagicCalculator magic = new MagicCalculator();\n\t\t\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Pick a number\");\n\t\tint number = Integer.parseInt(input.nextLine());\n\t\tSystem.out.println(\"Pick another number\");\n\t\tint number2 = Integer.parseInt(input.nextLine());\n\t\tinput.close();\n\t\t\n\t\t//Uses classes inherited from parent class Calculator\n\t\tmagic.Add(number, number2);\n\t\tmagic.Subtract(number, number2);\n\t\tmagic.Multiplication(number, number2);\n\t\tmagic.Division(number, number2);\n\t\t\n\t\tmagic.SquareRoot(number);\n\t\tmagic.SquareRoot(number2);\n\t\t\n\t\t//Uses its own classes\n\t\tmagic.FindSine(number, number2);\n\t\tmagic.FindCosine(number, number2);\n\t\tmagic.FindTangent(number, number2);\n\t\t\n\t\tmagic.FindFactorial(number);\n\t\t//magic.FindFactorial(number2);\n\t\t\n\t\t\n\t}",
"public void calculate() //default method\n {\n int average;\n average= (a+b+c)/3;\n System.out.println(\"the average of 3 numbers is :\"+average); // printing average\n }",
"public abstract void calculate();",
"@Test\n public void testModulus10() {\n System.out.println(\"modulus10\");\n int pz = 7;\n AbstractMethod instance = new AbstractMethodImpl();\n int expResult = 3;\n int result = instance.modulus10(pz);\n assertEquals(expResult, result);\n pz = 5;\n expResult = 5;\n result = instance.modulus10(pz);\n assertEquals(expResult, result);\n\n pz = 17;\n expResult = 3;\n result = instance.modulus10(pz);\n assertEquals(expResult, result);\n\n }",
"static void factorial(){\n\t}",
"public abstract int calculateOutput();",
"void arithmetic() {\n\n int sum, subtraction, multi, div,mod; //Local variable\n Scanner num = new Scanner(System.in); //create a class\n System.out.println(\"Input the first value: \");\n a = num.nextInt(); //\n System.out.println(\"Input the second value\");\n ArithmeticOperator.b = num.nextInt();\n\n sum = a + b;\n System.out.println(a + \" + \" + b + \" = \" + sum);\n\n subtraction = a - b;\n System.out.println(a + \" - \" + b + \" = \" + subtraction);\n\n multi = a * b;\n System.out.println(a + \" * \" + b + \" = \" + multi);\n\n div = a / b;\n System.out.println(a + \" / \" + b + \" = \" + div);\n\n mod=a%b;\n System.out.println(a+\" mod \"+b+\" = \"+mod);\n\n }",
"public static void main(String[] args) {\n\t\tCal c = new Cal();\n\t\tc.setOperands(10, 20, 30);\n\t\tSystem.out.println(c.sum());\n\t\tSystem.out.println(c.avg());\n\t}",
"void doCalculations(){\n double out1;\n double out2;\n double out3;\n \n out1 = x + n * y - (x + n) * y;\n System.out.printf(\"If x=%s, n=%s, y=%s, then out1 = \\n\",x,n,y);\n System.out.println(out1 + \"\\n\");\n \n out2 = m / n + m % n;\n System.out.printf(\"If m=%s, n=%s, then out2 = \\n\",m,n);\n System.out.println(out2 + \"\\n\");\n \n out3 = 5 * x - n / 5;\n System.out.printf(\"If x=%s, n=%s, then out3 = \\n\",x,n);\n System.out.println(out3 + \"\\n\");\n \n \n }",
"public static void main(String[] args) {\n \n\t\tcalculatior input=new calculatior();\n\tSystem.out.println(input.div(15, 3));\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tSystem.out.println(Calculator.powerInt(2, 5));\r\n\t\tSystem.out.println(Calculator.powerDouble(5.5, 2));\r\n\r\n\t}",
"@Test\n public void testModulus7() {\n System.out.println(\"modulus7\");\n int number = 8;\n AbstractMethod instance = new AbstractMethodImpl();\n int expResult = 6;\n int result = instance.modulus7(number);\n assertEquals(expResult, result);\n\n }",
"public static void main(String[] args) {\n ArithmeticExpression calculation =\n new Operand(\n new Operand(new Number(4), Operation.PLUS, new Number(6)),\n Operation.MULTIPLICATION,\n new Operand(new Number(1), Operation.DIVISION, new Number(2)));\n\n System.out.println(calculation.toString() + \" = \" + calculation.calculate());\n }",
"public static void main(String[] args) {\n\t\tNumero n1=new Numero(7);\n\t\tNumero n2=new Numero(5);\n\t\tint n3=6;\n\t\t\n\t\tSystem.out.println(\"La suma de:\" + n1.getN() + \"+\" + n3 + \" es:\" + n1.sumar(n3));\n\t\tSystem.out.println(\"La suma de:\" + n2.getN() + \"+\" + n3 + \" es:\" + n2.sumar(n3));\n\t\tSystem.out.println(\"La multiplicacion de:\" + n1.getN() + \"*\" + n3 + \" es:\" + n1.multiplicar(n3));\n\t\tSystem.out.println(\"La multiplicacion de:\" + n2.getN() + \"*\" + n3 + \" es:\" + n2.multiplicar(n3));\n\t\tSystem.out.println(\"El numero \" + n1.getN() + \" es par? \" + n1.esPar());\n\t\tSystem.out.println(\"El numero \" + n2.getN() + \" es par? \" + n2.esPar());\n\t\tSystem.out.println(\"El numero \" + n1.getN() + \" es primo? \" + n1.esPrimo());\n\t\tSystem.out.println(\"El numero \" + n2.getN() + \" es primo? \" + n2.esPrimo());\n\t\tSystem.out.println(n1.convertirAString());\n\t\tSystem.out.println(n2.convertirAString());\n\t\tSystem.out.println(\"El numero \" + n1.getN() + \" en formato double es: \" + n1.convertirADouble());\n\t\tSystem.out.println(\"El numero \" + n2.getN() + \" en formato double es: \" + n2.convertirADouble());\n\t\tint exp=2;\n\t\tSystem.out.println(\"El numero \" + n1.getN() + \" elevado a \" + exp + \" da como resultado \" + n1.calcularPotencia(exp));\n\t\tSystem.out.println(\"El numero \" + n2.getN() + \" elevado a \" + exp + \" da como resultado \" + n2.calcularPotencia(exp));\n\t\tSystem.out.println(\"El numero \" + n1.getN() + \" en base 2 es \" + n1.pasarBase2());\n\t\tSystem.out.println(\"El numero \" + n2.getN() + \" en base 2 es \" + n2.pasarBase2());\n\t\tSystem.out.println(\"El factorial de \" + n1.getN() + \" es \" + n1.calcularFactorial());\n\t\tSystem.out.println(\"El factorial de \" + n2.getN() + \" es \" + n2.calcularFactorial());\n\t\tint comb=2;\n\t\tSystem.out.println(\"El numero combinatorio de \" + n1.getN() + \" y \" + comb + \" es: \" + n1.numeroCombinatorio(comb));\n\t\tSystem.out.println(\"El numero combinatorio de \" + n2.getN() + \" y \" + comb + \" es: \" + n2.numeroCombinatorio(comb));\n\t\tSystem.out.println(\"Mellizos? \" + n1.esPrimoMellizo(n1, n2));\n\t\tint n=20;\n\t\t//primos utilizando un for\n\t\tfor(int i=2;i<=n;i++){\n\t\t\tint a=0;\n\t\t\tfor(int j=1;j<=n;j++){\n\t\t\t\tif(i%j==0){\n\t\t\t\t\ta+=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(a==2){\n\t\t\t\tSystem.out.println(\"Numero: \" + i);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\n\t}",
"public static void main(String[] args) {\n func1();\n System.out.println(\"---------\");\n func2();\n System.out.println(\"---------\");\n func3();\n System.out.println(\"---------\");\n func4();\n System.out.println(\"---------\");\n func5();\n System.out.println(\"---------\");\n System.out.println(func6(5));\n System.out.println(\"---------\");\n func7(100);\n System.out.println(\"---------\");\n System.out.println(func8(100));\n System.out.println(\"---------\");\n func9();\n System.out.println(\"---------\");\n func10();\n }",
"public static void main(String[] args) {\n\t\tMyCalc cal = new MyCalc();\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"두 정수를 입력하세요.\");\n\t\tSystem.out.print(\"a > \");\n\t\tint a = Integer.parseInt(scan.nextLine());\n\t\tSystem.out.print(\"b > \");\n\t\tint b = Integer.parseInt(scan.nextLine());\n\n\t\tSystem.out.println(a + \" + \" + b + \" = \" + cal.add(a, b));\n\t\tSystem.out.println(a + \" - \" + b + \" = \" + cal.sub(a, b));\n\t\tSystem.out.println(a + \" * \" + b + \" = \" + cal.mul(a, b));\n\t}",
"public Calculator () {\r\n\t\ttotal = 0; // not needed - included for clarity\r\n\t\thistory = \"\" + 0;\r\n\t}",
"@Test\n\tpublic void calculateTest(){\n\t\tAssertions.assertThat(calculate(\"5*5\")).isEqualTo(25);\n\t}",
"public static void main(String[] args) {\nint firstNumber=1000;\nint secondNumber=999;\nint result=maxof(firstNumber,secondNumber);//METHOD CALLING\n\n \nmaxof(23,24);\nmaxof(35,40);\nSystem.out.println(result);\nsay();\nsay();\n\t}",
"public static void main (String args[]) {\r\n\t\t\r\n\t\tCalculator calc = new Calculator();\r\n\t\tcalc.add();\r\n\t\tcalc.div();\r\n\t\tcalc.mul();\r\n\t\tcalc.sub();\r\n\t\t\t\t\r\n\t}",
"abstract void calculate(double a);",
"public static void main(String[] args) {\n\t\n\t\t\n\t\tcalc();\n\t}",
"@Test\n public void testSpreadCalc() {\n Result result = calculator.calculate(.1, .32);\n assert (result.getMaxProfit().doubleValue() == 4.84);\n assert (result.getMaxLoss().doubleValue() == .16);\n assert (result.getBreakEven().doubleValue() == 39.84);\n assert (result.getMaxProfitPerContract().doubleValue() == 484);\n assert (result.getMaxLossPerContract().doubleValue() == 16);\n assert (result.getBreakEvenPerContract().doubleValue() == 3984);\n }",
"public static void main(String[] args) {\n\t\t\n\t\tFibonocciseries fibObj=new Fibonocciseries();\n\t\tList<Integer> value = fibObj.fibmeth(21);\n\t\tSystem.out.println(value.toString());\n\t\t\t\n\t\tCharacterCount charCountObj=new CharacterCount();\n\t\tString[] xyz = { \"a\",\"b\",\"a\",\"c\",\"b\",\"c\",\"b\"};\n\t\tList<Integer> result1 = charCountObj.charCount(xyz);\n\t\tSystem.out.println(result1.toString());\n\t\t\n\t\t\n\t\tFizzBuzzPgm fizzBuzzObj=new FizzBuzzPgm();\n\t\tint[] Fizzbuzzvalues = {10,3,5,15};\n\t\tList<String> fzzBuzzReuslt = fizzBuzzObj.fizzBuzzMethod(Fizzbuzzvalues);\n\t\t\n\t\tDuplicateString duplicateObj=new DuplicateString();\n\t\tString[] DuplicateValues= {\"abc\",\"mno\",\"xyz\",\"pqr\",\"xyz\",\"def\",\"mno\"};\n\t\tList<String> DuplicateResult=duplicateObj.DuplicateMethod(DuplicateValues);\n\t\tSystem.out.println(DuplicateResult.toString());\n\t\t\n\t\tPalindromePgm PalindromeObj=new PalindromePgm();\n\t\tList<String> PalindromeResult=PalindromeObj.PalindromeMethod(24);\n\t\tSystem.out.println(PalindromeResult.toString());\n\t\t\n\t\tCalculatorPgm addVal = new CalculatorPgm();\n\t\tint resultAdd = addVal.add(20,10);\n\t\tSystem.out.println(\"Calc prgm add output=\"+resultAdd);\n\t\t\n\t\tCalculatorPgm subVal = new CalculatorPgm();\n\t\tint resultsub = subVal.add(300,10);\n\t\tSystem.out.println(\"Calc prgm sub output=\"+resultsub);\n\t\t\n\t\tCalculatorPgm divVal = new CalculatorPgm();\n\t\tint resultdiv = divVal.add(400,10);\n\t\tSystem.out.println(\"Calc prgm div output=\"+resultdiv);\n\t\t\n\t\t\n\t\t\n\n\t}",
"public interface Calculator {\n long add(int number1, int number2);\n}",
"public abstract void execute(InputCalc input, Calculator calculator);",
"private SelfShieldingCalc()\n {\n // This class should just contain static methods. Don't let anyone\n // instantiate it.\n }",
"public static void main(String[] args) {\r\n\t\t\r\n\t\tMethodOverloading m = new MethodOverloading();\r\n\t\tm.sum();\r\n\t\tm.sum(15, 15);\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\tint a=Sum (10,20);\r\n\t\tint b=Sum (20,50);\r\n\t\tSystem.out.println(a+b);\r\n\r\n\t\tNonStaticFunction obj= new NonStaticFunction();\r\n\t\tSystem.out.println(obj.sum(10, 20));\r\n\t}",
"public static void main(String[] args) {\n Homework1 hw1 = new Homework1();\n\n System.out.println(\"===Problem 1===\");\n hw1.problem1();\n\n System.out.println(\"===Problem 2===\");\n System.out.println(hw1.topInt(1.5));\n System.out.println(hw1.topInt(5.1));\n System.out.println(hw1.topInt(1.0));\n System.out.println(hw1.topInt(-4.2));\n\n\n System.out.println(\"===Problem 3===\");\n hw1.draw4x4('-');\n hw1.draw4x4('4');\n\n System.out.println(\"===Problem 4===\");\n System.out.println(hw1.citationName(\"Alastair\", \"Reynolds\"));\n System.out.println(hw1.citationName(\"Grace\", \"Hopper\"));\n\n System.out.println(\"===Problem 5===\");\n System.out.println(String.valueOf(hw1.min3(1.0, 2.0, 3.0)));\n System.out.println(String.valueOf(hw1.min3(4.0, 3.0, 2.0)));\n System.out.println(String.valueOf(hw1.min3(0.5, 0.1, 0.5)));\n \n System.out.println(\"===Problem 6===\");\n System.out.println(hw1.fibonacci(0));\n System.out.println(hw1.fibonacci(1));\n System.out.println(hw1.fibonacci(2));\n System.out.println(hw1.fibonacci(3));\n System.out.println(hw1.fibonacci(10));\n System.out.println(hw1.fibonacci(25));\n \n \n System.out.println(\"===Problem 7===\");\n //System.out.println(hw1.isPalindrome(\"racecar\"));\n //System.out.println(hw1.isPalindrome(\"cat\"));\n //System.out.println(hw1.isPalindrome(\"hannah\"));\n //System.out.println(hw1.isPalindrome(\"saippuakivikauppias\"));\n }",
"public Calculator () {\n\t\ttotal = 0; // not needed - included for clarity\n\t\thistory = \"0\";\n\t}",
"public static void main(String[] args) {\n\t\tcalc obj= new calc();\n\t\tobj.add(9, 8);\n\t\tobj.add(10, 20, 30);\n\t\t\n\n\t}",
"@Test\n public void testCal(){\n Stack<Double> stack = new Stack<>();\n Double num = 3.14;\n stack.push(num);\n operator = new UndoOperator();\n Stack<String> historyStack = new Stack<>();\n historyStack.push(num.toString());\n try {\n operator.cal(stack,historyStack);\n }catch (Exception e){\n Assert.fail(\"No exception should be thrown.\");\n }\n Assert.assertEquals(0,stack.size());\n Assert.assertEquals(0,historyStack.size());\n\n //test \"+\"\n Double result = 100.00;\n stack.clear();\n stack.push(result);\n operator = new UndoOperator();\n Double secOperand = 5.00;\n historyStack.clear();\n historyStack.push(secOperand.toString());\n historyStack.push(OperatorType.PLUS.getName());\n try {\n operator.calculate(stack,historyStack);\n }catch (Exception e){\n Assert.fail(\"No exception should be thrown.\");\n }\n Assert.assertEquals(secOperand,stack.pop(),0.0000001);\n Assert.assertEquals(result-secOperand,stack.pop(),0.0000001);\n\n //test \"-\"\n result = 100.00;\n stack.clear();\n stack.push(result);\n operator = new UndoOperator();\n secOperand = 5.00;\n historyStack.clear();\n historyStack.push(secOperand.toString());\n historyStack.push(OperatorType.MINUS.getName());\n try {\n operator.calculate(stack,historyStack);\n }catch (Exception e){\n Assert.fail(\"No exception should be thrown.\");\n }\n Assert.assertEquals(secOperand,stack.pop(),0.0000001);\n Assert.assertEquals(result+secOperand,stack.pop(),0.0000001);\n\n //test \"*\"\n result = 100.00;\n stack.clear();\n stack.push(result);\n operator = new UndoOperator();\n secOperand = 5.00;\n historyStack.clear();\n historyStack.push(secOperand.toString());\n historyStack.push(OperatorType.MULTIPLY.getName());\n try {\n operator.calculate(stack,historyStack);\n }catch (Exception e){\n Assert.fail(\"No exception should be thrown.\");\n }\n Assert.assertEquals(secOperand,stack.pop(),0.0000001);\n Assert.assertEquals(result/secOperand,stack.pop(),0.0000001);\n\n //test \"/\"\n result = 100.00;\n stack.clear();\n stack.push(result);\n operator = new UndoOperator();\n secOperand = 5.00;\n historyStack.clear();\n historyStack.push(secOperand.toString());\n historyStack.push(OperatorType.DIVIDE.getName());\n try {\n operator.calculate(stack,historyStack);\n }catch (Exception e){\n Assert.fail(\"No exception should be thrown.\");\n }\n Assert.assertEquals(secOperand,stack.pop(),0.0000001);\n Assert.assertEquals(result*secOperand,stack.pop(),0.0000001);\n\n //test \"sqrt\"\n result = 100.00;\n stack.clear();\n stack.push(result);\n operator = new UndoOperator();\n historyStack.clear();\n secOperand = 5.00;\n historyStack.push(secOperand.toString());\n historyStack.push(OperatorType.SQRT.getName());\n try {\n operator.calculate(stack,historyStack);\n }catch (Exception e){\n Assert.fail(\"No exception should be thrown.\");\n }\n Assert.assertEquals(result*result,stack.pop(),0.0000001);\n }",
"public static void main(String[] args) {\n System.out.println(new MultiplesOfThreeAndFive().calculate(1000));\n\n System.out.println(EvenFibonacci.calculateSumOfEvenFibonacciNumbersBelowValue(4000000));\n }",
"public static void main(String[] args) {\n\t\tT07 dut = new T07();\n\t\tdut.calc();\n\t\tdut.calc();\n\t}"
]
| [
"0.63736045",
"0.6338807",
"0.63325053",
"0.61870384",
"0.6176631",
"0.6168635",
"0.6137161",
"0.61254895",
"0.60312974",
"0.59837663",
"0.59646606",
"0.59487605",
"0.59364295",
"0.59344447",
"0.5930448",
"0.59200543",
"0.5919766",
"0.5910121",
"0.59065783",
"0.5881346",
"0.58759695",
"0.58165395",
"0.58128464",
"0.5811951",
"0.58097583",
"0.5799143",
"0.57814187",
"0.5759204",
"0.5743079",
"0.5729041",
"0.5722409",
"0.5709613",
"0.5694684",
"0.5692305",
"0.5674653",
"0.5674567",
"0.5670763",
"0.5670031",
"0.56427526",
"0.5639336",
"0.5621307",
"0.56054294",
"0.55994827",
"0.55978656",
"0.5595751",
"0.5593687",
"0.5593641",
"0.55920684",
"0.5591126",
"0.5583043",
"0.557915",
"0.55790824",
"0.55778134",
"0.5573148",
"0.5571637",
"0.5564266",
"0.5564021",
"0.5562936",
"0.5560501",
"0.55569994",
"0.5547994",
"0.5545108",
"0.5533273",
"0.55332565",
"0.5531758",
"0.552603",
"0.5520943",
"0.55203915",
"0.5509416",
"0.55064034",
"0.5503313",
"0.55024713",
"0.55017895",
"0.5494538",
"0.5489742",
"0.54843754",
"0.54841155",
"0.5476347",
"0.5469764",
"0.54679966",
"0.5467461",
"0.5461247",
"0.5457383",
"0.54499024",
"0.5449242",
"0.54421157",
"0.54397756",
"0.54342777",
"0.54326254",
"0.5431135",
"0.542874",
"0.5428658",
"0.54278654",
"0.5425867",
"0.5424532",
"0.54236275",
"0.5423212",
"0.542236",
"0.54217476",
"0.54196554"
]
| 0.73061854 | 0 |
Use Smali to grab header information from the oat file because vdexExtractor does not give us much information | @Override
protected boolean parseOatFile(String location, Path oatFilePath, Path workingDir, Path archiveDir, String arch, Path bootDirForArch) {
List<String> deps = Collections.emptyList();
int oatLevel = -1;
int apiLevel = -1;
String firstEntry = null;
try {
MultiDexContainer<? extends DexBackedDexFile> container = DexFileFactory.loadDexContainer(oatFilePath.toFile(),
Opcodes.forApi(defaultApi));
if(container instanceof OatFile) {
List<String> temp = ((OatFile)container).getBootClassPath();
oatLevel = ((OatFile)container).getOatVersion();
if(!temp.isEmpty()) {
deps = new ArrayList<>();
for(String s : temp) {
String ext = com.google.common.io.Files.getFileExtension(s);
String name = com.google.common.io.Files.getNameWithoutExtension(s);
if(ext.equals("art")){
deps.add(name + ".oat");
} else {
deps.add(name + "." + ext);
}
}
}
}
firstEntry = container.getDexEntryNames().get(0);
apiLevel = VersionMap.mapArtVersionToApi(oatLevel);
} catch(Throwable t) {
logger.fatal("{}: Failed to parse the oat/odex file header for '{}'.",t,cname,oatFilePath);
return false;
}
//Setup commands to extract dex from vdex
Path vdexFilePath = FileHelpers.getPath(oatFilePath.getParent(),
com.google.common.io.Files.getNameWithoutExtension(oatFilePath.getFileName().toString()) + ".vdex");
List<String> commands = new ArrayList<>();
if(osid == 1) { //windows
// Test to make sure we can execute wsl
try {
ProcessBuilder pb = new ProcessBuilder("wsl", "true");
Process p = pb.start();
int r = p.waitFor();
if(r != 0) {
logger.fatal("{}: Did not successfully execute the command 'wsl true'. Does wsl not exist?",cname);
return false;
}
} catch(Throwable t) {
logger.fatal("{}: Failed to execute the command 'wsl true'.",t,cname);
return false;
}
// wsl run.sh -i "path.vdex" -o "path"
commands.add("wsl");
commands.add(getWSLPath(pathToScript));
commands.add("-i");
commands.add("\"" + getWSLPath(vdexFilePath) + "\"");
commands.add("-o");
commands.add("\"" + getWSLPath(pathToWorkingExeDir) + "\"");
} else {
// run.sh -i "path.vdex" -o "path"
commands.add(pathToScript.toString());
commands.add("-i");
commands.add(vdexFilePath.toString());
commands.add("-o");
commands.add(pathToWorkingExeDir.toString());
}
//Extract dex from vdex
try {
ProcessBuilder pb = new ProcessBuilder(commands.toArray(new String[0]));
pb.directory(pathToWorkingExeDir.toFile());
Process p = pb.start();
BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line;
while((line = br.readLine()) != null) {
line = line.trim();
}
int r = p.waitFor();
if(r != 0) {
logger.fatal("{}: VdexExtractor did not terminate normally when extracting the dex files from vdex file '{}' of "
+ "location '{}'.",cname,vdexFilePath,location);
return false;
}
} catch(Throwable t) {
logger.fatal("{}: Unexpected error. Failed to parse the vdex file '{}' of location '{}'."
,t,cname,vdexFilePath,location);
return false;
}
//Locate the extracted files
Set<Path> extractedDexFiles = null;
Path vdexExtractorOutputDir = FileHelpers.getPath(pathToWorkingExeDir, "vdexExtractor_deodexed");
try {
extractedDexFiles = FileHelpers.find(vdexExtractorOutputDir, "*.dex", null, "f", null, null);
} catch(Throwable t) {
logger.fatal("{}: Unexpected error. Failed to locate the extracted dex files of '{}' at '{}'."
,t,cname,vdexFilePath,vdexExtractorOutputDir);
return false;
}
try {
String[] parts = parseOatEntryString(firstEntry,oatLevel);
String archiveName = parts[0];
String archiveExtension = parts[1];
String key = makeArchiveEntriesKey(location,archiveName,archiveExtension);
VdexExtractorArchiveEntry archiveEntry = archiveEntries.get(key);
if(archiveEntry == null) {
archiveEntry = new VdexExtractorArchiveEntry(archiveName,archiveExtension,location,
FileHelpers.getPath(workingDir, archiveName),archiveDir);
archiveEntries.put(key, archiveEntry);
try {
FileHelpers.processDirectory(archiveEntry.getWorkingDir(), true, false);
} catch(Throwable t) {
logger.fatal("{}: Failed to create the working directory '{}' for the archive entry of oat file "
+ "'{}' of location '{}'.",t,cname,archiveEntry.getWorkingDir(),oatFilePath,location);
}
}
for(Path dexFilePath : extractedDexFiles) {
String fileName = com.google.common.io.Files.getNameWithoutExtension(dexFilePath.getFileName().toString());
Matcher m = vdexExtractorOutputPattern.matcher(fileName);
if(!m.matches()) {
logger.fatal("{}: Unhandled extracted dex file path format for '{}' of '{}' at '{}'.",cname,fileName,vdexFilePath,location);
return false;
}
String dexName = m.group(1).trim();
if(dexName.isEmpty())
dexName = null;
else
dexName = "classes" + dexName + ".dex";
String entry = makeOatEntryString(firstEntry, dexName, oatLevel);
VdexExtractorDexEntry curEntry = archiveEntry.addDexFileData(bootClassPath, bootDirForArch, entry, dexName,
apiLevel, oatLevel, oatFilePath, deps);
try {
Files.copy(dexFilePath, curEntry.getPathToDexFile());
} catch(Throwable t) {
logger.fatal("{}: Failed to copy the extracted dex file at '{}' to the path '{}' for oat file '{}' of "
+ "location '{}'.",t,cname,dexFilePath,curEntry.getPathToDexFile(),oatFilePath,location);
curEntry.setState(State.SETUPERR);
return false;
}
curEntry.setState(State.SETUPSUCC);
}
if(FileHelpers.checkRWDirectoryExists(vdexExtractorOutputDir)){
try{
FileHelpers.removeDirectory(vdexExtractorOutputDir);
}catch(Throwable t){
logger.fatal("{}: Failed to completly remove directory containing the extracted dex files at '{}'.",
t,cname,vdexExtractorOutputDir);
return false;
}
}
} catch(Throwable t) {
logger.fatal("{}: Unexpected error. Failed to process the dex files extracted from '{}' of location '{}'."
,t,cname,vdexFilePath,location);
return false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void writeHeader() throws IOException, FileNotFoundException {\n\n EndianCorrectOutputStream ecs;\n ByteArrayOutputStream baos;\n FileOutputStream fos;\n short s, ss[];\n byte b, bb[], ext_blob[];\n int hsize;\n int i, n;\n int extlist[][];\n\n\n // header is 348 except nii and anz/hdr w/ extensions is 352\n hsize = Nifti1.ANZ_HDR_SIZE;\n if ((header.isDs_is_nii()) || (header.getExtension()[0] != 0)) {\n hsize += 4;\n }\n\n try {\n\n baos = new ByteArrayOutputStream(hsize);\n fos = new FileOutputStream(header.getDs_hdrname());\n\n ecs = new EndianCorrectOutputStream(baos, header.isBig_endian());\n\n\n ecs.writeIntCorrect(header.getSizeof_hdr());\n\n if (header.getData_type_string().length() >= 10) {\n ecs.writeBytes(header.getData_type_string().substring(0, 10));\n } else {\n ecs.writeBytes(header.getData_type_string().toString());\n for (i = 0; i < (10 - header.getData_type_string().length()); i++) {\n ecs.writeByte(0);\n }\n }\n\n if (header.getDb_name().length() >= 18) {\n ecs.writeBytes(header.getDb_name().substring(0, 18));\n } else {\n ecs.writeBytes(header.getDb_name().toString());\n for (i = 0; i < (18 - header.getDb_name().length()); i++) {\n ecs.writeByte(0);\n }\n }\n\n ecs.writeIntCorrect(header.getExtents());\n\n ecs.writeShortCorrect(header.getSession_error());\n\n ecs.writeByte((int) header.getRegular().charAt(0));\n\n b = packDimInfo(header.getFreq_dim(), header.getPhase_dim(), header.getSlice_dim());\n ecs.writeByte((int) b);\n\n for (i = 0; i < 8; i++) {\n ecs.writeShortCorrect(header.getDim()[i]);\n }\n\n for (i = 0; i < 3; i++) {\n ecs.writeFloatCorrect(header.getIntent()[i]);\n }\n\n ecs.writeShortCorrect(header.getIntent_code());\n\n ecs.writeShortCorrect(header.getDatatype());\n\n ecs.writeShortCorrect(header.getBitpix());\n\n ecs.writeShortCorrect(header.getSlice_start());\n\n for (i = 0; i < 8; i++) {\n ecs.writeFloatCorrect(header.getPixdim()[i]);\n }\n\n\n ecs.writeFloatCorrect(header.getVox_offset());\n\n ecs.writeFloatCorrect(header.getScl_slope());\n ecs.writeFloatCorrect(header.getScl_inter());\n\n ecs.writeShortCorrect(header.getSlice_end());\n\n ecs.writeByte((int) header.getSlice_code());\n\n ecs.writeByte((int) packUnits(header.getXyz_unit_code(), header.getT_unit_code()));\n\n\n ecs.writeFloatCorrect(header.getCal_max());\n ecs.writeFloatCorrect(header.getCal_min());\n\n ecs.writeFloatCorrect(header.getSlice_duration());\n\n ecs.writeFloatCorrect(header.getToffset());\n\n ecs.writeIntCorrect(header.getGlmax());\n ecs.writeIntCorrect(header.getGlmin());\n\n ecs.write(setStringSize(header.getDescrip(), 80), 0, 80);\n ecs.write(setStringSize(header.getAux_file(), 24), 0, 24);\n\n\n ecs.writeShortCorrect(header.getQform_code());\n ecs.writeShortCorrect(header.getSform_code());\n\n for (i = 0; i < 3; i++) {\n ecs.writeFloatCorrect(header.getQuatern()[i]);\n }\n for (i = 0; i < 3; i++) {\n ecs.writeFloatCorrect(header.getQoffset()[i]);\n }\n\n for (i = 0; i < 4; i++) {\n ecs.writeFloatCorrect(header.getSrow_x()[i]);\n }\n for (i = 0; i < 4; i++) {\n ecs.writeFloatCorrect(header.getSrow_y()[i]);\n }\n for (i = 0; i < 4; i++) {\n ecs.writeFloatCorrect(header.getSrow_z()[i]);\n }\n\n\n ecs.write(setStringSize(header.getIntent_name(), 16), 0, 16);\n ecs.write(setStringSize(header.getMagic(), 4), 0, 4);\n\n\n // nii or anz/hdr w/ ext. gets 4 more\n if ((header.isDs_is_nii()) || (header.getExtension()[0] != 0)) {\n for (i = 0; i < 4; i++) {\n ecs.writeByte((int) header.getExtension()[i]);\n }\n }\n\n /** write the header blob to disk */\n baos.writeTo(fos);\n\n } catch (IOException ex) {\n throw new IOException(\"Error: unable to write header file \" + header.getDs_hdrname() + \": \" + ex.getMessage());\n }\n\n\n\n /** write the extension blobs **/\n try {\n\n ////// extensions\n if (header.getExtension()[0] != 0) {\n\n baos = new ByteArrayOutputStream(Nifti1.EXT_KEY_SIZE);\n ecs = new EndianCorrectOutputStream(baos, header.isBig_endian());\n extlist = header.getExtensionsList();\n n = extlist.length;\n for (i = 0; i < n; i++) {\n // write size, code\n ecs.writeIntCorrect(extlist[i][0]);\n ecs.writeIntCorrect(extlist[i][1]);\n baos.writeTo(fos);\n baos.reset();\n\n // write data blob\n ext_blob = (byte[]) header.getExtension_blobs().get(i);\n fos.write(ext_blob, 0, extlist[i][0] - Nifti1.EXT_KEY_SIZE);\n }\n }\n\n fos.close();\n } catch (IOException ex) {\n throw new IOException(\"Error: unable to write header extensions for file \" + header.getDs_hdrname() + \": \" + ex.getMessage());\n }\n\n\n }",
"private void initMetadata() throws IOException {\n \n // start by reading the file header\n in.seek(0);\n byte[] toRead = new byte[4];\n in.read(toRead);\n long order = batoi(toRead); // byte ordering\n little = toRead[2] != 0xff || toRead[3] != 0xff;\n metadata.put(\"Byte Order\", new Boolean(little));\n \n in.skipBytes(4);\n in.read(toRead);\n long version = DataTools.bytesToLong(toRead, little);\n metadata.put(\"Version\", new Long(version));\n \n byte[] er = new byte[2];\n in.read(er);\n short count = DataTools.bytesToShort(er, little);\n metadata.put(\"Count\", new Short(count));\n \n in.skipBytes(2);\n \n in.read(toRead);\n long offset = DataTools.bytesToLong(toRead, little);\n \n // skip to first tag\n in.seek(offset);\n \n // read in each tag and its data\n \n for (int i=0; i<count; i++) {\n in.read(er);\n short tag = DataTools.bytesToShort(er, little);\n in.skipBytes(2);\n \n in.read(toRead);\n offset = DataTools.bytesToLong(toRead, little);\n \n in.read(toRead);\n long fmt = DataTools.bytesToLong(toRead, little);\n metadata.put(\"Format\", new Long(fmt));\n \n in.read(toRead);\n long numBytes = DataTools.bytesToLong(toRead, little);\n metadata.put(\"NumBytes\", new Long(numBytes));\n \n if (tag == 67 || tag == 68) {\n byte[] b = new byte[1];\n in.read(b);\n boolean isOpenlab2;\n if (b[0] == '0') isOpenlab2 = false;\n else isOpenlab2 = true;\n metadata.put(\"isOpenlab2\", new Boolean(isOpenlab2));\n \n in.skipBytes(2);\n in.read(er);\n short layerId = DataTools.bytesToShort(er, little);\n metadata.put(\"LayerID\", new Short(layerId));\n \n in.read(er);\n short layerType = DataTools.bytesToShort(er, little);\n metadata.put(\"LayerType\", new Short(layerType));\n \n in.read(er);\n short bitDepth = DataTools.bytesToShort(er, little);\n metadata.put(\"BitDepth\", new Short(bitDepth));\n \n in.read(er);\n short opacity = DataTools.bytesToShort(er, little);\n metadata.put(\"Opacity\", new Short(opacity));\n \n // not sure how many bytes to skip here\n in.skipBytes(10);\n \n in.read(toRead);\n long type = DataTools.bytesToLong(toRead, little);\n metadata.put(\"ImageType\", new Long(type));\n \n // not sure how many bytes to skip\n in.skipBytes(10);\n \n in.read(toRead);\n long timestamp = DataTools.bytesToLong(toRead, little);\n metadata.put(\"Timestamp\", new Long(timestamp));\n \n in.skipBytes(2);\n \n if (isOpenlab2 == true) {\n byte[] layerName = new byte[127];\n in.read(layerName);\n metadata.put(\"LayerName\", new String(layerName));\n \n in.read(toRead);\n long timestampMS = DataTools.bytesToLong(toRead, little);\n metadata.put(\"Timestamp-MS\", new Long(timestampMS));\n \n in.skipBytes(1);\n byte[] notes = new byte[118];\n in.read(notes);\n metadata.put(\"Notes\", new String(notes));\n }\n else in.skipBytes(123);\n }\n else if (tag == 69) {\n in.read(toRead);\n long platform = DataTools.bytesToLong(toRead, little);\n metadata.put(\"Platform\", new Long(platform));\n \n in.read(er);\n short units = DataTools.bytesToShort(er, little);\n metadata.put(\"Units\", new Short(units));\n \n in.read(er);\n short imageId = DataTools.bytesToShort(er, little);\n metadata.put(\"ID\", new Short(imageId));\n in.skipBytes(1);\n \n byte[] toRead2 = new byte[8];\n double xOrigin = DataTools.readDouble(in, little);\n metadata.put(\"XOrigin\", new Double(xOrigin));\n double yOrigin = DataTools.readDouble(in, little);\n metadata.put(\"YOrigin\", new Double(yOrigin));\n double xScale = DataTools.readDouble(in, little);\n metadata.put(\"XScale\", new Double(xScale));\n double yScale = DataTools.readDouble(in, little);\n metadata.put(\"YScale\", new Double(yScale));\n in.skipBytes(1);\n \n byte[] other = new byte[31];\n in.read(other);\n metadata.put(\"Other\", new String(other));\n }\n \n // Initialize OME metadata\n \n if (ome != null) {\n OMETools.setBigEndian(ome, !little);\n if (metadata.get(\"BitDepth\") != null) {\n int bitDepth = ((Integer) metadata.get(\"BitDepth\")).intValue();\n String type;\n \n if (bitDepth <= 8) type = \"int8\";\n else if (bitDepth <= 16) type = \"int16\";\n else type = \"int32\";\n \n OMETools.setPixelType(ome, type);\n }\n if (metadata.get(\"Timestamp\") != null) {\n OMETools.setCreationDate(ome, (String) metadata.get(\"Timestamp\"));\n }\n \n if (metadata.get(\"XOrigin\") != null) {\n Double xOrigin = (Double) metadata.get(\"XOrigin\");\n OMETools.setStageX(ome, xOrigin.floatValue());\n }\n \n if (metadata.get(\"YOrigin\") != null) {\n Double yOrigin = (Double) metadata.get(\"YOrigin\");\n OMETools.setStageY(ome, yOrigin.floatValue());\n }\n \n if (metadata.get(\"XScale\") != null) {\n Double xScale = (Double) metadata.get(\"XScale\");\n OMETools.setPixelSizeX(ome, xScale.floatValue());\n }\n \n if (metadata.get(\"YScale\") != null) {\n Double yScale = (Double) metadata.get(\"YScale\");\n OMETools.setPixelSizeY(ome, yScale.floatValue());\n }\n }\n in.seek(offset);\n }\n }",
"com.didiyun.base.v1.Header getHeader();",
"public IMAGE_FILE_HEADER getFileHeader() { return peHeader; }",
"private void readHeader(){ \n Set<Object> tmpAttr = headerFile.keySet();\n Object[] attributes = tmpAttr.toArray(new Object[tmpAttr.size()]);\n \n Object[][] dataArray = new Object[attributes.length][2];\n for (int ndx = 0; ndx < attributes.length; ndx++) {\n dataArray[ndx][0] = attributes[ndx];\n dataArray[ndx][1] = headerFile.get(attributes[ndx]);\n if (attributes[ndx].toString().equals(\"Description\"))\n Description = headerFile.get(attributes[ndx]);\n }\n data = dataArray;\n }",
"public void parseHeader() {\n\t\tthis.release = (Integer) this.headerData.get(0);\n\t\tthis.endian = (ByteOrder) this.headerData.get(1);\n\t\tthis.K = (Short) this.headerData.get(2);\n\t\tthis.datasetLabel = (String) this.headerData.get(4);\n\t\tthis.datasetTimeStamp = (String) this.headerData.get(5);\n\t\tthis.mapOffset = (Integer) this.headerData.get(6);\n\t}",
"public String getFileHeaderInfo() {\n return this.fileHeaderInfo;\n }",
"public VCFHeader getHeader();",
"private void readHeader() {\n version = \"\";\n XmlNode node = _document.SelectSingleNode(\"//ovf:Envelope\", _xmlNS);\n if (node != null) {\n version = node.attributes.get(\"ovf:version\").getValue();\n }\n }",
"public IMAGE_DOS_HEADER getDOSHeader() { return dosHeader; }",
"private void parseHeader() throws IOException {\n\n\t\t// ////////////////////////////////////////////////////////////\n\t\t// Administrative header info\n\t\t// ////////////////////////////////////////////////////////////\n\n\t\t// First 10 bytes reserved for preamble\n\t\tbyte[] sixBytes = new byte[6];\n\t\tkeyBuffer.get(sixBytes, 0, 6);\n\t\tlogger.log(new String(sixBytes) + \"\\n\"); // says adac01\n\n\t\ttry {\n\n\t\t\tshort labels = keyBuffer.getShort();\n\t\t\tlogger.log(Integer.toString(labels)); // Number of labels in header\n\t\t\tlogger.log(Integer.toString(keyBuffer.get())); // Number of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// sub-headers\n\t\t\tlogger.log(Integer.toString(keyBuffer.get())); // Unused byte\n\n\t\t\t// For each header field available.. get them\n\t\t\tfor (short i = 0; i < labels; i++) {\n\n\t\t\t\t// Attempt to find the next key...\n\t\t\t\t// ...the keynum (description)\n\t\t\t\t// ...the offset to the value\n\t\t\t\tADACKey key = getKeys();\n\t\t\t\tswitch (key.getDataType()) {\n\n\t\t\t\tcase ADACDictionary.BYTE:\n\n\t\t\t\t\tkeyList.add(new ByteKvp(this, key));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ADACDictionary.SHORT:\n\n\t\t\t\t\tkeyList.add(new ShortKvp(this, key));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ADACDictionary.INT:\n\n\t\t\t\t\tkeyList.add(new IntKvp(this, key));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ADACDictionary.FLOAT:\n\n\t\t\t\t\tkeyList.add(new FloatKvp(this, key));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ADACDictionary.EXTRAS:\n\n\t\t\t\t\tkeyList.add(new ExtrasKvp(this, key));\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\tlogger.error(\"ADAC Decoder\", \"Failed to retrieve ADAC image file header. \" + \"Is this an ADAC image file?\");\n\t\t}\n\t}",
"private void readHeader() throws IOException {\n\n header = new byte[ShapeConst.SHAPE_FILE_HEADER_LENGTH];\n\n /*\n * Make sure we're at the beginning of the file\n */\n rafShp.seek(0); \n\n rafShp.read(header, 0, ShapeConst.SHAPE_FILE_HEADER_LENGTH);\n\n int fileCode = ByteUtils.readBEInt(header, 0);\n\n if (fileCode != ShapeConst.SHAPE_FILE_CODE) {\n\n throw new IOException(\"Invalid file code, \" + \"probably not a shape file\");\n\n }\n\n fileVersion = ByteUtils.readLEInt(header, 28);\n\n if (fileVersion != ShapeConst.SHAPE_FILE_VERSION) {\n\n throw new IOException(\"Unable to read shape files with version \" +\n fileVersion);\n\n }\n\n fileLength = ByteUtils.readBEInt(header, 24);\n\n /* \n * convert from 16-bit words to 8-bit bytes\n */\n fileLength *= 2;\n\n fileShapeType = ByteUtils.readLEInt(header, 32);\n\n /*\n * read ESRIBoundingBox and convert to SHPEnvelope\n */\n fileMBR = new SHPEnvelope(ShapeUtils.readBox(header, 36));\n\n }",
"public static String getHeaderLine()\n {\n return \"j2ksec,eid,lat,lon,depth,mag\";\n }",
"public void mapHeader(){\r\n\t\tString header = readNextLine();\r\n\t\tif (header == null) return;\r\n\t\t\r\n\t\tString split[] = header.split(Constants.SPLIT_MARK);\r\n\t\tfor (int i=0; i < Constants.HEADER.length; i++){\r\n\t\t\tmapHeader.put(Constants.HEADER[i], Constants.UNKNOWN);\r\n\t\t\tfor (int j = 0; j < split.length; j++){\r\n\t\t\t\tif (Constants.HEADER[i].equals(split[j])){\r\n\t\t\t\t\tmapHeader.put(Constants.HEADER[i], j);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void processHeader()\n {\n try{\n String line = oReader.readLine();\n String regrex = line.replaceAll(\"[^0-9]+\",\"\"); //only looking at the numbers\n this.maxmem = Integer.parseInt(regrex.substring(4, 8), 16);\n mem = new MainMemory(maxmem);\n\n } catch(IOException e)\n {\n e.printStackTrace();\n }\n }",
"public boolean readHeader(final boolean loadTagBuffer) throws IOException {\r\n int[] extents;\r\n String type, // type of data; there are 7, see FileInfoDicom\r\n name; // string representing the tag\r\n\r\n boolean endianess = FileBase.LITTLE_ENDIAN; // all DICOM files start as little endian (tags 0002)\r\n boolean flag = true;\r\n\r\n if (loadTagBuffer == true) {\r\n loadTagBuffer();\r\n }\r\n\r\n String strValue = null;\r\n Object data = null;\r\n FileDicomSQ sq = null;\r\n\r\n try {\r\n extents = new int[2];\r\n } catch (final OutOfMemoryError e) {\r\n\r\n if ( !isQuiet()) {\r\n MipavUtil.displayError(\"Out of memory in FileDicom.readHeader\");\r\n Preferences.debug(\"Out of memory in FileDicom.readHeader\\n\", Preferences.DEBUG_FILEIO);\r\n } else {\r\n Preferences.debug(\"Out of memory in FileDicom.readHeader\\n\", Preferences.DEBUG_FILEIO);\r\n }\r\n\r\n throw new IOException(\"Out of Memory in FileDicom.readHeader\");\r\n }\r\n\r\n metaGroupLength = 0;\r\n elementLength = 0;\r\n fileInfo.setEndianess(endianess);\r\n\r\n skipBytes(ID_OFFSET); // Find \"DICM\" tag\r\n\r\n // In v. 3.0, within the ID_OFFSET is general header information that\r\n // is not encoded into data elements and not present in DICOM v. 2.0.\r\n // However, it is optional.\r\n\r\n if ( !getString(4).equals(\"DICM\")) {\r\n fileInfo.containsDICM = false;\r\n seek(0); // set file pointer to zero\r\n }\r\n\r\n fileInfo.setDataType(ModelStorageBase.SHORT); // Default file type\r\n\r\n final FileDicomTagTable tagTable = fileInfo.getTagTable();\r\n\r\n while (flag == true) {\r\n\r\n int bPtrOld = bPtr;\r\n boolean isPrivate = false;\r\n if (fileInfo.containsDICM) {\r\n\r\n // endianess is defined in a tag and set here, after the transfer\r\n // syntax group has been read in\r\n if (getFilePointer() >= (ID_OFFSET + 4 + metaGroupLength)) {\r\n endianess = fileInfo.getEndianess();\r\n // Preferences.debug(\"endianess = \" + endianess + \"\\n\", Preferences.DEBUG_FILEIO);\r\n }\r\n } else {\r\n\r\n if (getFilePointer() >= metaGroupLength) {\r\n endianess = fileInfo.getEndianess();\r\n }\r\n }\r\n\r\n // ******* Gets the next element\r\n getNextElement(endianess); // gets group, element, length\r\n name = convertGroupElement(groupWord, elementWord);\r\n\r\n if (name.equals(\"2005,140F\")) {\r\n System.out.println(\"Begin debug analysis.\");\r\n }\r\n\r\n final FileDicomKey key = new FileDicomKey(name);\r\n int tagVM;\r\n\r\n // Preferences.debug(\"group = \" + groupWord + \" element = \" + elementWord + \" length = \" +\r\n // elementLength + \"\\n\", Preferences.DEBUG_FILEIO);\r\n\r\n if ( (fileInfo.vr_type == FileInfoDicom.IMPLICIT) || (groupWord == 2)) {\r\n\r\n // implicit VR means VR is based on tag as defined in dictionary\r\n type = DicomDictionary.getType(key);\r\n tagVM = DicomDictionary.getVM(key);\r\n\r\n // the tag was not found in the dictionary..\r\n if (type == null) {\r\n type = \"typeUnknown\";\r\n tagVM = 0;\r\n }\r\n } else { // Explicit VR\r\n // System.err.println(\"Working with explicit: \"+key);\r\n\r\n type = FileDicomTagInfo.getType(new String(vr));\r\n\r\n if ( !DicomDictionary.containsTag(key)) { // a private tag\r\n tagVM = 0;\r\n isPrivate = true;\r\n } else { // not a private tag\r\n\r\n final FileDicomTagInfo info = DicomDictionary.getInfo(key);\r\n // this is required if DicomDictionary contains wild card characters\r\n info.setKey(key);\r\n tagVM = info.getValueMultiplicity();\r\n }\r\n }\r\n\r\n if ( (elementWord == 0) && (elementLength == 0)) { // End of file\r\n\r\n if ( !isQuiet()) {\r\n MipavUtil.displayError(\"Error: Unexpected end of file: \" + fileName\r\n + \" Unable to load image.\");\r\n }\r\n\r\n throw new IOException(\"Error while reading header\");\r\n }\r\n\r\n if ( (getFilePointer() & 1) != 0) { // The file location pointer is at an odd byte number\r\n\r\n if ( !isQuiet()) {\r\n MipavUtil.displayError(\"Error: Input file corrupted. Unable to load image.\");\r\n }\r\n\r\n // System.err.println(\"name: \"+ name + \" , len: \" + Integer.toString(elementLength, 0x10));\r\n System.err.println(\"ERROR CAUSED BY READING IMAGE ON ODD BYTE\");\r\n throw new IOException(\"Error while reading header\");\r\n }\r\n\r\n try {\r\n bPtrOld = bPtr;\r\n if (type.equals(\"typeString\")) {\r\n strValue = getString(elementLength);\r\n } else if (type.equals(\"otherByteString\")) {\r\n\r\n if ( !name.equals(FileDicomInner.IMAGE_TAG)) {\r\n data = getByte(tagVM, elementLength, endianess);\r\n }\r\n } else if (type.equals(\"otherWordString\") && !name.equals(\"0028,1201\") && !name.equals(\"0028,1202\")\r\n && !name.equals(\"0028,1203\")) {\r\n\r\n if ( !name.equals(FileDicomInner.IMAGE_TAG)) {\r\n data = getByte(tagVM, elementLength, endianess);\r\n }\r\n } else if (type.equals(\"typeShort\")) {\r\n data = getShort(tagVM, elementLength, endianess);\r\n } else if (type.equals(\"typeInt\")) {\r\n data = getInteger(tagVM, elementLength, endianess);\r\n } else if (type.equals(\"typeFloat\")) {\r\n data = getFloat(tagVM, elementLength, endianess);\r\n } else if (type.equals(\"typeDouble\")) {\r\n data = getDouble(tagVM, elementLength, endianess);\r\n }\r\n // (type == \"typeUnknown\" && elementLength == -1) Implicit sequence tag if not in DICOM dictionary.\r\n else if (type.equals(\"typeSequence\") || ( (type == \"typeUnknown\") && (elementLength == -1))) {\r\n final int len = elementLength;\r\n\r\n // save these values because they'll change as the sequence is read in below.\r\n Preferences.debug(\"Sequence Tags: (\" + name + \"); length = \" + len + \"\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n\r\n sq = (FileDicomSQ) getSequence(endianess, len, name);\r\n sequenceTags.put(key, sq);\r\n // System.err.print( \"SEQUENCE DONE: Sequence Tags: (\" + key + \")\"+\" \"+type);\r\n // Integer.toString(len, 0x10) + \"\\n\");\r\n\r\n try {\r\n\r\n } catch (final NullPointerException e) {\r\n System.err.println(\"Null pointer exception while setting value. Trying to put new tag.\");\r\n }\r\n Preferences.debug(\"Finished sequence tags.\\n\\n\", Preferences.DEBUG_FILEIO);\r\n }\r\n\r\n // check if private\r\n if (isPrivate) {\r\n if (type.equals(\"typeString\")) {\r\n privateTags.put(key, strValue);\r\n } else if ( !type.equals(\"typeSequence\")) {\r\n privateTags.put(key, data);\r\n } else {\r\n privateTags.put(key, sq);\r\n }\r\n }\r\n\r\n // check if should anonymize, note user can specify private tags to anonymize\r\n if (tagExistInAnonymizeTagIDs(key.toString())) {\r\n\r\n // System.out.print(\"Writing \"+key+\"\\t\");\r\n\r\n final long raPtrOld = raFile.getFilePointer();\r\n if (type.equals(\"typeString\")) {\r\n\r\n // System.out.println(strValue);\r\n anonymizeTags.put(key, strValue);\r\n String anonStr = \"\";\r\n if (key.equals(\"0008,0014\") || key.equals(\"0008,0018\") || key.equals(\"0020,000E\")\r\n || key.equals(\"0020,000D\") || key.equals(\"0020,0010\") || key.equals(\"0020,0052\")) {\r\n final Random r = new Random();\r\n\r\n for (int i = 0; i < strValue.length(); i++) {\r\n if (strValue.charAt(i) == '.') {\r\n anonStr = anonStr + \".\";\r\n } else if (key.equals(\"0008,0018\")) {\r\n anonStr = anonStr + r.nextInt(10);\r\n } else {\r\n anonStr = anonStr + \"1\";\r\n }\r\n }\r\n } else {\r\n for (int i = 0; i < strValue.length(); i++) {\r\n anonStr = anonStr + \"X\";\r\n }\r\n }\r\n\r\n raFile.seek(bPtrOld);\r\n raFile.writeBytes(anonStr); // non-anon would be strValue\r\n raFile.seek(raPtrOld);\r\n System.out.println(\"Writing \" + strValue + \" to \" + bPtrOld + \". Returned raPtr to \"\r\n + raPtrOld);\r\n } else if (type.equals(\"otherByteString\")) {\r\n\r\n if ( !name.equals(FileDicomInner.IMAGE_TAG)) {\r\n // System.out.println(data);\r\n anonymizeTags.put(key, data);\r\n\r\n final byte[] b = new byte[ ((Byte[]) data).length];\r\n for (int i = 0; i < b.length; i++) {\r\n b[i] = 0;\r\n }\r\n raFile.seek(bPtrOld);\r\n raFile.write(b);\r\n raFile.seek(raPtrOld);\r\n }\r\n } else if (type.equals(\"otherWordString\") && !name.equals(\"0028,1201\")\r\n && !name.equals(\"0028,1202\") && !name.equals(\"0028,1203\")) {\r\n\r\n if ( !name.equals(FileDicomInner.IMAGE_TAG)) {\r\n // System.out.println(data);\r\n anonymizeTags.put(key, data);\r\n\r\n final byte[] b = new byte[ ((Byte[]) data).length];\r\n for (int i = 0; i < b.length; i++) {\r\n b[i] = 0;\r\n }\r\n raFile.seek(bPtrOld);\r\n raFile.write(b);\r\n raFile.seek(raPtrOld);\r\n }\r\n } else if (type.equals(\"typeShort\")) {\r\n // System.out.println(data);\r\n anonymizeTags.put(key, data);\r\n\r\n raFile.seek(bPtrOld);\r\n if (data instanceof Short || data instanceof Integer) {\r\n writeShort((short) 0, endianess);\r\n } else if (data instanceof Short[] || data instanceof Integer[]) {\r\n if (data instanceof Integer[]) {\r\n System.err.println(\"Unusual data type encountered\");\r\n }\r\n for (int i = 0; i < ((Short[]) data).length; i++) {\r\n writeShort((short) 0, endianess);\r\n }\r\n } else {\r\n System.err.println(\"Data corruption\");\r\n }\r\n raFile.seek(raPtrOld);\r\n } else if (type.equals(\"typeInt\")) {\r\n // System.out.println(data);\r\n anonymizeTags.put(key, data);\r\n\r\n raFile.seek(bPtrOld);\r\n if (data instanceof Integer) {\r\n writeInt(0, endianess);\r\n } else if (data instanceof Integer[]) {\r\n for (int i = 0; i < ((Integer[]) data).length; i++) {\r\n writeInt(0, endianess);\r\n }\r\n } else {\r\n System.err.println(\"Data corruption\");\r\n }\r\n raFile.seek(raPtrOld);\r\n } else if (type.equals(\"typeFloat\")) {\r\n // System.out.println(data);\r\n anonymizeTags.put(key, data);\r\n\r\n raFile.seek(bPtrOld);\r\n if (data instanceof Float) {\r\n writeFloat(0, endianess);\r\n } else if (data instanceof Float[] || data instanceof Double[]) {\r\n if (data instanceof Double[]) {\r\n System.err.println(\"Unusual data type encountered\");\r\n }\r\n for (int i = 0; i < ((Float[]) data).length; i++) {\r\n writeFloat(0, endianess);\r\n }\r\n } else {\r\n System.err.println(\"Data corruption\");\r\n }\r\n raFile.seek(raPtrOld);\r\n } else if (type.equals(\"typeDouble\")) {\r\n anonymizeTags.put(key, data);\r\n\r\n raFile.seek(bPtrOld);\r\n if (data instanceof Double) {\r\n writeDouble(0, endianess);\r\n } else if (data instanceof Double[]) {\r\n for (int i = 0; i < ((Double[]) data).length; i++) {\r\n writeDouble(0, endianess);\r\n }\r\n } else {\r\n System.err.println(\"Data corruption\");\r\n }\r\n raFile.seek(raPtrOld);\r\n }\r\n }\r\n } catch (final OutOfMemoryError e) {\r\n\r\n if ( !isQuiet()) {\r\n MipavUtil.displayError(\"Out of memory in FileDicom.readHeader\");\r\n Preferences.debug(\"Out of memory in FileDicom.readHeader\\n\", Preferences.DEBUG_FILEIO);\r\n } else {\r\n Preferences.debug(\"Out of memory in FileDicom.readHeader\\n\", Preferences.DEBUG_FILEIO);\r\n }\r\n\r\n e.printStackTrace();\r\n\r\n throw new IOException();\r\n }\r\n\r\n if (name.equals(\"0002,0000\")) { // length of the transfer syntax group\r\n\r\n if (data != null) {\r\n metaGroupLength = ((Integer) (data)).intValue() + 12; // 12 is the length of 0002,0000 tag\r\n }\r\n\r\n Preferences.debug(\"metalength = \" + metaGroupLength + \" location \" + getFilePointer() + \"\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n } else if (name.equals(\"0018,602C\")) {\r\n fileInfo.setUnitsOfMeasure(FileInfoBase.CENTIMETERS, 0);\r\n } else if (name.equals(\"0018,602E\")) {\r\n fileInfo.setUnitsOfMeasure(FileInfoBase.CENTIMETERS, 1);\r\n } else if (name.equals(\"0002,0010\")) {\r\n\r\n // Transfer Syntax UID: DICOM part 10 page 13, part 5 p. 42-48, Part 6 p. 53\r\n // 1.2.840.10008.1.2 Implicit VR Little Endian (Default)\r\n // 1.2.840.10008.1.2.1 Explicit VR Little Endian\r\n // 1.2.840.10008.1.2.2 Explicit VR Big Endian\r\n // 1.2.840.10008.1.2.4.50 8-bit Lossy JPEG (JPEG Coding Process 1)\r\n // 1.2.840.10008.1.2.4.51 12-bit Lossy JPEG (JPEG Coding Process 4)\r\n // 1.2.840.10008.1.2.4.57 Lossless JPEG Non-hierarchical (JPEG Coding Process 14)\r\n // we should bounce out if we don't support this transfer syntax\r\n if (strValue.trim().equals(\"1.2.840.10008.1.2\")) {\r\n Preferences.debug(\"File Dicom: readHeader - Transfer Syntax = \" + strValue\r\n + \" Implicit VR - Little Endian \\n\", Preferences.DEBUG_FILEIO);\r\n\r\n fileInfo.setEndianess(FileBase.LITTLE_ENDIAN);\r\n fileInfo.vr_type = FileInfoDicom.IMPLICIT;\r\n encapsulated = false;\r\n } else if (strValue.trim().equals(\"1.2.840.10008.1.2.1\")) {\r\n Preferences.debug(\"File Dicom: readHeader - Transfer Syntax = \" + strValue\r\n + \" Explicit VR - Little Endian \\n\", Preferences.DEBUG_FILEIO);\r\n\r\n fileInfo.setEndianess(FileBase.LITTLE_ENDIAN);\r\n fileInfo.vr_type = FileInfoDicom.EXPLICIT;\r\n encapsulated = false;\r\n } else if (strValue.trim().equals(\"1.2.840.10008.1.2.2\")) {\r\n Preferences.debug(\"File Dicom: readHeader - Transfer Syntax = \" + strValue\r\n + \" Explicit VR - Big Endian \\n\", Preferences.DEBUG_FILEIO);\r\n\r\n fileInfo.setEndianess(FileBase.BIG_ENDIAN);\r\n fileInfo.vr_type = FileInfoDicom.EXPLICIT;\r\n encapsulated = false;\r\n } else if (strValue.trim().startsWith(\"1.2.840.10008.1.2.4.\")) { // JPEG\r\n Preferences.debug(\"File Dicom: readHeader - Transfer Syntax = \" + strValue\r\n + \" Implicit VR - Little Endian \\n\", Preferences.DEBUG_FILEIO);\r\n\r\n fileInfo.setEndianess(FileBase.LITTLE_ENDIAN);\r\n fileInfo.vr_type = FileInfoDicom.EXPLICIT;\r\n encapsulated = true;\r\n\r\n if (strValue.trim().equals(\"1.2.840.10008.1.2.4.57\")\r\n || strValue.trim().equals(\"1.2.840.10008.1.2.4.58\")\r\n || strValue.trim().equals(\"1.2.840.10008.1.2.4.65\")\r\n || strValue.trim().equals(\"1.2.840.10008.1.2.4.66\")\r\n || strValue.trim().equals(\"1.2.840.10008.1.2.4.70\")) {\r\n lossy = false;\r\n } else {\r\n lossy = true;\r\n }\r\n } else {\r\n Preferences.debug(\"File Dicom: readHeader - Transfer Syntax = \" + strValue + \" unknown!\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n\r\n if ( !isQuiet()) {\r\n MipavUtil.displayError(\"MIPAV does not support transfer syntax:\\n\" + strValue);\r\n }\r\n\r\n flag = false; // break loop\r\n\r\n return false; // couldn't read it!\r\n }\r\n } else if (name.equals(FileDicomInner.IMAGE_TAG)) { // && elementLength!=0) { // The image.\r\n System.out.println(\"Reading \" + name + \" image data\");\r\n // This complicated code determines whether or not the offset is correct for the image.\r\n // For that to be true, (height * width * pixel spacing) + the present offset should equal\r\n // the length of the file. If not, 4 might need to be added (I don't know why). If not again,\r\n // the function returns false.\r\n\r\n final int imageLength = extents[0] * extents[1] * fileInfo.bitsAllocated / 8;\r\n\r\n Preferences.debug(\"File Dicom: readHeader - Data tag = \" + FileDicomInner.IMAGE_TAG + \"\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n Preferences.debug(\"File Dicom: readHeader - imageLength = \" + imageLength + \"\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n Preferences.debug(\"File Dicom: readHeader - getFilePointer = \" + getFilePointer() + \"\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n\r\n if (fileInfo.getModality() == FileInfoBase.POSITRON_EMISSION_TOMOGRAPHY) {\r\n fileInfo.displayType = ModelStorageBase.FLOAT;\r\n } else {\r\n fileInfo.displayType = fileInfo.getDataType();\r\n }\r\n\r\n if ( !encapsulated) {\r\n // System.err.println( \"\\n\" +\r\n // Long.toString(getFilePointer()) + \" \" +\r\n // Long.toString(raFile.length()) +\r\n // \" image length = \" + imageLength );\r\n\r\n long fileEnd;\r\n\r\n if (loadTagBuffer == true) {\r\n fileEnd = raFile.length();\r\n } else {\r\n fileEnd = fLength;\r\n }\r\n\r\n if ( (imageLength + getFilePointer()) <= fileEnd) {\r\n fileInfo.setOffset(getFilePointer()); // Mark where the image is\r\n }\r\n // I think the extra 4 bytes is for explicit tags!!\r\n // see Part 5 page 27 1998\r\n else if ( (imageLength + getFilePointer() + 4) <= fileEnd) {\r\n fileInfo.setOffset(getFilePointer() + 4);\r\n } else {\r\n\r\n // Preferences.debug( \"File Dicom: readHeader: xDim = \" + extents[0] + \" yDim = \" +\r\n // extents[1] +\r\n // \" Bits allocated = \" + fileInfo.bitsAllocated, 2);\r\n if ( !isQuiet()) {\r\n MipavUtil.displayError(\"Image not at expected offset.\");\r\n }\r\n\r\n throw new IOException(\"Error while reading header\");\r\n }\r\n } else { // encapsulated\r\n fileInfo.setOffset( (getFilePointer() - 12));\r\n }\r\n\r\n fileInfo.setExtents(extents);\r\n flag = false; // break loop\r\n } else if (type.equals(\"typeUnknown\")) { // Private tag, may not be reading in correctly.\r\n\r\n try {\r\n\r\n // set the value if the tag is in the dictionary (which means it isn't private..) or has already\r\n // been put into the tag table without a value (private tag with explicit vr)\r\n if (DicomDictionary.containsTag(key) || tagTable.containsTag(key)) {\r\n final Object obj = readUnknownData();\r\n Preferences.debug(\"Note unknown data (\" + key + \"):\\t\" + obj + \"\\t\" + elementLength);\r\n\r\n // tagTable.setValue(key, readUnknownData(), elementLength);\r\n } else {\r\n final Object obj = readUnknownData();\r\n Preferences.debug(\"Note private data (\" + key + \"):\\t\" + obj + \"\\t\" + elementLength);\r\n privateTags.put(key, obj);\r\n\r\n // tagTable\r\n // .putPrivateTagValue(new FileDicomTagInfo(key, null, tagVM, \"PrivateTag\", \"Private Tag\"));\r\n\r\n // tagTable.setValue(key, readUnknownData(), elementLength);\r\n\r\n Preferences.debug(\"Group = \" + groupWord + \" element = \" + elementWord + \" Type unknown\"\r\n + \"; value = \" + strValue + \"; element length = \" + elementLength + \"\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n }\r\n } catch (final OutOfMemoryError e) {\r\n\r\n if ( !isQuiet()) {\r\n MipavUtil.displayError(\"Out of memory error while reading \\\"\" + fileName\r\n + \"\\\".\\nThis may not be a DICOM image.\");\r\n Preferences.debug(\"Out of memory storing unknown tags in FileDicom.readHeader\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n } else {\r\n Preferences.debug(\"Out of memory storing unknown tags in FileDicom.readHeader\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n }\r\n\r\n e.printStackTrace();\r\n\r\n throw new IOException(\"Out of memory storing unknown tags in FileDicom.readHeader\");\r\n } catch (final NullPointerException npe) {\r\n System.err.println(\"name: \" + name);\r\n System.err.print(\"no hashtable? \");\r\n System.err.println(tagTable == null);\r\n throw npe;\r\n }\r\n }\r\n }\r\n // Done reading tags\r\n\r\n String photometricInterp = null;\r\n\r\n if (tagTable.getValue(\"0028,0004\") != null) {\r\n fileInfo.photometricInterp = ((String) (tagTable.getValue(\"0028,0004\"))).trim();\r\n photometricInterp = fileInfo.photometricInterp.trim();\r\n }\r\n\r\n if (photometricInterp == null) { // Default to MONOCROME2 and hope for the best\r\n photometricInterp = new String(\"MONOCHROME2\");\r\n }\r\n\r\n if ( (photometricInterp.equals(\"MONOCHROME1\") || photometricInterp.equals(\"MONOCHROME2\"))\r\n && (fileInfo.pixelRepresentation == FileInfoDicom.UNSIGNED_PIXEL_REP)\r\n && (fileInfo.bitsAllocated == 8)) {\r\n fileInfo.setDataType(ModelStorageBase.UBYTE);\r\n fileInfo.displayType = ModelStorageBase.UBYTE;\r\n fileInfo.bytesPerPixel = 1;\r\n } else if ( (photometricInterp.equals(\"MONOCHROME1\") || photometricInterp.equals(\"MONOCHROME2\"))\r\n && (fileInfo.pixelRepresentation == FileInfoDicom.SIGNED_PIXEL_REP)\r\n && (fileInfo.bitsAllocated == 8)) {\r\n fileInfo.setDataType(ModelStorageBase.BYTE);\r\n fileInfo.displayType = ModelStorageBase.BYTE;\r\n fileInfo.bytesPerPixel = 1;\r\n } else if ( (photometricInterp.equals(\"MONOCHROME1\") || photometricInterp.equals(\"MONOCHROME2\"))\r\n && (fileInfo.pixelRepresentation == FileInfoDicom.UNSIGNED_PIXEL_REP)\r\n && (fileInfo.bitsAllocated > 8)) {\r\n fileInfo.setDataType(ModelStorageBase.USHORT);\r\n fileInfo.displayType = ModelStorageBase.USHORT;\r\n fileInfo.bytesPerPixel = 2;\r\n } else if ( (photometricInterp.equals(\"MONOCHROME1\") || photometricInterp.equals(\"MONOCHROME2\"))\r\n && (fileInfo.pixelRepresentation == FileInfoDicom.SIGNED_PIXEL_REP) && (fileInfo.bitsAllocated > 8)) {\r\n fileInfo.setDataType(ModelStorageBase.SHORT);\r\n fileInfo.displayType = ModelStorageBase.SHORT;\r\n fileInfo.bytesPerPixel = 2;\r\n }\r\n // add something for RGB DICOM images - search on this !!!!\r\n else if (photometricInterp.equals(\"RGB\") && (fileInfo.bitsAllocated == 8)) {\r\n fileInfo.setDataType(ModelStorageBase.ARGB);\r\n fileInfo.displayType = ModelStorageBase.ARGB;\r\n fileInfo.bytesPerPixel = 3;\r\n\r\n if (tagTable.getValue(\"0028,0006\") != null) {\r\n fileInfo.planarConfig = ((Short) (tagTable.getValue(\"0028,0006\"))).shortValue();\r\n } else {\r\n fileInfo.planarConfig = 0; // rgb, rgb, rgb\r\n }\r\n } else if (photometricInterp.equals(\"YBR_FULL_422\") && (fileInfo.bitsAllocated == 8) && encapsulated) {\r\n fileInfo.setDataType(ModelStorageBase.ARGB);\r\n fileInfo.displayType = ModelStorageBase.ARGB;\r\n fileInfo.bytesPerPixel = 3;\r\n\r\n if (tagTable.getValue(\"0028,0006\") != null) {\r\n fileInfo.planarConfig = ((Short) (tagTable.getValue(\"0028,0006\"))).shortValue();\r\n } else {\r\n fileInfo.planarConfig = 0; // rgb, rgb, rgb\r\n }\r\n } else if (photometricInterp.equals(\"PALETTE COLOR\")\r\n && (fileInfo.pixelRepresentation == FileInfoDicom.UNSIGNED_PIXEL_REP)\r\n && (fileInfo.bitsAllocated == 8)) {\r\n fileInfo.setDataType(ModelStorageBase.UBYTE);\r\n fileInfo.displayType = ModelStorageBase.UBYTE;\r\n fileInfo.bytesPerPixel = 1;\r\n\r\n final int[] dimExtents = new int[2];\r\n dimExtents[0] = 4;\r\n dimExtents[1] = 256;\r\n lut = new ModelLUT(ModelLUT.GRAY, 256, dimExtents);\r\n\r\n for (int q = 0; q < dimExtents[1]; q++) {\r\n lut.set(0, q, 1); // the alpha channel is preloaded.\r\n }\r\n // sets the LUT to exist; we wait for the pallete tags to\r\n // describe what the lut should actually look like.\r\n } else {\r\n Preferences.debug(\"File DICOM: readImage() - Unsupported pixel Representation\",\r\n Preferences.DEBUG_FILEIO);\r\n\r\n if (raFile != null) {\r\n raFile.close();\r\n }\r\n\r\n return false;\r\n }\r\n\r\n if (fileInfo.getModality() == FileInfoBase.POSITRON_EMISSION_TOMOGRAPHY) {\r\n fileInfo.displayType = ModelStorageBase.FLOAT;\r\n // a bit of a hack - indicates Model image should be reallocated to float for PET image the data is\r\n // stored\r\n // as 2 bytes (short) but is \"normalized\" using the slope parameter required for PET images (intercept\r\n // always 0 for PET).\r\n }\r\n\r\n if ( ( (fileInfo.getDataType() == ModelStorageBase.UBYTE) || (fileInfo.getDataType() == ModelStorageBase.USHORT))\r\n && (fileInfo.getRescaleIntercept() < 0)) {\r\n // this performs a similar method as the pet adjustment for float images stored on disk as short to read\r\n // in\r\n // signed byte and signed short images stored on disk as unsigned byte or unsigned short with a negative\r\n // rescale intercept\r\n if (fileInfo.getDataType() == ModelStorageBase.UBYTE) {\r\n fileInfo.displayType = ModelStorageBase.BYTE;\r\n } else if (fileInfo.getDataType() == ModelStorageBase.USHORT) {\r\n fileInfo.displayType = ModelStorageBase.SHORT;\r\n }\r\n }\r\n\r\n if (tagTable.getValue(\"0028,1201\") != null) {\r\n // red channel LUT\r\n final FileDicomTag tag = tagTable.get(new FileDicomKey(\"0028,1201\"));\r\n final Object[] values = tag.getValueList();\r\n final int lutVals = values.length;\r\n\r\n // load LUT.\r\n if (values instanceof Byte[]) {\r\n\r\n for (int qq = 0; qq < lutVals; qq++) {\r\n lut.set(1, qq, ((Byte) values[qq]).intValue());\r\n }\r\n } else {\r\n\r\n for (int qq = 0; qq < lutVals; qq++) {\r\n lut.set(1, qq, ((Short) values[qq]).intValue());\r\n }\r\n }\r\n }\r\n\r\n if (tagTable.getValue(\"0028,1202\") != null) {\r\n\r\n // green channel LUT\r\n final FileDicomTag tag = tagTable.get(new FileDicomKey(\"0028,1202\"));\r\n final Object[] values = tag.getValueList();\r\n final int lutVals = values.length;\r\n\r\n // load LUT.\r\n if (values instanceof Byte[]) {\r\n\r\n for (int qq = 0; qq < lutVals; qq++) {\r\n lut.set(2, qq, ((Byte) values[qq]).intValue());\r\n }\r\n } else {\r\n\r\n for (int qq = 0; qq < lutVals; qq++) {\r\n lut.set(2, qq, ((Short) values[qq]).intValue());\r\n }\r\n }\r\n }\r\n\r\n if (tagTable.getValue(\"0028,1203\") != null) {\r\n\r\n // blue channel LUT\r\n final FileDicomTag tag = tagTable.get(new FileDicomKey(\"0028,1203\"));\r\n final Object[] values = tag.getValueList();\r\n final int lutVals = values.length;\r\n\r\n // load LUT.\r\n if (values instanceof Byte[]) {\r\n\r\n for (int qq = 0; qq < lutVals; qq++) {\r\n lut.set(3, qq, ((Byte) values[qq]).intValue());\r\n }\r\n } else {\r\n\r\n for (int qq = 0; qq < lutVals; qq++) {\r\n lut.set(3, qq, ((Short) values[qq]).intValue());\r\n }\r\n }\r\n\r\n // here we make the lut indexed because we know that\r\n // all the LUT tags are in the LUT.\r\n lut.makeIndexedLUT(null);\r\n }\r\n\r\n hasHeaderBeenRead = true;\r\n\r\n if ( (loadTagBuffer == true) && (raFile != null)) {\r\n raFile.close();\r\n }\r\n\r\n return true;\r\n }",
"com.didiyun.base.v1.HeaderOrBuilder getHeaderOrBuilder();",
"public interface Header {\n\n short getId();\n\n String getPhone();\n\n short getNo();\n\n short getLength();\n\n EncryptType getEncryptType();\n}",
"public String printHeader() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"\\n***********************************\\n\");\n sb.append(\"\\tAbacus\\n\");\n try {\n sb.append(\"\\tVersion: \");\n //sb.append(abacus.class.getPackage().getImplementationVersion());\n sb.append(\"2.6\");\n } catch (Exception e) {\n // Don't print anything\n }\n sb.append(\"\\n***********************************\\n\")\n .append(\"Developed and written by: Damian Fermin and Alexey Nesvizhskii\\n\")\n .append(\"Modifications by Dmitry Avtonomov\\n\")\n .append(\"Copyright 2010 Damian Fermin\\n\\n\")\n .append(\"Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\")\n .append(\"you may not use this file except in compliance with the License.\\n\")\n .append(\"You may obtain a copy of the License at \\n\\n\")\n .append(\"http://www.apache.org/licenses/LICENSE-2.0\\n\\n\")\n .append(\"Unless required by applicable law or agreed to in writing, software\\n\")\n .append(\"distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\")\n .append(\"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\")\n .append(\"See the License for the specific language governing permissions and\\n\")\n .append(\"limitations under the License.\\n\\n\");\n return sb.toString();\n }",
"public SAMFileHeader getFileHeader() {\n return dest.getFileHeader();\n }",
"public interface MetaInfo {\n\n String DIR_EMPTY = \"empty\";\n\n\n //===========================\n float WEIGHT_CAMERA_MOTION = 1;\n float WEIGHT_LOCATION = 1;\n float WEIGHT_MEDIA_TYPE = 1;\n float WEIGHT_SHORT_TYPE = 1;\n\n float WEIGHT_MEDIA_DIR = 3f;\n float WEIGHT_TIME = 3;\n float WEIGHT_VIDEO_TAG = 2.5f;\n float WEIGHT_SHOT_KEY = 5f;\n float WEIGHT_SHOT_CATEGORY = 2.5f;\n\n int FLAG_TIME = 0x0001;\n int FLAG_LOCATION = 0x0002;\n int FLAG_MEDIA_TYPE = 0x0004;\n int FLAG_MEDIA_DIR = 0x0008;\n int FLAG_SHOT_TYPE = 0x0010;\n int FLAG_CAMERA_MOTION = 0x0020;\n int FLAG_VIDEO_TAG = 0x0040;\n int FLAG_SHOT_KEY = 0x0080;\n int FLAG_SHOT_CATEGORY = 0x0100;\n\n //================= location ==================\n int LOCATION_NEAR_GPS = 1;\n int LOCATION_SAME_COUNTRY = 2;\n int LOCATION_SAME_PROVINCE = 3; //省,市,区\n int LOCATION_SAME_CITY = 4;\n int LOCATION_SAME_REGION = 5;\n\n //=================== for camera motion ====================\n int STILL = 0; // 静止, class 0\n int ZOOM = 3; // 前后移动(zoomIn or zoomOut), class 1\n int ZOOM_IN = 4;\n int ZOOM_OUT = 5;\n int PAN = 6; // 横向移动(leftRight or rightLeft), class 2\n int PAN_LEFT_RIGHT = 7;\n int PAN_RIGHT_LEFT = 8;\n int TILT = 9; // 纵向移动(upDown or downUp), class 3\n int TILT_UP_DOWN = 10;\n int TILT_DOWN_UP = 11;\n int CATEGORY_STILL = 1;\n int CATEGORY_ZOOM = 2;\n int CATEGORY_PAN = 3;\n int CATEGORY_TILT = 4;\n\n //图像类型。视频,图片。 已有\n\n //============== shooting device =================\n /**\n * the shoot device: cell phone\n */\n int SHOOTING_DEVICE_CELLPHONE = 1;\n /**\n * the shoot device: camera\n */\n int SHOOTING_DEVICE_CAMERA = 2;\n\n /**\n * the shoot device: drone\n */\n int SHOOTING_DEVICE_DRONE = 3; //无人机\n\n\n //====================== shooting mode ===========================\n /**\n * shooting mode: normal\n */\n int SHOOTING_MODE_NORMAL = 1;\n /**\n * shooting mode: slow motion\n */\n int SHOOTING_MODE_SLOW_MOTION = 2;\n /**\n * shooting mode: time lapse\n */\n int SHOOTING_MODE_TIME_LAPSE = 3;\n\n //=========================== shot type =======================\n /**\n * shot type: big - long- short ( 大远景)\n */\n int SHOT_TYPE_BIG_LONG_SHORT = 5;\n /**\n * shot type: long short ( 远景)\n */\n int SHOT_TYPE_LONG_SHORT = 4;\n\n /** medium long shot. (中远景) */\n int SHOT_TYPE_MEDIUM_LONG_SHOT = 3;\n /**\n * shot type: medium shot(中景)\n */\n int SHOT_TYPE_MEDIUM_SHOT = 2;\n /**\n * shot type: close up - chest ( 特写-胸)\n */\n int SHOT_TYPE_MEDIUM_CLOSE_UP = 1;\n\n /**\n * shot type: close up -head ( 特写-头)\n */\n int SHOT_TYPE_CLOSE_UP = 0;\n\n int SHOT_TYPE_NONE = -1;\n\n int CATEGORY_CLOSE_UP = 12; //特写/近景\n int CATEGORY_MIDDLE_VIEW = 11; //中景\n int CATEGORY_VISION = 10; //远景\n\n //========================== time ==========================\n int[] MORNING_HOURS = {7, 8, 9, 10, 11};\n int[] AFTERNOON_HOURS = {12, 13, 14, 15, 16, 17};\n //int[] NIGHT_HOURS = {18, 19, 20, 21, 22, 24, 1, 2, 3, 4, 5, 6};\n int TIME_SAME_DAY = 1;\n int TIME_SAME_PERIOD_IN_DAY = 2; //timeSamePeriodInDay\n\n class LocationMeta {\n private double longitude, latitude;\n /**\n * 高程精度比水平精度低原因,主要是GPS测出的是WGS-84坐标系下的大地高,而我们工程上,也就是电子地图上采用的高程一般是正常高,\n * 它们之间的转化受到高程异常和大地水准面等误差的制约。\n * 卫星在径向的定轨精度较差,也限制了GPS垂直方向的精度。\n */\n private int gpsHeight; //精度不高\n private String country, province, city, region; //国家, 省, 市, 区\n\n public double getLongitude() {\n return longitude;\n }\n\n public void setLongitude(double longitude) {\n this.longitude = longitude;\n }\n\n public double getLatitude() {\n return latitude;\n }\n\n public void setLatitude(double latitude) {\n this.latitude = latitude;\n }\n\n public String getCountry() {\n return country;\n }\n\n public void setCountry(String country) {\n this.country = country;\n }\n\n public String getProvince() {\n return province;\n }\n\n public void setProvince(String province) {\n this.province = province;\n }\n\n public String getCity() {\n return city;\n }\n\n public void setCity(String city) {\n this.city = city;\n }\n\n public String getRegion() {\n return region;\n }\n\n public void setRegion(String region) {\n this.region = region;\n }\n\n public int getGpsHeight() {\n return gpsHeight;\n }\n\n public void setGpsHeight(int gpsHeight) {\n this.gpsHeight = gpsHeight;\n }\n\n @Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n\n LocationMeta that = (LocationMeta) o;\n\n if (Double.compare(that.longitude, longitude) != 0) return false;\n if (Double.compare(that.latitude, latitude) != 0) return false;\n if (gpsHeight != that.gpsHeight) return false;\n if (country != null ? !country.equals(that.country) : that.country != null)\n return false;\n if (province != null ? !province.equals(that.province) : that.province != null)\n return false;\n if (city != null ? !city.equals(that.city) : that.city != null) return false;\n return region != null ? region.equals(that.region) : that.region == null;\n }\n }\n\n /**\n * the meta data of image/video ,something may from 'AI'.\n */\n class ImageMeta extends SimpleCopyDelegate{\n private String path;\n private int mediaType;\n /** in mills */\n private long date;\n\n /** in mill-seconds */\n private long duration;\n private int width, height;\n\n private LocationMeta location;\n\n /**\n * frames/second\n */\n private int fps = 30;\n /** see {@linkplain IShotRecognizer#CATEGORY_ENV} and etc. */\n private int shotCategory;\n /**\n * the shot type\n */\n private String shotType;\n\n /** shot key */\n private String shotKey;\n /**\n * 相机运动\n */\n private String cameraMotion;\n /** video tags */\n private List<List<Integer>> tags;\n\n /** the whole frame data of video(from analyse , like AI. ), after read should not change */\n private SparseArray<VideoDataLoadUtils.FrameData> frameDataMap;\n /** the high light data. key is the time in seconds. */\n private SparseArray<List<? extends IHighLightData>> highLightMap;\n private HighLightHelper mHighLightHelper;\n\n /** 主人脸个数 */\n private int mainFaceCount = -1;\n private int mBodyCount = -1;\n\n /** 通用tag信息 */\n private List<FrameTags> rawVideoTags;\n /** 人脸框信息 */\n private List<FrameFaceRects> rawFaceRects;\n\n //tag indexes\n private List<Integer> nounTags;\n private List<Integer> domainTags;\n private List<Integer> adjTags;\n\n private Location subjectLocation;\n\n //-------------------------- start High-Light ----------------------------\n /** set metadata for high light data. (from load high light) */\n public void setMediaData(MediaData mediaData) {\n List<MediaData.HighLightPair> hlMap = mediaData.getHighLightDataMap();\n if(!Predicates.isEmpty(hlMap)) {\n highLightMap = new SparseArray<>();\n VisitServices.from(hlMap).fire(new FireVisitor<MediaData.HighLightPair>() {\n @Override\n public Boolean visit(MediaData.HighLightPair pair, Object param) {\n List<MediaData.HighLightData> highLightData = VEGapUtils.filterHighLightByScore(pair.getDatas());\n if(!Predicates.isEmpty(highLightData)){\n highLightMap.put(pair.getTime(), highLightData);\n }\n return null;\n }\n });\n }\n mHighLightHelper = new HighLightHelper(highLightMap, mediaType == IPathTimeTraveller.TYPE_IMAGE);\n }\n @SuppressWarnings(\"unchecked\")\n public KeyValuePair<Integer, List<IHighLightData>> getHighLight(int time){\n return mHighLightHelper.getHighLight(time);\n }\n @SuppressWarnings(\"unchecked\")\n public KeyValuePair<Integer, List<IHighLightData>> getHighLight(ColorGapContext context, ITimeTraveller tt){\n return mHighLightHelper.getHighLight(context, tt);\n }\n\n public List<KeyValuePair<Integer, List<IHighLightData>>> getHighLights(ColorGapContext context, ITimeTraveller tt){\n return mHighLightHelper.getHighLights(context, tt);\n }\n @SuppressWarnings(\"unchecked\")\n public HighLightArea getHighLightArea(ColorGapContext context, ITimeTraveller tt){\n return mHighLightHelper.getHighLightArea(context, tt);\n }\n\n public void setHighLightMap(SparseArray<List<? extends IHighLightData>> highLightMap) {\n this.highLightMap = highLightMap;\n this.mHighLightHelper = new HighLightHelper(highLightMap, mediaType == IPathTimeTraveller.TYPE_IMAGE);\n }\n\n //-------------------------- end High-Light ----------------------------\n public SparseArray<VideoDataLoadUtils.FrameData> getFrameDataMap() {\n if(frameDataMap == null){\n frameDataMap = new SparseArray<>();\n }\n return frameDataMap;\n }\n public void setFrameDataMap(SparseArray<VideoDataLoadUtils.FrameData> frameDataMap) {\n this.frameDataMap = frameDataMap;\n }\n public void travelAllFrameDatas(Map.MapTravelCallback<Integer, VideoDataLoadUtils.FrameData> traveller){\n Throwables.checkNull(frameDataMap);\n CollectionUtils.travel(frameDataMap, traveller);\n }\n\n public List<Integer> getNounTags() {\n return nounTags != null ? nounTags : Collections.emptyList();\n }\n public void setNounTags(List<Integer> nounTags) {\n this.nounTags = nounTags;\n }\n\n public List<Integer> getDomainTags() {\n return domainTags != null ? domainTags : Collections.emptyList();\n }\n public void setDomainTags(List<Integer> domainTags) {\n this.domainTags = domainTags;\n }\n\n public List<Integer> getAdjTags() {\n return adjTags != null ? adjTags : Collections.emptyList();\n }\n public void setAdjTags(List<Integer> adjTags) {\n this.adjTags = adjTags;\n }\n public void setShotCategory(int shotCategory) {\n this.shotCategory = shotCategory;\n }\n\n public int getShotCategory() {\n return shotCategory;\n }\n public String getShotKey() {\n return shotKey;\n }\n public void setShotKey(String shotKey) {\n this.shotKey = shotKey;\n }\n\n public int getMainFaceCount() {\n return mainFaceCount;\n }\n public void setMainFaceCount(int mainFaceCount) {\n this.mainFaceCount = mainFaceCount;\n }\n public int getMediaType() {\n return mediaType;\n }\n public void setMediaType(int mediaType) {\n this.mediaType = mediaType;\n }\n\n public String getPath() {\n return path;\n }\n\n public void setPath(String path) {\n this.path = path;\n }\n\n /** date in mills */\n public long getDate() {\n return date;\n }\n /** date in mills */\n public void setDate(long date) {\n this.date = date;\n }\n\n public long getDuration() {\n return duration;\n }\n\n /** set duration in mill-seconds */\n public void setDuration(long duration) {\n this.duration = duration;\n }\n\n public int getWidth() {\n return width;\n }\n\n public void setWidth(int width) {\n this.width = width;\n }\n\n public int getHeight() {\n return height;\n }\n\n public void setHeight(int height) {\n this.height = height;\n }\n\n public int getFps() {\n return fps;\n }\n\n public void setFps(int fps) {\n this.fps = fps;\n }\n\n public String getShotType() {\n return shotType;\n }\n\n public void setShotType(String shotType) {\n this.shotType = shotType;\n }\n\n public String getCameraMotion() {\n return cameraMotion;\n }\n\n public void setCameraMotion(String cameraMotion) {\n this.cameraMotion = cameraMotion;\n }\n\n public List<List<Integer>> getTags() {\n return tags;\n }\n public void setTags(List<List<Integer>> tags) {\n this.tags = tags;\n }\n public LocationMeta getLocation() {\n return location;\n }\n public void setLocation(LocationMeta location) {\n this.location = location;\n }\n public void setBodyCount(int size) {\n this.mBodyCount = size;\n }\n public int getBodyCount(){\n return mBodyCount;\n }\n public int getPersonCount() {\n return Math.max(mBodyCount, mainFaceCount);\n }\n\n public Location getSubjectLocation() {\n return subjectLocation;\n }\n public void setSubjectLocation(Location subjectLocation) {\n this.subjectLocation = subjectLocation;\n }\n\n //============================================================\n public List<FrameFaceRects> getAllFaceRects() {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameFaceRects> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n FrameFaceRects faceRects = frameDataMap.valueAt(i).getFaceRects();\n if(faceRects != null) {\n result.add(faceRects);\n }else{\n //no face we just add a mock\n }\n }\n return result;\n }\n public List<FrameTags> getVideoTags(ITimeTraveller part) {\n return getVideoTags(part.getStartTime(), part.getEndTime());\n }\n\n /** get all video tags. startTime and endTime in frames */\n public List<FrameTags> getVideoTags(long startTime, long endTime) {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameTags> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n long key = CommonUtils.timeToFrame(frameDataMap.keyAt(i), TimeUnit.SECONDS);\n if(key >= startTime && key <= endTime){\n FrameTags tag = frameDataMap.valueAt(i).getTag();\n if(tag != null) {\n result.add(tag);\n }\n }\n }\n return result;\n }\n public List<FrameTags> getAllVideoTags() {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameTags> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n //long key = CommonUtils.timeToFrame(frameDataMap.keyAt(i), TimeUnit.SECONDS);\n FrameTags tag = frameDataMap.valueAt(i).getTag();\n if(tag != null) {\n result.add(tag);\n }\n }\n return result;\n }\n public List<FrameFaceRects> getFaceRects(ITimeTraveller part) {\n return getFaceRects(part.getStartTime(), part.getEndTime());\n }\n /** get all face rects. startTime and endTime in frames */\n public List<FrameFaceRects> getFaceRects(long startTime, long endTime) {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameFaceRects> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n long key = CommonUtils.timeToFrame(frameDataMap.keyAt(i), TimeUnit.SECONDS);\n if(key >= startTime && key <= endTime){\n FrameFaceRects faceRects = frameDataMap.valueAt(i).getFaceRects();\n if(faceRects != null) {\n result.add(faceRects);\n }\n }\n }\n return result;\n }\n\n public void setRawVideoTags(List<FrameTags> tags) {\n rawVideoTags = tags;\n }\n public List<FrameTags> getRawVideoTags() {\n return rawVideoTags;\n }\n\n public List<FrameFaceRects> getRawFaceRects() {\n return rawFaceRects;\n }\n public void setRawFaceRects(List<FrameFaceRects> rawFaceRects) {\n this.rawFaceRects = rawFaceRects;\n }\n /** 判断这段原始视频内容是否是“人脸为主”. work before cut */\n public boolean containsFaces(){\n if(rawFaceRects == null){\n if(frameDataMap == null){\n return false;\n }\n rawFaceRects = getAllFaceRects();\n }\n if(Predicates.isEmpty(rawFaceRects)){\n return false;\n }\n List<FrameFaceRects> tempList = new ArrayList<>();\n VisitServices.from(rawFaceRects).visitForQueryList((ffr, param) -> ffr.hasRect(), tempList);\n float result = tempList.size() * 1f / rawFaceRects.size();\n Logger.d(\"ImageMeta\", \"isHumanContent\", \"human.percent = \"\n + result + \" ,path = \" + path);\n return result > 0.55f;\n }\n\n /** 判断这段原始视频是否被标记原始tag(人脸 or 通用) . work before cut */\n public boolean hasRawTags(){\n return frameDataMap != null && frameDataMap.size() > 0;\n }\n\n @Override\n public void setFrom(SimpleCopyDelegate sc) {\n if(sc instanceof ImageMeta){\n ImageMeta src = (ImageMeta) sc;\n setShotType(src.getShotType());\n setShotCategory(src.getShotCategory());\n setShotKey(src.getShotKey());\n\n setMainFaceCount(src.getMainFaceCount());\n setDuration(src.getDuration());\n setMediaType(src.getMediaType());\n setPath(src.getPath());\n setCameraMotion(src.getCameraMotion());\n setDate(src.getDate());\n setFps(src.getFps());\n setHeight(src.getHeight());\n setWidth(src.getWidth());\n //not deep copy\n setTags(src.tags);\n setAdjTags(src.adjTags);\n setNounTags(src.nounTags);\n setDomainTags(src.domainTags);\n\n setLocation(src.getLocation());\n setRawFaceRects(src.getRawFaceRects());\n setRawVideoTags(src.getRawVideoTags());\n setFrameDataMap(src.frameDataMap);\n setHighLightMap(src.highLightMap);\n }\n }\n }\n\n}",
"public VicarBinaryLabel getBinaryHeader() throws IOException;",
"public String getHeader();",
"@Test\n public void validHeaderTest(){\n //test for a complete header with some missing values\n Header h;\n SimpleReader sr = new SimpleReader();\n String fileForLexer = sr.FileToString(\"sample_abc/piece1.abc\");\n abcLexer lex = new abcLexer(fileForLexer);\n abcParser parser = new abcParser(lex);\n h=parser.parseHeader();\n assertEquals(h.getIndex(),\"1\");\n assertEquals(h.getTitle(),\"PieceNo.1\");\n assertEquals(h.getComposer(),\"Unknown\");//uses a default value\n assertEquals(h.getIndex(),\"1\");\n assertEquals(h.getMeter(),\"4/4\");\n assertEquals(h.getNoteLength(),\"1/4\");\n assertEquals(h.getTempo(),\"140\");\n assertEquals(h.getKey(),\"C\");\n }",
"stockFilePT102.StockHeaderDocument.StockHeader getStockHeader();",
"java.lang.String getHeader();",
"@Test(expected=RuntimeException.class)\n public void missingPartOfHeader(){\n Header h;\n SimpleReader sr = new SimpleReader();\n String fileForLexer = sr.FileToString(\"sample_abc/invalid_for_testing.abc\");\n abcLexer lex = new abcLexer(fileForLexer);\n abcParser parser = new abcParser(lex);\n h=parser.parseHeader();}",
"private void write_adts_header(byte[] frame, int offset) {\n frame[offset] = (byte) 0xff;\n frame[offset + 1] = (byte) 0xf0;\n // versioin 0 for MPEG-4, 1 for MPEG-2 (1-bit)\n frame[offset + 1] |= 0 << 3;\n // layer 0 (2-bit)\n frame[offset + 1] |= 0 << 1;\n // protection absent: 1 (1-bit)\n frame[offset + 1] |= 1;\n // profile: audio_object_type - 1 (2-bit)\n frame[offset + 2] = (SrsAacObjectType.AacLC - 1) << 6;\n // sampling frequency index: 4 (4-bit)\n frame[offset + 2] |= (4 & 0xf) << 2;\n // channel configuration (3-bit)\n frame[offset + 2] |= (2 & (byte) 0x4) >> 2;\n frame[offset + 3] = (byte) ((2 & (byte) 0x03) << 6);\n // original: 0 (1-bit)\n frame[offset + 3] |= 0 << 5;\n // home: 0 (1-bit)\n frame[offset + 3] |= 0 << 4;\n // copyright id bit: 0 (1-bit)\n frame[offset + 3] |= 0 << 3;\n // copyright id start: 0 (1-bit)\n frame[offset + 3] |= 0 << 2;\n // frame size (13-bit)\n frame[offset + 3] |= ((frame.length - 2) & 0x1800) >> 11;\n frame[offset + 4] = (byte) (((frame.length - 2) & 0x7f8) >> 3);\n frame[offset + 5] = (byte) (((frame.length - 2) & 0x7) << 5);\n // buffer fullness (0x7ff for variable bitrate)\n frame[offset + 5] |= (byte) 0x1f;\n frame[offset + 6] = (byte) 0xfc;\n // number of data block (nb - 1)\n frame[offset + 6] |= 0x0;\n }",
"String getHeader(String headerName);",
"public String getHeader() {\n\t\tString header = \"id\" + \",\" + \"chrId\" + \",\" + \"strand\" + \",\" + \"TSS\" + \",\" + \"PolyASite\"\n\t\t\t\t\t\t+ \",\" + \"5SSPos\" + \",\" + \"3SSPos\" + \",\" + \"intronLength\" + \",\" + \"terminalExonLength\"\n\t\t\t\t\t\t+ \",\" + \"BPS_3SS_distance\" + \",\" + \"PolyPyGCContent\" + \",\" + \"IntronGCContent\" + \",\" + \"terminalExonGCContent\"\n\t\t\t\t\t\t+ \",\" + \"5SS\" + \",\" + \"3SS\" + \",\" + \"BPS\"\n\t\t\t\t\t\t+ \",\" + \"5SSRank\" + \",\" + \"3SSRank\" + \",\" + \"BPSRank\"\n\t\t\t\t\t\t+ \",\" + \"5SSLevenshteinDistance\" + \",\" + \"3SSLevenshteinDistance\" + \",\" + \"BPSLevenshteinDistance\";\n\t\treturn header; \n\t}",
"@Test\n public void voicesAndvarMeterHeaderTest(){\n Header h;\n SimpleReader sr = new SimpleReader();\n String fileForLexer = sr.FileToString(\"sample_abc/invention.abc\");\n abcLexer lex = new abcLexer(fileForLexer);\n abcParser parser = new abcParser(lex);\n h=parser.parseHeader();\n assertEquals(h.getMeter(),\"4/4\");// this will test for M:C\n ArrayList<String> voice = new ArrayList<String>();\n voice.add(\"V:1\");\n voice.add(\"V:2\");\n assertEquals(h.getVoice(),voice);\n }",
"public IMAGE_SECTION_HEADER[] getSectionHeader() { return peFileSections; }",
"public abstract String header();",
"public IMAGE_OPTIONAL_HEADER32 getOptionalHeader32() { return (IMAGE_OPTIONAL_HEADER32) peOptionalHeader; }",
"public ByteBuffer getHeader() {\n ByteBuffer wrap;\n byte[] bArr;\n if (this.largeBox || getSize() >= 4294967296L) {\n bArr = new byte[16];\n bArr[3] = (byte) 1;\n bArr[4] = this.type.getBytes()[0];\n bArr[5] = this.type.getBytes()[1];\n bArr[6] = this.type.getBytes()[2];\n bArr[7] = this.type.getBytes()[3];\n wrap = ByteBuffer.wrap(bArr);\n wrap.position(8);\n IsoTypeWriter.writeUInt64(wrap, getSize());\n } else {\n bArr = new byte[8];\n bArr[4] = this.type.getBytes()[0];\n bArr[5] = this.type.getBytes()[1];\n bArr[6] = this.type.getBytes()[2];\n bArr[7] = this.type.getBytes()[3];\n wrap = ByteBuffer.wrap(bArr);\n IsoTypeWriter.writeUInt32(wrap, getSize());\n }\n wrap.rewind();\n return wrap;\n }",
"public Object initialize(final File source) throws FileNotFoundException {\n List<String> header = null;\n int linesLookedAt = 0;\n xReadLines reader = new xReadLines(source);\n \n for ( String line : reader ) {\n Matcher m = HEADER_PATTERN.matcher(line);\n if ( m.matches() ) {\n //System.out.printf(\"Found a header line: %s%n\", line);\n header = new ArrayList<String>(Arrays.asList(line.split(DELIMITER_REGEX)));\n //System.out.printf(\"HEADER IS %s%n\", Utils.join(\":\", header));\n }\n \n if ( linesLookedAt++ > MAX_LINES_TO_LOOK_FOR_HEADER )\n break;\n }\n \n // check that we found the header\n if ( header != null ) {\n logger.debug(String.format(\"HEADER IS %s%n\", Utils.join(\":\", header)));\n } else {\n // use the indexes as the header fields\n logger.debug(\"USING INDEXES FOR ROD HEADER\");\n // reset if necessary\n if ( !reader.hasNext() )\n reader = new xReadLines(source);\n header = new ArrayList<String>();\n int tokens = reader.next().split(DELIMITER_REGEX).length;\n for ( int i = 0; i < tokens; i++)\n header.add(Integer.toString(i));\n }\n \n return header;\n }",
"public static DataHeader readDataHeader(ArchiveFileBuffer buffer, CtrlInfoReader info) throws Exception\n {\n final File file = buffer.getFile();\n final long offset = buffer.offset();\n\n // first part of data file header:\n // 4 bytes directory_offset (skipped)\n // \" next_offset (offset of next entry in its file)\n // \" prev_offset (offset of previous entry in its file)\n // \" cur_offset (used by FileAllocator writing file)\n // \" num_samples (number of samples in the buffer)\n // \" ctrl_info_offset (offset in this file of control info header (units, limits, etc.))\n // \" buff_size (bytes allocated for this entry, including header)\n // \" buff_free (number of un-used, allocated bytes for this header)\n // 2 bytes DbrType (type of data stored in buffer)\n // 2 bytes DbrCount (count of values for each buffer element, i.e. 1 for scalar types, >1 for array types)\n // 4 bytes padding (used to align the period)\n // 8 bytes (double) period\n // 8 bytes (epicsTimeStamp) begin_time\n // \" next_file_time\n // \" end_time\n // char [40] prev_file\n // char [40] next_file\n // --> Total of 152 bytes in data header\n buffer.skip(4);\n final long nextOffset = buffer.getUnsignedInt();\n buffer.skip(4);\n buffer.skip(4);\n final long numSamples = buffer.getUnsignedInt();\n final long ctrlInfoOffset = buffer.getUnsignedInt();\n final long buff_size = buffer.getUnsignedInt();\n final long buff_free = buffer.getUnsignedInt();\n final short dbrTypeCode = buffer.getShort();\n final short dbrCount = buffer.getShort();\n buffer.skip(4);\n buffer.skip(8);\n final Instant beginTime = buffer.getEpicsTime();\n final Instant nextTime = buffer.getEpicsTime();\n final Instant endTime = buffer.getEpicsTime();\n\n buffer.skip(40);\n final byte nameBytes [] = new byte [40];\n buffer.get(nameBytes);\n\n if (!info.isOffset(ctrlInfoOffset))\n info = new CtrlInfoReader(ctrlInfoOffset);\n final DbrType dbrType = DbrType.forValue(dbrTypeCode);\n\n // compute amount of data in this data file entry: (bytes allocated) - (bytes free) - (bytes in header)\n final long buffDataSize = buff_size - buff_free - 152;\n System.out.println(buffDataSize);\n\n // Size of samples:\n // 12 bytes for status/severity/timestamp,\n // padding, value, padding\n final long dbr_size = 12 + dbrType.padding + dbrCount * dbrType.valueSize + dbrType.getValuePad(dbrCount);\n final long expected = dbr_size * numSamples;\n System.out.println(dbr_size);\n System.out.println(expected);\n\n if (expected != buffDataSize)\n throw new Exception(\"Expected \" + expected + \" byte buffer, got \" + buffDataSize);\n\n String nextFilename = nextOffset != 0 ? new String(nameBytes).split(\"\\0\", 2)[0] : \"*\";\n File nextFile = new File(buffer.getFile().getParentFile(), nextFilename);\n\n logger.log(Level.FINE, \"Datablock\\n\" +\n \"Buffer : '\" + file + \"' @ 0x\" + Long.toHexString(offset) + \"\\n\" +\n \"Time : \" + beginTime + \"\\n\" +\n \"... : \" + endTime);\n\n return new DataHeader(file, offset, nextFile, nextOffset, nextTime, info, dbrType, dbrCount, numSamples);\n }",
"public IMAGE_OPTIONAL_HEADER32 getOptionalHeader() { return peOptionalHeader; }",
"public String[] getHeaders(){\n String[] headers={\"Owner Unit ID\",\"Origin Geoloc\",\"Origin Name\",\"Number of Assets\",};\n return headers;\n }",
"public BuildHeaderSearchString() { }",
"public void printHeaderInfo(String className) {\n outFile.println(\"// Declarations for \" + className);\n outFile.println(\n \"// Declarations written by Chicory \" + LocalDateTime.now(ZoneId.systemDefault()));\n outFile.println();\n\n // Determine comparability string\n String comparability = \"none\";\n if (Runtime.comp_info != null) {\n comparability = \"implicit\";\n }\n outFile.printf(\"decl-version 2.0%n\");\n outFile.printf(\"var-comparability %s%n%n\", comparability);\n }",
"void processHeaders(Vector in, SummitFileWriter out) { \n\t\ttry {\n\t\t\t// Read all the headers. Must read the header from each file\n\t\t\t// so that the random-access file is cued to the right location.\n\t\t\tSummitHeader header = null;\n\t\t\tfor (int i=0; i<in.size(); i++) {\n\t\t header = ((SummitFileReader)in.elementAt(i)).getHeader();\n\t\t }\n\n\t\t\t// And write the header to the output file\n\t\t\tmZones = header.getZones();\n\t\t\tmSegments = header.getMarketSegments();\n\t\t\tout.writeHeader(header);\n\t\t\t\n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n }",
"void setHeaderInfo(float rFree, float rWork, float resolution, String title, String depositionDate, \n\t\t\tString releaseDate, String[] experimnetalMethods);",
"public void testHeaders() {\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset59.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertFalse(JdkUtil.LogEventType.UNKNOWN.toString() + \" collector identified.\",\n jvmRun.getEventTypes().contains(LogEventType.UNKNOWN));\n Assert.assertEquals(\"Event type count not correct.\", 3, jvmRun.getEventTypes().size());\n Assert.assertTrue(JdkUtil.LogEventType.HEADER_COMMAND_LINE_FLAGS.toString() + \" not identified.\",\n jvmRun.getEventTypes().contains(LogEventType.HEADER_COMMAND_LINE_FLAGS));\n Assert.assertTrue(JdkUtil.LogEventType.HEADER_MEMORY.toString() + \" not identified.\",\n jvmRun.getEventTypes().contains(LogEventType.HEADER_MEMORY));\n Assert.assertTrue(JdkUtil.LogEventType.HEADER_VERSION.toString() + \" not identified.\",\n jvmRun.getEventTypes().contains(LogEventType.HEADER_VERSION));\n Assert.assertTrue(Analysis.WARN_EXPLICIT_GC_DISABLED + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_EXPLICIT_GC_DISABLED));\n }",
"public IMAGE_OPTIONAL_HEADER64 getOptionalHeader64() { return null; }",
"private Header [] loadSource(String name, Header [] list, Header header, final boolean force)\r\n {\r\n int pos;\r\n int depth = header.depth;\r\n File file = null;\r\n\r\n name = name.trim();\r\n\r\n for(pos = 0; pos < list.length && list[pos] != header; pos++);\r\n\r\n String path = list[pos].name.substring(0, list[pos].name.lastIndexOf('\\\\'));\r\n\r\n // look in sdk's root directory\r\n if ((file = getFile(Parser.jdkSource, name)) != null)\r\n {\r\n if (Parser.jdkSource.compareToIgnoreCase(path) != 0)\r\n depth++;\r\n }\r\n\r\n // look in package\r\n if (file == null)\r\n {\r\n file = getFile(path, name);\r\n }\r\n\r\n // look in imports\r\n for (int j = 0; j < header.imports.length && file == null; j++)\r\n {\r\n String st = header.imports[j];\r\n int last = st.lastIndexOf('.') + 1;\r\n\r\n if (st.substring(last).compareToIgnoreCase(name) == 0)\r\n st = st.substring(0, last);\r\n\r\n if (st.endsWith(\".\"))\r\n st = st.substring(0, st.length() - 1);\r\n\r\n for (int k = -1; (k = st.indexOf('.')) >= 0; )\r\n st = st.substring(0, k) + '\\\\' + st.substring(k + 1);\r\n\r\n st = jdkSource + '\\\\' + st;\r\n\r\n file = getFile(st, name);\r\n\r\n if (file != null)\r\n depth++;\r\n }\r\n\r\n if (file != null)\r\n {\r\n String st = file.getAbsolutePath();\r\n\r\n // already loaded?\r\n for(int k = 0; k < list.length; k++)\r\n if (list[k].name.compareToIgnoreCase(st) == 0)\r\n {\r\n file = null;\r\n return list;\r\n }\r\n\r\n if (file != null)\r\n {\r\n File desc = new File(st.substring(0, st.lastIndexOf('.') + 1) + 'h');\r\n File fs = new File(st.substring(0, st.lastIndexOf('.') + 1) + \"fs\");\r\n\r\n st = file.getAbsolutePath();\r\n for(int i = 0; i < built.size(); i++)\r\n if (((String)built.get(i)).compareToIgnoreCase(st) == 0)\r\n {\r\n file = desc;\r\n break;\r\n }\r\n\r\n if ((!desc.exists() || !fs.exists() || fs.length() == 0 || fs.lastModified() < file.lastModified() || force) && file != desc)\r\n {\r\n Header [] hh \t= new Pass(file, built, force, gc).compilationUnit(list, depth); // compile\r\n\r\n return hh;\r\n }\r\n else\r\n {\r\n Header [] newList = new Header[list.length + 1];\r\n\r\n for (int k = 0; k < newList.length - 1; k++)\r\n newList[k] = list[k];\r\n System.out.println(desc.getAbsolutePath() + \" will be read!\");\r\n newList[newList.length - 1] = new Header(desc.getAbsolutePath(), depth); // load header\r\n list = newList;\r\n }\r\n }\r\n }\r\n\r\n return list;\r\n }",
"private HeaderUtil() {}",
"private static java.lang.String[] a(android.content.Context r3, com.xiaomi.xmpush.thrift.u r4) {\n /*\n java.lang.String r0 = r4.h()\n java.lang.String r1 = r4.j()\n java.util.Map r4 = r4.s()\n if (r4 == 0) goto L_0x0073\n android.content.res.Resources r2 = r3.getResources()\n android.util.DisplayMetrics r2 = r2.getDisplayMetrics()\n int r2 = r2.widthPixels\n android.content.res.Resources r3 = r3.getResources()\n android.util.DisplayMetrics r3 = r3.getDisplayMetrics()\n float r3 = r3.density\n float r2 = (float) r2\n float r2 = r2 / r3\n r3 = 1056964608(0x3f000000, float:0.5)\n float r2 = r2 + r3\n java.lang.Float r3 = java.lang.Float.valueOf(r2)\n int r3 = r3.intValue()\n r2 = 320(0x140, float:4.48E-43)\n if (r3 > r2) goto L_0x0051\n java.lang.String r3 = \"title_short\"\n java.lang.Object r3 = r4.get(r3)\n java.lang.String r3 = (java.lang.String) r3\n boolean r2 = android.text.TextUtils.isEmpty(r3)\n if (r2 != 0) goto L_0x0042\n r0 = r3\n L_0x0042:\n java.lang.String r3 = \"description_short\"\n java.lang.Object r3 = r4.get(r3)\n java.lang.String r3 = (java.lang.String) r3\n boolean r4 = android.text.TextUtils.isEmpty(r3)\n if (r4 != 0) goto L_0x0073\n goto L_0x0072\n L_0x0051:\n r2 = 360(0x168, float:5.04E-43)\n if (r3 <= r2) goto L_0x0073\n java.lang.String r3 = \"title_long\"\n java.lang.Object r3 = r4.get(r3)\n java.lang.String r3 = (java.lang.String) r3\n boolean r2 = android.text.TextUtils.isEmpty(r3)\n if (r2 != 0) goto L_0x0064\n r0 = r3\n L_0x0064:\n java.lang.String r3 = \"description_long\"\n java.lang.Object r3 = r4.get(r3)\n java.lang.String r3 = (java.lang.String) r3\n boolean r4 = android.text.TextUtils.isEmpty(r3)\n if (r4 != 0) goto L_0x0073\n L_0x0072:\n r1 = r3\n L_0x0073:\n r3 = 2\n java.lang.String[] r3 = new java.lang.String[r3]\n r4 = 0\n r3[r4] = r0\n r4 = 1\n r3[r4] = r1\n return r3\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.xiaomi.push.service.ah.a(android.content.Context, com.xiaomi.xmpush.thrift.u):java.lang.String[]\");\n }",
"public String getPragma()\r\n/* 304: */ {\r\n/* 305:458 */ return getFirst(\"Pragma\");\r\n/* 306: */ }",
"public Header parseHeader(CharArrayBuffer buffer) throws ParseException {\n/* 445 */ return (Header)new BufferedHeader(buffer);\n/* */ }",
"protected String getTraceFileUserHeaderData() { return userHeader; }",
"public static int offset_infos_metadata(int index1) {\n int offset = 144;\n if (index1 < 0 || index1 >= 2) throw new ArrayIndexOutOfBoundsException();\n offset += 0 + index1 * 8;\n return (offset / 8);\n }",
"private void parseHeader()\n throws IOException {\n\n while (headerPending) {\n\n // check if we have a complete line\n int eol = -1;\n while (eol < 0) {\n for (int i = 0; (eol < 0) && (i < nEncoded); ++i) {\n if (encoded[i] == '\\n') {\n eol = i;\n }\n } \n if (eol < 0) {\n // we don't have enough characters\n if (readEncodedBytes() < 0) {\n throw new IOException(\"missing uuencode header\");\n }\n }\n }\n \n if (eol == 0) {\n eol = 1;\n System.arraycopy(encoded, eol, encoded, 0, nEncoded - eol);\n nEncoded -= 1;\n } else\n if ((eol < 4) || (encoded[0] != 'b') || (encoded[1] != 'e')\n || (encoded[2] != 'g') || (encoded[3] != 'i') || (encoded[4] != 'n')) {\n // this is not the header line, skip it\n \t//System.out.println(\"eol:\" + eol);\n \t//System.out.println(\"srcpos: \" + (eol + 1) + \" \" + (nEncoded - eol));\n System.arraycopy(encoded, eol + 1, encoded, 0,\n nEncoded - eol);\n nEncoded -= eol;\n } else {\n\n // skip the whitespace characters\n int i = 5;\n while ((i < eol) && Character.isWhitespace((char) encoded[i])) {\n ++i;\n }\n\n if (((i + 2) < eol)\n && (encoded[i] >= '0') && (encoded[i] <= '7')\n && (encoded[i+1] >= '0') && (encoded[i+1] <= '7')\n && (encoded[i+2] >= '0') && (encoded[i+2] <= '7')) {\n \n // store the permissions\n userPerms = encoded[i] - '0';\n groupPerms = encoded[i+1] - '0';\n othersPerms = encoded[i+2] - '0';\n\n // in order to allow space in file names, uudecode as provided in\n // version 4.3.x of the GNU sharutils package uses a single space\n // between permissions and file name\n if (encoded[i+3] == ' ') {\n i += 4;\n\n // store the file name (which may contain space characters)\n StringBuffer buffer = new StringBuffer();\n while (i < eol) {\n buffer.append((char) encoded[i++]);\n }\n name = buffer.toString();\n\n // set up state for data decoding\n headerPending = false;\n System.arraycopy(encoded, eol + 1, encoded, 0, nEncoded - eol);\n nEncoded -= eol;\n firstQuantum = 1;\n current = 0;\n return;\n\n }\n }\n\n throw new IOException(\"malformed uuencode header\");\n\n }\n\n }\n\n }",
"@Override\r\n\tpublic void loadHeader() {\n\r\n\t}",
"public int readVectorHeader() throws IOException {\n return in.readInt();\n }",
"protected void parseHeaderLine(String unparsedLine) {\r\n\r\n\t\tif (DEBUG)\r\n\t\t\tSystem.out.println(\"HEADER LINE = \" + unparsedLine);\r\n\r\n\t\tStringTokenizer t = new StringTokenizer(unparsedLine, \" ,\\042\\011\");\r\n\t\tString tok = null;\r\n\r\n\t\tfor (int i = 0; t.hasMoreTokens(); i++) {\r\n\t\t\ttok = t.nextToken();\r\n\t\t\tif (DEBUG)\r\n\t\t\t\tSystem.out.println(\"token \" + i + \"=[\" + tok + \"]\");\r\n\t\t\tif (tok.equalsIgnoreCase(CHAN_HEADER)) {\r\n\t\t\t\t_chanIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"chan_header=\" + i);\r\n\t\t\t}\r\n\t\t\tif (tok.equalsIgnoreCase(DIST_HEADER)) {\r\n\t\t\t\t_distIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"dist_header=\" + i);\r\n\t\t\t}\r\n\t\t\tif (tok.equalsIgnoreCase(FILENAME_HEADER)) {\r\n\t\t\t\t_filenameIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"filename_header=\" + i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (DEBUG)\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"_chanIndex, _distIndex, _filenameIndex=\" + _chanIndex + \",\" + _distIndex + \",\" + _filenameIndex);\r\n\r\n\t}",
"private static elf32_phdr parseProgramHeader(byte[] header){\n\t\tElfType32.elf32_phdr phdr = new ElfType32.elf32_phdr();\n\t\tphdr.p_type = Utils.copyBytes(header, 0, 4);\n\t\tphdr.p_offset = Utils.copyBytes(header, 4, 4);\n\t\tphdr.p_vaddr = Utils.copyBytes(header, 8, 4);\n\t\tphdr.p_paddr = Utils.copyBytes(header, 12, 4);\n\t\tphdr.p_filesz = Utils.copyBytes(header, 16, 4);\n\t\tphdr.p_memsz = Utils.copyBytes(header, 20, 4);\n\t\tphdr.p_flags = Utils.copyBytes(header, 24, 4);\n\t\tphdr.p_align = Utils.copyBytes(header, 28, 4);\n\t\treturn phdr;\n\t\t\n\t}",
"private NetFlowHeader prepareHeader() throws IOException {\n NetFlowHeader internalHeader;\n int numBytesRead = 0;\n int lenRead = 0;\n WrappedByteBuf buf;\n byte[] headerArray;\n\n // Read header depending on stream version (different from flow version)\n if (streamVersion == 1) {\n // Version 1 has static header\n // TODO: verify header size for stream version 1\n lenRead = NetFlowHeader.S1_HEADER_SIZE - METADATA_LENGTH;\n internalHeader = new NetFlowHeader(streamVersion, byteOrder);\n } else {\n // Version 3 with dynamic header size\n headerArray = new byte[HEADER_OFFSET_LENGTH];\n numBytesRead = in.read(headerArray, 0, HEADER_OFFSET_LENGTH);\n if (numBytesRead != HEADER_OFFSET_LENGTH) {\n throw new UnsupportedOperationException(\"Short read while loading header offset\");\n }\n\n buf = WrappedByteBuf.init(headerArray, byteOrder);\n int headerSize = (int)buf.getUnsignedInt(0);\n if (headerSize <= 0) {\n throw new UnsupportedOperationException(\"Failed to load header of size \" + headerSize);\n }\n\n // Actual header length, determine how many bytes to read\n lenRead = headerSize - METADATA_LENGTH - HEADER_OFFSET_LENGTH;\n internalHeader = new NetFlowHeader(streamVersion, byteOrder, headerSize);\n }\n\n // allocate buffer for length to read\n headerArray = new byte[lenRead];\n numBytesRead = in.read(headerArray, 0, lenRead);\n if (numBytesRead != lenRead) {\n throw new UnsupportedOperationException(\"Short read while loading header data\");\n }\n // build buffer\n buf = WrappedByteBuf.init(headerArray, byteOrder);\n\n // resolve stream version (either 1 or 3)\n if (streamVersion == 1) {\n internalHeader.setFlowVersion((short)buf.getUnsignedShort(0));\n internalHeader.setStartCapture(buf.getUnsignedInt(2));\n internalHeader.setEndCapture(buf.getUnsignedInt(6));\n internalHeader.setHeaderFlags(buf.getUnsignedInt(10));\n internalHeader.setRotation(buf.getUnsignedInt(14));\n internalHeader.setNumFlows(buf.getUnsignedInt(18));\n internalHeader.setNumDropped(buf.getUnsignedInt(22));\n internalHeader.setNumMisordered(buf.getUnsignedInt(26));\n // Read hostname fixed bytes\n byte[] hostnameBytes = new byte[NetFlowHeader.S1_HEADER_HN_LEN];\n buf.getBytes(30, hostnameBytes, 0, hostnameBytes.length);\n internalHeader.setHostname(new String(hostnameBytes));\n // Read comments fixed bytes\n byte[] commentsBytes = new byte[NetFlowHeader.S1_HEADER_CMNT_LEN];\n buf.getBytes(30 + hostnameBytes.length, commentsBytes, 0, commentsBytes.length);\n internalHeader.setComments(new String(commentsBytes));\n\n // Dereference arrays\n hostnameBytes = null;\n commentsBytes = null;\n } else {\n // Resolve TLV (type-length value)\n // Set decode pointer to first tlv\n int dp = 0;\n int left = lenRead;\n // Smallest TLV is 2+2+0 (null TLV)\n // tlv_t - TLV type, tlv_l - TLV length, tlv_v - TLV value\n int tlv_t = 0;\n int tlv_l = 0;\n int tlv_v = 0;\n\n // Byte array for holding Strings\n byte[] pr;\n\n while (left >= 4) {\n // Parse type, store in host byte order\n tlv_t = buf.getUnsignedShort(dp);\n dp += 2;\n left -= 2;\n\n // Parse len, store in host byte order\n tlv_l = buf.getUnsignedShort(dp);\n dp += 2;\n left -= 2;\n\n // Parse val\n tlv_v = dp;\n\n // Point decode buffer at next tlv\n dp += tlv_l;\n left -= tlv_l;\n\n // TLV length check\n if (left < 0) {\n break;\n }\n\n switch(tlv_t) {\n // FT_TLV_VENDOR\n case 0x1:\n internalHeader.setVendor(buf.getUnsignedShort(tlv_v));\n break;\n // FT_TLV_EX_VER\n case 0x2:\n internalHeader.setFlowVersion((short) buf.getUnsignedShort(tlv_v));\n break;\n // FT_TLV_AGG_VER\n case 0x3:\n internalHeader.setAggVersion(buf.getUnsignedByte(tlv_v));\n break;\n // FT_TLV_AGG_METHOD\n case 0x4:\n internalHeader.setAggMethod(buf.getUnsignedByte(tlv_v));\n break;\n // FT_TLV_EXPORTER_IP\n case 0x5:\n internalHeader.setExporterIP(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_START\n case 0x6:\n internalHeader.setStartCapture(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_END\n case 0x7:\n internalHeader.setEndCapture(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_HEADER_FLAGS\n case 0x8:\n internalHeader.setHeaderFlags(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_ROT_SCHEDULE\n case 0x9:\n internalHeader.setRotation(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_COUNT\n case 0xA:\n internalHeader.setNumFlows(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_LOST\n case 0xB:\n internalHeader.setNumDropped(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_MISORDERED\n case 0xC:\n internalHeader.setNumMisordered(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_PKT_CORRUPT\n case 0xD:\n internalHeader.setNumCorrupt(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_SEQ_RESET\n case 0xE:\n internalHeader.setSeqReset(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_HOSTNAME\n case 0xF:\n pr = new byte[tlv_l];\n buf.getBytes(tlv_v, pr, 0, pr.length);\n // Expected null-terminated string\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n\n internalHeader.setHostname(new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_COMMENTS\n case 0x10:\n pr = new byte[tlv_l];\n buf.getBytes(tlv_v, pr, 0, pr.length);\n // Expected null-terminated string\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n internalHeader.setComments(new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_IF_NAME\n case 0x11:\n // uint32_t, uint16_t, string:\n // - IP address of device\n // - ifIndex of interface\n // - interface name\n long ip = buf.getUnsignedInt(tlv_v);\n int ifIndex = buf.getUnsignedShort(tlv_v + 4);\n pr = new byte[tlv_l - 4 - 2];\n buf.getBytes(tlv_v + 4 + 2, pr, 0, pr.length);\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n internalHeader.setInterfaceName(ip, ifIndex, new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_IF_ALIAS\n case 0x12:\n // uint32_t, uint16_t, uint16_t, string:\n // - IP address of device\n // - ifIndex count\n // - ifIndex of interface (count times)\n // - alias name\n long aliasIP = buf.getUnsignedInt(tlv_v);\n int aliasIfIndexCnt = buf.getUnsignedShort(tlv_v + 4);\n int aliasIfIndex = buf.getUnsignedShort(tlv_v + 4 + 2);\n pr = new byte[tlv_l - 4 - 2 - 2];\n buf.getBytes(tlv_v + 4 + 2 + 2, pr, 0, pr.length);\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n\n internalHeader.setInterfaceAlias(aliasIP, aliasIfIndexCnt, aliasIfIndex,\n new String(pr, 0, pr.length - 1));\n break;\n // Case 0x0\n default:\n break;\n }\n }\n buf = null;\n pr = null;\n }\n return internalHeader;\n }",
"protected void parseHeader(String line){\n headerMap = new LinkedHashMap<>();\n String[] bits = line.split(delimiter);\n for (int i = 0; i < bits.length; i++){\n headerMap.put(bits[i], i);\n }\n }",
"public List<byte[]> getHeader() {\n\t\treturn this.fileHeader;\n\t}",
"public static int offset_infos_log_src() {\n return (16 / 8);\n }",
"public static com.google.android.exoplayer2.metadata.icy.IcyHeaders parse(java.util.Map<java.lang.String, java.util.List<java.lang.String>> r13) {\n /*\n java.lang.String r0 = \"Invalid metadata interval: \"\n java.lang.String r1 = \"icy-br\"\n java.lang.Object r1 = r13.get(r1)\n java.util.List r1 = (java.util.List) r1\n java.lang.String r2 = \"IcyHeaders\"\n r3 = -1\n r4 = 1\n r5 = 0\n if (r1 == 0) goto L_0x0051\n java.lang.Object r1 = r1.get(r5)\n java.lang.String r1 = (java.lang.String) r1\n int r6 = java.lang.Integer.parseInt(r1) // Catch:{ NumberFormatException -> 0x0039 }\n int r6 = r6 * 1000\n if (r6 <= 0) goto L_0x0021\n r1 = 1\n goto L_0x0037\n L_0x0021:\n java.lang.StringBuilder r7 = new java.lang.StringBuilder // Catch:{ NumberFormatException -> 0x003a }\n r7.<init>() // Catch:{ NumberFormatException -> 0x003a }\n java.lang.String r8 = \"Invalid bitrate: \"\n r7.append(r8) // Catch:{ NumberFormatException -> 0x003a }\n r7.append(r1) // Catch:{ NumberFormatException -> 0x003a }\n java.lang.String r7 = r7.toString() // Catch:{ NumberFormatException -> 0x003a }\n com.google.android.exoplayer2.util.Log.w(r2, r7) // Catch:{ NumberFormatException -> 0x003a }\n r1 = 0\n r6 = -1\n L_0x0037:\n r7 = r6\n goto L_0x0053\n L_0x0039:\n r6 = -1\n L_0x003a:\n java.lang.StringBuilder r7 = new java.lang.StringBuilder\n r7.<init>()\n java.lang.String r8 = \"Invalid bitrate header: \"\n r7.append(r8)\n r7.append(r1)\n java.lang.String r1 = r7.toString()\n com.google.android.exoplayer2.util.Log.w(r2, r1)\n r7 = r6\n r1 = 0\n goto L_0x0053\n L_0x0051:\n r1 = 0\n r7 = -1\n L_0x0053:\n java.lang.String r6 = \"icy-genre\"\n java.lang.Object r6 = r13.get(r6)\n java.util.List r6 = (java.util.List) r6\n r8 = 0\n if (r6 == 0) goto L_0x0067\n java.lang.Object r1 = r6.get(r5)\n java.lang.String r1 = (java.lang.String) r1\n r9 = r1\n r1 = 1\n goto L_0x0068\n L_0x0067:\n r9 = r8\n L_0x0068:\n java.lang.String r6 = \"icy-name\"\n java.lang.Object r6 = r13.get(r6)\n java.util.List r6 = (java.util.List) r6\n if (r6 == 0) goto L_0x007b\n java.lang.Object r1 = r6.get(r5)\n java.lang.String r1 = (java.lang.String) r1\n r10 = r1\n r1 = 1\n goto L_0x007c\n L_0x007b:\n r10 = r8\n L_0x007c:\n java.lang.String r6 = \"icy-url\"\n java.lang.Object r6 = r13.get(r6)\n java.util.List r6 = (java.util.List) r6\n if (r6 == 0) goto L_0x008f\n java.lang.Object r1 = r6.get(r5)\n java.lang.String r1 = (java.lang.String) r1\n r11 = r1\n r1 = 1\n goto L_0x0090\n L_0x008f:\n r11 = r8\n L_0x0090:\n java.lang.String r6 = \"icy-pub\"\n java.lang.Object r6 = r13.get(r6)\n java.util.List r6 = (java.util.List) r6\n if (r6 == 0) goto L_0x00a9\n java.lang.Object r1 = r6.get(r5)\n java.lang.String r1 = (java.lang.String) r1\n java.lang.String r6 = \"1\"\n boolean r1 = r1.equals(r6)\n r12 = r1\n r1 = 1\n goto L_0x00aa\n L_0x00a9:\n r12 = 0\n L_0x00aa:\n java.lang.String r6 = \"icy-metaint\"\n java.lang.Object r13 = r13.get(r6)\n java.util.List r13 = (java.util.List) r13\n if (r13 == 0) goto L_0x00ea\n java.lang.Object r13 = r13.get(r5)\n java.lang.String r13 = (java.lang.String) r13\n int r5 = java.lang.Integer.parseInt(r13) // Catch:{ NumberFormatException -> 0x00d8 }\n if (r5 <= 0) goto L_0x00c2\n r3 = r5\n goto L_0x00d5\n L_0x00c2:\n java.lang.StringBuilder r4 = new java.lang.StringBuilder // Catch:{ NumberFormatException -> 0x00d7 }\n r4.<init>() // Catch:{ NumberFormatException -> 0x00d7 }\n r4.append(r0) // Catch:{ NumberFormatException -> 0x00d7 }\n r4.append(r13) // Catch:{ NumberFormatException -> 0x00d7 }\n java.lang.String r4 = r4.toString() // Catch:{ NumberFormatException -> 0x00d7 }\n com.google.android.exoplayer2.util.Log.w(r2, r4) // Catch:{ NumberFormatException -> 0x00d7 }\n r4 = r1\n L_0x00d5:\n r1 = r4\n goto L_0x00ea\n L_0x00d7:\n r3 = r5\n L_0x00d8:\n java.lang.StringBuilder r4 = new java.lang.StringBuilder\n r4.<init>()\n r4.append(r0)\n r4.append(r13)\n java.lang.String r13 = r4.toString()\n com.google.android.exoplayer2.util.Log.w(r2, r13)\n L_0x00ea:\n if (r1 == 0) goto L_0x00f8\n com.google.android.exoplayer2.metadata.icy.IcyHeaders r13 = new com.google.android.exoplayer2.metadata.icy.IcyHeaders\n r6 = r13\n r8 = r9\n r9 = r10\n r10 = r11\n r11 = r12\n r12 = r3\n r6.<init>(r7, r8, r9, r10, r11, r12)\n r8 = r13\n L_0x00f8:\n return r8\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.exoplayer2.metadata.icy.IcyHeaders.parse(java.util.Map):com.google.android.exoplayer2.metadata.icy.IcyHeaders\");\n }",
"private void IdentifyHeaderAndFooter() {\n receipt_Header = receipt_lines.length > 0 ? receipt_lines[0] : null;\n receipt_Footer = receipt_lines.length > 1 ? receipt_lines[receipt_lines.length - 1].split(\" \")[0] : null;\n }",
"IAudioHeader readHeader(InputStream inputStream) throws AudioReaderException, InvalidFormatException;",
"ICpPackInfo getPackInfo();",
"public void read(ExecutableStream s) throws Exception {\n\t\tdosHeader = new IMAGE_DOS_HEADER(this);\n\t\tif(dosHeader.getE_magic()==0x5a4d) { //MZ HEADER FOUND\n\t\t\ts.setIndex(dosHeader.getE_lfanew());\n\t\t\tsignature = s.readAddrInt();\n\t\t}else if(dosHeader.getE_magic()==0x4550){ //PE HEADER FOUND\n\t\t\tsignature = dosHeader.getE_magic();\n\t\t\tgetStream().setIndex(getStream().getIndex()+2); //MZ only reads short but int must be read\n\t\t}else {\n\t\t\tSystem.err.println(\"[!] File isn't an executable.\"); return;\n\t\t}\n\t\tif(getSignature()!=0x4550){System.out.println(\"[!] Signature isn't PE00 format.\"); return;}\n\t\tpeHeader = new IMAGE_FILE_HEADER(this); //parse the file header and check if this is a 32bit binary\n\t\tif(peHeader.getMachine() != IMAGE_FILE_HEADER.IMAGE_FILE_MACHINE_I386) {\n\t\t\tSystem.err.println(\"[!] Isn't a 32bit executable\");\n\t\t\treturn;\n\t\t}\n\t\tpeOptionalHeader = new IMAGE_OPTIONAL_HEADER32(this); //parse the optional header for 32bit\n\t\tpeFileSections = new IMAGE_SECTION_HEADER[peHeader.getNumberOfSections()];\n\t\tfor(int i=0;i<peFileSections.length;i++)\n\t\t\tpeFileSections[i]\t= new IMAGE_SECTION_HEADER(this); //parse the sections\n\t\t\n\t\tpeOptionalHeader.parseDirectories(); //parse the directories of this PE File\n\t}",
"public Map<String, List<String>> getHeaderFields() {\n/* 262 */ return this.delegate.getHeaderFields();\n/* */ }",
"public byte[] getHeader() {\n\treturn header;\n }",
"private void writeHEADER() throws IOException {\n\t\tmeta.compute_checksum();\n\t\tmeta.write();\n\t\t\n\t\t// We could also generate a non-aldus metafile :\n\t\t// writeClipboardHeader(meta);\n\t\t\n\t\t// Generate the standard header common to all metafiles.\n\t\thead.write();\n\t}",
"private boolean loadRepositoryHeader() {\r\n\t\ttry {\r\n\t\t\t// annotation with URI: repositoryURL + \"#header\"\r\n\t\t\trepositoryURI = new URI(repURLFld.getText());\r\n\t\t\tURI repHeaderURI = new URI(repositoryURI+\"#header\");\r\n\t\t\t\r\n\t\t\tif (client==null) this.initAnnoteaClient();\r\n\t\t\t\r\n\t\t\t// get annotation using Annotea\r\n\t\t\tSet headerSet = client.findAnnotations(repHeaderURI);\r\n\t\t\tif (headerSet.size()>0) {\r\n\t\t\t\tDescription header = (Description) headerSet.iterator().next();\r\n\t\t\t\tversionDescriptions[0] = header;\r\n\t\t\t\t\r\n\t\t\t\t// parse header description to get author, date, baseOntologyURI\r\n\t\t\t\tthis.repositoryAuthor = header.getAuthor();\r\n\t\t\t\tthis.reposityCreatedDate = header.getCreated();\r\n\t\t\t\tthis.baseOntologyURI = new URI(header.getAnnotatedEntityDefinition());\r\n\t\t\t\t// and headVersionNumber\r\n\t\t\t\tthis.headVersionNumber = Integer.parseInt(header.getBody());\r\n\t\t\t\t\r\n\t\t\t\t// also get actual URL location of annotation\r\n\t\t\t\tthis.repHeaderLoc = header.getLocation();\r\n\t\t\t\t\r\n\t\t\t\t// set UI accordingly\r\n\t\t\t\tthis.repAuthorFld.setText(this.repositoryAuthor);\r\n\t\t\t\tthis.repDateFld.setText(this.reposityCreatedDate);\r\n\t\t\t\tthis.repBaseOntFld.setText(this.baseOntologyURI.toString());\r\n\t\t\t\tthis.toggleRepOptions(false);\r\n\t\t\t\tSystem.out.println(\"Ontology Repository header exists at \"+repHeaderURI);\r\n\t\t\t\treturn true;\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"private String readHeader(RoutingContext ctx) {\n String tok = ctx.request().getHeader(XOkapiHeaders.TOKEN);\n if (tok != null && ! tok.isEmpty()) {\n return tok;\n }\n return null;\n }",
"static CodeGenerator.GeneratedCodeInfo readLeccSpecificSerializationInfo(RecordInputStream s) throws IOException {\r\n RecordInputStream.RecordHeaderInfo rhi = s.findRecord(ModuleSerializationTags.SERIALIZATION_INFO);\r\n if (rhi == null) {\r\n throw new IOException (\"Unable to find serialization info\");\r\n }\r\n \r\n // Skip the non-machine-specific data\r\n s.readLong(); // timestamp\r\n \r\n // read our own part of the record\r\n CodeGenerator.GeneratedCodeInfo codeInfo = CodeGenerator.GeneratedCodeInfo.load(s);\r\n \r\n s.skipRestOfRecord();\r\n return codeInfo;\r\n }",
"private static String getPSMHeader() {\r\n return \"PSM No.\" + SEP\r\n + \"Spectrum title\" + SEP\r\n + \"Peptide Sequence\" + SEP\r\n + \"Protein Accession\" + SEP\r\n + \"Intensity Score\" + SEP\r\n + \"Matched Peaks\" + SEP;\r\n }",
"public String getHeaderNames(){return header.namesText;}",
"FS2ObjectHeaders getHeaders();",
"static private ImageMetaInfo getImageMetaInfo(File file) {\n ImageMetaInfo imageMetaInfo = null;\n ImageParser imageParser = null;\n BufferedImage bufferedImage = null;\n ImageInfo imageInfo = null;\n ImageInfo.CompressionAlgorithm compressionAlgorithm = null;\n String compression = \"\";\n try {\n log(\"read file: \" + file.getName());\n\n String extension = ExtFilter.getExtension(file);\n // unambiguous definition of extension\n if (extension.equals(\"jpg\"))\n extension = \"jpeg\";\n else if (extension.equals(\"tif\"))\n extension = \"tiff\";\n\n imageParser = imageParserMap.get(extension);\n bufferedImage = imageParser.getBufferedImage(file, null);\n //for know compression algorithm name\n imageInfo = imageParser.getImageInfo(file, null);\n compressionAlgorithm = imageInfo.getCompressionAlgorithm();\n compression = compressionAlgorithm.toString();\n\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ImageReadException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n if (bufferedImage == null){\n try {\n bufferedImage = ImageIO.read(file);\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n\n try {\n int height = bufferedImage.getHeight();\n int width = bufferedImage.getWidth();\n ColorModel colorModel = bufferedImage.getColorModel();\n int bpi = colorModel.getPixelSize();\n //size in kb\n long size = (long) (file.length() / 1024.0);\n imageMetaInfo = new ImageMetaInfo(file.getName(), size, width, height, bpi, compression);\n } catch (Exception e){\n e.printStackTrace();\n }\n\n\n return imageMetaInfo;\n }",
"public String getHeaderAsXML() {\n\n final String sep = System.getProperty(\"line.separator\");\n StringBuilder builder = new StringBuilder(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\" + sep + \"<meta>\" + sep + \"<fits>\" + sep);\n\n HeaderCard headerCard;\n for (Cursor iter = header.iterator(); iter.hasNext();) {\n headerCard = (HeaderCard) iter.next();\n if (headerCard.getValue() != null) {\n builder.append(\"<\" + headerCard.getKey() + \">\" + headerCard.getValue() + \"</\" + headerCard.getKey() + \">\" + sep);\n }\n }\n\n builder.append(\"</fits>\" + sep + \"</meta>\");\n\n return builder.toString();\n }",
"String[] getHeader(String key);",
"public boolean isHeaderFile(String ext);",
"protected long readDataStartHeader() throws IOException {\n file.seek(DATA_START_HEADER_LOCATION);\n return file.readLong();\n }",
"private void _readHeader() throws PicoException, IOException {\n if (!_open)\n return;\n\n // Save the current position and move to the start of the header.\n long pos = _backing.getFilePointer();\n _backing.seek(PicoStructure.HEAD_START);\n\n // Read the header from the file. We read the fixed length portion\n // here, up through the start of the key.\n byte[] _fixedhdr = new byte[(int) PicoStructure.FIXED_HEADER_LENGTH];\n int length = _backing.read(_fixedhdr);\n\n // Make sure we have enough bytes for the magic string.\n if (length < PicoStructure.MAGIC_LENGTH - PicoStructure.MAGIC_OFFSET) {\n // The magic string was not present. This cannot be a Pico wrapper\n // file.\n throw new PicoException(\"File too short; missing magic string.\");\n }\n\n // Process the fixed portion of the header. After calling this the\n // key is allocated, but not populated.\n _head = PicoHeader.getHeader(_fixedhdr);\n\n // The hash is valid because we just read it from the file and nothing\n // has yet been written. All write methods must invalidate the hash.\n _hashvalid = true;\n\n // Go and read the key, now that we know its length. Note that we read\n // it directly into the array returned by getKey.\n length = _backing.read(_head.getKey());\n\n // Make sure we have the complete key. The only bad case is that the\n // file ends before the key is complete.\n if (length != _head.getKey().length) {\n throw new PicoException(\"File too short; incomplete key.\");\n }\n\n // Move to the original position in the file.\n _backing.seek(pos);\n\n // Ka-presto! The header has been read. Life is good.\n }",
"public Header [] compilationUnit(Header [] loaded, final int depth)\r\n {\r\n\ttry\r\n\t{\r\n this.depth = depth;\r\n String trunc = sources.getPath();\r\n list = loaded == null?new Header[0]:loaded;\r\n countToken = 0;\r\n \r\n Find.notePass(null);\r\n \r\n lookAhead();\r\n\r\n // read package name\r\n String myPackage = null;\r\n if (nextSymbol == Keyword.PACKAGESY)\r\n {\r\n lookAhead();\r\n myPackage = qualident();\r\n matchKeyword(Keyword.SEMICOLONSY);\r\n }\r\n\r\n Header header = new Header(new File(Parser.jdkSource).getPath(), trunc, myPackage, depth);\r\n\r\n Vector imported = new Vector();\r\n imported.add(\"java.lang.\");\r\n\r\n // read import statements\r\n while (nextSymbol == Keyword.IMPORTSY)\r\n imported.add(importDeclaration());\r\n\r\n header.imports = new String[imported.size()];\r\n for(int l = 0; l < imported.size(); l++)\r\n header.imports[l] = (String)imported.get(l);\r\n\r\n trunc = trunc.substring(0, sources.getPath().lastIndexOf(\".java\"));\r\n String basename = trunc.substring(trunc.lastIndexOf('\\\\') + 1);\r\n\r\n scopeStack = header.scopes;\r\n\r\n while(nextSymbol != Keyword.EOFSY)\r\n typeDeclaration(header.base, basename);\r\n\r\n matchKeyword(Keyword.EOFSY);\r\n\r\n if (Errors.count() != 0)\r\n return null;\r\n\r\n // write valid header\r\n header.write(trunc + \".h\");\r\n\r\n // append compiled file to list\r\n Header [] newList = new Header[(list != null?list.length:0) + 1];\r\n\r\n for(int i = 0; i < newList.length - 1; i++)\r\n newList[i] = list[i];\r\n\r\n newList[newList.length - 1] = header;\r\n list = newList;\r\n connectClasses(list);\r\n\r\n // resolve superclasses and interfaces\r\n for(int i = 0; i < header.scopes.size() && list != null; i++)\r\n {\r\n Vector v = new Vector();\r\n Scope scope = (Scope)header.scopes.get(i);\r\n\r\n for(Iterator iter = scope.iterator(); iter.hasNext();)\r\n {\r\n Basic b = (Basic)iter.next();\r\n if (b instanceof ClassType)\r\n v = getExtendImplement((ClassType)b);\r\n }\r\n\r\n while(v.size() > 0 && list != null)\r\n {\r\n connectClasses(list);\r\n list = loadSource((String)v.get(0), list, header, force);\r\n v.remove(0);\r\n }\r\n }\r\n\r\n if (Errors.count() != 0 || header.depth > 0 || list == null)\r\n return list;\r\n\r\n // process imports\r\n for(int i = 0; i < imported.size() && list != null; i++)\r\n {\r\n String st = (String)imported.get(i);\r\n if (!st.endsWith(\".\"))\r\n {\r\n connectClasses(list);\r\n list = loadSource(st.substring(st.lastIndexOf('.') + 1), list, header, force);\r\n }\r\n }\r\n\r\n if (Errors.count() != 0 || header.depth > 0 || list == null)\r\n return list;\r\n\r\n connectClasses(list);\r\n // process unresolved references\r\n for(int i = 0; i < header.scopes.size() && list != null; i++)\r\n {\r\n Scope scope = (Scope)header.scopes.get(i);\r\n Iterator step = scope.iterator();\r\n while(step.hasNext() && list != null)\r\n {\r\n Basic x = (Basic)step.next();\r\n\r\n if (x instanceof ClassType)\r\n {\r\n boolean inner = false;\r\n ClassType y = (ClassType)x;\r\n\r\n while(y.unresolved.size() > 0 && list != null)\r\n {\r\n Iterator it = y.unresolved.iterator();\r\n if (!it.hasNext())\r\n break;\r\n String name = (String)it.next();\r\n it = null;\r\n y.unresolved.remove(name);\r\n String [] s = name.split(\"\\\\.\");\r\n Scope [] z = null;\r\n\r\n z = Find.find(s[0], scope, true);\r\n\r\n if (z.length == 0)\r\n {\r\n list = loadSource(s[0], list, header, force);\r\n connectClasses(list);\r\n }\r\n try {\r\n if (s.length > 1)\r\n {\r\n ClassType [] classes = null;\r\n \r\n classes = Find.findClass(s[0], 0, scope);\r\n \r\n if (classes.length == 0)\r\n {\r\n classes = new ClassType[1];\r\n classes[0] = y;\r\n }\r\n for(int k = 1; k < s.length && classes.length > 0; k++)\r\n {\r\n Basic[] b = classes[0].scope.get(s[k]);\r\n for (int j = 0; j < b.length; j++)\r\n if (b[j] instanceof VariableType)\r\n {\r\n VariableType v = (VariableType) b[j];\r\n if (v.type.type == Keyword.NONESY)\r\n {\r\n classes = Find.findClass(v.type.ident.string, 0, scope);\r\n \r\n if (classes.length == 0)\r\n {\r\n y.unresolved.add(v.type.ident.string);\r\n //y.unresolved.add(name);\r\n }\r\n }\r\n else\r\n classes = new ClassType[0];\r\n break;\r\n }\r\n else if (b[j] instanceof MethodType)\r\n {\r\n MethodType v = (MethodType) b[j];\r\n if (v.type.type == Keyword.NONESY)\r\n {\r\n classes = Find.findClass(v.type.ident.string, 0, scope);\r\n \r\n if (classes.length == 0)\r\n {\r\n y.unresolved.add(v.type.ident.string);\r\n //y.unresolved.add(name);\r\n }\r\n }\r\n else\r\n classes = new ClassType[0];\r\n break;\r\n }\r\n else if (b[j] instanceof ClassType)\r\n {\r\n classes = new ClassType[1];\r\n classes[0] = (ClassType) b[j];\r\n break;\r\n }\r\n }\r\n }\r\n } catch(Exception ee){error(\"nullpointer \" + s[0] + '.' + s[1]);}\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (depth > 0)\r\n return list;\r\n\r\n if (Errors.count() != 0 || list == null)\r\n return null;\r\n\r\n connectClasses(list);\r\n \r\n Find.notePass(this);\r\n\r\n // resolve operator tree to Forth-code\r\n FileOutputStream file = null, starter = null;\r\n try\r\n {\r\n file = new FileOutputStream(header.name.substring(0, header.name.lastIndexOf('.')) + \".fs\");\r\n starter = new FileOutputStream(header.name.substring(0, header.name.lastIndexOf('.')) + \".start.fs\");\r\n System.out.println(\"translate \" + header.name);\r\n\r\n for(int k = 0; k < header.scopes.size(); k++)\r\n {\r\n Scope scope = (Scope)header.scopes.get(k);\r\n boolean module = (k == 0);\r\n for(Iterator iter = scope.iterator(); iter.hasNext();)\r\n {\r\n Basic b = (Basic)iter.next();\r\n if (b instanceof ClassType && (b.modify & Keyword.INTERFACESY.value) == 0)\r\n {\r\n if (gc.startsWith(\"m\"))\r\n CodeRCmodified.codeClass( (ClassType) b, file, starter, module);\r\n else\r\n Code3color.codeClass( (ClassType) b, file, starter, module);\r\n module = false;\r\n }\r\n }\r\n }\r\n\r\n file.close();\r\n starter.close();\r\n }\r\n catch(IOException ex1) { ex1.printStackTrace(); }\r\n \r\n Find.notePass(this);\r\n\t}\r\n\tcatch(Exception failed)\r\n\t{ error(failed.getMessage() + \" aborted\"); }\r\n \r\n return (Errors.count() != 0)?null:list;\r\n }",
"private static android.hardware.camera2.impl.CameraMetadataNative convertResultMetadata(android.hardware.camera2.legacy.LegacyRequest r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.hardware.camera2.legacy.LegacyResultMapper.convertResultMetadata(android.hardware.camera2.legacy.LegacyRequest):android.hardware.camera2.impl.CameraMetadataNative, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.hardware.camera2.legacy.LegacyResultMapper.convertResultMetadata(android.hardware.camera2.legacy.LegacyRequest):android.hardware.camera2.impl.CameraMetadataNative\");\n }",
"java.lang.String getSourceFile(int index);",
"public String getHeader()\r\n\t{\r\n\t\treturn header;\r\n\t}",
"public Object getHeader() {\n return header;\n }",
"private static boolean parseHtcMetaData(final FileChannel fc, final long offset, final long size) throws IOException {\n\n\t int version = 0;\n\t boolean nBitsCheck = true;\n\t long nOffset = 0;\n\t int nSize = 0;\n\n\t byte[] buffer = Util.read(fc, offset, (int)size);\n\t ByteArrayInputStream bis = new ByteArrayInputStream(buffer);\n\n\t version = Util.readInt(bis);;\n\n\t nBitsCheck =Util.readInt(bis)==1? true:false;\n\n\t if(version != 1) {\n\t Log.e(TAG, \"Htc Table version(\"+ version+\") incorrect!! Skip parsing Htc table\");\n\t return true;\n\t }\n\n\t if(nBitsCheck) {\n\t nOffset = Util.readUInt(bis);\n\t }else {\n\t nOffset = Util.readLong(bis);\n\t }\n\n\t nSize = Util.readInt(bis);\n\t \n\t sUSE_32BIT_OFFSET = nBitsCheck;\n\t sHMTA_Offset = nOffset;\n\t sHMTA_Size = nSize;\n\n\t Log.d(TAG, \"version \"+version+\", use32Bits \"+ nBitsCheck);\n\t Log.v(TAG, \"offset \"+nOffset+\", size \" +nSize);\n\n\t bis.close();\n\n\t return true;\n\t }",
"com.cmpe275.grpcComm.MetaData getMetaData();",
"org.apache.xmlbeans.XmlString xgetHeader();",
"@Override\n\tpublic Map<String, String> getHeader() {\n\t\treturn this.header;\n\t}",
"public abstract void buildHeadSource(OutputStream out, SourceObjectDeclared o) throws IOException;",
"@Override\n public void updateFirstHeader() {\n padToCacheAlign();\n long pos = bytes.writePosition();\n updateFirstHeader(pos);\n }",
"public static int offsetBits_infos_metadata(int index1) {\n int offset = 144;\n if (index1 < 0 || index1 >= 2) throw new ArrayIndexOutOfBoundsException();\n offset += 0 + index1 * 8;\n return offset;\n }",
"public FileHeader(RandomAccessFile rafShp_) throws IOException {\n\n rafShp = rafShp_; \n\n initHeader(false); \n }",
"public String getMetaInfo() {\n \tString metaInfo = \"\";\n \t//Add items\n \tfor (Collectable item : items) {\n \t\tif (item != null) {\n \t\t\tmetaInfo += String.format(META_ITEM_FORMAT, item.getGridCoords().toString(),\n \t\t\t\t\t\t\t\tMETA_ITEM_KEYWORD, item.getMetaInfo());\n \t\t\tmetaInfo += GlobalInfo.NEW_LINE;\n \t\t}\n \t}\n \t//Add numTokens\n \tmetaInfo += String.format(META_TOKEN_FORMAT, \"0,0\", META_TOKEN_KEYWORD, numTokens);\n \treturn metaInfo;\n }",
"protected void parseFlvSequenceHeader(byte[] data) throws UnsupportedOperationException, IOException {\n // Sound format: first 4 bits\n final int soundFormatInt = (data[0] >>> 4) & 0x0f;\n try {\n audioFormat = AudioFormat.valueOf(soundFormatInt);\n } catch (IllegalArgumentException ex) {\n throw new UnsupportedOperationException(\"Sound format not supported: \" + soundFormatInt);\n }\n switch (audioFormat) {\n case AAC:\n delegateWriter = new AacWriter(out);\n break;\n case MP3:\n delegateWriter = new Mp3Writer(out);\n break;\n default:\n throw new UnsupportedOperationException(\"Sound format not supported: \" + audioFormat);\n }\n }",
"public String getHeader() {\n return header;\n }",
"public String getHeader() {\n return header;\n }",
"protected FileHeader getFileHeader(String aPath)\n {\n GitIndex.Entry entry = getIndex().getEntry(aPath); if(entry==null) return null;\n FileHeader file = new FileHeader(aPath, entry.isDir());\n file.setModTime(entry.getLastModified()); file.setSize(entry.getLength());\n return file;\n }",
"private void initializeKnownHeaders() {\r\n needParceHeader = true;\r\n \r\n addMainHeader(\"city\", getPossibleHeaders(DataLoadPreferences.NH_CITY));\r\n addMainHeader(\"msc\", getPossibleHeaders(DataLoadPreferences.NH_MSC));\r\n addMainHeader(\"bsc\", getPossibleHeaders(DataLoadPreferences.NH_BSC));\r\n addMainIdentityHeader(\"site\", getPossibleHeaders(DataLoadPreferences.NH_SITE));\r\n addMainIdentityHeader(\"sector\", getPossibleHeaders(DataLoadPreferences.NH_SECTOR));\r\n addMainHeader(INeoConstants.PROPERTY_SECTOR_CI, getPossibleHeaders(DataLoadPreferences.NH_SECTOR_CI));\r\n addMainHeader(INeoConstants.PROPERTY_SECTOR_LAC, getPossibleHeaders(DataLoadPreferences.NH_SECTOR_LAC));\r\n addMainHeader(INeoConstants.PROPERTY_LAT_NAME, getPossibleHeaders(DataLoadPreferences.NH_LATITUDE));\r\n addMainHeader(INeoConstants.PROPERTY_LON_NAME, getPossibleHeaders(DataLoadPreferences.NH_LONGITUDE));\r\n // Stop statistics collection for properties we will not save to the sector\r\n addNonDataHeaders(1, mainHeaders);\r\n \r\n // force String types on some risky headers (sometimes these look like integers)\r\n useMapper(1, \"site\", new StringMapper());\r\n useMapper(1, \"sector\", new StringMapper());\r\n \r\n // Known headers that are sector data properties\r\n addKnownHeader(1, \"beamwidth\", getPossibleHeaders(DataLoadPreferences.NH_BEAMWIDTH), false);\r\n addKnownHeader(1, \"azimuth\", getPossibleHeaders(DataLoadPreferences.NH_AZIMUTH), false);\r\n }"
]
| [
"0.6040915",
"0.5999796",
"0.5946014",
"0.5831083",
"0.58258635",
"0.57806265",
"0.56771815",
"0.56708467",
"0.5643628",
"0.56400865",
"0.56354517",
"0.559236",
"0.55386496",
"0.5482117",
"0.54736674",
"0.54627967",
"0.5448769",
"0.54218113",
"0.54174036",
"0.54072",
"0.5378582",
"0.53534406",
"0.5327005",
"0.5318969",
"0.5301627",
"0.53015697",
"0.5295175",
"0.5292877",
"0.52731884",
"0.52694744",
"0.5263001",
"0.5260907",
"0.52535075",
"0.5242459",
"0.52352804",
"0.52103966",
"0.5200975",
"0.5181454",
"0.5179705",
"0.51777464",
"0.5155606",
"0.5154454",
"0.51320064",
"0.51133645",
"0.51077384",
"0.5075176",
"0.5058829",
"0.50526327",
"0.50438225",
"0.50437915",
"0.50290775",
"0.50267494",
"0.50196517",
"0.5019586",
"0.5014981",
"0.50088805",
"0.50065434",
"0.4986654",
"0.49822822",
"0.4981207",
"0.49805012",
"0.49717757",
"0.4942329",
"0.49356854",
"0.49242017",
"0.49221605",
"0.4906483",
"0.49050587",
"0.49037012",
"0.49026185",
"0.48869637",
"0.48861426",
"0.48793077",
"0.48790815",
"0.48776025",
"0.4873824",
"0.48664752",
"0.4852564",
"0.48510572",
"0.48488203",
"0.48473716",
"0.4840672",
"0.48378873",
"0.48361897",
"0.4829513",
"0.48174006",
"0.4810537",
"0.48076165",
"0.48044538",
"0.48030052",
"0.47992855",
"0.47986883",
"0.47984427",
"0.4784614",
"0.47781968",
"0.4776764",
"0.4773395",
"0.4773395",
"0.47727",
"0.4771146"
]
| 0.5172883 | 40 |
making actions before any action called in any controllers | @Before
public static void beforeCRUDActions() throws Throwable
{
SmartController.beforeActions();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void doActionBefore(DefaultInstanceActionCmd actionModel) {\n }",
"@Override\n\tpublic void beforeAction(String method, HttpServletRequest request, HttpServletResponse response) {\n\t\t// Default behavior : nothing to do \n\t}",
"protected void doPreEntryActions(RequestControlContext context) throws FlowExecutionException {\r\n\r\n\t}",
"public interface ControllerFilter {\n\n /**\n * Called by framework before executing a controller\n */\n void before();\n\n /**\n * Called by framework after executing a controller\n */\n void after();\n\n /**\n * Called by framework in case there was an exception inside a controller\n *\n * @param e exception.\n */\n void onException(Exception e);\n}",
"public void doInitialAction(){}",
"protected abstract void before();",
"@Override\n public void beforeFirstLogic() {\n }",
"public void prePerform() {\n // nothing to do by default\n }",
"public abstract void init_actions() throws Exception;",
"void before();",
"void beforeRun();",
"public void before() {\n }",
"public void before() {\n }",
"@Override\r\n\tpublic void initActions() {\n\t\t\r\n\t}",
"protected void runBeforeStep() {}",
"private void doBeforeApplyRequest(final PhaseEvent arg0) {\n\t}",
"private void doBeforeInvokeApplication(final PhaseEvent arg0) {\n\t}",
"@Before\r\n\tpublic void before() {\r\n\t}",
"@Override\n\tpublic void preProcessAction(GwtEvent e) {\n\t\t\n\t}",
"public void initializeActions(SGControllerActionInitializer actionInitializer);",
"public void doBefore(JoinPoint jp) {\n }",
"public void initiateAction() {\r\n\t\t// TODO Auto-generated method stub\t\r\n\t}",
"default void beforeUse() {\n\t}",
"protected abstract void beforeCall();",
"@Override\n public void beforePhase(PhaseEvent pe) {\n\n AccessController accessController = (AccessController) FacesUtils.getManagedObject(\"access\");\n accessController.doSecurity();\n }",
"@Override\r\n\tprotected void doPre() {\n\t\t\r\n\t}",
"protected abstract void preRun();",
"public void setupActions() {\n getActionManager().setup(getView());\n }",
"private void initBefore() {\n // Crear Modelo\n model = new Model();\n\n // Crear Controlador\n control = new Controller(model, this);\n\n // Cargar Propiedades Vista\n prpView = UtilesApp.cargarPropiedades(FICHERO);\n\n // Restaurar Estado\n control.restaurarEstadoVista(this, prpView);\n\n // Otras inicializaciones\n }",
"@Before\n public void before() {\n }",
"@Before\n public void before() {\n }",
"protected void executeBeforeMiddlewares(Request request)\n {\n synchronized (this.middlewares) {\n List<Middleware> middlewares = getRouteMiddleware(\"*\");\n \n if (middlewares != null) {\n // Execute all of the wildcard middleware.\n for (Middleware middleware : middlewares) {\n middleware.before(request, services);\n }\n }\n \n middlewares = getRouteMiddleware(request.route());\n \n if (middlewares != null) {\n // Execute all the before middleware.\n for (Middleware middleware : middlewares) {\n middleware.before(request, services);\n }\n }\n \n middlewares = Volt.getRouteMiddlewares(\"*\");\n\n if (middlewares != null) {\n // Execute all of the global wildcard middleware.\n for (Middleware middleware : middlewares) {\n middleware.before(request, services);\n }\n }\n\n middlewares = Volt.getRouteMiddlewares(request.route());\n\n if (middlewares != null) {\n // Execute all the before global middleware.\n for (Middleware middleware : middlewares) {\n middleware.before(request, services);\n }\n }\n }\n }",
"void beforeState();",
"@Before(\"com.in28minutes.spring.aop.springaop.CommonJoinPointConfig.dataLayerExecution())\")\n public void before(JoinPoint joinPoint) {\n //you do not need to check access in every class, you can\n // do it here\n\n //ADVICE\n logger.info(\"Check user access\");\n logger.info(\" Intercepted Method Call - {}\", joinPoint);\n }",
"public abstract void initController();",
"public void beforeInit(){\n System.out.println(\"## beforeInit() - Before Init - Called by Bean Post Processor\");\n }",
"@Override\n public void preRun() {\n super.preRun();\n }",
"@Before(\"execution(* com.p.boot.interview.mgmt.rest.resource.*.*(..))\")\r\n\tpublic void before(JoinPoint joinPoint){\r\n\t\t//Advice\r\n\t\tlogger.info(\" Going to execute resource \");\r\n\t\tlogger.info(\r\n\t\t\t\t\"Entered into \"\r\n\t\t\t\t+ joinPoint.getSignature()\r\n\t\t\t\t+ \" method\");\r\n\t\tlogger.info(\" Allowed execution for {}\", joinPoint);\r\n\t}",
"public void doAuthorize() {\n authorizeBehavior.authorizd();\n }",
"@Override\n public void beforeStart() {\n \n }",
"private void before() {\n\t\tSystem.out.println(\"程序开始执行!\");\n\t}",
"@Override\n public void doInit() {\n action = (String) getRequestAttributes().get(\"action\");\n }",
"private void preRequest() {\n\t\tSystem.out.println(\"pre request, i am playing job\");\n\t}",
"@BeforeAll\n public static void executedBeforeAll() {\n System.out.println(\"\\n@Before: executedBeforeall\");\n }",
"private void setUpController(){\n\n SessionController.getInstance().addCommand(new PartyCreateCommand(\"PARTY_CREATE\"));\n SessionController.getInstance().addCommand(new PartyDetailsRetrieveCommand(\"PARTY_DETAILS_RETRIEVE\"));\n SessionController.getInstance().addCommand(new PartyInvitesRetrieveCommand(\"PARTY_INVITES_RETRIEVE\"));\n SessionController.getInstance().addCommand(new PartyLeaveCommand(\"PARTY_LEAVE\"));\n SessionController.getInstance().addCommand(new PartyMemberRemoveCommand(\"PARTY_MEMBER_REMOVE\"));\n SessionController.getInstance().addCommand(new PlayerCreateCommand(\"PLAYER_CREATE\"));\n SessionController.getInstance().addCommand(new PlayerInvitesRetrieveCommand(\"PLAYER_INVITES_RETRIEVE\"));\n SessionController.getInstance().addCommand(new PlayerLogOutCommand(\"PLAYER_LOG_OUT\"));\n }",
"@Override\n protected void before() throws Throwable {\n ClassLoader oldClassLoader = ClassLoaders.setContextClassLoader(STANDALONE.getClass().getClassLoader());\n try {\n Method before = STANDALONE.getClass().getDeclaredMethod(\"before\");\n before.setAccessible(true);\n before.invoke(STANDALONE);\n } finally {\n ClassLoaders.setContextClassLoader(oldClassLoader);\n }\n }",
"protected void init_actions()\n {\n action_obj = new CUP$include$actions(this);\n }",
"@Override\n @Before\n public void before() throws Exception {\n\n super.before();\n }",
"protected void runBeforeTest() {}",
"private void authorize() {\r\n\r\n\t}",
"@Pointcut(\"execution(* com.bharath.spring.mvc.aop.controller.*.*(..))\")\n private void forControllerPackage() {}",
"private void initializeWashControllers() {\n trNewPetWash = WashesControllersFactory.createTrNewPetWash();\n trObtainAllPetWashes = WashesControllersFactory.createTrObtainAllPetWashes();\n trDeleteWash = WashesControllersFactory.createTrDeleteWash();\n trUpdateWash = WashesControllersFactory.createTrUpdateWash();\n }",
"@Before\r\n public void before() throws Exception {\r\n }",
"public void handleInitRequest(ScenarioController scenarioController);",
"protected void declareGlobalActionKeys() {\n\r\n }",
"@Before(\"controllerClassMethods()\")\n\tpublic void logBeforeCall(JoinPoint joinPoint) {\n\t\tSystem.out.println(\"--------------------------------------------------\");\n\t\tSystem.out.println(\"Esto es el @Before de aspect\");\n\t\tSystem.out.println(\"--------------------------------------------------\");\n\t\tlog.info(\"Attempting to Call [{}]:[{}] with Args, {}\",\n\t\t\t\tjoinPoint.getSignature().getDeclaringType().getSimpleName(), joinPoint.getSignature().getName(),\n\t\t\t\tjoinPoint.getArgs());\n\t}",
"@Override\n\tpublic void pre()\n\t{\n\n\t}",
"@Stub\n\tpublic void before()\n\t{\n\t\t//\n\t}",
"@Override\n public void beforeAll(ExtensionContext context) {\n }",
"@Before\r\n\tpublic void init() {\r\n\t\tMockitoAnnotations.initMocks(this);\r\n\t\tmockMvc = MockMvcBuilders.standaloneSetup(tokenController).build();\r\n\r\n\t\t// mockMvc = MockMvcBuilders.webAppContextSetup(context).build();\r\n\t}",
"public void beforeInput() {\n }",
"public void beforeInput() {\n }",
"@Before\r\n\tpublic void setup() {\r\n\t\tthis.mockMvc = MockMvcBuilders.standaloneSetup(brickController).build();\r\n\t}",
"boolean InitController();",
"public void action() {\n action.action();\n }",
"@BeforeMethod\n\tpublic void beforeMethod() {\n\t}",
"@Before\n public void setup(){\n MockitoAnnotations.initMocks(this);\n\n // create a standalone MVC Context to mocking\n mockMvc = MockMvcBuilders.standaloneSetup(customerController).build();\n }",
"protected void runBeforeIterations() {}",
"private void initializeAchievementsControllers() {\n trUpdateMedalProgress = AchievementsControllersFactory.createTrUpdateMedalProgress();\n }",
"@Override\n\tprotected void setController() {\n\t\t\n\t}",
"private void initializeUserControllers() {\n trUpdateUserImage = UserControllersFactory.createTrUpdateUserImage();\n trDeleteUser = UserControllersFactory.createTrDeleteUser();\n trObtainUser = UserControllersFactory.createTrObtainUser();\n trChangePassword = UserControllersFactory.createTrChangePassword();\n trChangeMail = UserControllersFactory.createTrChangeMail();\n trChangeUsername = UserControllersFactory.createTrChangeUsername();\n trExistsUsername = UserControllersFactory.createTrExistsUsername();\n trObtainUserImage = UserControllersFactory.createTrObtainUserImage();\n trSendFirebaseMessagingToken = UserControllersFactory.createTrSendFirebaseMessagingToken();\n }",
"public interface BeforeHandler {\n void execute(Map<String, Object> body,HttpServletRequest request) throws Exception;\n}",
"@Override\n\tpublic void onActionStart(int action) {\n\t\t\n\t}",
"@Override\r\n public void initAction() {\n \r\n }",
"public void before()\n {\n adapter = context.getBean(HandlerAdapter.class);\n }",
"protected static void initializePageActions() throws Exception {\n\t\tloginPageAction = new LoginPageActions(getDriver(), getBaseURL(), getTestSetup());\n\t\tcomplianceReportsPageAction = new ComplianceReportsPageActions(getDriver(), getBaseURL(), getTestSetup());\n\t\tmanageLocationPageActions = new ManageLocationPageActions(getDriver(), getBaseURL(), getTestSetup());\n\t\tsetReportsPage((ComplianceReportsPage)complianceReportsPageAction.getPageObject());\n\t}",
"private void initializeMedicationControllers() {\n trNewPetMedication = MedicationControllersFactory.createTrNewPetMedication();\n trObtainAllPetMedications = MedicationControllersFactory.createTrObtainAllPetMedications();\n trDeleteMedication = MedicationControllersFactory.createTrDeleteMedication();\n trUpdateMedication = MedicationControllersFactory.createTrUpdateMedication();\n }",
"public void includeAction(){\n actions.showActions();\n }",
"@Override\n protected void hookUpActionListeners() {\n }",
"@Before(\"execution(* com.dav.mybatis.controller..*.*(..))\")\n public synchronized void logMethodAccessBefore(JoinPoint joinPoint) {\n log.info(\"***** Starting: \" + joinPoint.getSignature().getName() + \" *****\");\n }",
"@BeforeAll\n public static void beforeAllInit()\n {\n System.out.println(\"Before all initialized .......\");\n }",
"protected void beforeStartManager(Manager manager) {\n }",
"public CreateIndividualPreAction() {\n }",
"protected void runBeforeIteration() {}",
"protected void init_actions()\n {\n action_obj = new CUP$PCLParser$actions(this);\n }",
"private void initializePetControllers() {\n trRegisterNewPet = PetControllersFactory.createTrRegisterNewPet();\n trUpdatePetImage = PetControllersFactory.createTrUpdatePetImage();\n trDeletePet = PetControllersFactory.createTrDeletePet();\n trUpdatePet = PetControllersFactory.createTrUpdatePet();\n trObtainAllPetImages = PetControllersFactory.createTrObtainAllPetImages();\n }",
"@Override\n \tpublic void addActions() {\n \t\t\n \t}",
"public void onStart() {\n /* do nothing - stub */\n }",
"ControllerContext() {\n\t\t// do nothing\n\t}",
"public void preProcess(HttpServletRequest arg0, ContentList contentList) {\n\r\n\t}",
"@Override\r\n\tpublic void before(Method m, Object[] arg1, Object traget) throws Throwable {\n\t\tSystem.out.println(\"Before\"+m.getName() + \" this advice call\" );\r\n\t}",
"@Override\n\tprotected void initial(HttpServletRequest req) throws SiDCException, Exception {\n\t\tLogAction.getInstance().initial(logger, this.getClass().getCanonicalName());\n\t}",
"@Override\n public void action() {\n System.out.println(\"Matchmaker Behaviour\");\n addBehaviour(new RequestToMatchMakerBehaviour());\n\n }",
"@Override\n public void onPre() {\n }",
"protected void beforeJobExecution() {\n\t}",
"private void initializeExerciseControllers() {\n trAddExercise = ExerciseControllersFactory.createTrAddExercise();\n trDeleteExercise = ExerciseControllersFactory.createTrDeleteExercise();\n trUpdateExercise = ExerciseControllersFactory.createTrUpdateExercise();\n trAddWalk = ExerciseControllersFactory.createTrAddWalk();\n trGetAllWalks = ExerciseControllersFactory.createTrGetAllWalks();\n trGetAllExercises = ExerciseControllersFactory.createTrGetAllExercises();\n }",
"@Override\r\n\tpublic void beforePhase(PhaseEvent event) {\n\t\t\r\n\t}",
"public Action<PaymentState, PaymentEvent> preAuthAction(){\n\n// this is where you will implement business logic, like API call, check value in DB ect ...\n return context -> {\n System.out.println(\"preAuth was called !!\");\n\n if(new Random().nextInt(10) < 8){\n System.out.println(\"Approved\");\n\n // Send an event to the state machine to APPROVED the auth request\n context.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.PRE_AUTH_APPROVED)\n .setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, context.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER))\n .build());\n } else {\n System.out.println(\"Declined No Credit !!\");\n\n // Send an event to the state machine to DECLINED the auth request, and add the\n context.getStateMachine().sendEvent(MessageBuilder.withPayload(PaymentEvent.PRE_AUTH_DECLINED)\n .setHeader(PaymentServiceImpl.PAYMENT_ID_HEADER, context.getMessageHeader(PaymentServiceImpl.PAYMENT_ID_HEADER))\n .build());\n }\n };\n }",
"@BeforeMethod\n public void preCondtions() {\n }",
"@Override\n public void beforePhase(PhaseEvent event) {\n\n }"
]
| [
"0.67471445",
"0.67312634",
"0.6649401",
"0.6595362",
"0.6563684",
"0.6554207",
"0.6545339",
"0.65308744",
"0.6400683",
"0.6354094",
"0.6267673",
"0.62483346",
"0.62483346",
"0.61943734",
"0.6189852",
"0.6172478",
"0.6141384",
"0.6121393",
"0.61010826",
"0.60923713",
"0.6085426",
"0.60767436",
"0.60714483",
"0.60505855",
"0.60496455",
"0.5952274",
"0.59296924",
"0.5924708",
"0.5918342",
"0.59144795",
"0.59144795",
"0.5908322",
"0.58939767",
"0.5891219",
"0.5883953",
"0.5883205",
"0.58200586",
"0.5810718",
"0.57978094",
"0.5776656",
"0.5769523",
"0.5749346",
"0.57222337",
"0.57170916",
"0.5696696",
"0.5678322",
"0.5655597",
"0.56508726",
"0.5647722",
"0.56469494",
"0.5631671",
"0.560009",
"0.559818",
"0.5594765",
"0.5588543",
"0.5585416",
"0.5585366",
"0.558241",
"0.5575641",
"0.5561722",
"0.55616015",
"0.55616015",
"0.55561453",
"0.5549531",
"0.5540301",
"0.5536309",
"0.5520753",
"0.55192417",
"0.5516506",
"0.55162513",
"0.5510308",
"0.55052036",
"0.5500278",
"0.5498525",
"0.5493458",
"0.5493194",
"0.5478942",
"0.547459",
"0.54715544",
"0.5459791",
"0.5456482",
"0.54557675",
"0.5434338",
"0.5433181",
"0.5432685",
"0.5430971",
"0.5426784",
"0.5424351",
"0.5420944",
"0.54198974",
"0.5410131",
"0.5409744",
"0.5406644",
"0.5403011",
"0.5402515",
"0.5401462",
"0.5401033",
"0.5399279",
"0.5396656",
"0.5392332"
]
| 0.68801236 | 0 |
Simply selects the home view to render by returning its name. | @Secured("ROLE_USER")
@RequestMapping(value = "/", method = RequestMethod.GET)
public String home(Locale locale, Model model,
@RequestParam(value = "user", defaultValue = "", required = true) String user) {
HomeService homeService = new HomeService();
logger.info("Welcome home! The client locale is {}.", locale);
UserVO userVO = new UserVO();
userVO.setUser_name(user);
System.out.println("어드민은 노작동??");
homeService.getUser(userVO);
System.out.println(userVO);
Date date = new Date();
DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale);
String formattedDate = dateFormat.format(date);
model.addAttribute("serverTime", formattedDate);
return "home";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@GetMapping(Mappings.HOME)\n\tpublic String showHome() {\n\n\t\treturn ViewNames.HOME;\n\t}",
"public String home() {\n if (getUsuario() == null) {\n return \"login.xhtml\";\n }\n // Si el usuario es un ADMINISTRADOR, le lleva a la pagina a la lista de Alumnos\n if (getUsuario().getRol().equals(getUsuario().getRol().ADMINISTRADOR)) {\n return \"ListaAlumnos.xhtml\";\n }\n // Si el usuario es Alumno, le llevará a la página web de INDEX\n // REVISAR\n if (getUsuario().getRol().equals(getUsuario().getRol().ALUMNO)) {\n return \"login.xhtml\";\n }\n return null;\n }",
"public String home() {\n if(getUsuario()==null){\r\n return \"login.xhtml\";\r\n }\r\n \r\n // Si el usuario es un administrador, le lleva a la pagina del listado de apadrinados\r\n if(getUsuario().getRol().equals(getUsuario().getRol().ADMINISTRADOR)){\r\n return \"listaninosapadrinados.xhtml\";\r\n }\r\n \r\n // Si el usuario es socio, le lleva a la pagina de apadrinar\r\n if(getUsuario().getRol().equals(getUsuario().getRol().SOCIO)){\r\n return \"apadrinar.xhtml\";\r\n }\r\n return null;\r\n }",
"@RequestMapping(\"/home\")\n\tpublic String showHome() {\n\t\treturn \"home\";\n\t}",
"public void home_index()\n {\n Home.index(homer);\n }",
"public Class getHomePage() {\n return HomePage.class;\n }",
"public void displayHome() {\n\t\tclearBackStack();\n\t\tselectItemById(KestrelWeatherDrawerFactory.MAP_OVERVIEW, getLeftDrawerList());\n\t}",
"InternationalizedResourceLocator getHomePage();",
"@RequestMapping(value = \"/home\")\n\tpublic String home() {\t\n\t\treturn \"index\";\n\t}",
"public String getHomePage() {\r\n return this.homePage;\r\n }",
"public void toHomeScreen(View view) {\n Intent intent = new Intent(SportHome.this, HomeScreen.class);\n startActivity(intent);\n\n }",
"@RequestMapping(\"/\")\n\tpublic String homePage() {\n\t\tlogger.info(\"Index Page Loaded\");\n\t\treturn \"index\";\n\t}",
"public static final String getHome() { return home; }",
"@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\tpublic String home() {\n\t\treturn \"home\";\n\t}",
"String getOssHomepage();",
"public static Result home() {\n Skier loggedInSkier = Session.authenticateSession(request().cookie(COOKIE_NAME));\n if(loggedInSkier==null)\n return redirect(\"/\");\n else\n return renderHome(loggedInSkier);\n }",
"@RequestMapping(value = {\"/\", \"/home\"}, method = RequestMethod.GET)\n public String goHome(ModelMap model) {\n model.addAttribute(\"loggedinuser\", appService.getPrincipal());\n model.addAttribute(\"pagetitle\", \"Pand-Eco\");\n return \"view_landing_page\";\n }",
"@GetMapping(\"/\")\n\tpublic String showHomePage() {\n\t\treturn \"home\";\n\t}",
"@RequestMapping(\"home\")\n public String loadHomePage( HttpServletRequest request, final HttpServletResponse response, Model model ) {\n response.setHeader( \"Cache-Control\", \"max-age=0, no-cache, no-store\" );\n\n // Get the title of the application in the request's locale\n model.addAttribute( \"title\", webapp.getMessage( \"webapp.subtitle\", null, request.getLocale() ) );\n\n return \"home\";\n }",
"public void homeClicked() {\r\n Pane newRoot = loadFxmlFile(Home.getHomePage());\r\n Home.getScene().setRoot(newRoot);\r\n }",
"@RequestMapping(value = \"/\", method = RequestMethod.GET)\n public String home(Model model, Authentication authentication){\n if(authentication != null) {\n User currUser = customUserDetailsService.findByUsername(authentication.getName());\n model.addAttribute(\"user\", currUser);\n }\n // The string \"Index\" that is returned here is the name of the view\n // (the Index.jsp file) that is in the path /main/webapp/WEB-INF/jsp/\n // If you change \"Index\" to something else, be sure you have a .jsp\n // file that has the same name\n return \"Index\";\n }",
"public void tohome (View view){\n Intent i = new Intent(this,Intro.class);\n startActivity(i);\n }",
"public static String getHome() {\n return home;\n }",
"private void setDefaultView() {\n mDefaultFragment = mHomeFragment;\n mDefaultNavItemSelectionId = R.id.navigation_home;\n\n mNavigationView.setSelectedItemId(mDefaultNavItemSelectionId);\n mCurrentFragment = mDefaultFragment;\n switchFragment();\n setActionBarTitle(mDefaultNavItemSelectionId);\n }",
"private void loadHome(){\n Intent intent = new Intent(this, NameListActivity.class);\n startActivity(intent);\n finish();\n }",
"String home();",
"public void goHomeScreen(View view)\n {\n\n Intent homeScreen;\n\n homeScreen = new Intent(this, homeScreen.class);\n\n startActivity(homeScreen);\n\n }",
"@Override\n public void showHomeView()\n {\n Intent homeView = new Intent(LoginActivity.this, HomeActivity.class);\n startActivity(homeView);\n }",
"public String getHomePage(User currentUser) {\r\n VelocityContext context = getHomePageData(currentUser);\r\n String page = renderView(context, \"pages/home.vm\");\r\n return page;\r\n }",
"public void goHome();",
"@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\n\t public String home()\n\t {\n\t return \"welcome\";\n\t }",
"@Override\n\tpublic int getContentView() {\n\t\treturn R.layout.activity_home;\n\t}",
"public void gotoHome(){ application.gotoHome(); }",
"@RequestMapping(value=\"/\")\r\npublic ModelAndView homePage(ModelAndView model) throws IOException\r\n{\r\n\tmodel.setViewName(\"home\");\r\n\treturn model;\r\n}",
"public abstract int getRootView();",
"public void goToHomePage(View view)\n {\n Intent intent = new Intent( this, HomeActivity.class );\n startActivity( intent );\n }",
"public JTextPane getHomeName() {\n return this.homeName;\n }",
"@RequestMapping(method= RequestMethod.GET, value=\"/staff/home\")\n protected static String getStaffHome() {\n return \"staff-home\";\n }",
"public String homepage() {\n return this.home;\n }",
"@RequestMapping(value=\"/homepage\")\r\npublic ModelAndView homePage1(ModelAndView model) throws IOException\r\n{\r\n model.setViewName(\"home\");\r\n\treturn model;\r\n}",
"@RequestMapping(value=\"/\", method=RequestMethod.GET)\n\tpublic String home() {\n\t\tlogger.info(\"Welcome home!\");\n\t\treturn \"home\";\n\t}",
"public void setHomeName(String homeName) {\n this.homeName.setText(homeName);\n }",
"@RequestMapping(value = { \"/broadband-user\", \"/broadband-user/login\" })\n\tpublic String userHome(Model model) {\n\t\tmodel.addAttribute(\"title\", \"CyberPark Broadband Manager System\");\n\t\treturn \"broadband-user/login\";\n\t}",
"public void showHomeScreen() {\n try {\n FXMLLoader loader1 = new FXMLLoader();\n loader1.setLocation(MainApplication.class.getResource(\"view/HomeScreen.fxml\"));\n AnchorPane anchorPane = (AnchorPane) loader1.load();\n rootLayout.setCenter(anchorPane);\n HomeScreenController controller = loader1.getController();\n controller.setMainApp(this);\n } catch (IOException e) {\n \t\te.printStackTrace();\n \t }\n }",
"public void backHome(View view) {\n Intent intent = new Intent(this, home.class);\n startActivity(intent);\n\n }",
"@Override\n protected int getLayoutId() {\n return R.layout.fragment_home;\n }",
"@RequestMapping(value = \"home.do\", method = RequestMethod.GET)\n public String getHome(HttpServletRequest request, Model model) {\n logger.debug(\"Home page Controller:\");\n return \"common/home\";\n }",
"public String extractHomeView() {\n return (new StringBuilder()\n .append(\"<a href=\\\"/products/details/\" + this.getId() + \"\\\" class=\\\"col-md-2\\\">\")\n .append(\"<div class=\\\"product p-1 chushka-bg-color rounded-top rounded-bottom\\\">\")\n .append(\"<h5 class=\\\"text-center mt-3\\\">\" + this.getName() + \"</h5>\")\n .append(\"<hr class=\\\"hr-1 bg-white\\\"/>\")\n .append(\"<p class=\\\"text-white text-center\\\">\")\n .append(this.getDescription())\n .append(\"</p>\")\n .append(\"<hr class=\\\"hr-1 bg-white\\\"/>\")\n .append(\"<h6 class=\\\"text-center text-white mb-3\\\">$\" + this.getPrice() + \"</h6>\")\n .append(\"</div>\")\n .append(\"</a>\")\n ).toString();\n }",
"@Override\r\n\tpublic String executa(HttpServletRequest req, HttpServletResponse res) throws Exception {\n\t\treturn \"view/home.html\";\r\n\t}",
"public void homeButtonClicked(ActionEvent event) throws IOException {\n Parent homeParent = FXMLLoader.load(getClass().getResource(\"Home.fxml\"));\n Scene homeScene = new Scene(homeParent, 1800, 700);\n\n //gets stage information\n Stage window = (Stage) ((Node) event.getSource()).getScene().getWindow();\n window.setTitle(\"Home Page\");\n window.setScene(homeScene);\n window.show();\n }",
"public void returnHome(View view) {\n Intent intent = new Intent(GameDetailsActivity.this, HomeActivity.class);\n startActivity(intent);\n }",
"public String getHomeClassName()\n {\n if (_homeClass != null)\n return _homeClass.getName();\n else\n return getAPIClassName();\n }",
"@RequestMapping(\"/\")\n\t public String index(Model model){\n\t return \"homepage\";\n\t }",
"@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\tpublic String home(Model model) {\n\t\t// logger.info(\"Welcome home! The client locale is {}.\", locale);\n\t\treturn \"home\";\n\t}",
"@RequestMapping(\"/\")\n\tpublic String welcomeHandler() {\n\n\t\tString viewName = \"welcome\";\n\t\tlogger.info(\"welcomeHandler(): viewName[\" + viewName + \"]\");\n\t\treturn viewName;\n\t}",
"protected String getHomePageTitle() { \n return null; \n }",
"public String home()\n\t{\n\t\treturn SUCCESS;\n\t}",
"@RequestMapping(value=\"/loginForm\", method = RequestMethod.GET)\n\tpublic String home(){\n\n\t\treturn \"loginForm\";\n\t}",
"protected void callHome() {\n\t\tIntent intent = new Intent(this, AdminHome.class);\r\n\t\tstartActivity(intent);\r\n\t}",
"@RequestMapping(value = {\"/\", \"/home\"}, method = RequestMethod.GET)\n public ModelAndView goToHome(Model m) {\n \tModelAndView mav = new ModelAndView(\"home\");\n \treturn mav;\n }",
"public static void selectedHomeScreen(Activity context) {\n\n // Get tracker\n Tracker tracker = ((GlobalEntity) context.getApplicationContext())\n .getTracker(TrackerName.APP_TRACKER);\n if (tracker == null) {\n return;\n }\n\n // Build and send an Event\n tracker.send(new HitBuilders.EventBuilder()\n .setCategory(\"Selected Home Screen\")\n .setAction(\"homeScreenSelect\")\n .setLabel(\n \"homeScreenSelect: \"\n + NavDrawerHomeScreenPreferences\n .getUserHomeScreenChoice(context))\n .build());\n }",
"@Override\n\tpublic int getLayoutId() {\n\t\treturn R.layout.fragment_home;\n\t}",
"View getActiveView();",
"void showHome() {\n\t\tsetContentView(R.layout.home);\r\n\t\tView homeView = findViewById(R.id.home_image);\r\n\t\thomeView.setOnClickListener(new View.OnClickListener() {\r\n\t\t public void onClick(View v) {\r\n\t\t \tstartGame();\r\n\t\t }\r\n\t\t});\r\n\t}",
"public void home() {\n\t\tUserUI ui = new UserUI();\n\t\tui.start();\n\t}",
"private void navigateToDefaultView() {\n\t\tif (navigator!=null && \"\".equals(navigator.getState())) {\n\t\t\t// TODO: switch the view to the \"dashboard\" view\n\t\t}\n\t}",
"@GetMapping(\"/homePage\")\n public String homePage(final Model model) {\n LOGGER.debug(\"method homePage was invoked\");\n model.addAttribute(\"listCarMakes\", carMakeProvider.getCarMakes());\n return \"homepage\";\n }",
"@RequestMapping(method = RequestMethod.GET)\r\n public String home(ModelMap model) throws Exception\r\n {\t\t\r\n return \"Home\";\r\n }",
"@FXML\r\n private void goHomeScreen(ActionEvent event) {\n Stage stage = (Stage) mainGridPane.getScene().getWindow();\r\n\r\n //load up WelcomeScene FXML document\r\n Parent root = null;\r\n try {\r\n root = FXMLLoader.load(getClass().getResource(\"WelcomeChipScene.fxml\"));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n Scene scene = new Scene(root, 1024, 720);\r\n stage.setTitle(\"Restaurant Reservation System\");\r\n stage.setScene(scene);\r\n stage.show();\r\n }",
"public void goHome(View view) {\n String toastString = \"go home...\";\n Toast.makeText(FriendsList.this,toastString, Toast.LENGTH_SHORT).show();\n\n //TODO\n // go to list screen....\n Intent goToNextScreen = new Intent (this, AccountAccess.class);\n final int result = 1;\n startActivity(goToNextScreen);\n }",
"public void switchToHomeScreen() {\n Intent startMain = new Intent(Intent.ACTION_MAIN);\n startMain.addCategory(Intent.CATEGORY_HOME);\n startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(startMain);\n }",
"public URI getHome() {\n return this.homeSpace;\n }",
"public final String getViewName() {\n\t\treturn viewName;\n\t}",
"@RequestMapping(value = \"/\", method = RequestMethod.GET)\r\n\tpublic String index(Model model) {\r\n\r\n\t\treturn \"home\";\r\n\t}",
"public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"HomeView Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }",
"protected Object getHome()\r\n/* 75: */ throws NamingException\r\n/* 76: */ {\r\n/* 77:159 */ if ((!this.cacheHome) || ((this.lookupHomeOnStartup) && (!isHomeRefreshable()))) {\r\n/* 78:160 */ return this.cachedHome != null ? this.cachedHome : lookup();\r\n/* 79: */ }\r\n/* 80:163 */ synchronized (this.homeMonitor)\r\n/* 81: */ {\r\n/* 82:164 */ if (this.cachedHome == null)\r\n/* 83: */ {\r\n/* 84:165 */ this.cachedHome = lookup();\r\n/* 85:166 */ this.createMethod = getCreateMethod(this.cachedHome);\r\n/* 86: */ }\r\n/* 87:168 */ return this.cachedHome;\r\n/* 88: */ }\r\n/* 89: */ }",
"public void launchHomePage() {\n Intent intent = new Intent(LoginActivity.this, HomeActivity.class);\n startActivity(intent);\n }",
"public abstract String getView();",
"@RequestMapping(value = \"/home\", method = RequestMethod.GET)\n\tpublic String openhomePage() {\n/*\t\tlogger.debug(\"Inside Instruction page\");\n*/\t\treturn \"home\";\n\t}",
"private Home getHome(final Context ctx)\r\n {\r\n return (Home) ctx.get(this.homeKey_);\r\n }",
"protected String getView() {\r\n/* 216 */ return \"/jsp/RoomView.jsp\";\r\n/* */ }",
"@RequestMapping(value = \"/\", method = RequestMethod.GET)\n public String home(Locale locale, Model model)\n {\n System.out.println(\"Home \" + service.getName());\n model.addAttribute(\"name\", service.getName());\n return \"home\";\n }",
"public String getView(String viewName) {\n\t\t\n\t\treturn prefix + viewName + suffix;\n\t}",
"@Override\n public int getLayout() {\n return R.layout.activity_home;\n }",
"private void CallHomePage() {\n\t\t\n\t\tfr = new FragmentCategories();\n\t\tFragmentManager fm = getFragmentManager();\n\t\tFragmentTransaction fragmentTransaction = fm.beginTransaction();\n\t\tfragmentTransaction.replace(R.id.fragment_place, fr);\n\t\tfragmentTransaction.addToBackStack(null);\n\t\tfragmentTransaction.commit();\n\n\t}",
"@Override\r\n\tpublic String getViewIdentifier() {\n\t\treturn ClassUtils.getUrl(this);\r\n\t}",
"public java.lang.String getViewName() {\r\n return viewName;\r\n }",
"public String toWelcome() {\r\n\t\treturn \"/secured/fragenpool.xhtml\";\r\n\t}",
"@Test\n public void testHome() {\n GenericServiceMockup<Person> personService = new GenericServiceMockup<Person>();\n homeController.setPrivilegeEvaluator(mockup);\n homeController.setPersonBean(personService);\n ModelAndView result = homeController.home();\n assertEquals(\"Wrong view name for exception page\", HomeController.HOME_VIEW, result.getViewName());\n }",
"public String getViewName() {\n return viewName;\n }",
"@Override\n\tpublic String getViewIdentifier() {\n\t\treturn ClassUtils.getUrl(this);\n\t}",
"@Override\n\tpublic String getViewIdentifier() {\n\t\treturn ClassUtils.getUrl(this);\n\t}",
"public String getView();",
"public String getView();",
"public String getViewName() {\n return viewName;\n }",
"public void goTo(View view) {\n if (stage != null) {\n try {\n Parent root = FXMLLoader.load(getClass().getResource(\"../ui/\" + view.toString() + \".fxml\"));\n stage.setTitle(APP_NAME);\n stage.setScene(new Scene(root, APP_WIDTH, APP_HEIGHT));\n stage.show();\n } catch (IOException e) {\n System.err.println(\"The view \" + \"../ui/\" + view.toString() + \".fxml\" + \" doesn't exist.\");\n e.printStackTrace();\n }\n }\n }",
"public void goToHome() {\n navController.navigate(R.id.nav_home);\n }",
"@RequestMapping(value= {\"/flight-home\",\"/\"})\n\tpublic ModelAndView flightSearchPage() {\n\t\treturn new ModelAndView (\"home\");\n\t}",
"public void homeButtonClicked(ActionEvent event) throws IOException {\n\t\tSystem.out.println(\"Loading Home...\");\n\t\tAnchorPane pane = FXMLLoader.load(getClass().getResource(\"HomeFXML.fxml\"));\n\t\trootPane.getChildren().setAll(pane);\n\t\t\n\t}",
"public Home clickonHome()\n\t{\n\t\tdriver.findElement(By.xpath(home_xpath)).click();\n\t\treturn new Home(driver);\n\t}",
"private void openHome() {\n Intent intent = new Intent(this, WelcomeActivity.class);\n startActivity(intent);\n\n finish();\n }"
]
| [
"0.6819594",
"0.6264309",
"0.62159723",
"0.6201521",
"0.6198399",
"0.6187909",
"0.6151758",
"0.61228037",
"0.6120205",
"0.610317",
"0.60107136",
"0.6008739",
"0.59784985",
"0.5976386",
"0.5941382",
"0.59348583",
"0.59226644",
"0.5905844",
"0.5904103",
"0.5879214",
"0.5858803",
"0.58093745",
"0.58088934",
"0.58026075",
"0.58003354",
"0.5759494",
"0.57517624",
"0.57493037",
"0.5748849",
"0.57280064",
"0.57250947",
"0.57216734",
"0.5719073",
"0.56983334",
"0.56963545",
"0.5685644",
"0.5685627",
"0.5683984",
"0.5681187",
"0.5669517",
"0.5662236",
"0.5645227",
"0.5640115",
"0.56249446",
"0.5612721",
"0.5611999",
"0.55943364",
"0.55814797",
"0.5561007",
"0.55594087",
"0.5550495",
"0.5544936",
"0.55445933",
"0.55443245",
"0.55355054",
"0.5526398",
"0.55179465",
"0.55168974",
"0.5513729",
"0.5512892",
"0.5507205",
"0.5505189",
"0.5502731",
"0.55011755",
"0.5491711",
"0.54783314",
"0.5471381",
"0.5460273",
"0.5460181",
"0.5450608",
"0.5436762",
"0.54353005",
"0.5433689",
"0.5418436",
"0.5417458",
"0.5413596",
"0.5406757",
"0.54058254",
"0.5404544",
"0.54036623",
"0.53972876",
"0.53965867",
"0.53835505",
"0.53798014",
"0.5379446",
"0.53599346",
"0.5342699",
"0.534211",
"0.5333958",
"0.53252655",
"0.5321729",
"0.5321729",
"0.5320508",
"0.5320508",
"0.53190213",
"0.5314257",
"0.5313289",
"0.5304765",
"0.5302871",
"0.5300623",
"0.52957004"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
protected int getLayoutId() {
return R.layout.activity_music;
} | {
"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
protected void initView() {
iv_content = (ImageView) findViewById(R.id.music_content);
iv_music = (ImageView) findViewById(R.id.music_me_iv);
iv_queen = (ImageView) findViewById(R.id.music_queen_iv);
tv_music = (TextView) findViewById(R.id.music_me_tv);
tv_queen = (TextView) findViewById(R.id.music_queen_tv);
iv_music.setOnClickListener(this);
iv_queen.setOnClickListener(this);
bitmap=DisplayUtil.readBitMap(getApplicationContext(), R.drawable.music_part1);
iv_content.setImageBitmap(bitmap);
} | {
"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
protected void initParams() {
} | {
"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
protected void showFisrtDialog() {
boolean isFirst=LocalApplication.getInstance().sharereferences.getBoolean("music", false);
if(isFirst){ showAlertDialog(showString(R.string.app_Music),
showString(R.string.music_dialog),
new String[] {showString(R.string.no_dialog), showString(R.string.yes_dialog)}, true, true, null);}
LocalApplication.getInstance().sharereferences.edit().putBoolean("music", false).commit();
} | {
"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 onClick(View v) {
switch (v.getId()) {
case R.id.music_me_iv:
iv_content.setImageBitmap(bitmap);
iv_music.setImageResource(R.drawable.music_pressed);
iv_queen.setImageResource(R.drawable.queen);
tv_music.setTextColor(getResources().getColor(
R.color.selected_music_text));
tv_queen.setTextColor(getResources().getColor(
R.color.unselected_calendar_text));
break;
case R.id.music_queen_iv:
iv_content.setImageBitmap(DisplayUtil.readBitMap(getApplicationContext(), R.drawable.music_part2));
iv_music.setImageResource(R.drawable.music_unpressed);
iv_queen.setImageResource(R.drawable.queen_unpressed);
tv_music.setTextColor(getResources().getColor(
R.color.unselected_calendar_text));
tv_queen.setTextColor(getResources().getColor(
R.color.selected_music_text));
break;
}
} | {
"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
protected void addToControl(Composite control) {
} | {
"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 |
Create a new empty list | public InsertNode() {
head = new DoublyLinkedList(Integer.MIN_VALUE, null, null);
tail = new DoublyLinkedList(Integer.MIN_VALUE, null, null);
head.setNext(tail);
length = 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static <T> List<T> createList() {\n\t\treturn Collections.emptyList();\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n public void createList() {\r\n items = new int[MAX_LIST];\r\n NumItems = 0;\r\n }",
"abstract protected Object newList( int capacity );",
"public void makeEmpty() {\r\n\t\tArrays.fill(list, -1);\r\n\t}",
"public List() {\n this.list = new Object[MIN_CAPACITY];\n this.n = 0;\n }",
"public List()\n {\n list = new Object [10];\n }",
"List() {\n final int ten = 10;\n list = new int[ten];\n size = 0;\n }",
"List() {\n this.length = 0;\n }",
"ListType createListType();",
"public static LinkedList createEmpty(){\n return new LinkedList();\n }",
"public List()\n\t{\n\t\tthis(null, null);\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n \tpublic List() {\r\n \t\titems = (T[]) new Object[INIT_LEN];\r\n \t\tnumItems = 0;\r\n \t\tcurrentObject = 0;\r\n \t}",
"@SuppressWarnings(\"unchecked\" )\n public static <T> ConstList<T> make() {\n return emptylist;\n }",
"private Lists() { }",
"private static List<Student> createEmptyList(DataStructureChoice dsChoice) {\r\n\r\n\t\tList<Student> foo = null; /** declared using an Interface declaration */\r\n\t\t\r\n\t\tswitch ( dsChoice ) {\r\n\t\tcase JAVA_ARRAY_LIST:\r\n\t\t\tfoo = new ArrayList<Student>();\r\n\t\t\tbreak;\r\n\t\tcase JAVA_LINKED_LIST:\r\n\t\t\tfoo = new LinkedList<Student>();\r\n\t\t\tbreak;\r\n\t\tcase CSC205_LINKED_LIST:\r\n\t\t\tfoo = new CSC205_Project_1_Linked_List<Student>();\r\n\r\n\t\t\tCSC205_Project_1_Linked_List<Student> fooAlias = \r\n\t\t\t\t\t(CSC205_Project_1_Linked_List<Student>) foo;\r\n\r\n\t\t\tbridges.setDataStructure( fooAlias.getDummyHeader() ); \r\n\r\n\t\t\t/** highlight the dummy header node in red */\r\n\t\t\tfooAlias.getDummyHeader().getVisualizer().setColor( \"RED\" );\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tSystem.out.println ( \"Illegal choice of data structure\");\r\n\t\t\tSystem.exit(1); // abort the program\r\n\t\t}\r\n\t\treturn foo;\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n public ArrayList() {\n list = (E[])new Object[DEFAULT_CAP];\n capacity = 10;\n size = 0;\n }",
"public MyArrayList ()\r\n {\r\n \tlist = new Object[100];\r\n \tnumElements = 0;\r\n }",
"List<Wine> emptyMethodReturnList(){\n return List.of();\n }",
"@Nonnull\n public static <T> PlayList<T> empty()\n {\n return new PlayList<>();\n }",
"public List<New> list();",
"public ArrayList() {\n elements = new Object[DEFAULT_CAPACITY];\n }",
"public MutiList() {\n\t\tsuper();\n\t\tthis.myList = new ArrayList<>();\n\t}",
"public TempList() {\n list = new ArrayList<T>();\n }",
"public void makeEmpty() {\n for (int i = 0; i < buckets.length; i++) {\n buckets[i] = new SList();\n }\n size = 0;\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList () {\n\t\tcapacity = 10;\n\t\tsize = 0;\n\t\tlist = (E[]) new Object[capacity];\n\t}",
"public MyArrayList() {\r\n\t\tthis.list=new Object[this.capacity];\r\n\t}",
"@Test\n\tpublic void createListWithInitialCapacity() {\n\t\tList<String> list1 = new ArrayList<>();\n\n\t\t// You can set capacity using constructor of ArrayList\n\t\tList<String> list2 = new ArrayList<>(20);\n\n\t\tassertTrue(list1.isEmpty());\n\t\tassertTrue(list2.isEmpty());\n\t\tassertTrue(list1.equals(list2));\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList() {\n\t\tsize = 0;\n\t\tlist = (E[]) new Object[INIT_SIZE];\n\t}",
"private void createLoanList() {\n\t\tArrayList<Object> loans = new ArrayList<Object>(Arrays.asList(loanArray));\n\t\tfor (int i = 0; i < loans.size(); i++)\n\t\t\tif (((Loan) loans.get(i)).getFineAmount() == 0)\n\t\t\t\tloans.remove(i);\n\t\tlist = new LoanList();\n\t\tlist.setItems(loans);\n\t\tadd(list);\n\t}",
"myArrayList() {\n\t\thead = null;\n\t\ttail = null;\n\t}",
"public static ImmutableIntList of() {\n return EMPTY;\n }",
"public list() {\r\n }",
"protected <V> List<V> newObject(Collection<V> initialValues) {\n return new ArrayList<>(initialValues);\n }",
"public List() {\n\t\tthis.head = null; \n\t}",
"public ListHolder()\n {\n this.list = new TestList(15, false);\n }",
"public AList() {\n items = (TypeHere[]) new Object[100];\n size = 0;\n }",
"private void initList() {\n\n }",
"public void emptyList() {\n coursesTaken = new ArrayList<CourseTaken>();\r\n }",
"public static <T> List<T> createList (T... args) {\n\tif (args == null) { return new ArrayList<T>(); };\n\treturn new ArrayList<T>(Arrays.asList(args));\n }",
"public static <T>\n LazyList<T> empty() {\n return EMPTY;\n }",
"public AList() {\n size = 0;\n items = (Item[]) new Object[100];\n }",
"public AList() {\n size = 0;\n items = (Item[]) new Object[100];\n }",
"public ArrayList() { // constructs list with default capacity\n this(CAPACITY);\n }",
"public List hardList() {\r\n List result = new ArrayList();\r\n\r\n for (int i=0; i < size(); i++) {\r\n Object tmp = get(i);\r\n\r\n if (tmp != null)\r\n result.add(tmp);\r\n }\r\n\r\n return result;\r\n }",
"abstract void makeList();",
"public Builder clearList() {\n list_ = com.google.protobuf.LazyStringArrayList.EMPTY;\n bitField0_ = (bitField0_ & ~0x08000000);\n onChanged();\n return this;\n }",
"public ArrayList()\n {\n list = new int[SIZE];\n length = 0;\n }",
"public ArrayList() {\n arr = (T[]) new Object[10];\n size = 0;\n }",
"public MyArrayList() {\n elements = new Object[DEFAULT_CAPACITY];\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList() {\n\t\tObject[] oList = new Object[INIT_SIZE];\n\t\tlist = (E[]) oList;\n\t\tsize = INIT_SIZE;\n\t}",
"public Lista()\n {\n empty=true;\n next = null;\n }",
"public ListStack() {\n\t\tlist = new ArrayList<>();\n\t}",
"public linkedList() { // constructs an initially empty list\r\n\r\n }",
"public List(){\n\t\tthis(\"list\", new DefaultComparator());\n\t}",
"public static <T> List<T> getOrEmptyList(List<T> list) {\n return list == null ? Collections.emptyList() : list;\n }",
"public TempList(int n) {\n list = new ArrayList<T>(n >= 0 ? n : 0);\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList1() {\n\t\telements = (E[]) new Object[CAPACITY];\n\t\tsize = 0;\n\t}",
"@SuppressWarnings(\"unchecked\")\n public ArrayList(int initialCap) {\n list = (E[])new Object[0];\n capacity = initialCap;\n size = 0;\n }",
"@Before\n public void createSimpleList() {\n testList = new SimpleList();\n }",
"public SmartList() {\n size = 0;\n storage = null;\n }",
"public SimpleArrayList() {\n this.values = new Object[SimpleArrayList.DEFAULT_SIZE];\n }",
"public ArrayList() {\n\t\tthis.elements = new Object[5];\n\t\tthis.last = -1;\n\t}",
"public ArrayJList() {\n this(DEFAULT_CAPACITY);\n }",
"public ArrayList() {\n //sets an array with no length\n this.array = (E[]) new Object[0];\n }",
"public static <T> ArrayList<T> createArrayList() {\n \t\treturn new ArrayList<T>();\n \t}",
"public void makeEmpty() {\n System.out.println(\"List is now empty\");\n head = null;\n tail = null;\n\n }",
"ArrayListOfStrings () {\n list = new ArrayList<String>();\n }",
"public SimpleList(int capacity) {\n this.values = new Object[capacity];\n }",
"public ContactList()\n {\n myList = new ArrayList<>();\n }",
"private ContentProposalList getEmptyProposalArray() {\n\t\treturn new ContentProposalList();\n\t}",
"private static <T> List<T> list(T... elements) {\n return ImmutableList.copyOf(elements);\n }",
"public StudentList() {\r\n\t\t\r\n\t\tlist = new Student[GROW_SIZE];\r\n\t}",
"private void addToEmptyList(T data) {\n this.first = this.last = new Node(data);\n this.nrOfElements++;\n }",
"public NumericObjectArrayList() {\r\n list = new Copiable[10];\r\n count = 0;\r\n }",
"private ArrayList<String> initList(String[] vastitems){\n return new ArrayList<>(Arrays.asList(vastitems));\n }",
"public void makeEmpty() {\n defTable = new DList[sizeBucket];\n for(int i=0; i<sizeBucket; i++) {\n defTable[i] = new DList();\n }\n size = 0;\n }",
"public TreeList()\n {\n\t this.lst = new AVLTree();\n\t this.length = 0;\n }",
"public SLList()\n {\n head = tail = null;\n }",
"public static ElementInsertionList create()\n {\n return new ElementInsertionList();\n }",
"public LinkedJList() {\n this(DEFAULT_CAPACITY);\n }",
"public MyArrayList() {\n\t\tthis(EXTRA_SPACE);\n\t}",
"public ArrayList(int initCapacity) {\n elements = new Object[initCapacity];\n }",
"public ArrayList() {\n\t\tthis(10, 75);\n\t}",
"@SuppressWarnings(\"unchecked\")\n \tpublic static <T> List<T> createConcurrentList() {\n \t\treturn (List<T>) Collections.synchronizedList(createArrayList());\n \t}",
"public static java.util.List singletonList(java.lang.Object arg0)\n { return null; }",
"protected void newPlayerList() {\n int len = getPlayerCount();\n mPlayerStartList = new PlayerStart[ len ];\n for(int i = 0; i < len; i++) {\n mPlayerStartList[i] = new PlayerStart( 0.f, 0.f );\n }\n }",
"public void initializeList() {\n listitems.clear();\n int medicationsSize = Medications.length;\n for(int i =0;i<medicationsSize;i++){\n Medication Med = new Medication(Medications[i]);\n listitems.add(Med);\n }\n\n }",
"private void createList(String[] toAdd) {\n FixData fixedList;\n for (int i = 0; i < toAdd.length; ++i) {\n fixedList = new FixData(toAdd[i]);\n if (pickAdjacent(fixedList))\n this.head = createListWrap(this.head, fixedList);\n else\n fixedList = null;\n }\n }",
"public static <T> List<T> createList(T item1) {\n\t\tList<T> list = new ArrayList<T>();\n\t\tlist.add(item1);\n\t\treturn list;\n\t}",
"@Override\n public List<Object> list() {\n return null;\n }",
"private MyIntegerList generatedPopulatedList() {\n final MyIntegerList mil = new MyIntegerList();\n\n mil.push(1);\n mil.push(2);\n mil.push(1);\n mil.push(6);\n mil.push(6);\n mil.push(7);\n mil.push(2);\n mil.push(2);\n mil.push(0);\n mil.push(5);\n\n return mil;\n }",
"public MyArrayList() {\n data = new Object[10];\n }",
"public OccList()\n {\n int capacity = 8;\n data = new Occ[capacity];\n // initialize data with empty occ\n for (int i=0; i<capacity; i++) data[i] = new Occ(); \n }",
"public List<Person> createPersonListUsingNew() {\n return names.stream()\n // .parallel()\n .map(Person::new)\n .collect(LinkedList::new, // Supplier<LinkedList>\n LinkedList::add, // BiConsumer<LinkedList,Person>\n LinkedList::addAll); // BiConsumer<LinkedList,LinkedList>\n }",
"public UtillLinkList() {\n\t\tlist = new LinkedList<String>();\n\t}",
"Listof<X> toList();",
"private static <T> List<T> m971u(List<T> list) {\n return list == null ? Collections.emptyList() : list;\n }",
"@BeforeEach\n public void createList() {\n myListOfInts = new ArrayListDIY<>(LIST_SIZE);\n listOfInts = new ArrayList<>(LIST_SIZE);\n\n getRandomIntStream(0,10).limit(LIST_SIZE)\n .forEach(elem -> {\n listOfInts.add(elem);\n myListOfInts.add(elem);\n });\n }",
"public IntList() { // doesn't HAVE to be declared public, but doesn't hurt\n theList = new int[STARTING_SIZE];\n size = 0;\n }",
"public ListPolygone() {\n this.list = new ArrayList();\n }",
"public DLList() {\r\n init();\r\n }"
]
| [
"0.781724",
"0.7377329",
"0.7079245",
"0.7001087",
"0.6987521",
"0.69816965",
"0.6968267",
"0.69659066",
"0.6955798",
"0.69459873",
"0.69338584",
"0.68774647",
"0.6852056",
"0.68337125",
"0.6826514",
"0.68082464",
"0.67918867",
"0.6771026",
"0.6721837",
"0.6717258",
"0.67111313",
"0.6705215",
"0.6656128",
"0.6635165",
"0.6627193",
"0.66178125",
"0.6616919",
"0.66075385",
"0.65945035",
"0.6589017",
"0.65740687",
"0.6542509",
"0.6512972",
"0.64999557",
"0.6489293",
"0.64869237",
"0.6485143",
"0.6468932",
"0.64685726",
"0.64635843",
"0.6447813",
"0.6447813",
"0.64446926",
"0.6437423",
"0.64172626",
"0.6410377",
"0.64020324",
"0.6400455",
"0.63960445",
"0.63833165",
"0.6365928",
"0.63575447",
"0.63473606",
"0.6343729",
"0.63430965",
"0.63366127",
"0.63099086",
"0.63031656",
"0.62898344",
"0.6285068",
"0.6281118",
"0.6263851",
"0.6237915",
"0.62350315",
"0.62262475",
"0.62177706",
"0.6209654",
"0.6208503",
"0.62032425",
"0.6179275",
"0.6175185",
"0.6173566",
"0.6155951",
"0.6142332",
"0.61358476",
"0.61321974",
"0.6128676",
"0.6123822",
"0.6113726",
"0.6112785",
"0.61102396",
"0.61037636",
"0.6102982",
"0.60988766",
"0.6089989",
"0.6087116",
"0.60750854",
"0.60746014",
"0.6066721",
"0.6061673",
"0.6052621",
"0.6051119",
"0.605056",
"0.6023148",
"0.60105956",
"0.60102016",
"0.60094565",
"0.59998244",
"0.599586",
"0.5992946",
"0.59893596"
]
| 0.0 | -1 |
Get value at current position | public int get(int position) {
return Integer.MIN_VALUE;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int get(int pos) {\n if (pos != 0) {\n return this.nextNode.get(pos - 1);\n } else {\n return this.value;\n }\n }",
"public T get(int pos);",
"public Object getValue(int index);",
"abstract public Object getValue(int index);",
"protected E value(Position<Item<E>> p) {\n return p.getElement().getValue();\n }",
"T get(int position);",
"public Number getValue() {\n return currentVal;\n }",
"public Integer getPosition();",
"@Override\r\n\tpublic double getValue(int index) {\n\t\tif (data==null) return 0;\r\n\t\t\r\n\t\tdouble d = 0;\r\n\t\tint begin=index+pos;\r\n\t\tif (begin<0) begin=0;\r\n\t\tif (begin>data.size()-1) begin = data.size()-1;\r\n\t\td = data.get(begin).getOpen();\r\n\t\t\r\n\t\treturn d;\r\n\t}",
"public Integer getValueAt(Integer position)\r\n {\r\n Integer value = -1;\r\n if(fixedValueMap.containsKey(position))\r\n {\r\n value = fixedValueMap.get(position).getValue();\r\n }\r\n else if(otherValueMap.containsKey(position))\r\n {\r\n value = otherValueMap.get(position);\r\n }\r\n return value;\r\n }",
"public int getValue();",
"public int getValue();",
"int getValue();",
"int getValue();",
"int getValue();",
"int getValue();",
"int getValue();",
"String getCurrentValue();",
"public int getValue(){\n return this.value;\n }",
"public Object currValue();",
"public E valueAt (int pos) {\n\t\tif (pos >= count || pos < 0) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tNode<E> n = head;\n\t\t\tfor (int i = 0; i < count; i++) {\n\t\t\t\tif (i == pos) {\n\t\t\t\t\treturn n.value;\n\t\t\t\t} else {\n\t\t\t\t\tn = n.next;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public int getValue() \n {\n return value;\n }",
"public int getValue() {\r\n return index;\r\n }",
"public int getValue() \n {\n return value;\n }",
"public byte getValueAt(int position) {\r\n\r\n\t\tif (position >= values.length) {\r\n\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\"Index must be less than \" + values.length);\r\n\t\t}\r\n\r\n\t\treturn values[position];\r\n\t}",
"V getValue();",
"V getValue();",
"V getValue();",
"public int getValue ()\r\n\t{\r\n\t\treturn (m_value);\r\n\t}",
"public int getValue()\n {\n return value;\n }",
"public K get()\n {\n\treturn current.data(); \n }",
"public T getValue() {\r\n return getValue(interval.start);\r\n }",
"public int getValue()\r\n {\r\n return value;\r\n }",
"public int getValue () {\n return value;\n }",
"public int getCurrentValue() {\n\t\treturn this.currentValue;\n\t}",
"public int getPosition() {\n\treturn (_current);\n }",
"public int getValue() {\r\n return value;\r\n }",
"public int getValue() {\r\n return value;\r\n }",
"public int getValue(){\n return value;\n }",
"public Integer getValue();",
"public S getValue() { return value; }",
"@Override\n public V getValue() {\n return m_value;\n }",
"public V getValue()\r\n\t\t{\r\n\t\t\treturn val;\r\n\t\t}",
"public int PositionGet();",
"public int readValue() { \n\t\treturn (port.readRawValue() - offset); \n\t}",
"public double getCurrent( )\r\n {\r\n\t double element = 0; \r\n\t if(isCurrent() != true){// Student will replace this return statement with their own code:\r\n\t throw new IllegalStateException (\"no current element, getCurrent may not be called\");\r\n\t }\r\n\t else\r\n\t \t element = element + (cursor.getData()) ;\r\n\t return element; \r\n }",
"public int getValue(int row, int column);",
"public V getValue() {\r\n\t\treturn value;\r\n\t}",
"@Override\n public T get(int position) {\n if (!validate(position)) {\n throw new ArrayIndexOutOfBoundsException(\"Bad position!\");\n }\n return (T) this.values[position];\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue()\n {\n return value;\n }",
"public int getValue() {\r\n return value;\r\n }",
"public int getValue(){\n\t\treturn value;\n\t}",
"double getValueAt(int x, int y);",
"Integer getValue();",
"Integer getValue();",
"@Override\n public int get(int index) {\n checkIndex(index);\n return getEntry(index).value;\n }",
"Object getValueFrom();",
"public Object getValue() { return _value; }",
"public int value() { \n return this.value; \n }",
"V getValue() {\n return value;\n }",
"@Override\n\t\tpublic V getValue(){\n\t\t\treturn value;\n\t\t}",
"public int getX(){\n return this.position[0];\n }",
"float get(int idx);",
"public int value() {\n\t\treturn offset;\n\t}",
"public int getValue() {\n return value_;\n }",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"public int getValue() {\r\n return Value;\r\n }",
"public Object getValue(){\n \treturn this.value;\n }",
"default V get() {\n V item = orElseNull();\n if ( item == null )\n throw new IllegalArgumentException(\"No item at the targeted position!\");\n return item;\n }",
"public final T getValue() {\n return this.getValue(this.getBuffer());\n }",
"@Override\n \tpublic IValue getValue() {\n \t\treturn this;\n \t}",
"public V getValue();",
"protected V getValue() {\n return this.value;\n }",
"public int getValue()\n\t{\n\t\treturn value;\n\t}",
"public int getValue()\n\t{\n\t\treturn value;\n\t}",
"public int getValue()\n\t{\n\t\treturn value;\n\t}",
"public int getValue() {\n return this.value;\n }",
"public V getValue() {\n return value;\n }",
"public V getValue() {\n return value;\n }",
"@Override\n\t\tpublic V getValue() {\n\t\t\treturn v;\n\t\t}",
"public Object getValue()\n {\n Object[] a = (Object[]) getArray().getValue();\n int i = ((Number) getIndex().getValue()).intValue();\n\n return a[i];\n }",
"synchronized public long peek() {\n return currValue;\n }",
"@Override\r\n public int intValue() {\r\n return (int) this.m_current;\r\n }",
"public V getValue() {\n\t\treturn value;\n\t}",
"public V getValue() {\n\t\treturn value;\n\t}",
"public Object getValue() { return this.value; }",
"public int getValue() {\n return _value;\n }",
"public int getValue()\n {\n return mi_value;\n }"
]
| [
"0.7508066",
"0.7188398",
"0.71091115",
"0.71004635",
"0.71002316",
"0.70071095",
"0.6988833",
"0.6986016",
"0.69640785",
"0.69639283",
"0.6953581",
"0.6953581",
"0.69042003",
"0.69042003",
"0.69042003",
"0.69042003",
"0.69042003",
"0.6902151",
"0.6862313",
"0.68163997",
"0.68101364",
"0.67887366",
"0.67767626",
"0.6770881",
"0.6770456",
"0.6765769",
"0.6765769",
"0.6765769",
"0.6758498",
"0.67474097",
"0.6733447",
"0.6723281",
"0.67179924",
"0.671216",
"0.6705183",
"0.67010754",
"0.670022",
"0.669604",
"0.6693945",
"0.6678091",
"0.6674822",
"0.66723365",
"0.6669299",
"0.66515005",
"0.66477543",
"0.66437566",
"0.6637789",
"0.6633658",
"0.663011",
"0.66290796",
"0.66290796",
"0.66290796",
"0.66290796",
"0.66290796",
"0.66290796",
"0.6624631",
"0.6624414",
"0.6618307",
"0.66129357",
"0.6612101",
"0.6612101",
"0.66114074",
"0.6610754",
"0.66038275",
"0.6603342",
"0.6599196",
"0.6598606",
"0.6590174",
"0.6588287",
"0.65871894",
"0.65820026",
"0.6580387",
"0.6580387",
"0.6580387",
"0.6580387",
"0.6580387",
"0.6580387",
"0.6580387",
"0.6579618",
"0.65787894",
"0.6578166",
"0.6577813",
"0.657568",
"0.6573731",
"0.65659386",
"0.6563178",
"0.6563178",
"0.6563178",
"0.65628946",
"0.65598917",
"0.65598917",
"0.6557487",
"0.6552895",
"0.6550602",
"0.65478307",
"0.65453863",
"0.65453863",
"0.6541273",
"0.6536872",
"0.6532315"
]
| 0.6917049 | 12 |
Find the position of the node value that is equal to the specified value. | public int getPosition(int data) {
DoublyLinkedList temp = head;
int pos = 0;
while (temp != null) {
if (temp.getData() != data) {
pos += 1;
temp = temp.getNext();
} else {
// as the specific node is found, return it.
return pos;
}
}
return Integer.MIN_VALUE;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic int find(int pValueToFind) {\n\t\tfor (int n = 0; n < pointer; ++n) {\n\t\t\tif (values[n] == pValueToFind) {\n\t\t\t\t// this returns the index position\n\t\t\t\treturn n;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}",
"public int searchByValue(T value) {\n Node<T> currNode = head;\n int index = 0;\n if (null != currNode) {\n while ((null != currNode.next) || (null != currNode.data)) {\n if (currNode.data == value) {\n break;\n }\n currNode = currNode.next;\n if (null == currNode) {\n return -1;\n }\n index++;\n }\n }\n return index;\n }",
"public SudokuCell getPositionForValue(int value)\n {\n SudokuCell ret=null;\n for(int i=0;i<SudokuConstants.GRID_SIZE;i++)\n {\n for(int j=0;j<SudokuConstants.GRID_SIZE;j++)\n {\n SudokuCell cell=_cells[i][j];\n Integer cellValue=cell.getValue();\n if ((cellValue!=null) && (cellValue.intValue()==value))\n {\n ret=cell;\n break;\n }\n }\n if (ret!=null)\n {\n break;\n }\n }\n return ret;\n }",
"private int compareValueToNodeValue(@NotNull T value, @NotNull Node<T> node) {\n return node == head ? 1 : (node == tail ? -1 : value.compareTo(node.value));\n }",
"public int find(int value) {\n \t\tfor (int i=0; i<data.length; i++) {\n \t\t\tif (data[i]==value) return i;\n \t\t}\n \t\t\t\n \t\treturn -1;\n \t}",
"public int search(T value) {\n\t\tif(head!=null) {\n\t\t\tNode<T> current=head;\n\t\t\tint i=0;\n\t\t\twhile(current!=null && current.getValue()!=value) {\n\t\t\t\ti++;\n\t\t\t\tcurrent=current.getNext();\n\t\t\t}\n\t\t\tif(i >= size) return -1;\n\t\t\treturn i;\n\t\t}\n\t\treturn -1;\n\t}",
"public int findItem(int value) {\n return find(value, root);\n }",
"public int indexOf()\n {\n\treturn indexOfValue(mValue);\n }",
"public int getPosition(String v) {\n\t\t\t// go looking for the data\n\t\t\tElementDPtr temp = head;\n\t\t\tint pos = 0;\n\t\t\twhile (temp != null) {\n\t\t\t\tif (temp.getValue().equals(v)) {\n\t\t\t\t\t// return the position if found\n\t\t\t\t\treturn pos;\n\t\t\t\t}\n\t\t\t\tpos += 1;\n\t\t\t\ttemp = temp.getNext();\n\t\t\t}\n\t\t\t// else return -1\n\t\t\treturn Integer.MIN_VALUE;\n\t\t}",
"public T search(T value) {\n\n if (root.getValue().compareTo(value) == 0) return root.getValue();\n else return searchRecursively(root, value).getValue();\n }",
"private int indexValue(String value) {\n int loc = openHashCode(value);\n //if the searchVal exist\n if (this.openHashSetArray[loc] == null||!this.openHashSetArray[loc].myList.contains(value))\n return -1;\n else\n return loc;\n\n }",
"public int getIndexOfTokenValue(int value) {\n int left = 0;\n int right = tokens.size() - 1;\n\n while (left <= right) {\n int mid = (left + right) / 2;\n if (tokens.get(mid).getValue() == value) {\n return mid;\n }\n if (tokens.get(mid).getValue() > value) {\n right = mid - 1;\n } else {\n left = mid + 1;\n }\n }\n return -1;\n }",
"public int indexOf(Object value) {\n Element element = _headAndTail.getNext();\n for (int i = 0; i < _size; i++) {\n if (value.equals(element.getValue())) {\n return i;\n }\n element = element.getNext();\n }\n return -1;\n }",
"@Override\r\n public int locate(Copiable value) {\r\n for (int i = 0; i < count; i++) {\r\n if (list[i].equals(value)) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n }",
"public int search(char value)\n {\n for(int i = 0; i < this.raw_value.length; i++)\n {\n if(this.raw_value[i] == value) return i;\n }\n return -1;\n }",
"protected int search(double value) {\n int n = sequence.size();\n int left = 0, right = n - 1, index = 0;\n while (left != right) {\n index = (right - left) / 2 + left;\n if (value >= sequence.get(index == left ? index + 1 : index)) {\n left = index == left ? index + 1 : index;\n } else {\n right = index;\n }\n }\n while (left > 0 && value == sequence.get(left - 1)) {\n left -= 1;\n }\n return left;\n }",
"@Override\n\tpublic int indexOf(Object value) {\n\t\tListNode<L> current=this.first;\n\t\tfor(int i=0;i<this.size;i++) {\n\t\t\tif(current.storage==value) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t\tcurrent=current.next;\n\t\t}\n\t\treturn -1;\n\t\n\t}",
"public boolean searchNode(int value) \n { \n return searchNode(header.rightChild, value); \n }",
"public Node find(int val) {\r\n\r\n\t\tif (root == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tNode currentNode = root;\r\n\r\n\t\twhile (!currentNode.isLeaf()) {\r\n\t\t\tif (currentNode.getKey() == val) {\r\n\t\t\t\treturn currentNode;\r\n\t\t\t}\r\n\r\n\t\t\tif (val < currentNode.getKey()) {\r\n\t\t\t\tcurrentNode = currentNode.getLeftChild();\r\n\t\t\t} else {\r\n\t\t\t\tcurrentNode = currentNode.getRightChild();\r\n\t\t\t}\r\n\t\t\tif (currentNode == null) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (currentNode.getKey() == val) {\r\n\t\t\treturn currentNode;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public BSTNode search(int value){ //The value to search for.\n BSTNode current = root;\n \n // While we don't have a match\n while(current!=null){\n \n // If the value is less than current, go left.\n if(value < current.value){\n current = current.left;\n }\n \n // If the value is more than current, go right.\n else if(value > current.value){\n current = current.right;\n }\n \n // We have a match!\n else{\n break;\n }\n }\n return current;\n }",
"public int indexOf(int value) {\n\t\tint index = 0;\n\t\tListNode current = front;\n\t\twhile (current != null) {\n\t\t\tif (current.data == value) {\n\t\t\t\treturn index;\n\t\t\t}\n\t\t\tindex++;\n\t\t\tcurrent = current.next;\n\t\t}\n\t\treturn -1;\n\t}",
"int indexOfChild(TreeNodeValueModel<T> child);",
"public Node searchItemAtNode(Node start, int value) {\n if (start == null)\n return null;\n if (value < start.value)\n return searchItemAtNode(start.left, value);\n if (value > start.value)\n return searchItemAtNode(start.right, value);\n\n return start;\n }",
"public void searchNode(int value) {\n int i = 1;\n boolean flag = false;\n Node current = head;\n if (head == null) {\n System.out.println(\"List is empty\");\n return;\n }\n while (current != null) {\n if (current.data == value) {\n flag = true;\n break;\n }\n current = current.next;\n i++;\n }\n if (flag)\n System.out.println(\"Node is present in the list at the position::\" + i);\n else\n System.out.println(\"Node is note present in the list\");\n }",
"Node search(int reqNodeValue){\r\n\t\tNode reqNode = this.root ;\r\n\t\t \r\n\t\twhile(reqNode != null && reqNode.value != reqNodeValue) {\r\n\t\t\tif(reqNode.value < reqNodeValue) {\r\n\t\t\t\treqNode = reqNode.right ; \r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treqNode = reqNode.left ;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(reqNode == null) {\r\n\t\t\tSystem.out.println(\"No such node exists in the tree\");\r\n\t\t}\r\n\t\treturn reqNode;\r\n\t}",
"public BiNode findLeaf( int value )\n {\n return _root.findLeaf( value );\n }",
"public String linearSearchForValue(int value) {\n String indexWithValue = \"\";\n boolean found = false;\n for(int i= 0; i < arraySize; i++){\n if(theArray[i] == value){\n found = true;\n indexWithValue += i + \" \";\n }\n printHorizontalArray(i, -1);\n }\n\n if(!found){\n indexWithValue = \"None\";\n }\n System.out.println(\"The value was found in the following: \" + indexWithValue);\n System.out.println();\n\n return indexWithValue;\n }",
"private int find(int p1, int p2) {\n return id[p1 - 1][p2 - 1]; // find the current value of a node\n }",
"private static <V> int buscarPosicion(V pValue, V[] pArray) {\n for (int x = 0; x < pArray.length; x++) {\n if (pArray[x].equals(pValue)) {\n return x;\n }\n }\n return -1;\n }",
"public void search(int value, Node start) {\r\n\t\tif (start == null) {\r\n\t\t\tSystem.out.println(\"node is not found\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (value == start.value) {\r\n\t\t\tSystem.out.println(\"node is found\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (value == start.value) {\r\n\t\t\tSystem.out.println(\"node is found\");\r\n\t\t}\r\n\r\n\t\t// if value is greater than current node value, it will be set to right\r\n\t\t// side\r\n\t\tif (value > start.value) {\r\n\t\t\tsearch(value, start.right);\r\n\t\t}\r\n\r\n\t\t// if value is less than current node value, it will be set to left side\r\n\t\tif (value < start.value) {\r\n\t\t\tsearch(value, start.left);\r\n\t\t}\r\n\t}",
"public int valuePosition(int[] arr, int x) {\n for (int i = 0; i < arr.length; i++)\n if (arr[i] == x) {\n return i;\n }\n return x;\n }",
"Integer getIndexOfGivenValue(String value) {\n Integer index = null;\n for (IndexValuePair indexValuePair : indexValuePairs) {\n if (indexValuePair.getValue().equals(value)) {\n index = indexValuePair.getIndex();\n break;\n }\n }\n return index;\n }",
"public double getPosition(double value) {\n return getRelPosition(value) * (size - nanW - negW - posW) + (min < max ? negW : posW);\n }",
"public static int findValue(int [] array, int value){\n int index = -1;\n for(int i = 0; i < array.length; i++){\n if(value == array[i]){\n index = i + 1;\n System.out.println(Arrays.toString(array));\n }\n }\n return index;\n }",
"public int indexOf(final Object value) {\n\t\tint position = -1;\n\t\tfor (int i = 0; i < this.size; i++) {\n\t\t\tif (elements[i].equals(value)) {\n\t\t\t\tposition = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn position;\n\t}",
"public HTreeNode find (char value) {\r\n HTreeNode listrunner = getHeadNode();\r\n while (listrunner != null && listrunner.getCharacter() != value) {\r\n listrunner = listrunner.getNext();\r\n }\r\n return listrunner;\r\n }",
"private MsoSmartArtNodePosition(int value) { this.value = value; }",
"private int findPos(String x) {\n\t int offset = 1;\n\t int currentPosition = myhash(x);\n\t \n\t while (array[currentPosition] != null && !array[currentPosition].element.getContent().equals(x)) {\n\t currentPosition += offset; // Compute ith probe\n\t offset += 2;\n\t if(currentPosition >= array.length)\n\t currentPosition -= array.length;\n\t }\n\t \n\t return currentPosition;\n\t }",
"int getIndexOfElement(T value);",
"public void searchNode(int value) { \r\n int i = 1; \r\n boolean flag = false; \r\n //Node current will point to head \r\n Node current = head; \r\n \r\n //Checks whether the list is empty \r\n if(head == null) { \r\n System.out.println(\"List is empty\"); \r\n return; \r\n } \r\n while(current != null) { \r\n //Compare value to be searched with each node in the list \r\n if(current.data == value) { \r\n flag = true; \r\n break; \r\n } \r\n current = current.next; \r\n i++; \r\n } \r\n if(flag) \r\n System.out.println(\"Node is present in the list at the position : \" + i); \r\n else \r\n System.out.println(\"Node is not present in the list\"); \r\n }",
"public Reference search(int val) { // completely not sure\n\t\tReference ref = null;\n\t\t// This method will call findPtrIndex(val)\n\t\t// which returns the array index i, such that the ith pointer in the node points to the subtree containing val.\n\t\t// It will then call search() recursively on the node returned in the previous step.\n\t\tint ptrIndex = findPtrIndex(val);\n\t\tNode subNode = ptrs[ptrIndex];\n\t\tref = subNode.search(val); // return the reference pointing to a leaf node.\n\t\treturn ref;\n\t}",
"private int findIndex(String value) {\n\tint index = 0;\n\tfor (int i = 0; i < getData().length && index == 0;) {\n\t if (value.compareTo(getData()[i]) <= 0) {\n\t\tindex = i;\n\t }\n\t else {\n\t\ti++;\n\t }\n\t}\n\treturn index;\n }",
"public MyBinNode findNodeByValue(Type val){\n MyBinNode aux = this.root;\n while(aux.value.compareTo(val) != 0){\n if(aux.value.compareTo(val) > 0){\n aux = aux.left;\n }else{\n aux = aux.right;\n }\n if(aux == null){\n return null;\n }\n }\n return aux;\n }",
"Node successor(T value) {\n Node x = search(value);\n if (x.value.compareTo(value) > 0) return x;\n else return successor(x);\n }",
"@Contract(pure = true)\n default int indexOf(Object value) {\n int idx = 0;\n if (value == null) {\n for (E e : this) {\n if (null == e) {\n return idx;\n }\n ++idx;\n }\n } else {\n for (E e : this) {\n if (value.equals(e)) {\n return idx;\n }\n ++idx;\n }\n }\n return -1;\n }",
"public boolean find(int value) {\n\t for(Map.Entry<Integer,Integer> entry:map.entrySet){\n\t\t int key = entry.getKey();\n\t\t int num = entry.getValue();\n\t\t int offset = value-key;\n\t\t if((offset==key&&num>1)||(offset!=key&&!map.containsKey(offset))){\n\t\t\t return true;\n\t\t }\n\t }\n\t return false;\n\t}",
"protected int findIndex(A val) {\n int index = 0;\n boolean found = false;\n \n \n if (elems[0] == null || elems[0] == val){\n return index;\n }\n else{\n \n }\n \n \n\n return index; \n }",
"public SkipNode find(String k, Integer val) {\n SkipNode node = head;\n\n while(true) {\n // Search right until a larger entry is found\n while( (node.right.key) != SkipNode.posInf && (node.right.value).compareTo(val) <= 0 ) {\n node = node.right;\n }\n\n // If possible, go down one level\n if(node.down != null)\n node = node.down;\n else\n break; // Lowest level reached\n }\n\n /**\n * If k is FOUND: return reference to entry containing key k\n * If k is NOT FOUND: return reference to next smallest entry of key k\n */\n return node;\n }",
"private Integer getKey(WeatherData value)\n\t{\n\t for(Integer key : trainDataXMap.keySet())\n\t {\n\t if(trainDataXMap.get(key).equals(value))\n\t {\n\t return key; //return the first found\n\t }\n\t }\n\t return null;\n\t}",
"private int findPos( AnyType x )\n {\n int offset = 1;\n int currentPos = myhash( x );\n \n while( array[ currentPos ] != null &&\n !array[ currentPos ].key.equals( x ) )\n {\n currentPos += offset; // Linear probing.\n if( currentPos >= array.length )\n currentPos -= array.length;\n }\n \n return currentPos;\n }",
"public int getPosition(int data) {\n\t\t// go looking for the data\n\t\tListNode temp = head;\n\t\tint pos = 0;\n\t\twhile (temp != null) {\n\t\t\tif (temp.getData() == data) {\n\t\t\t\t// return the position if found\n\t\t\t\treturn pos;\n\t\t\t}\n\t\t\tpos += 1;\n\t\t\ttemp = temp.getNext();\n\t\t}\n\t\t// else return -1\n\t\treturn Integer.MIN_VALUE;\n\t}",
"public boolean search(T value) {\n if (value.hashCode() == this.value.hashCode()) {\n return true;\n }\n if (value.hashCode() > this.value.hashCode()) {\n return this.right.search(value);\n }\n if (value.hashCode() < this.value.hashCode()) {\n return this.left.search(value);\n }\n return false;\n }",
"public int indexOf(E value) {\n\t\tif (isEmpty()) {\n\t\t\treturn -1;\n\t\t}\n\t\tfor (int i = 0; i < size(); i++) {\n\t\t\tif (((Person) get(i)).equalsPerson((Person) value)) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}",
"public int getPosition(int data) {\n\t\tListNode temp = head;\n\t\tint pos = 0;\n\t\twhile (temp != null) {\n\t\t\tif (temp.getData() == data) {\n\t\t\t\treturn pos;\n\t\t\t}\n\t\t\tpos += 1;\n\t\t\ttemp = temp.getNext();\n\t\t}\n\t\treturn Integer.MIN_VALUE;\n\t}",
"public boolean find(int val) {\n\t\tif (isEmpty()) {\n\t\t\tthrow new IllegalArgumentException(\"Tree is empty\");\n\t\t}\n\t\tNode curr = root;\n\t\t while(curr != null) {\n\t\t\t if (curr.val == val) {\n\t\t\t\t return true;\n\t\t\t }else if (curr.val < val) {\n\t\t\t\t curr = curr.right;\n\t\t\t }else {\n\t\t\t\t curr = curr.left;\n\t\t\t }\n\t\t}\n\t\t return false;\n\t\t\n\t}",
"public Integer search(String k, Integer val) {\n SkipNode node = find(k, val);\n\n if( k.equals(node.getKey()) ) {\n System.out.println(k + \" found\");\n return node.value;\n }\n else {\n System.out.println(k + \" NOT FOUND\");\n return null;\n }\n }",
"public Point getCoordinates(int val) {\r\n\t\tfor(int i = 0; i < rows_size; i++) {\r\n\t\t\tfor(int j = 0; j < columns_size; j++) {\r\n\t\t\t\tif(game[i][j].getValue() == val)\r\n\t\t\t\t\treturn new Point(i,j);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new Point(-1,-1);\r\n\t}",
"public int indexOf(Object value) {\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (elements[i].equals(value)) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}",
"public static MsoSmartArtNodePosition valueOf(int value) {\r\n switch(value) {\r\n case 1: return msoSmartArtNodeDefault;\r\n case 2: return msoSmartArtNodeAfter;\r\n case 3: return msoSmartArtNodeBefore;\r\n case 4: return msoSmartArtNodeAbove;\r\n case 5: return msoSmartArtNodeBelow;\r\n default: return new MsoSmartArtNodePosition(value);\r\n }\r\n }",
"public int inorderSuccessor(Node node, int value){\n Node startNode = findNode(node, value);\n if (startNode.right != null){\n // case 1: node has right subtree: find min node in right subtree\n return findMinValue(startNode.right);\n } else {\n // case 2: node has no right subtree: go to nearest ancestor for which given node would be in left subtree.\n Node successor = null;\n Node ancestor = node;\n while (ancestor != startNode){\n if (startNode.value <= ancestor.value) {\n successor = ancestor;\n ancestor = ancestor.left;\n } else {\n ancestor = ancestor.right;\n }\n }\n if (successor != null){\n return successor.value;\n } else {\n // successor not found, return -1.\n return -1;\n }\n }\n }",
"private int findNodeLocation(int data) {\n\t\tint index = -1;\n\t\tNode currentElement = headNode;\n\t\tint counter = 0;\n\t\tif(currentElement!=null) {\n\t\t\tif(currentElement.getData()==data) {\n\t\t\t\tSystem.out.println(\" Found the Element, \"\n\t\t\t\t\t\t+ \" which is at the Head of the LinkedList \");\n\t\t\t\treturn 0;\n\t\t\t} else {\n\t\t\t\twhile(currentElement.getNextNode()!=null) {\n\t\t\t\t\tcurrentElement = currentElement.getNextNode();\n\t\t\t\t\tcounter++;\n\t\t\t\t\tif(currentElement.getData()==data) {\n\t\t\t\t\t\tSystem.out.println(\" The Element is Found at the Index \"+ counter);\n\t\t\t\t\t\treturn counter;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//If the Element is found at the Last Element, return the Last Element's index\n\t\t\t\tif(currentElement.getData()==data) {\n\t\t\t\t\treturn counter++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn index;\n\t}",
"public static int indexOfValue(long value)\n {\n\tif (value >= 0 && value <= 15)\n\t return (int)value;\n\telse\n\t return -1;\n }",
"private int get(int pos) {\n if (pos != 0) {\n return this.nextNode.get(pos - 1);\n } else {\n return this.value;\n }\n }",
"public Node searchSubTreeByValue(String value){\n\t\tArrayList<Node> childNodes = new ArrayList<Node>();\n\t\tchildNodes = this.getChildren(); // get children\n\t\tlastFounded = null;\n\t\tfor(Node resNode : childNodes){ // for each child\n\t\t\tif(resNode.value.equals(value)){ // if we find the searched value\n\t\t\t\tif(resNode.getChildren()==null){\n\t\t\t\t\treturn resNode;// we return the node if it has no children\n\t\t\t\t}else{// 50% to return the node if it has children\n\t\t\t\t\tlastFounded = resNode;// we save the node in case we don't find any matching not later.\n\t\t\t\t\treturn (new Random().nextInt(2)==0?resNode:resNode.searchSubTreeByValue(value));\n\t\t\t\t}\n\t\t\t\t//return resNode;\n\n\t\t\t}else if(resNode.getChildren()!=null && resNode.getChildren().size()>0){ // if node has children but has not value searched\n\t\t\t\treturn resNode.searchSubTreeByValue(value); // Recursively search value\n\t\t\t}\n\t\t}\n\t\tif(lastFounded != null)// if we founded matching nodes, we return the last matching node founded\n\t\t\treturn lastFounded;\n\t\treturn this.getSubTree(-1); // if we didn't find any matching node, we take random node \n\t}",
"public static int Find(int[] array, int value) {\r\n\t\tint j = -1;\r\n\t\tfor (int i = 0; i < array.length; i++) {\r\n\t\t\tif (array[i] == value) {\r\n\t\t\t\tj = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn j;\r\n\t}",
"boolean containsValue(Object toFind)\n\t\t{\n\t\t\tif(value != null && toFind.equals(value))\n\t\t\t\treturn true;\n\t\t\tif(nextMap == null)\n\t\t\t\treturn false;\n\t\t\tfor(Node<T> node : nextMap.values())\n\t\t\t\tif(node.containsValue(toFind))\n\t\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t}",
"public Reference search (String val) {\n Node nextPtr = ptrs[this.findPtrIndex(val)];\n return nextPtr.search(val);\n }",
"public Integer getPosition();",
"@Override\n public Optional<Node<E>> findBy(E value) {\n Optional<Node<E>> rsl = Optional.empty();\n Queue<Node<E>> data = new LinkedList<>();\n data.offer(this.root);\n while (!data.isEmpty()) {\n Node<E> el = data.poll();\n if (el.eqValue(value)) {\n rsl = Optional.of(el);\n break;\n }\n for (Node<E> child : el.leaves()) {\n data.offer(child);\n }\n }\n return rsl;\n }",
"public K searchKey (V value) {\n\t\tfor (Map.Entry<K, V> entry : this.entrySet()) {\n\t\t\tif (entry.getValue().equals(value)) {\n\t\t\t\treturn entry.getKey();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public int indexOf(Object val) {\n Integer idx = hmap.get(val);\n if (idx == null)\n return -1;\n return idx.intValue();\n }",
"public static <E extends Comparable> TreeNode<E> findNode(TreeNode<E> root, E value) {\r\n TreeNode node = root;\r\n \r\n while(node != null) {\r\n int compare = value.compareTo(node.getValue());\r\n \r\n if(compare == 0) {\r\n return node;\r\n } else if(compare < 0) {\r\n node = node.getLeft();\r\n } else {\r\n node = node.getRight();\r\n }\r\n }\r\n \r\n return null;\r\n }",
"private Tile getTileByValue(int value) {\n\t\tfor (int i = 0; i < gameSize; i++)\n\t\t\tfor (int j = 0; j < gameSize; j++)\n\t\t\t\tif (gameTiles.getTile(i, j).getValue() == value)\n\t\t\t\t\treturn gameTiles.getTile(i, j);\n\n\t\treturn null;\n\t}",
"private int valueToPos( final double value )\n\t{\n\t\tfinal double dmin = range.getMinBound();\n\t\tfinal double dmax = range.getMaxBound();\n\t\treturn ( int ) Math.round( ( value - dmin ) * SLIDER_LENGTH / ( dmax - dmin ) );\n\t}",
"public int findPositionInorder(int[]inOrder,int value){\r\n \tint place = 0;\r\n \twhile(inOrder[place] != value){\r\n \t\tplace++;\r\n \t}\r\n \treturn place;\r\n }",
"public static PositionConfidence valueOf(long value)\n {\n\tint inx = indexOfValue(value);\n\t\n\tif (inx < 0)\n\t return null;\n\telse\n\t return cNamedNumbers[inx];\n }",
"private int getPositionInList(Node n) \n\t//PRE: Node n is initialized\n\t//POST: FCTVAL == the position of the Node n in the list\n\t{\n\t\tNode<T> tmp = start;\n\t\tint count = 0;\t//set counter variable to keep track of position\n\t\twhile(tmp != n) //while current node != to node being searched for\n\t\t{\n\t\t\tif(count > length) //make sure position is not greater than max size of list\n\t\t\t{\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tcount++;\t//increment position\n\t\t\ttmp = tmp.next;\t//move to next element\n\t\t}\n\t\treturn count;\t//return count which is the position of the node n in the list\n\t}",
"protected int searchLeft(double value) {\n int i = search(value);\n while (i > 0 && value == sequence.get(i - 1)) {\n i -= 1;\n }\n return i;\n }",
"@Override\n public Optional<Node<T>> findBy(T value) {\n Optional<Node<T>> rsl = Optional.empty();\n Queue<Node<T>> data = new LinkedList<>();\n data.offer(this.root);\n while (!data.isEmpty()) {\n Node<T> el = data.poll();\n if (el.eqValues(value)) {\n rsl = Optional.of(el);\n break;\n }\n for (Node<T> child : el.leaves()) {\n data.offer(child);\n }\n }\n return rsl;\n }",
"public E valueAt (int pos) {\n\t\tif (pos >= count || pos < 0) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tNode<E> n = head;\n\t\t\tfor (int i = 0; i < count; i++) {\n\t\t\t\tif (i == pos) {\n\t\t\t\t\treturn n.value;\n\t\t\t\t} else {\n\t\t\t\t\tn = n.next;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public BinaryNode<T> find(T v);",
"public boolean search(int value)\n{\n if(head==null)\n return false;\nelse\n{\n Node last=head;\n while(last.next!=null)\n{\n if(last.data==value)\n return true;\n\nlast=last.next;\n}\nreturn false;\n}\n}",
"@Override\n\tpublic int compareTo(Node o) {\n\t\treturn (int) (this.value - o.value);\n\t}",
"private static int getMappingValue(ArrayList<Integer[]> mapTable, int listOrder, int value) {\n // Define Mapping Order\n int mapIndex;\n if (listOrder == 1){\n mapIndex = 1;\n }else{\n mapIndex = 0;\n }\n // Go through the Whole List\n for(Integer[] item: mapTable) {\n if (item[listOrder - 1] == value){\n return item[mapIndex];\n }\n }\n return value;\n }",
"int indexOf(Object value);",
"int indexOf(Object value);",
"public void binarySearchForValue(int value) {\n int lowIndex = 0;\n int highIndex = arraySize - 1;\n\n while (lowIndex <= highIndex) {\n int middleIndex = (highIndex + lowIndex) / 2;\n\n if (theArray[middleIndex] < value) {\n lowIndex = middleIndex + 1;\n } else if (theArray[middleIndex] > value) {\n highIndex = middleIndex - 1;\n } else {\n System.out.println(\"\\nFound a match for \" + value + \" at index \" + middleIndex);\n lowIndex = highIndex + 1;\n }\n\n printHorizontalArray(middleIndex, -1);\n }\n }",
"public boolean find(int value) {\n \t\n \tfor(int num : map.keySet()) {\n \t\tint target = value - num;\n \t\tif(map.containsKey(target)) {\n \t\t\tif(num != target || map.get(target) == 2)\n \t\t\t\treturn true;\n \t\t}\n \t}\n return false;\n }",
"private int findCoordElementRegular(double coordValue, boolean bounded) {\n int n = orgGridAxis.getNcoords();\n if (n == 1 && bounded)\n return 0;\n\n double distance = coordValue - orgGridAxis.getCoordEdge1(0);\n double exactNumSteps = distance / orgGridAxis.getResolution();\n // int index = (int) Math.round(exactNumSteps); // ties round to +Inf\n int index = (int) exactNumSteps; // truncate down\n\n if (bounded && index < 0)\n return 0;\n if (bounded && index >= n)\n return n - 1;\n\n // check that found point is within interval\n if (index >= 0 && index < n) {\n double lower = orgGridAxis.getCoordEdge1(index);\n double upper = orgGridAxis.getCoordEdge2(index);\n if (orgGridAxis.isAscending()) {\n assert lower <= coordValue : lower + \" should be le \" + coordValue;\n assert upper >= coordValue : upper + \" should be ge \" + coordValue;\n } else {\n assert lower >= coordValue : lower + \" should be ge \" + coordValue;\n assert upper <= coordValue : upper + \" should be le \" + coordValue;\n }\n }\n\n return index;\n }",
"boolean searchValueExists(int i){\t\r\n\t\tthis.searchedNode = search(this.root, i);\r\n\t\tif(this.searchedNode != null){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"Node predecessor(T value) {\n Node x = search(value);\n if (x.value.compareTo(value) < 0) return x;\n else return predecessor(x);\n }",
"public int GetPosition()\n {\n int position = -1;\n\n double CurrentDistance = GetDistance();\n\n for (int i = 0; i < Positions.length; i++)\n {\n // first get the distance from current to the test point\n double DistanceFromPosition = Math.abs(CurrentDistance\n - Positions[i]);\n\n // then see if that distance is close enough using the threshold\n if (DistanceFromPosition < PositionThreshold)\n {\n position = i;\n break;\n }\n }\n\n return position;\n }",
"public boolean checkIfExists(int value) {\n HomogeneusNode HomogeneusNode = root;\n while (HomogeneusNode != null) {\n if (value == HomogeneusNode.getData()) {\n return true;\n } else if (value < HomogeneusNode.getData()) {\n HomogeneusNode = HomogeneusNode.getLeft();\n } else {\n HomogeneusNode = HomogeneusNode.getRight();\n }\n }\n return false;\n\n }",
"private int findNearestValue(final int i, final double key) {\n\n\t\tint low = 0;\n\t\tint high = m_NumValues[i];\n\t\tint middle = 0;\n\t\twhile (low < high) {\n\t\t\tmiddle = (low + high) / 2;\n\t\t\tdouble current = m_seenNumbers[i][middle];\n\t\t\tif (current == key) {\n\t\t\t\treturn middle;\n\t\t\t}\n\t\t\tif (current > key) {\n\t\t\t\thigh = middle;\n\t\t\t} else if (current < key) {\n\t\t\t\tlow = middle + 1;\n\t\t\t}\n\t\t}\n\t\treturn low;\n\t}",
"public int find(Object o) {\n int currentIndex = 0;\n int index = -1;\n ListNode current = start;\n while(current != null) {\n if (o.equals(current.data)) {\n index = currentIndex;\n break;\n }\n currentIndex++;\n current = current.next;\n }\n return index;\n }",
"protected int searchRight(double value) {\n int i = search(value);\n while (i < sequence.size() - 1 && value == sequence.get(i + 1)) {\n i += 1;\n }\n return i;\n }",
"public static int getPosition(int toFind, ArrayList<Integer> arr) {\n int leftBound = 0;\n int rightBound = arr.size() - 1;\n int lastOk = -1;\n int mid;\n while (leftBound <= rightBound) {\n mid = (leftBound + rightBound) / 2;\n if (arr.get(mid) == toFind) {\n return mid;\n } else {\n if (arr.get(mid) < toFind) {\n leftBound = mid + 1;\n } else {\n rightBound = mid - 1;\n }\n }\n }\n return -1;\n }",
"public Integer numEqualTo(Integer value){\n\t\treturn blocks.getLast().numEqualTo(value);\n\t}",
"private RegressionTreeNode traverseNominalNode(Serializable value) {\n\t\tif(value.equals(this.value)){\n\t\t\treturn this.leftChild;\n\t\t}else{\n\t\t\treturn this.rightChild;\n\t\t}\n\t}",
"K findKeyForValue(V val);"
]
| [
"0.73732275",
"0.7033524",
"0.7015125",
"0.6737099",
"0.663256",
"0.65719527",
"0.65700436",
"0.65689844",
"0.6510296",
"0.6479885",
"0.64393014",
"0.6427701",
"0.637646",
"0.6337829",
"0.6332241",
"0.63290906",
"0.6319604",
"0.6265717",
"0.6249059",
"0.62086517",
"0.6185783",
"0.6132191",
"0.6112349",
"0.6111277",
"0.60588485",
"0.60547256",
"0.60382277",
"0.60265714",
"0.601553",
"0.60109735",
"0.60006",
"0.5987731",
"0.595985",
"0.5945296",
"0.59327203",
"0.5906521",
"0.5903032",
"0.5883153",
"0.5861874",
"0.5854854",
"0.58390856",
"0.5837735",
"0.58302104",
"0.58209133",
"0.58104247",
"0.5804244",
"0.5797563",
"0.57882154",
"0.5746491",
"0.57459754",
"0.5736987",
"0.57200277",
"0.5703161",
"0.5673493",
"0.56722116",
"0.56476194",
"0.5627163",
"0.5611261",
"0.56082654",
"0.5603544",
"0.5597962",
"0.5567725",
"0.5536434",
"0.5530938",
"0.5521011",
"0.5514294",
"0.5507028",
"0.55002207",
"0.5496961",
"0.54896426",
"0.5483994",
"0.548314",
"0.54798174",
"0.546243",
"0.5441359",
"0.5435163",
"0.54312974",
"0.54283965",
"0.54133266",
"0.54119855",
"0.5406585",
"0.54052836",
"0.53943104",
"0.5386957",
"0.5385829",
"0.5385829",
"0.5377884",
"0.5369076",
"0.5368026",
"0.53669095",
"0.53640014",
"0.5356563",
"0.53532726",
"0.5336863",
"0.5331589",
"0.53196496",
"0.53194934",
"0.5318349",
"0.5309191",
"0.5303865"
]
| 0.5674486 | 53 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.